Demo-Mode-tile
Demo-Mode-tile copied to clipboard
Feature request: enable permissions w/o adb if root is available
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.
Well, yes but I didn't want to embed the app with root dependencies to be fair
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
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
@franciscofranco @notpushkin Here is the code of my fork: https://github.com/franciscofranco/Demo-Mode-tile/compare/master...binarynoise:master What do you think?