Rooting the HTC Hero/G2..(success)

Search This thread

LeeDroid

Recognized Developer
Jan 13, 2007
28,855
45,663
Newton Aycliffe
www.leedroid.co.uk
If you have a 2.73+ rom with the latest hboot you will need to follow This Post to boot the recovery image

1) restart into bootloader (switch on holding the back button)

2) Extract the latest GSM Hero recovery IMG into your android SDK/tools folder

(For SDK & CMD help reffer to Post 3 "The Basics" )

3) Download Superuser.zip and extract the contents to your SDK/tools folder.

4) Plug in USB

5) open a CMD prompt from the tools directory and type the following command> fastboot boot recovery-RA-hero-v1.5.2.img
(you should now enter a recovery console on the handset)

NOW PERFORM A NANDROID BACKUP from the recovery menu, once completre, continue..

6)then type the following commands in CMD exactly as they are here, hitting enter for a new line.

adb shell mount /system
adb push su /system/bin/
adb shell chmod 4755 /system/bin/su
adb push Superuser.apk /system/app/
adb shell reboot

Congratulations you now have root access..

Download "Root Boot" from the app store (this will only work if you have root!)

Step 6 modified thanks to ENLIGHTENER, cheers, su whitelist working nicely now..

Recovery image updated to recovery-RA-hero-v1.5.2.img , thanks to Amon_RA

Please be carefull! I accept no liability!



FYI, To unroot you will have to either restore an earlier backup or flash a stock rom..... (reccomend the new official HTC Update via RUU to do a full reset) :cool:
 
Last edited:

gaabrysz

Senior Member
Dec 4, 2007
354
49
OK i have a stupid question as i'm new to all that android thing. Where is the sdk folder? How do i open CMD? Maby u could do a tutorial for totaly new guys on *how to root your HERO* ??

Thanks
 

LeeDroid

Recognized Developer
Jan 13, 2007
28,855
45,663
Newton Aycliffe
www.leedroid.co.uk
The Basics

OK i have a stupid question as i'm new to all that android thing. Where is the sdk folder? How do i open CMD? Maby u could do a tutorial for totaly new guys on *how to root your HERO* ??

Thanks

1) you need to download the android software development kit from Here and extract it to yourhard drive.

2) (check) fastboot and adb should be located in the tools folder.

3) in tools right click>new>shortcut when asked enter CMD.exe

4) right click on cmd.exe shortcut, go to properties and clear the "start in" box.

job done, follow as above.

*Edit*

FYI

Verify you have root, go to app store> download Root Booter and test its functions if this works, you have root!

The G2 is the HTC Hero on T-Mobile.

The SDK includes all the drivers needed.

once you have booted the img via fastboot you should enter a recovery console, at this point you need to follow the instructions exactly as typed for adb,

I am running windows 7 Ultimate, should be the same for all windows platforms,

Cheers
__________________
 
Last edited:

MrHorus

Member
Nov 25, 2006
39
1
I've followed the process and I never ran into any problems, but I'm new to Android having previously owned Win Mobile phones and now an iPhone.

I got my G2 today on a contract upgrade just so that I could play around with it and try some development work.

Now that I have followed the process, how do I verify that I now have root?

Is there anything I can do to test?
 

jul644

Senior Member
Jul 22, 2009
955
200
London Ontario
www.lmgtfy.com
I've followed the process and I never ran into any problems, but I'm new to Android having previously owned Win Mobile phones and now an iPhone.

I got my G2 today on a contract upgrade just so that I could play around with it and try some development work.

Now that I have followed the process, how do I verify that I now have root?

Is there anything I can do to test?

Use a program that requires root access.
 
Last edited:
A

AdrianK

Guest
I've followed the process and I never ran into any problems, but I'm new to Android having previously owned Win Mobile phones and now an iPhone.

I got my G2 today on a contract upgrade just so that I could play around with it and try some development work.

Now that I have followed the process, how do I verify that I now have root?

Is there anything I can do to test?

If by G2 you mean HTC Magic/Sapphire rather than HTC Hero you're in the wrong place...
 

gaabrysz

Senior Member
Dec 4, 2007
354
49
OK i have a problem when i do this:
4) open CMD prompt use> fastboot boot cm-hero-recovery.img

the phone reboots and then you have to do "adb shell" but when i do that it says "error: device not found", what now??
 

maikie

Member
Oct 22, 2008
38
0
Just tried it and it works sweet... Took all of 5 minutes... Awesome work thank you

I now have root access on my Hero :D
 

maikie

Member
Oct 22, 2008
38
0
OK i have a problem when i do this:
4) open CMD prompt use> fastboot boot cm-hero-recovery.img

the phone reboots and then you have to do "adb shell" but when i do that it says "error: device not found", what now??

Have you installed the correct drivers? They are located in the SDK folders you downloaded.

If so try entering "adb devices" in the commmand prompt, Just incase the daemon didnt start.
 

gaabrysz

Senior Member
Dec 4, 2007
354
49
I think i did. i'm on win 7 x64 btw. ok i'll switch to vista 32bit and try there.
Ok i have checked and in the device manager there is a ADB device>HTC bootloader so i think drivers are correct.
 

maikie

Member
Oct 22, 2008
38
0
I think i did. i'm on win 7 x64 btw. ok i'll switch to vista 32bit and try there.
Ok i have checked and in the device manager there is a ADB device>HTC bootloader so i think drivers are correct.

try entering adb devices see if that makes any differences

btw, when i done mine the phone was in the recovery console..
 

Mienaikage

Member
Aug 2, 2009
17
0
34
London
Never mind I got it, I'm on Win7 x64, had to switch the driver from:
HTC Dream Composite ADB Interface Version: 1.0.10.1 [25/06/09]
To:
HTC Dream Composite ADB Interface Version: 1.0.9.0
 

gaabrysz

Senior Member
Dec 4, 2007
354
49
Ok so lets clear something. after i type in cmd: fastboot boot cm-hero-recovery.img my phone reboots and goes to recovery console where i have some otions.... so now i have to type in cmd: adb shell, yes??
still nothing and the adb devices didn't help.
 

gaabrysz

Senior Member
Dec 4, 2007
354
49
OK got it working. It is a driver issue. using latest sdk but i had to use older drivers just like Mienaikage sad.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    A GUIDE FOR TOTAL NOOBS to SDK + Rooting of HERO.

    Right - a nice clear NOOB guide - I'll asume no previous SDK experience :) and XP Throughout, the stuff you need to type into the cmd will be in quotes " but you DO NOT TYPE THE QUOTES! :) UPDATED FROM EXPERIENCE!

    1 GETTING THE SDK and INSTALLING IT
    Firstly you need to download the Android SDK (Software Developers Kit if you were wondering) from http://developer.android.com/index.html

    They tell you to install it but really, what you need to do is just make sure the unzipped folder with everything in is placed in the root of your main drive (Usually c) so that its easier to point at it I guess. When unzipped, this folder is named something longwinded - I renamed mine to sdk and i'll use that in the following instructions.

    2 INSTALLING SDK USB DRIVERS and USB DEBUGGING
    Firstly on your device, go to Settings - Applications -Development - USB Debugging and make sure it has a green tick :)
    Now you need to install the USB Drivers - Plug your fone in using the USB and it should come up Unknown device and ask you to install drivers - choose the Specific location option and then browse to the USB Driver folder in sdk - for XP choose the x86 folder - if you have a different OS you probably know which one to choose more than me. The drivers should install and the phone is now recognised when you plug it in (Remember if you plug it in a different USB port it may not recognise it again - stick to the same one if you have more than one USB port)

    Additional - in my case, when I got to the adb section (Step6), my device wasn't recognised again. I had to do the exact same process above for adb functions. If you get a second pop up later on when starting the adb process, then navigate to the same folder. I had to specifically browse to the x86 folder. Checking USB debugging first should stop this but if not you are forewarned. :)

    3 CHECKING ON SDK TOOLS
    Firstly have a look in the sdk folder to find the tools folder and make sure you have fastboot.exe and adb.exe in there. If yes then cool and groovy.


    4 CHECKING IF FASTBOOT or ADB SEES YOUR HERO.
    Shutdown the phone and restart by pressing and holding power and the Back Button - you should be in bootloader - plug in your device to the USB BUT DON'T MOUNT IT!! should now say Fastboot USB on your hero. If you get prompted for drivers or device not recognised on plugging in the USB, follow step 2 again - just to be safe. :)

    Open a comand Prompt Window - in XP its in Accessories/system from programs - I dragged the shortcut to my desktop, just so it was easier. You can also get to a command prompt by going to "RUN" and typing cmd (Ta Republik)

    Double click and you'll see a line pointing to C drive probably Docs and settings, and your user name. You need to cd (change directory) into the tools folder so type (if you changed the name of the SDK folder to sdk like me)

    "cd C:\sdk\tools" (and press enter)

    should look like this now C:\sdk\tools>_

    Next type in "fastboot devices" and press enter -

    You should see something recognised - if nothing happens you need a different driver or more help. It might be worth going through step 2 again by unplugging from the PC then replugging in to force the driver request. (If that fails, ask on XDA for help)

    If your device is listed, then you're set to start the Hero Rooting Process.

    5 ROOTING!!! BOOTING INTO RECOVERY IMAGE
    Now you need to get the recovery image that will allow you to root from here
    http://rapidshare.com/files/262621147/cm-hero-recovery.img.zip

    Once downloaded, unzip and place the file cm-hero-recovery.img INTO YOUR TOOLS FOLDER IN SDK (Don't forget to Unzip the zip file like I did. LOL You need the .img file in the root of the tools folder)

    Now restart your fone into bootloader as mentioned above (HOLDing Back and Power) then plug into the USB and cd into the tools folder (You may already be there if you didn't unplug from before when you checked if the device was seen in part 4 above )

    In the command window on your PC type "fastboot boot cm-hero-recovery.img" and press enter. Your fone should boot into a recovery console.

    AT THIS POINT YOU SHOULD CONSIDER DOING A NANDROID BACKUP OF YOUR PRE ROOTED HERO ROM - scroll down to the nandroid backup option and press the scrollwheel. Once the Backup is finished, carry on with the next step - the backup will be on your SD Card and if anything goes wrong, can be restored by getting into this recovery console again :)

    6 ROOTING - MODIFYING THE CODE TO GET ROOT ACCESSS
    enlightener says - download Superuser.zip here http://forum.xda-developers.com/attachment.php?attachmentid=211569&d=1249225060 and extract the contents. You get a folder with two files : su and superuser.apk. Put those two files directly into the TOOLS folder in sdk (Same place as the recovery.img in step 5 above) (superuser.zip contains Superuser.apk and the su binary ) once that's done type the following code into your command window, pressing enter after each line.

    "adb shell mount /system"
    "adb push su /system/bin/"
    "adb shell chmod 4755 /system/bin/su"
    "adb push Superuser.apk /system/app/"
    "adb shell reboot"

    Now your fone should be rebooting itself. At this point you can unplug from USB and let it reboot - it *should* be rooted - You can check by plugging in the USB without mounting - from a Command console cd to the tools directory and then type "adb shell" (You see a little dollar sign) then type "su" (must be lower case) - the Superuser app should ask for permission, click allow always and then you'll see the little rooted # sign - You are rooted!!

    Use the script below if you fail anywhere along the line, in case you need to remove the previous Superuser then push it back.

    "adb shell mount /system"
    "adb shell rm /system/app/Superuser.apk"
    (will give error if you don't have it... ignore the error)
    "adb push su /system/bin/"
    "adb shell chmod 4755 /system/bin/su"
    "adb push Superuser.apk /system/app"
    "adb shell reboot"


    7 CHEcKING IF YOU ARE ROOTED
    Download and install a programme from the market that requires root eg
    Root Booter and test its functions if this works, you have root! You already have Superuser Permissions installed. Once installed, any programme needing root access must ask for permission (Choose allow always) and this is another way you know root has been successful. Other good ROOT prgs to try are Root Explorer (a great file explorer) bluex (For BT file transfer)

    Warning - some folk get errors trying to upgrade to Superuser Whitelist (Including me) - if Superuser Permissions is working fine, leave it as is :)

    Additional - Lots of posters reporting that Root Explorer not working as it should on the HTC Hero.

    Hope that is NOOB FRIENDLY enough - Love Dayzee.


    ALL the info is from this thread or the earlier ones so much THANKS to all involved. Please let me know if I've got any bits wrong or they could be clearer and I'll edit. I know there will be a lot of new to Android folks who need these "Granny suckingEggs" type instructions, because I was one of them 6 months ago!!
    1
    OK i have a stupid question as i'm new to all that android thing. Where is the sdk folder? How do i open CMD? Maby u could do a tutorial for totaly new guys on *how to root your HERO* ??

    Thanks

    better visit www.theunlockr.com