Because Android is the Linux kernel, it is understood that Linux rights Management can know the principle of root, specific access to the "Android system permissions and Root permissions " article, The general Androd under the SU command only support under the root user and Shell users have permission to run the program as the root user, actually read the Android source under the system/extras/su/ The SU.C code is clear, and we bypass the current running user's judgment to let all the users can run the program in their own identity to run as the root user, that is, run the SU command does not need to determine the current user's UID to run the program, directly can set the corresponding UID and GID, and all we do is to modify the SU . c file, block the following code.
myUID = Getuid (); if (myuid! = Aid_root && myUID! = Aid_shell) {fprintf (stderr, "su:uid%d not allowed to su\n", myUID); return 1; } Reference URL:http://www.liqucn.com/article/30107.shtmlhttps://www.deleak.com/blog/2010/12/17/android-root-on-linux/http://blog.csdn.net/liujian885/article/details/5404834http://blog.csdn.net/superkris/article/details/7709504 http://hi.baidu.com/donghaozheng/blog/item/23ca75ec0028bbdc2e2e21c5.htmlreprinted from: Http://www.61ic.com/Mobile/Android/201207/43661.html