Fugogugo Fugogugo - 11 days ago 5
Android Question

How to create android apps with root access?

I have never found any tutorial which telling about creating apps with root access. but I found out that there's so many apps out there which required root access.

the question is, How they able to create that apps? where did they found all the resource?
Is there any official document about the root access? or will it need some hackish way ?

and what kinds of access which required root access?
is proxy one of them? i didn't found any documentation about accessing the proxy anywhere.

=== UPDATE ====

I think some people mistaken by my question. sorry for my bad english.. lol . I know that the phone need to be rooted to get root access. but the things I want to find out is, what kind of services are need root access?
some i see wireless tether , the other is to clear cache (is it even need root access just to clear cache??) , and the other apps out there. is there any list of what I kind of advantage I get from root access??

Answer

You need su installed in the phone (of course). Details here: http://forum.xda-developers.com/showthread.php?t=682828

And to use it, is as simple as running su command. Here is a sample I use to reboot the phone programmatically (copied from this answer: Android 2.2: Reboot device programmatically )

try {
    Runtime.getRuntime().exec("su");
    Runtime.getRuntime().exec("reboot");
} catch (IOException e) {
} 
Comments