Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Service-like wrapper #2

Open
Chainfire opened this issue Jan 5, 2019 · 1 comment
Open

Create a Service-like wrapper #2

Chainfire opened this issue Jan 5, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Chainfire
Copy link
Owner

Chainfire commented Jan 5, 2019

Some feel a Service-like wrapper that makes usage more transparent would be a good idea. This is certainly possible to create.

Currently, the following things are analogous between librootjava and Android Service:

  • (client) Use a su library to execute getLaunchScript() vs context.bindService()
  • (client) Use a RootIPCReceiver instead of a ServiceConnection
  • (server) Implement main method instead of a Service class

(this could probably go into the docs as well)

Creating a Service-class-like wrapper will likely hide some functionalities, but those are probably only relevant to the most advanced users.

Foreseen difficulties:

  • Create wrappers that work with both normal and daemon services. This would be tricky if the wrapper is an additional library, but easy if the wrappers are included in both existing libraries itself.
  • Execute the script as root without directly depending on libsuperuser, libsu, or whatever root library the user may be using. This will probably either need an additional library plugin per root library, optionally using reflection to support the base ones out-of-the-box.
@Chainfire Chainfire added the enhancement New feature or request label Jan 5, 2019
@Polster64319
Copy link

Some feel a Service-like wrapper that makes usage more transparent would be a good idea. This is certainly possible to create.

Currently, the following things are analogous between librootjava and Android Service:

  • (client) Use a su library to execute getLaunchScript() vs context.bindService()
  • (client) Use a RootIPCReceiver instead of a ServiceConnection
  • (server) Implement main method instead of a Service class

(this could probably go into the docs as well)

Creating a Service-class-like wrapper will likely hide some functionalities, but those are probably only relevant to the most advanced users.

Foreseen difficulties:

  • Create wrappers that work with both normal and daemon services. This would be tricky if the wrapper is an additional library, but easy if the wrappers are included in both existing libraries itself.
  • Execute the script as root without directly depending on libsuperuser, libsu, or whatever root library the user may be using. This will probably either need an additional library plugin per root library, optionally using reflection to support the base ones out-of-the-box.

idkyou1500 pushed a commit to idkyou1500/librootjava that referenced this issue Jun 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants