I know this is possible in android API version 21, but I want to do it in the API version 19 or earlier. To achieve this task, I have to get root permissions. I don't know how to get root permission. How can this be achieved?
Asked
Active
Viewed 22 times
-1
-
1http://stackoverflow.com/questions/5293615/how-can-i-get-root-permissions-through-the-android-sdk – Shane Duffy Jan 09 '17 at 03:21
1 Answers
0
What you need to do is something like:
Process root = Runtime.getRuntime().exec("su");
That causes SuperUser to show, which lets you either Allow or Block it from root access. This approach might not work if the user is not rooted. Here is a way you can test it.