Obtain the android root permission (magic root access)

Source: Internet
Author: User

Accessing root from the magic/Sapphire terminal emulator

Now that you have followed magic rooting to root your HTC magic/Sapphire, you will notice that it is not possible to gain a root from an application running on the phone. the only way to get root access is through the ADB shell. in order to be able to gain root access usingSuWith a terminal emulator applicationSuUtility in/System/xbin/suNeeds to be replaced. In Android 1.5,SuUtility was updated to allow onlyShellAndRootUsers to gain root access [1]. SinceADB ShellRuns as the shell user,SuUtility will give root access throughADB shell.These instructions will also work for G1/adp1 users who have upgraded to Android 1.5 and rooted their phone.

* ** Note: Installing the modifiedSuUtility opens up a security risk to your phone, since any app can gain root access. You have been warned ...***

  • First, download the modifiedSuUtility (ZIP), and unzip it somewhere on your computer. The instructions below assumeC:/android.
  • Make sure you have ADB installed on your PC, and that USB debugging is enabled on your phone. For details, see this post.
  • Next, openDOS command promptWindow, and push a modifiedSuUtility to your phone. This utility will then be copied into the proper location to replace the existingSuUtility.
C:/Android>adb push su /data/local595 KB/s (76200 bytes in 0.125s)
  • Next, useADBTo get a shell prompt on your phone:
C:/Android>adb shell
  • GainRootAccess using the existing su utility:
$ su#
  • Then, Remount/SystemPartition as read/write so you can replace the existingSu:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
  • TheSuUtility is located in/System/xbin. The following commands will back up your existingSuUtilityOsu, And install the modifiedSuUtility, and change the permissions appropriately.
# cd /system/xbin# mv su osu# cat /data/local/su > su# chmod 6755 su
  • Now, check your work, and make sure the permissions on the newSuMatch those of the originalOsu.
# ls -l *su-rwsr-sr-x root     root        76200 2008-08-01 05:00 osu-rwsr-sr-x root     root        76200 2009-05-30 11:28 su
  • Finally, if everything checks out, sync the filesystem, and reboot your phone:
# sync# reboot
  • After your phone reboots, you will be ableSuTo root from the terminal emulator application.

Http://android-dls.com/wiki/index.php? Title = magic_root_access

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.