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

Feature request: enable permissions w/o adb if root is available #8

Open
notpushkin opened this issue Nov 19, 2017 · 4 comments
Open

Comments

@notpushkin
Copy link

Thanks for such a neat app! I've noticed that if the device is rooted, there's no need to use adb to run the pm grant commands, one can run them using on-device Terminal instead (using su first, of course). It would be even more nice though if we could do this from the app itself.

@franciscofranco
Copy link
Owner

Well, yes but I didn't want to embed the app with root dependencies to be fair

@binarynoise
Copy link

At least add a button to copy the command (without adb shell but with su -c) to the clipboard or make it selectable so we can paste it into our terminal emulator

@binarynoise
Copy link

I forked the project (need to upload the changes, though) and implemented root. Didn't need to add a root lib, just used

Runtime.getRuntime().exec(arrayOf(
	  "su", "-c",
	  "pm grant ${BuildConfig.APPLICATION_ID} android.permission.DUMP && pm grant ${BuildConfig.APPLICATION_ID} android.permission.WRITE_SECURE_SETTINGS"
))

Here is an apk for you to test (just rename back to .apk):
DemoModeTile-1.7-debug.apk.renamedTo.zip

@binarynoise
Copy link

@franciscofranco @notpushkin
Here is the code of my fork: master...binarynoise:master
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@franciscofranco @notpushkin @binarynoise and others