How-To Root Your Sprint HTC Hero using a Mac

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
*****This is for 1.56 Hero's. 2.1 has a different root method*****


OK, I did my first successful root today via telephone tech support and decided to write a guide on how to root your hero using a Mac. I used a Windows PC, but its much, much easier to use a Mac... Why? NO USB DRIVERS TO MESS WITH :) (also, no need to mess with Java Development Kit [JDK] which takes significant time to download and install).
Note: Do not use safari for downloading anything. Anything that requires to be flashed, needs to remain in the .zip file for it to work. Use Chrome/Firefox as these browser keep downloads as is.

So basically, this is gbhil's guide to Rooting your Hero, with a Mac twist. I advise you to read the Windows version first because he provides a great detail of what each of these steps are doing.

Step 1: Download the SDK. Much easier than PC, just download it from Android Developers and download the Mac SDK. For the purposes of this tutorial, stick it in your personal folder. For example, if I open up Finder, and I select the Home directory with my name on it... I would be there. The file comes as a .zip, so unzip this file first, then drag and drop it to the home directory.

Step 2: Download the Exploit from: Sprint Hero Exploit
Drag and drop this file into the tools folder of the SDK. So open up Finder and double click the sdk folder automatically named android-sdk-mac_86 and place the file in that tools folder.

Step 3: Download the Recovery Image from: RA Recovery Image
Place this file in the same folder (the tools folder of the SDK)

Step 4: Fire up Terminal. If you've never used Terminal, its in your Mac Utilities folder. Couple ways to get to it. Open up applications, then Utilities, or from the Finder Menu, select GO from the top and then hit Utilities. From here, things will differ slightly from the Windows. Windows uses a different nomenclature for naming files and their paths from Macintosh. Since Mac is UNIX based, everything will be "/" instead of Windows "\"
We want to navigate to the directory where the SDK Folder is, so we will type in the Terminal window:
Code:
cd /users/YOUR_USER_NAME/android-sdk-mac_86/tools
alternatively, by putting it in your home folder, you can just type:
Code:
cd android-sdk-mac_86/tools/
and you "SHOULD" get to the same location. Your should see this:
Code:
OWNERs-macbook:tools YOURNAME$
Guess what? The hard part is done. You can now copy and paste the next parts one line at a time, and they should work!

Step 5: Check that your device is connected with USB debugging on (on the phone open up settings-->Applications-->Development-->Enable USB Debugging)
Type this:
Code:
./adb devices
You should get a response:
Code:
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached 
HT***********	device
The last number is your devices' serial number

If this is a go, then proceed

Step 6: Push and Run the Root Exploit. Hit enter after each line and wait til the computer is done spitting out data.
Code:
./adb push asroot2 /data/local/
./adb shell
chmod 0755 /data/local/asroot2
/data/local/asroot2 /system/bin/sh

Step 7: Make Exploit Permanant:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
exit
exit

Step 8: Place Recovery Image to SD card
Code:
./adb push recovery-RA-heroc-v1.5.2.img /sdcard
Reboot Phone
Code:
./adb shell reboot
Wait until you see the lock screen, then:
Code:
./adb shell
su
cd /sdcard/
flash_image recovery Recovery-RA-heroc-v1.5.2.img
Make sure you wait until you get "#" after hitting su

Reboot into recovery:
Code:
reboot recovery

You should eventually be brought to a screen with a black background and green text.
You want to make a nandbackup immediately. This will be you fall back plan. It saves your phones current state including settings and apps.
Using the trackball, scroll down to "Backup/Restore" and select it.
Next select the first option "Nandroid Backup" (or something similar) and press the "home" button to confirm.

You will see a bunch of periods going on the screen, this is like a progress bar. When its done, the backup/restore menu will pop up again, back out of that.

To Wipe data before flashing a ROM, you select the wipe option (typically, you will wipe the first three options)
To Flash a ROM select Flash .ZIP
To Restore a previous backup, go to Backup/Restore, select Nandroid Restore and select a previous backup.
To Mount your SD card on your Computer while in recovery mode without booting up the phone select USB-MS Toggle
To Partition your SD card to run Apps2SD (commonly built into the ROM, you won't see it), select Partition SD Card, then Partition SD (you can use default, I made my EXT partition 500MB, which is more than plenty, and then FAT32 for the rest (what you see when you mount your SD card to your computer)). The you want to SD:ext2 to ext3. I would do all of this before flashing the ROM, BUTTTTT: THIS WILL DELETE EVERYTHING ON YOUR SD CARD so Make a backup on the computer first, then USB-MS to put everything back.


To flash a ROM, the file needs to be in .zip format and cannot be in any other folder of the SD card. On a Mac, you will need to use a different browser from Safari as it automatically unzips folders into the "Downloads" folder of the computer.

If you still have troubles, I can remotely do this, but I'm a pretty busy guy of late. Post a problem on here first and if I or someone else still can't get it to work, I will offer this option. My girlfriend says that I'm too helpful. But I can't help it, its my nature.

Big thanks to gbhil, he has taught me everything I know either directly, or just by reading his posts.
 
Last edited:

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
Since there is no Kitchen for Mac...
If you want to get rid of some apps built into the ROM and therefore, do not get stored on the SD card, you need to find out the specific name of the file and then do this. I will use Amazon MP3 Store in this example

Navigate to SDK tools
Code:
cd android-sdk-mac_86/tools

Mount the phone:
Code:
./adb remount
./adb shell
rm /system/app/amazonmp3.apk
reboot
Here's what I did:
Made the phone's drive read/write capable
Access the phone at a root level
remove amazonmp3.apk located in /system/app/ of the phone
reboot to make the phone's drive Read Only.

If you don't know what the file does... Don't remove it.
 

laraiza

Well-known member
Dec 13, 2009
59
2
0
Visit site
Great thread Rufflez, you hit the nail right on the head the other day with your tech support, and I thank you again.
Leo
 

rhotondm

Member
Apr 23, 2010
10
0
0
Visit site
I am having trouble. I already rooted my Hero. I am trying to remove some apps and gave up with messing with the drivers on windows 7 so here I am on my Mac. I am able to navigate to the adb tools but I cannot get my devices serial number to show. It is showing no devices but the phone is plugged in. Do you have any suggestions?
 

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
I am having trouble. I already rooted my Hero. I am trying to remove some apps and gave up with messing with the drivers on windows 7 so here I am on my Mac. I am able to navigate to the adb tools but I cannot get my devices serial number to show. It is showing no devices but the phone is plugged in. Do you have any suggestions?

Make sure USB debugging is on:
Phone--> Settings--> Applications--> Development--> Enable USB Debugging

Try again. Let me know if you have any other troubles.
 

rhotondm

Member
Apr 23, 2010
10
0
0
Visit site
Check That...I think I figured it out. For some reason last night USB debugging was checked but it must have became unchecked when I flashed a new theme last night.

I got it working. Thanks for the help. I spent 4 hours today messing with drivers on windows 7. Oh how I love my Mac.
 

beezy

Well-known member
Feb 27, 2010
2,434
1,010
0
Visit site
Check That...I think I figured it out. For some reason last night USB debugging was checked but it must have became unchecked when I flashed a new theme last night.

I got it working. Thanks for the help. I spent 4 hours today messing with drivers on windows 7. Oh how I love my Mac.

Yeah after flashing a theme or anything you got to make sure usb debugging is on,i do that to myself all the time.I'm always flashing something.Super user doesn't play nice if it not selected either.;)
 

SJenkins114

New member
Apr 25, 2010
1
0
0
Visit site
Hi there,

I am new to all of this. I want to root my hero just to get rid of the extra stuff from Sprint. After Step 8, I get this response: cannot stat 'recovery-RA-heroc-v1.5.2.img': No such file or directory

Any ideas?
 

beezy

Well-known member
Feb 27, 2010
2,434
1,010
0
Visit site
Hi there,

I am new to all of this. I want to root my hero just to get rid of the extra stuff from Sprint. After Step 8, I get this response: cannot stat 'recovery-RA-heroc-v1.5.2.img': No such file or directory

Any ideas?

Make sure the name didn't get changed. Like recovery-RA-v1.5.2.img.img or anything crazy like that.
 

dantheman2689

Member
Apr 28, 2010
5
0
0
Visit site
Hi, first let me say how glad I am that I came across your post of rooting a Hero using a Mac. I tried out the first initial commands to make sure that it would work with me, since I've never done anything like that with Terminal before. I'm using the MyTouch 1.2 (with the headphone jack) and I would like to root it. I'm not sure how to do it exactly, but I would love to know if you know of a way and could show me somehow. I know and I'm sure you must be a busy individual, but it would help other Mac users like myself get a new feel for Android. Once again thank you and thanks again in advance!
 

Andrew Ruffolo

Well-known member
Jan 5, 2010
3,567
172
0
Visit site
Did you type ./adb devices?
You should get daemon starting...
What version of OS are you using? I've only done this in 10.6 and 10.5, dunno about 10.4 as I've never used that OS (Sorry, new mac convert, probably won't stay).
 

macdonx

Member
Apr 28, 2010
11
0
0
Visit site
@Rufflez

I am using OS X 10.5.8 PowerBook 1.5Ghz

Should I mount the sd card or not? I tried doing the ./adb devices on both instances and I still got the same error.
 

macdonx

Member
Apr 28, 2010
11
0
0
Visit site
@Rufflez

I am using OS X 10.5.8 PowerBook 1.5Ghz

Should I mount the sd card or not? I tried doing the ./adb devices on both instances and I still got the same error.
 

beezy

Well-known member
Feb 27, 2010
2,434
1,010
0
Visit site
@Rufflez

I am using OS X 10.5.8 PowerBook 1.5Ghz

Should I mount the sd card or not? I tried doing the ./adb devices on both instances and I still got the same error.

Don't mount sdcard.Do you have usb debugging on. Its under settings>applications>development>?
 

nlphotographs

New member
May 3, 2010
1
0
0
Visit site
Problem!

Wait until you see the lock screen, then:
Code:
./adb shell
su
cd /sdcard/
flash_recovery recovery Recovery-RA-heroc-v1.5.2.img
Make sure you wait until you get "#" after hitting su

Reboot into recovery:
Code:
reboot recovery

I had no problems until I got to this step. When I tried to go to the flash_recovery point, it said flash recovery not found. I tried starting over from step one and still got back to that point. Am I missing something? I put all the files needed into my tools directory as suggested. Any help would be great.