Magic/Sapphire
==Rooting the Magic/Sapphire (Method 1)==
First of all, everyone owes [http://android-dls.com/wiki/index.php?title=User:Haykuro Haykuro] a great big thanks for working on this and helping create the solution without even owning a magic. The following is his method just reworded slightly. '''if this method fails, try method 2.''' this method is for older "branded" devices (like the Vodafone Magic).
# Enable USB debugging on the device in settings->applications->development->"USB Debugging"
# Ensure you have the [http://developer.android.com/sdk/ Android SDK] downloaded, and the included USB driver [http://developer.android.com/guide/developing/device.html installed correctly] on your desktop.
# Open up a DOS prompt and "cd" to the tools subdirectory of your SDK folder.
# Make sure your usb cable is inserted and you have [http://www.htc.com/www/support/android/adp.html Fastboot] and [[ADB]] installed and ready to use.
# Type the following command at your DOS prompt:
#*
adb devices
You should see your Android phone's serial in the list. If you get an empty list, you need to sort out your USB driver.
# Download [http://www.droiddeveloper.com/hrbuilds/rootme-signed.zip Haykuro's Magic "rootme" rom] ([http://www.dandan.us/haykuro/rootme-signed.zip Mirror]) and the [http://www.droiddeveloper.com/hrbuilds/recovery-new.img.zip Magic modified recovery]
# Unzip the recovery-new.img.zip file (do not unzip the rootme-signed.zip file). Put both in your "tools" directory.
# Connect the phone with the USB cable and from the notifications bar, mount the SD card. Rename rootme-signed.zip to update.zip and copy it and the recovery-new.img across to the phone's SD card (which should be in your "My Computer" as a new drive).
# Alternatively you can copy the files across by entering these commands on your desktop (not the device):
#*
adb push rootme-signed.zip /sdcard/update.zip
#*
adb push recovery-new.img /sdcard/recovery-new.img
# On your device, enter the bootloader FASTBOOT mode by trying one of the following
#* Turn off your device and while it is off hold down '''back''' while you press '''power'''.
#* Turn off your device and while it is off hold down '''volume down''' while pressing '''power'''
# Type the following commands on your desktop (not on the device):
#*
fastboot boot recovery-new.img
# Apply your update (by selecting menu item. dont miss it), reboot (using HOME+BACK, or via selection), and allow it to boot fully. Upon a complete boot enter the following command on your desktop (not on the device):
#*
adb shell flash_image recovery /sdcard/recovery-new.img
# To get the hacked SPL (to be able to apply nandroid backups and etc) [http://sapphire-port-dream.googlecode.com/files/spl-signed.zip download haykuro's SPL update] and copy it to your sdcard (again as "update.zip")
# Reboot into recovery mode by powering off, and holding HOME+POWER
# Apply update.
# To gain root access from a [http://www.cyrket.com/search?q=Terminal+Emulator Terminal Emulator application] running on your phone, see [[Magic Root Access]].
==Rooting the Magic/Sapphire (Method 2)==
If you have Asian Version of Magic, do not use this method cause it disables wi-fi.
# Copy [http://rapidshare.com/files/249031593/update.zip this update] to your SD-card.
# Download the rooted recovery image [http://rapidshare.com/files/248983573/recovery-RAv1.0H.img here.]
# Enable USB debugging on the device
#*
Settings -> Applications -> Development -> USB Debugging
# Boot the device in fastboot mode.
#*
adb shell reboot bootloader
# Connect the device to your machine over USB.
# Type the following command on your desktop (not on the device):
#*
fastboot boot recovery-RAv1.0H.img
# Choose option "Apply sdcard:update.zip" from the menu on the device
#* note: you may need to unplug the usb if you receive any errors
==Rooting the Magic/Sapphire (Method 3)==
If you have the same problems with Method 1 as some people described in the discussion page (after the fastboot step it hangs at "HTC Magic") do the reading here:
http://wiki.xda-developers.com/index.php?pagename=HTC_Sapphire_Hacking
==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 using '''su''' with a [http://www.cyrket.com/search?q=Terminal+Emulator Terminal Emulator application] the '''su''' utility in '''/system/xbin/su''' needs to be replaced. In Android 1.5, the '''su''' utility was updated to allow only the '''shell''' and '''root''' users to gain root access[http://magicandroidapps.com/]. Since the '''adb shell''' runs as the shell user, the '''su''' utility will give root access through the '''adb shell.''' These instructions will also work for G1/ADP1 users who have upgraded to Android 1.5 and rooted their phone.
'''*** NOTE: Installing the modified '''su''' utility opens up a security risk to your phone, since any App can gain root access. You have been warned... ***'''
* First, download the [http://www.magicandroidapps.com/su.zip modified '''su''' utility (ZIP)], and unzip it somewhere on your computer. The instructions below assume '''C:\Android'''.
* Make sure you have ADB installed on your PC, and that USB Debugging is enabled on your phone. For details, [http://androidcommunity.com/forums/f4/how-to-install-apps-using-adb-4482/ see this post].
* Next, open a '''DOS Command Prompt''' window, and push a modified '''su''' utility to your phone. This utility will then be copied into the proper location to replace the existing '''su''' utility.
C:\Android>adb push su /data/local 595 KB/s (76200 bytes in 0.125s)
* Next, use '''adb''' to get a shell prompt on your phone:
C:\Android>adb shell
* Gain '''root''' access using the existing su utility:
$ su #
* Then, remount the '''/system''' partition as read/write so you can replace the existing '''su''':
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
* The '''su''' utility is located in '''/system/xbin'''. The following commands will back up your existing '''su''' utility as '''osu''', and install the modified '''su''' utility, 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 new '''su''' match those of the original '''osu'''.
# 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 able to '''su''' to root from the [http://www.cyrket.com/search?q=Terminal+Emulator Terminal Emulator application].
How to install the HTC Sense UI rom :
1 - Download the rom from here. The one under the section 'HTC Hero ROM for Magic by Fatal1ty' for example for Canada.
2 - Rename the file you downloaded as update.zip and put is on the SDcard of the HTC Magic.
3 - Reboot your device on the System recovery utility (look at Amon Ra recovery tool if not sure about what the system recovery utility is).
4 - There is an option to wipe your data (make sure you backed up your stuff from the phone).
5 - once the system wiped, apply the update.zip. It will take a while
6 - Reboot, if everything was done right, CONGRATULATION ! YOU NOW HAVE A HTC HERO !!


Entries(RSS)
For some reason only half from the submit has been displayed, is it my browser or the site?