FORUMS
Remove All Ads from XDA

Rooting CDMA Hero [Mac]

684 posts
Thanks Meter: 40
 
By ajones7279, Senior Member on 8th November 2009, 11:15 AM
Post Reply Email Thread
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.
 
 
8th November 2009, 04:21 PM |#2  
Senior Member
Flag Charleston
Thanks Meter: 67
 
More
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?
8th November 2009, 04:34 PM |#3  
Junior Member
Flag Denver
Thanks Meter: 1
 
More
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
8th November 2009, 04:41 PM |#4  
Negrito's Avatar
Senior Member
Flag Las Vegas
Thanks Meter: 56
 
More
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!
8th November 2009, 06:15 PM |#5  
SS70Chevelle's Avatar
Member
Flag Tucson
Thanks Meter: 5
 
More
Quote:
Originally Posted by ajones7279

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???
8th November 2009, 06:26 PM |#6  
Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by SS70Chevelle

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.
8th November 2009, 06:30 PM |#7  
SS70Chevelle's Avatar
Member
Flag Tucson
Thanks Meter: 5
 
More
I'm pretty sure this has nothing to do with MicroSD card space. I have a 4 gig with lots of space.
8th November 2009, 06:31 PM |#8  
5tr4t4's Avatar
Senior Member
Thanks Meter: 1
 
More
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.
8th November 2009, 06:39 PM |#9  
Member
Thanks Meter: 1
 
More
Thanks for the guide have everything working! The link to the recovery ROM is hard to get into, it is hosted here as well for anyone else that has a problem.

http://www.androidspin.com/downloads...roc-v1.2.3.img

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.
8th November 2009, 06:39 PM |#10  
Member
Thanks Meter: 0
 
More
Ooops, nvm

It is a 2Gb card and the recovery is 3.4Mb.
8th November 2009, 06:45 PM |#11  
Negrito's Avatar
Senior Member
Flag Las Vegas
Thanks Meter: 56
 
More
Quote:
Originally Posted by gilroykilroy

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.

It cant be the size of the SD card, I have well over 4GB free on my 8GB card. Does anyone know how much device memory you must have free to flash the recovery image?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes