Simple code for root access in Android _android

Source: Internet
Author: User
Tags root access
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 ();

}
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.