Rooting CDMA Hero [Mac]

Search This thread

ajones7279

Senior Member
Nov 6, 2007
683
40
Somewhere
www.twitter.com
Root the CDMA Hero

Edit: I assumed that everyone knew that you needed the Android SDK to root. If you didn't know and/or don't have it, you can download it from here. http://developer.android.com/sdk/index.html. Extract it to a location of your choice. I put mine in /Users/Antonio(Would be your username)/Documents/Android/SDK

Now, this part is completely optional.
I'm going to show you how to add your sdk/tools directory to your .bash_profile file so you won't have to navigate to the folder each time.
Download this so you'll be able to see your hidden files http://www.mediafire.com/?diimft1ninn Run it, check "Show Hidden Files" then click Restart finder. Now, navigate to your home folder (/Users/%UserName%/) and see if there's a .bash_profile already there. If not, create with textedit.

Now add this to the file: export PATH=${PATH}:/Path/Of/Your/Sdk/Tools/Folder

Mine is /Users/Antonio/Documents/Android/SDK/tools

Now do not save it as rich text. If yours is in rich text, click on "Format" in the menu bar, and click "make plain text". Now save it as .bash_profile and uncheck "if no extension is provided, use .txt".

Now you can go back to Ghost and uncheck "Show all hidden files" and restart finder again.


Now, for rooting.

First, go to Settings > Applications>Development, and make sure USB Debugging is checked on your phone.

1. Download Asroot2 (http://zenthought.org/tmp/asroot2) and move it to your SDK/tools directory

2. Navigate to your SDK/tools folder (cd ~/Documents/Android/SDK/tools for me)(~ replaces /User/%Username% if you didn't know)

3. Then type:

Code:
./adb push asroot2 /data/local/
./adb shell chmod 0755 /data/local/asroot2
./adb shell
/data/local/asroot2 /system/bin/sh

And you should get:
$ /data/local/asroot2 /system/bin/sh

[+] Using newer pipe_inode_info layout

Opening: /proc/857/fd/3

SUCCESS: Enjoy the shell.


4. Then type:

Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4775 su

At this point you should have root access.


Now, for the recovery image (gives you extra options like backing up with Nandroid, partioning SD, etc.)

1. Download the recovery image from here: http://forum.xda-developers.com/showthread.php?t=596879

2. If you are still in adb shell from rooting type in exit until you are out. You should be in the directory where you extracted the recovery image. If not go there (You can put it in the SDK/Tools folder and nav there). Type in the following:

adb push recovery-RA-heroc-v1.5.1.img /sdcard/

You should get something like 868 KB/s (3352576 bytes in 3.767s)

3. Type in adb shell. If you see a dollar sign ($) then type in su and press enter. If it is a pound sign (#) you are good. Now type in:

Code:
flash_image recovery /sdcard/recovery-RA-heroc-v1.5.1.img

Once that is finished you are done. To reboot into recovery type in adb shell reboot recovery.


Told you most of the steps are the same. I just copied from other members and slightly modified it for Mac.

Now, if we could get a moderator to merge all these "How to Root" threads. :)
 
Last edited:

herzzreh

Senior Member
Sep 26, 2006
1,067
67
Charleston
Ugh... Doesn't seem to work on Macbook. Phone shows "USB Connected", but, see below...

Code:
michael-macbook:tools mglipin$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached 

michael-macbook:tools mglipin$ ./adb push asroot2 /data/local
error: device not found
michael-macbook:tools mglipin$

What's up?
 

lostboy4480

Member
May 2, 2006
19
1
44
Denver
Start HTC Sync on your phone Dont worry that it pops up with an error abbout not finding a PC.

Then when you do adb devices you should see your phones serial number.

Alsomake sure USB Debugging Settings >Applications > Development is turned on
 
Last edited:

Negrito

Senior Member
May 22, 2008
1,019
56
Las Vegas
www.fodografes.com
Thanks for this! I ended up getting mine rooted last night, but i had no idea about the recovery image thing. I gotta get that Nandroid going so i start removing some of the Sprint/HTC bloat! :D
 

SS70Chevelle

Member
Sep 14, 2008
44
5
Tucson
Root the CDMA Hero

3. Type in adb shell. If you see a dollar sign ($) then type in su and press enter. If it is a pound sign (#) you are good. Now type in:

flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img

I get to this step....and in my terminal it keeps coming up with
Code:
mtd: re-read error at 0x00440000 (Out of memory)
mtd: write error at 0x00440000 (Out of memory)
mtd: re-read error at 0x00440000 (Out of memory)
mtd: skipping write block at 0x00440000
mtd: write error at 0x00460000 (Out of memory)
error writing recovery: No space left on device

Any ideas???
 

gilroykilroy

Member
Sep 18, 2009
35
0
I get to this step....and in my terminal it keeps coming up with
Code:
mtd: re-read error at 0x00440000 (Out of memory)
mtd: write error at 0x00440000 (Out of memory)
mtd: re-read error at 0x00440000 (Out of memory)
mtd: skipping write block at 0x00440000
mtd: write error at 0x00460000 (Out of memory)
error writing recovery: No space left on device

Any ideas???

Unless you replaced your SD card with something > 4Mb then the 3.4Mb recovery image won't fit on the stock 2Mb SD card.

I ordered a 16Mb card myself from Amazon.
 

5tr4t4

Senior Member
Nov 8, 2009
122
1
I have a 2GB stock card and was able to flash. I initially had the same "Out of memory" error and fixed it by cleaning up my SD card -- copying off extra pictures, videos, podcasts, etc. I also rebooted for good measure, probably not necessary.
 

Negrito

Senior Member
May 22, 2008
1,019
56
Las Vegas
www.fodografes.com
I have a 2GB stock card and was able to flash. I initially had the same "Out of memory" error and fixed it by cleaning up my SD card -- copying off extra pictures, videos, podcasts, etc. I also rebooted for good measure, probably not necessary.

I was also getting the same error message. I didn't do anything to my SDcard, I just died a battery pull and tried again and everything worked.

Same Here, the soft reset worked like a charm Just started my nandroid backup. Thanks again gentlemen. :D
 

ajones7279

Senior Member
Nov 6, 2007
683
40
Somewhere
www.twitter.com
Ugh... Doesn't seem to work on Macbook. Phone shows "USB Connected", but, see below...

Code:
michael-macbook:tools mglipin$ ./adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached 

michael-macbook:tools mglipin$ ./adb push asroot2 /data/local
error: device not found
michael-macbook:tools mglipin$

What's up?

Go to Settings > Applications > Development and make sure USB Debugging is checked. It was a step I left out (assumed people knew rather). :p
 

ersocia

Member
Dec 18, 2007
34
0
Massachusetts
so, i'm quite definitely (and obviously, as you'll see) a complete android noob. i apologize in advance.

i followed the guide to the letter, and ran into the "out of memory" error. so i cleared out a few photos from the sd card and rebooted the phone, then tried the last step again. i typed "adb shell reboot recovery" at the command line, and my phone started to reboot, but when it hit the first HTC logo the screen went completely black, the charging light went off, and i couldn't turn the phone back on at all. i ended up popping the battery out and back in, then booted it back up just fine. it booted normally, as it always had, so i'm assuming i did something wrong and it's not "rooted".

basically my question(s) is/are:
a) when i ran into the "out of memory" error and rebooted, should i have started the guide from the beginning again? or was i right to just continue on from the step i left off at?
b) if it worked and i did in fact succeed in rooting the phone, how can i find out for sure that it's rooted? is there a failsafe way to tell me that it worked?
c) if i did something else wrong along the way.. what should i do?
 

Negrito

Senior Member
May 22, 2008
1,019
56
Las Vegas
www.fodografes.com
basically my question(s) is/are:
a) when i ran into the "out of memory" error and rebooted, should i have started the guide from the beginning again? or was i right to just continue on from the step i left off at?

I had the same issue. After the soft reset you should have done this:
Code:
mtd: re-read error at 0x004c0000 (Out of memory)
mtd: skipping write block at 0x004c0000
96-26-56-112:tools brynehobbs$ ./adb shell
$ su 
# flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img
# reboot recovery

b) if it worked and i did in fact succeed in rooting the phone, how can i find out for sure that it's rooted? is there a failsafe way to tell me that it worked?

yeah dl PicMe from the market, its free and requires root to run.

c) if i did something else wrong along the way.. what should i do?

Figure out where you made the mistake and try again.
 

thecodemonk

Senior Member
Oct 23, 2009
381
1
Spokane, WA

erasmogjr

Senior Member
Mar 30, 2009
98
1
Ran into the memory problem, but I have root now.

I didnt do anything to the sdcard or the device memory, all I did was hit phone+power+menu to do the reboot then did the commands to flash the recovery image and now I am running my nandroid backup.

I love the recovery menu also much better than the recovery menu on my rooted G1, but missing the recovery shell. Is there a way to get into the shell from the recovery menu or is adb the only way in.

edit: nevermind about the recovery shell just realized you cant have a software keyboard in the recovery shell :(
 
Last edited:

brian2220

Senior Member
Oct 7, 2009
266
10
Phoenix, AZ
i am having a hard time rooting my sprint htc hero
the stuff that ajones7279 posted is not enough from me as i have only had a mac and android phone a few weeks and don't know very much
i would be grateful if some one could give me detailed info on how to root my hero on a mac

thank you :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    how would i know if i successfully rooted my phone?
    1
    how would i know if i successfully rooted my phone?

    When the process finishes you can open the app tray and see the "SU" app for Super User Permissions. Also, you can download Terminal Emulator from the market and open it. When you type su, it should return # (not $).

    Remember that you will need to install a recovery after rooting with the Z4 app. The best is to download ROM Manager from the market and install Clockwork Recovery.