Simple code for the Root access in Android

  • 2020-05-17 06:21:51
  • OfStack

We know that the Android mobile phone operating system USES the Linux kernel, and the highest system permission in Linux is Root, which is similar to the Administrator system administrator permission in Windows, which is the highest permission of the operating system.
Because the permission of Root is too high, mobile phone manufacturer 1 generally does not allow users to directly use the permission of Root, so as to prevent users from modifying the built-in business and programs of the system. However, for users, of course, they want to have the Root permission to modify the phone into one of their own features, because with the Root permission, they can modify all the files and programs of the phone at will, so as to make the phone more personalized.

Process process = null; 

try{ 

process = Runtime.getRuntime().exec("su"); 

// Here is the main program code ATAAW.COM 

process.waitFor(); 

}catch(Exception e){ 

   e.printStackTrace(); 

}finally { 

   process.destroy(); 

}  

Related articles: