Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Request su in handleLoadPackage ? #154

Closed
suraj0208 opened this issue Jan 30, 2017 · 2 comments
Closed

Request su in handleLoadPackage ? #154

suraj0208 opened this issue Jan 30, 2017 · 2 comments
Labels

Comments

@suraj0208
Copy link

For one of my modules I need to request su in handleLoadPackage(). Actually I need to access database of other app for which su is necessary. Is it a bad practice ? by doing so zygote asks for su permissions if we are using supersu by chainfire. For cyanogen supersu there's no such request by zygote.

So in short
is it bad practice to request su in handleLoadPackage?
if it is what is the best alternative to handle such situation?

Thanks in advance.

@MolotovCherry
Copy link

MolotovCherry commented Aug 21, 2017

Su is able to provide root during boot, but you need to check the relevant 'enable su during boot' option. I believe that permission also has to have been granted before in the past (not completely sure about that)

Whether it's bad practice I cannot be completely sure (I'm not a seasoned dev yet), but it seems to me that if there is any alternative way to do so, it should be done. It seems that using su during boot in such a way is a pretty nasty workaround, and also cumbersome for the end user.

Note: This applies to SuperSU, don't know about other alternative su implementations

@rovo89
Copy link
Owner

rovo89 commented Sep 30, 2017

If you have a legit reason to use root, then I'd say why not. You can see your module as an extension to the app you're hooking, so if the app is lacking some functionality which you add with your module and which requires root, then go ahead.

@rovo89 rovo89 closed this as completed Sep 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants