HOW-TO root your Sprint Hero (condensed and easy to read version)

Jerry Hildenbrand

Space Cowboy
Staff member
Oct 11, 2009
5,569
2,797
113
Visit site
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:
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) -

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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:
  1. mounts the file system on your phone so that you can change or add files to the /system folder
  2. change to the /system/bin folder so we can work with files inside it.
  3. take the contents of the “sh” program (that’s the one we cracked) and copy them to a new file called “su”
  4. change the permissions and user of the “su” program so we can run it as a regular user.
  5. exit the root shell, and drop back to a regular user shell.
  6. 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 -
  1. Go back into the adb shell
  2. Switch to root
  3. Navigate to the SD card on your phone
  4. Replace the stock HTC boot loader with the custom boot loader
  5. 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 : ..................."
This will continue for a few minutes. When it’s finished, you’ll get a message saying
Code:
"Backup complete!"
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
 
Last edited:

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
One thing you might want to add since neither you nor the post states but I figured out is when downloading the SDK, in order to install it, you must also "prep" your PC. You obviously don't need Eclipse, but you do need Java. I got success on a win7 pc x64 with just installing the JDK recommended by download.android.com.

I know this isn't that hard to figure out... but its supposed to be a guide for dummies like myself.
 
  • Like
Reactions: noemi682

Drybonz

Active member
Dec 29, 2009
38
0
0
Visit site
Thanks for the guide... it is most appreciated. I have run into one problem. After rooting, I run the command to flash the custom recovery file and I continue to get the message that the file is not found, even though the command is correct and the file does appear on my sdcard in Astro File Manager. Is there something I could have done wrong to have run into this problem? Thanks for any advice you can offer.
 

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
The commands are exactly the same, the navigation parts are different though. you wouldn't put: c:\androidstuff\android-sdk-mac, you would put /users/computername/Desktop/android-sdk-mac/tools
 

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
Just rooted... If you get a snag where you try to flash the recovery and you get a ton of (Out of memory). Don't Panic. Just exit out (exit--> enter --> exit --> enter) and rebot your phone and try again. Worked like a champ for me.
 

Jerry Hildenbrand

Space Cowboy
Staff member
Oct 11, 2009
5,569
2,797
113
Visit site
One thing you might want to add since neither you nor the post states but I figured out is when downloading the SDK, in order to install it, you must also "prep" your PC. You obviously don't need Eclipse, but you do need Java. I got success on a win7 pc x64 with just installing the JDK recommended by download.android.com.

I know this isn't that hard to figure out... but its supposed to be a guide for dummies like myself.

Thanks. Will add a reminder to the post.

Thanks for the guide... it is most appreciated. I have run into one problem. After rooting, I run the command to flash the custom recovery file and I continue to get the message that the file is not found, even though the command is correct and the file does appear on my sdcard in Astro File Manager. Is there something I could have done wrong to have run into this problem? Thanks for any advice you can offer.

Only a million things that could go wrong :D

From the command window, while you're inside the adb shell, what's the output when you run these commands:

Code:
cd /sdcard
ls

It should be a long list of everything that's on the sdcard. Make sure the recovery image file is in that list, and make sure it doesn't have a different file extension added on to it by Windows.

Now is there an easy step by step for we MAC folks?

The commands are exactly the same, the navigation parts are different though. you wouldn't put: c:\androidstuff\android-sdk-mac, you would put /users/computername/Desktop/android-sdk-mac/tools

Thanks again rufflez.
@ERDude - he's right on the money. The only changes will be the commands to navigate your terminal while still in Mac OS. The commands once you enter the adb shell are exactly the same. That and you won't have to worry about Windows trying to rename your files.


Just rooted... If you get a snag where you try to flash the recovery and you get a ton of (Out of memory). Don't Panic. Just exit out (exit--> enter --> exit --> enter) and rebot your phone and try again. Worked like a champ for me.

I'll be sure to add that as well. In theory, as long as you rebooted after you copied the recovery image to your card you shouldn't get the OOM errors. But theorys are made to be proven wrong lol.
 

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
I here ya, I definitely rebooted the phone through command prompt. Oh well, I love the Gumbo, works great. Haven't charged since I rooted late last night and its running great.
 

Drybonz

Active member
Dec 29, 2009
38
0
0
Visit site
Only a million things that could go wrong :D

Yeah, it turned out to be user error. :) Thanks for the reply though.

Also, I'm gonna try out your gumbo rom as my first Android custom rom I think. I used to cook some WM roms so I can appreciate the time you have put into that, and it is most appreciated.
 

SlappyWag

New member
Mar 2, 2010
2
0
0
Visit site
I get to flash_image recovery recovery-RA-heroc-v1.5.2.img command and the first time I got Out of memory errors so I rebooted phone. Since then I get to that command I immediately see flash_image recovery recovery-RA-heroc-v1.5.2.img and then immediately I'm back to # prompt. Then I did reboot recovery and it just boots normally with no recovery menu. Any thoughts ? I tried rebooting pc and phone but same thing happens.
 
Last edited:

Jerry Hildenbrand

Space Cowboy
Staff member
Oct 11, 2009
5,569
2,797
113
Visit site
I get to flash_image recovery recovery-RA-heroc-v1.5.2.img command and the first time I got Out of memory errors so I rebooted phone. Since then I get to that command I immediately see flash_image recovery recovery-RA-heroc-v1.5.2.img and then immediately I'm back to # prompt. Then I did reboot recovery and it just boots normally with no recovery menu. Any thoughts ? I tried rebooting pc and phone but same thing happens.

RapidShare: 1-CLICK Web hosting - Easy Filehosting

Some people just can't get the newer version of the recovery image to load. Try this version, use the same method.
 

SlappyWag

New member
Mar 2, 2010
2
0
0
Visit site
Well this was weird. It looked like the 1.2.3 flashed but still no custom recovery menu when I rebooted. I then tried flashing the 1.5.2 ver again, it looked like it flashed and this time it rebooted into the custom recovery and I was able to backup Nandroid. I recovery rebooted the phone about 4 times after, to see if it would come up in the custom menu and it did 3 out 4 times the 4th just rebooted the phone normally. Long story short, it's rooted now thanks for the guide and help.
 

Jerry Hildenbrand

Space Cowboy
Staff member
Oct 11, 2009
5,569
2,797
113
Visit site
No problem. You're not alone. There are some small hardware or firmware differences in some Sprint Heros. What you describe is a known "bug" with the recovery images.

Glad you got it working.
 

pirates0argh

New member
Mar 12, 2010
1
0
0
Visit site
All the commands except the cd command should be the same on the mac as most of the commands are actually being run on the device, and the adb commands are all missing the .exe portion.