We know that the Android phone OS is based on the Linux kernel, and that the highest system privilege in Linux is root, which is similar to the administrator privileges in Windows, which is the highest authority on the operating system.
Because of the high power of root, handset manufacturers generally do not allow users to have root privileges directly to prevent users to modify the system's built-in business and procedures. But for users, of course, want to have root permissions to change the phone to their own characteristics, because the root permission can be arbitrarily modify the phone's all files and procedures, so that the mobile phone more personalized.
Copy Code code as follows:
Process process = NULL;
try{
Process = Runtime.getruntime (). EXEC ("su");
This is the main program code ataaw.com
Process.waitfor ();
}catch (Exception e) {
E.printstacktrace ();
}finally {
Process.destroy ();
}