How to get root privileges in the system terminal app

Source: Internet
Author: User

latest because I want to debug the USB OTG thing, so that the USB port is occupied, so, although I am a project version, but cannot execute the ADB shell, resulting in unable to debug.
So I now a system terminal APK, program http://download.csdn.net/detail/zangcf/8172151, extract so file libexec.so, put to system/lib below, source code put to: /alps/vendor/mediatek/project_xxx/artifacts/out/target/product/project_xxx/system/lib. Place the source program files under the./alps/vendor/mediatek/project_xxx/artifacts/out/target/product/project_xxx/system/app/
Modify/media/ ZANGCF/WORKS/ANDROID/MTK/6572/CARPAD/ALPS_ADD_ICS_ETHERNET/SYSTEM/EXTRAS/SU/SU.C, delete
/*
     myUID = Getuid ();
    if (myuid! = Aid_root && myUID! = Aid_shell) {
      & nbsp fprintf (stderr, "su:uid%d not allowed to su\n", myUID);
        return 1;
   }
*/
This section of code
In addition, modify Su's properties during post to 24775
in the source code to modify Init.rc, Add./alps/mediatek/config/mt6572/init.rc Add chmod 24755/system/xbin/su.
then recompile, and the prompt to execute Su,shell at the shell terminal from $, to #, indicates a successful switchover.

How to get root permissions in the system terminal app

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.