androidpermissionsrootsuperuser

Allow Super User permission programmatically


I want to use a shell command for my app as root permission. I put in my manifest:

<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>

How do I give Super User permission programmatically without using any input device?

A window like this is appearing:

enter image description here

I want to avoid that step and programmatically select the Remember choice forever.


Solution

  • You cannot do it programatically.