10-24-2011 10:36 PM
129 123 ...
tools
  1. Andrew Ruffolo's Avatar
    *****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.
    SioSioDef likes this.
    04-18-2010 02:43 AM
  2. Andrew Ruffolo's Avatar
    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.
    SioSioDef likes this.
    04-18-2010 02:50 AM
  3. laraiza's Avatar
    Great thread Rufflez, you hit the nail right on the head the other day with your tech support, and I thank you again.
    Leo
    04-19-2010 09:01 PM
  4. rhotondm's Avatar
    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?
    04-23-2010 02:25 PM
  5. Andrew Ruffolo's Avatar
    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.
    04-23-2010 02:38 PM
  6. rhotondm's Avatar
    Yes. Debugging is enabled. I am having the same issue when I try it on Windows 7.
    04-23-2010 08:09 PM
  7. rhotondm's Avatar
    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.
    04-23-2010 08:20 PM
  8. beezy's Avatar
    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.
    04-23-2010 08:47 PM
  9. Andrew Ruffolo's Avatar
    Yeah, thats the one benefit of a mac (no need for drivers). Other than that, I'm ready to kick my macbook to the curb.
    04-23-2010 11:24 PM
  10. SJenkins114's Avatar
    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?
    04-24-2010 11:13 PM
  11. beezy's Avatar
    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.
    04-24-2010 11:21 PM
  12. Andrew Ruffolo's Avatar
    is that recovery file in the tools folder of the sdk?
    04-25-2010 12:18 PM
  13. dantheman2689's Avatar
    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!
    04-27-2010 07:31 PM
  14. macdonx's Avatar
    Hi. I got to step 5 and I get this error message:

    -bash: ./adb: Bad CPU type in executable

    What should I do next?
    04-28-2010 04:21 PM
  15. Andrew Ruffolo's Avatar
    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).
    04-28-2010 05:54 PM
  16. dantheman2689's Avatar
    I hope the latter is for me... but I'm using 10.6.3 Snow Leopard... Oh, I'm sorry to hear that.
    04-28-2010 07:56 PM
  17. macdonx's Avatar
    @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.
    05-02-2010 12:24 AM
  18. macdonx's Avatar
    @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.
    05-02-2010 12:25 AM
  19. beezy's Avatar
    @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>?
    05-02-2010 08:10 AM
  20. nlphotographs's Avatar
    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.
    05-03-2010 04:00 PM
  21. superden's Avatar
    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.


    I had the same problem. type this instead

    flash_image recovery recovery-RA-heroc-v1.5.2.img
    instead of flash_recovery recovery recovery-RA-Heroc-v1.5.2.img
    05-04-2010 06:26 PM
  22. Andrew Ruffolo's Avatar
    my bad, ill fix that.
    05-04-2010 07:12 PM
  23. ksoze's Avatar
    This thread helped. I didnt have 1 problem, rooted it right up, flashed the 2.1 Lite on there and I am running it currently without any problems. Thank you for putting in the time and effort to do that. Completely awesome.
    05-07-2010 09:14 AM
  24. Andrew Ruffolo's Avatar
    no problem
    FYI to anyone, the steps are exactly the same for linux, but you need to run adb in superuser mode (on the computer, not phone) first, otherwise you get a permissions error.
    05-07-2010 10:50 AM
  25. MIG106's Avatar
    New user here. Not having any big problems with the current version, but really got sick and tired of being strung-along by all of the Sprint and HTC rumors. Time to do something about it. I'll be using this guide, either today or this weekend. Thanks for putting it together. I'll be back if I have any questions, and if it goes smoothly then I'll come back and share my delight to have 2.1 finally.
    05-07-2010 04:05 PM
129 123 ...
LINK TO POST COPIED TO CLIPBOARD