Reputation: 883
My native process runs under root on Android device. Is it possible to modify UID of another process in order to give it the root?
The reason is to give an access to some Android "features" that inaccessible for non-root processes.
Upvotes: 0
Views: 2644
Reputation: 349
You need make a exec bin(A)
run as root and do:
All above can be done by ptrace.
More info can be found here:
http://www.linuxjournal.com/node/6210/print
http://www.phrack.org/issues.html?issue=59&id=12&mode=txt
Upvotes: 1
Reputation: 61369
If you have a rooted phone, you can run processes explicitly using (usually) /system/xbin/su
. You can't change the uid of a program that's already running, though. (In theory you could poke at kernel memory and change all the various stored uids, but this is a really bad idea because you can't lock the things you're modifying and if they change or move you could cause a kernel panic.)
Upvotes: 2
Reputation: 12875
No. If another app needs root access it needs to gain permissions itself.
Upvotes: 1