01-07-2012 06:56 PM
207 123 ...
tools
  1. Jerry Hildenbrand's Avatar
    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
    02-21-2010 11:14 PM
  2. obannvi's Avatar
    Nice! Now figure out how to edit .odex files...
    02-22-2010 01:04 AM
  3. Jerry Hildenbrand's Avatar
    Nice! Now figure out how to edit .odex files...
    [HOW-TO] Change status bar clock color - xda-developers

    Google is your friend. Now stop cluttering my thread lol.
    02-22-2010 12:29 PM
  4. BurgesS's Avatar
    Great how-to. Very easy to follow.
    02-22-2010 11:29 PM
  5. ChaosShadow's Avatar
    By far the easiest "How To" ever. I'm a total Linux MORON and this made rooting a piece of cake!

    Many thanks
    02-22-2010 11:34 PM
  6. Andrew Ruffolo's Avatar
    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.
    noemi682 likes this.
    02-23-2010 09:41 PM
  7. Drybonz's Avatar
    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.
    02-23-2010 10:11 PM
  8. ERDude's Avatar
    Now is there an easy step by step for we MAC folks?
    02-23-2010 11:13 PM
  9. ChaosShadow's Avatar
    Now is there an easy step by step for we MAC folks?
    I just fired up my windows box! lol

    I'd imagine that it's almost the same except instead of a command prompt, you'd use the terminal.
    As for the commands.... yeah... not my fort.
    02-23-2010 11:28 PM
  10. ERDude's Avatar
    I just fired up my windows box! lol

    I'd imagine that it's almost the same except instead of a command prompt, you'd use the terminal.
    As for the commands.... yeah... not my fort.
    Not mine either. No more windoze boxes in this house.
    02-23-2010 11:52 PM
  11. Andrew Ruffolo's Avatar
    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
    02-24-2010 12:49 AM
  12. Andrew Ruffolo's Avatar
    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.
    02-24-2010 02:06 AM
  13. Jerry Hildenbrand's Avatar
    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

    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.
    02-24-2010 04:38 PM
  14. Andrew Ruffolo's Avatar
    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.
    02-24-2010 05:20 PM
  15. Drybonz's Avatar
    Only a million things that could go wrong
    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.
    02-25-2010 01:55 AM
  16. SlappyWag's Avatar
    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.
    03-02-2010 02:08 PM
  17. Jerry Hildenbrand's Avatar
    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.
    03-02-2010 11:05 PM
  18. SlappyWag's Avatar
    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.
    03-03-2010 04:00 PM
  19. Jerry Hildenbrand's Avatar
    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.
    03-03-2010 05:09 PM
  20. pirates0argh's Avatar
    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.
    03-11-2010 11:06 PM
  21. MSK01's Avatar
    I can't get past the "Find New Software" portion of the tutorial. The option just isn't appearing on my computer. I have the USB Debugging selected and I'm using Windows XP. Please help.
    03-22-2010 07:21 PM
  22. Jerry Hildenbrand's Avatar
    I can't get past the "Find New Software" portion of the tutorial. The option just isn't appearing on my computer. I have the USB Debugging selected and I'm using Windows XP. Please help.
    Make sure you have Java installed correctly

    https://cds.sun.com/is-bin/INTERSHOP...-CDS_Developer
    03-22-2010 07:27 PM
  23. MSK01's Avatar
    Java is installed correctly and the option still isn't showing up.
    03-22-2010 07:46 PM
  24. Jerry Hildenbrand's Avatar
    Java is installed correctly and the option still isn't showing up.
    Try opening the command line in the Android /tools folder and run the SDK Setup.exe from there. It should tell you why you're not getting the window.
    03-22-2010 08:09 PM
  25. MSK01's Avatar
    The command line is the black box with white type in it, right?

    Here's what my tools folder looks like.

    http://img683.imageshack.us/img683/1658/toolshelp.png

    Which one do I click on? And most of them only flash open for a second before closing, then the ones that do stay open I can't type anything into them.

    EDIT: Does having HTC Sync have anything to do with my problem?
    03-22-2010 08:40 PM
207 123 ...
LINK TO POST COPIED TO CLIPBOARD