• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to enable Superuser acces for android app from command line?

I have an Android system application which executes sudo commands. And when I run the app for the first time Superuser displays following window: "[App Name] is requesting Superuser access" with options allow and deny.

There is any way to Allow Superuser for my application manually from "adb shell" ?

qt9F5m.jpg
 
Your device needs to be rooted to allow this. Standard Android will not allow you to execute commands as super user.
 
Thanks for reply LV426. My device/android is already rooted. I can execute root command manually, with adb shell, but I receive upper described window when trying to run same command from my Application.
 
You have to also select "Remember this choice forever"
Of course I do. Problem is that the Superuser application opens this window every time. I need to allow sudo access for my app from command line (adb shell) if it's possible.
I have also tried to disable/remove Superuser.apk, in this case , Window not appears, but my app not executing commands.
 
You could try asking the developer of the app to add the ACCESS_SUPERUSER permission in the manifest.
 
By the way, are we talking about Chainfire's SuperSU or something else (King*Root, etc.,)?

I've got an app that does root things and does not get prompted each time a su request is made...

BTW, @LV426, I think that page is for CM ROMs...there was (is) "root access" switch for those ROMs to control overall root access.
 
Back
Top Bottom