nephron
01-23-2011, 03:35 AM
Hello!
Im attempting to create an android app that has a built it file explorer (with root access of course) but i have no idea how to give my app root access...
I am able to view all directories with the following
if(ShellInterface.isSuAvailable()) {
ShellInterface.runCommand("chmod a+r /");
}
and
if(ShellInterface.isSuAvailable()) {
ShellInterface.runCommand("chmod a+rw /");
}
which basically runs 'su' before the command itself. The thing is, i dont think this is the way to do it...
I implemented those two commands in a menu but when i try to go from rw to ro, it doesnt go back.... im pretty lost.
Im attempting to create an android app that has a built it file explorer (with root access of course) but i have no idea how to give my app root access...
I am able to view all directories with the following
if(ShellInterface.isSuAvailable()) {
ShellInterface.runCommand("chmod a+r /");
}
and
if(ShellInterface.isSuAvailable()) {
ShellInterface.runCommand("chmod a+rw /");
}
which basically runs 'su' before the command itself. The thing is, i dont think this is the way to do it...
I implemented those two commands in a menu but when i try to go from rw to ro, it doesnt go back.... im pretty lost.