Reputation: 678
I want to use shell command for my app as root permission. I put in my manifest:
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
I want to know if there is a way to allow Super User permission programmatically without using any input device. As you know a window like this is appearing :
I want to avoid that step and programmatically select Remember choice forever.
Upvotes: 1
Views: 5546
Reputation: 2704
Just exec the command su
and within that Process
you have root priviliges:
Process p = Runtime.getRuntime().exec("su");
See this blog post for full example.
Upvotes: 1