Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[Q] How can I execute shell commands from my app with root permissions?

$
0
0
I actually have got a prerooted business device by the device manufacture. Trough adb shell I’m instantly have su permissions without need to use the “su” command.

My app needs for certain operations root permissions. For instance, setting sim-pin by my app is possible, so it seems like, the app has all the root permissions.
My problem is: the app uses some shell commands. e.g. to set the systemtime. But that seems not to work.

On consumer devices like Samsung s4, after rooting the device and installing chainfire su app, setting the systemtime works fine.

My business device coming without preinstalled su-app, so I tried to install chainfire’s su app v 2.46 as a systemapp. But his app told me, my su binaries which comes from the prerooted device aren’t up to date.
So I tried to override them by chainfire’s su binaries to system/xbin, but after that, the su app told me there are no su binaries installed…

How can I execute shell commands from my app with root permissions?

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>