First and foremost - this only applies to the Sprint CDMA Hero. Other CDMA Heros or GSM Heros will not love you very much if you try this with them.
This guide is also geared towards Windows users. Apple and Linux users will use the same process, but have different methods of using the terminal. If you're a Mac or Linux guy and need some pointers, just holler.
Step1 - Fire up your web browser and navigate here : http://www.androidcentral.com/sdk-driver-root-oh-my Follow the guide posted to get the Android SDK and USB drivers installed on your PC. Now I know that many people don’t like working in the command line, and will chime in and say “But there is a one click root method that doesn’t need the SDK!!!!11!!!2”. And they would be right. There is a utility that roots your phone for you. But to really do anything, you’re going to need the SDK anyway. Just trust me and take the time to set it up.
rufflez reminds us that you'll need to be sure Java is installed on your PC. Thanks for the tip rufflez!
Step2 - Download the asroot2 exploit here: 4shared.com - online file sharing and storage - download root_exploit.zip . The download is a zip file with one file inside it. You need to unzip the file, and copy the asroot2 (no file extension) file to the SDK/tools folder you created in the above step. Be sure that the file remains named asroot2 and doesn’t get a random file extension attached to it. Vista and Win7 both will randomly rename the file asroot2.jar and that won’t work. If it happens, just rename the file back to asroot2 and ignore the warning from Windows about it becoming unusable.
Step3 - Download the Sprint Hero custom recovery image here: 4shared.com - online file sharing and storage - download recovery-RA-heroc-v1.5.2.img And place it inside your SDK/tools folder as well. The same rules apply - the file must stay named recovery-RA-heroc-v1.5.2.img without a .jar or other file extension added to it.
Step4 - Open the command prompt on your PC and navigate to the location you installed the SDK/tools folder. If you followed the example from step 1, the command will be:
Step5 - From the command prompt, copy and paste the following command in:
You’ll see messages about starting or refreshing the server, followed by the serial number of your Hero.
Step6 - Copy and paste these commands, one at a time followed by the enter key. Wait for each step to finish before going to the next.
You should see the following inside your command window:
What the steps mean (in order) -
Step7 - We need to make this permanent. Enter the following commands (cut and paste) one at a time followed by the enter key.
What these mean:
Step8 - Place the custom recovery image on your phone’s SD card by entering the following command:
Reboot your phone with the following command:
When your phone is fully booted (you see the lock screen) enter the following, one line at a time:
Wait until your command window returns back to the root prompt “#”. Failure to do so is bad juju, and might brick your phone!
Then enter
What’s happening here -
Another tidbit from rufflez - It's possible you'll get a string of "out of memory" errors. Don't panic. Reboot the phone and try again. Thanks again rufflez!
Step9 - In the custom recovery you’ll be faced with a menu. Use your trackball to navigate through it. We are looking for the “Backup/Restore” option. Highlight it, then click your trackball to select it. The “Nand backup” option is what we want here. Highlight it, and click that trackball. You’ll see the following on the bottom of your phone’s screen:
This will continue for a few minutes. When it’s finished, you’ll get a message saying
Hit the back key and select Reboot system. Click it to reboot the phone normally.
Step10 - After the phone reboots completely, mount your SD card as if you were going to transfer pictures or music to it. You’ll see a folder named “nandroid” . Right click and copy it. Paste it somewhere safe on your PC. This is your one click backup to restore the phone to the stock software, but rooted with a custom recovery. This is like gold.
I’ve tried to make things as simple as possible, but I’m sure there will be questions. Ask away on the forum for advice and you’ll get the right answer quickly most of the time.
Jerry
This guide is also geared towards Windows users. Apple and Linux users will use the same process, but have different methods of using the terminal. If you're a Mac or Linux guy and need some pointers, just holler.
Step1 - Fire up your web browser and navigate here : http://www.androidcentral.com/sdk-driver-root-oh-my Follow the guide posted to get the Android SDK and USB drivers installed on your PC. Now I know that many people don’t like working in the command line, and will chime in and say “But there is a one click root method that doesn’t need the SDK!!!!11!!!2”. And they would be right. There is a utility that roots your phone for you. But to really do anything, you’re going to need the SDK anyway. Just trust me and take the time to set it up.
rufflez reminds us that you'll need to be sure Java is installed on your PC. Thanks for the tip rufflez!
Step2 - Download the asroot2 exploit here: 4shared.com - online file sharing and storage - download root_exploit.zip . The download is a zip file with one file inside it. You need to unzip the file, and copy the asroot2 (no file extension) file to the SDK/tools folder you created in the above step. Be sure that the file remains named asroot2 and doesn’t get a random file extension attached to it. Vista and Win7 both will randomly rename the file asroot2.jar and that won’t work. If it happens, just rename the file back to asroot2 and ignore the warning from Windows about it becoming unusable.
Step3 - Download the Sprint Hero custom recovery image here: 4shared.com - online file sharing and storage - download recovery-RA-heroc-v1.5.2.img And place it inside your SDK/tools folder as well. The same rules apply - the file must stay named recovery-RA-heroc-v1.5.2.img without a .jar or other file extension added to it.
Step4 - Open the command prompt on your PC and navigate to the location you installed the SDK/tools folder. If you followed the example from step 1, the command will be:
Code:
cd C:\Android_stuff\android-sdk-windows\tools
Step5 - From the command prompt, copy and paste the following command in:
Code:
adb devices
You’ll see messages about starting or refreshing the server, followed by the serial number of your Hero.
Step6 - Copy and paste these commands, one at a time followed by the enter key. Wait for each step to finish before going to the next.
Code:
adb push asroot2 /data/local/
adb shell
chmod 0755 /data/local/asroot2
/data/local/asroot2 /system/bin/sh
You should see the following inside your command window:
$ /data/local/asroot2 /system/bin/sh
[+] Using newer pope_inode_info layout
Opening: /proc/857/fd/3
SUCCESS: Enjoy the shell.
#
What the steps mean (in order) -
- Open the adb (Android Debugging Bridge - the program that lets you interact with the phone via a computer) and push the file asroot2 to the /data/local directory on your phone. /data/local/ is one of the directories that you can write to without being root, that’s why it is used here.
- Open the adb and give me shell access to it. Shell access is simply a fancy term meaning what you type in on your PC will be run on the phone.
- This command changes the user permissions and makes the asroot2 a file that can be run, rather than a file that will just open in another app.
- Run the asroot2 program, and use /system/bin/sh as it’s target. The asroot2 program is like a NO-CD crack. It will change the target so that it is running as if it were root.
- What gets printed to your screen is the changes made to the system that allow root to be running. The final part “#” means you’re running as root. Anytime you’re root on a Linux system your prompt changes from “$” to “#”.
Step7 - We need to make this permanent. Enter the following commands (cut and paste) one at a time followed by the enter key.
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
exit
exit
What these mean:
- mounts the file system on your phone so that you can change or add files to the /system folder
- change to the /system/bin folder so we can work with files inside it.
- take the contents of the “sh” program (that’s the one we cracked) and copy them to a new file called “su”
- change the permissions and user of the “su” program so we can run it as a regular user.
- exit the root shell, and drop back to a regular user shell.
- exit the adb shell and go back to Windows.
Step8 - Place the custom recovery image on your phone’s SD card by entering the following command:
Code:
adb push recovery-RA-heroc-v1.5.2.img /sdcard
Reboot your phone with the following command:
Code:
adb shell reboot
When your phone is fully booted (you see the lock screen) enter the following, one line at a time:
Code:
adb shell
su
cd /sdcard/
flash_image recovery recovery-RA-heroc-v1.5.2.img
Wait until your command window returns back to the root prompt “#”. Failure to do so is bad juju, and might brick your phone!
Then enter
Code:
reboot recovery
What’s happening here -
- Go back into the adb shell
- Switch to root
- Navigate to the SD card on your phone
- Replace the stock HTC boot loader with the custom boot loader
- Reboot into the custom boot loader.
Another tidbit from rufflez - It's possible you'll get a string of "out of memory" errors. Don't panic. Reboot the phone and try again. Thanks again rufflez!
Step9 - In the custom recovery you’ll be faced with a menu. Use your trackball to navigate through it. We are looking for the “Backup/Restore” option. Highlight it, then click your trackball to select it. The “Nand backup” option is what we want here. Highlight it, and click that trackball. You’ll see the following on the bottom of your phone’s screen:
Code:
"Performing backup : ..................."
Code:
"Backup complete!"
Step10 - After the phone reboots completely, mount your SD card as if you were going to transfer pictures or music to it. You’ll see a folder named “nandroid” . Right click and copy it. Paste it somewhere safe on your PC. This is your one click backup to restore the phone to the stock software, but rooted with a custom recovery. This is like gold.
I’ve tried to make things as simple as possible, but I’m sure there will be questions. Ask away on the forum for advice and you’ll get the right answer quickly most of the time.
Jerry
Last edited: