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

Apps How to make an easy root app

Ok, I just realized how to make a root app really easy. I just found out that android has a command equivalent to sudo. The command is
Code:
su -c
then the command. Lets say you are making an app that reboots your phone. This is all you need to do:

Code:
try {
            Runtime.getRuntime().exec("su -c reboot");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

simple, right, I know.I just thought I would share.
 
Back
Top Bottom