Update: The below process definitely works, but I understand that there’s now a much simpler way of rooting your Android phone by using a piece of software called Unrevoked which’ll work on an Evo, Hero, Aria and Incredible as well as the HTC Desire – so it might well be worth you checking that out before going to all the effort of rooting the phone through this method!
The HTC Desire is a beautiful phone that, at the time of writing, only has official firmware going up to Android 2.1 – which is a great OS, but it’s not the latest and greatest bleeding-edge Android 2.2 which comes with the ability to make your phone act as a wireless hotspot and lets you install apps to your SD card rather than the phone memory (hence, more apps can be installed) amongst other neat features – so, why not root your Desire and install newer, unofficial 2.2 stuff? Well, because you might not really need it, and you might brick your phone in the process for starters – but that’s no fun! Have at it and don’t settle for the easiest route of just making do! Sweet, sweet Android 2.2 goodness is a mere hour or two away! So let’s get it on!
- A non-64 bit Windows PC, or Linux PC with a copy of VirtualBox running a non-64 bit version of Windows XP or later (Note: 64-bit Windows not recommended for reasons I’ll describe later on. 64-bit Linux host for the VirtualBox side of things is fine if that’s the route you’re taking.)
- An Internet connection
- A HTC Desire with a bootloader at version 0.80 or earlier (you can check this by turning off your phone, then turning it back on whilst holding down the Back button – the second line will say HBOOT-x.xx.xxxx – this needs be 0.80.0000 or lower for the process to work)
- A spare (i.e. not the one you intend using with the phone), small microSD card (512MB or larger is fine, Kingston brand preferred for reasons I’ll also go into later, but I used a Samsung brand 2GB microSD with no problems)
- A microSD to normal-SD adapter card or some other way to access the microSD card in your PC
- The ability to follow instructions to the letter.
Once you’ve got all this together, it’s just a case of following the instructions step-by-step, and in less than an hour (assuming everything goes smoothly – to figure all this out and get it working properly took me several hours!) you’ll have a de-branded, fully rooted HTC Desire running Android 2.1, but from which you can install Android 2.2, which I’ll write up in a separate article shortly.
Final Warning: It’s very, very unlikely that anything bad will happen during this rooting process, and the phone can always be restored to normal, un-rooted status should you wish – but the final responsibility for this lies with you. If you turn your phone into a paper-weight, it’s not my fault, okay? But saying that – I’ve successfully managed to root my phone and it all works perfectly, so if you follow these instructions carefully you can do the exact same thing.
Okay, enough preamble – let’s get on with the show!
Step 1 – Get the Android SDK
We’re going to be creating what’s called a Goldcard, which is just a specially modified microSD card which can be used to gain root access to the phone. Each Goldcard is unique to the phone you’re using it with, so for example, I’ve created a Goldcard for when I rooted my phone, but this card wouldn’t work to root your phone, because it has to be individually tailored to match up with the unique ID of your phone.
To get the details we need to kick off the Goldcard process, we need the Android SDK (Software Development Kit), so click this link and get the SDK for your platform of choice: Android SDK Download
Note: I did this section of the process using Windows 7 64-bit without issues.
Once that’s downloaded, extract it to a location of your choice, I’d suggest something like C:\HTC so the full path to it once extracted would be C:\HTC\android-sdk-windows.
We’ll come back to using the SDK in a little bit, but for now we need to set up some USB drivers, so lets get that out of the way.
Step 2 – Install Proper USB Drivers
You can connect to your phone as a hard drive just by connecting it to your PC, but we need to be able to access the phone in a kind of special way through the Android adb service, so to do this we need better drivers than just the standard ones.
Thankfully, these drivers come as part of the HTC Sync application, so head on over to this link and get yourself a copy of HTC Sync for Windows: HTC Sync Download
Note: I haven’t been able to find a Linux version of HTC Sync, so you really do seem to need a copy of Windows for this bit. Again, Windows 7 64-bit worked fine for me.
Once you’ve downloaded the application, double click on it to install it and follow the standard Next | Next | Finish prompts.
Step 3 – Enable USB Debugging Mode on your Phone
For this to all work properly, we need to have our phone connect via USB in USB debugging mode, which can be accomplished by simply going to Settings | Applications | Development | USB debugging
Step 4 – Get the Phone ID Details
With the Android SDK in place, HTC Sync installed, and the phone in USB debugging mode, it’s time to get the phone details, so using a USB cable connect your phone to your Windows PC – if the phone asks, it wants to connect in hard drive mode, and not Charge only or anything.
Once you’ve connected your phone, Windows will thrash around a bit setting up drivers, and bring up a window showing that you can connect to the phone which should show four ways of connecting, one of which should be ADB service or such, and all four options should have a green tick after them.
With the phone connected, on your Windows PC go to Start | Run and enter cmd followed by the enter key to open up a command-line window (if you don’t have Run enabled as a Start-menu option, just go Start | All Programs | Accessories | Command Prompt).
In the command line window, navigate to the android sdk by entering:
Then, check that the SDK can see your phone by entering:
If everything’s going according to plan, you should see the HTC detected and showing your phone’s serial number in output similar to the following (Note: This is not my real HTC serial number in case you were planning any shenanigans ;) ):
C:\HTC\android-sdk-windows\tools>adb devices adb server is out of date. killing... * daemon started successfully * List of devices attached HT076R317015 device
If you get “no devices found” type output at this stage then head on over to this post on setting up adb connectivity for assistance.
Assuming you can see your phone, the next step is to get (what I think is) the microSD card ID by typing the following at the command prompt:
C:\HTC\android-sdk-windows\tools>adb shell $
When you see the $ prompt like above, enter the following:
You should then see output like this:
cat /sys/class/mmc_host/mmc1/mmc1:*/cid 1d254d3040404030102a80143440a2a0
If you get an error at this point I’ve read that some people have changed the 1’s to 0’s to have it work, which would make the line:
$ cat /sys/class/mmc_host/mmc0/mmc0:*/cid
Once you’ve got the number, either write it down carefully or copy and paste it into a text file, notepad or such will do just fine.
Step 5 – Reverse the MicroSD Hex ID
We need to perform some voodoo on the number we generated on the last step, which is as simple as going to a web page, entering number or pasting it in, then clicking submit. I’d imagine they’re doing something like this – but I’ve not tested it at the time of writing – all I know is that it works!
Reverse yer number here: Soaa’s Hex Reverse for Goldcard Creation (Thanks, Soaa!)
Once you have your reversed hexadecimal ID number, copy and paste it into a text file for later use!
Step 6 – Get your Goldcard image
The Goldcard image is just a tiny (a few hundred bytes) disk image file (think like an ISO image) that contains some voodoo generated from your reversed hexadecimal ID. To get this image file emailed to you, head over to this link and fill in all the details: http://psas.revskills.de/?q=goldcard
Step 7 – Format your Spare microSD Card
In this stage we’re going to be wiping all data from the microSD card, so make sure there’s nothing on it you want to keep.
The easiest way to format the card in the correct format is via your phone, so turn it off, take off the back casing, remove the battery (so the microSD card can be inserted), put the card in the phone, then boot the phone and select Settings | SD & phone storage followed first by Unmount SD card and then Format SD card.
Once this is done, turn off your phone, remove the microSD card and place it into a microSD to normal SD card adapter or whatever adapter you’re using and plug it into your Windows PC.
Step 8 – Make your microSD card into a Goldcard
For this step we need a hex editor, the one recommended in the guides I read is called HxD and is available here: http://mh-nexus.de/en/downloads.php?product=HxD (the english version is about half-way down the page).
Once you’ve downloaded a version, extract the zip file and fire up HxD.exe, remembering to Right Click on it and choose Open as Administrator if using Vista or Windows 7.
Now, from the file menu in HxD, select Extra | Open Disk, then from the disk selection window that comes up first untick the Open Read-Only checkbox, and then click on your SD card under Physical Disk (this is important!) to select it followed by hitting the [OK] button.
HxD is an editor that uses tabs, so we’re now going to open the goldcard.img file that you were emailed in Step 6 by selecting Extra | Open Disk Image and then navigating to and opening your goldcard.img file. At this point you’ll have two tabs open, and the next thing we need to do is simply copy all the data from the goldcard image directly to the SD card in a kind of raw mode, so we’re not copying files – just some data.
To do this:
- With the goldcard.img tab selected, go to the menu and choose Edit | Select All followed by Edit | Copy
- Click on the Removable Disk 1 tab, and look at the first column of data which says Offset(h) – what you need to do is Highlight (i.e. Select – just like you would use to copy and paste text) ALL THE DATA from offset 00000000 to 00000170, and once you’ve got all that selected (I found it easier to find the 00000170 row, go to the far right of it, then Left-click and hold and drag up and to the far left of the very first 00000000 row) go to the menu and choose Edit | Paste write.
- Now you can save the changes to your SD card by hitting Ctrl+S or File | Save or whatever you want and close down HxD.
At this point you want to be able to eject the SD card and put it back in without Windows moaning. If Windows pops up a message saying that the card isn’t formatted correctly and would you like to format it now, you’ve either done one of the above steps wrong, or you’ve got an incompatible microSD card. If it were me (and believe me, from the less than crystal clear instructions I read it was me – three times!), I’d reformat the card and go again, slowly and carefully. When you’ve done it right and you eject then re-insert the card without Windows saying anything other than just mounting the card, then you’ve got yourself a Goldcard! Phew!
If you have any problems, I got my set of instructions from here: http://android.modaco.com/content/general-discussion/305672/creating-a-goldcard/
Step 9 – Get the Rooted Firmware and Install It
Okay – we’re nearly there! This is the stage that I DO NOT recommend using 64-bit Windows for, as when I tried it, it simply didn’t work, and I gave myself a minor panic when my phone wouldn’t boot and was stuck halfway between flashing it – BUT this could well have been because I got the wrong firmware for the phone! I got the normal firmware, whilst the Telstra A8183 models need the alt firmware (second link below).
Either way, I ended up using Linux 64-bit (Ubuntu 10.04) to do this final bit – so just be aware that you might run into problems on 64-bit Windows, and consider using something else – probably even a Linux live CD would do the job if you don’t have multiple OS’s available to you.
So to get the rooted firmware:
– If you have a bootloader version 0.75.xxxx or below AND a current ROM of 1.15.xxx.x or below – DOWNLOAD (MediaFire) / MIRROR (ROMraid / CoBlitz) – MD5: 28dd5acc4104bb49bd4b292cc8e8437c
– ONLY if the above download is not suitable – if you have a bootloader version 0.80.xxxx or below AND a current ROM of 1.21.xxx.x or below – DOWNLOAD (MediaFire) / MIRROR (ROMraid / CoBlitz) – MD5: eb2ed5bca1334cacd70e4720f5b29960
For my phone model (Telstra branded A8183 model HTC Desire – even though it showed bootloader version 0.75.xxxx before being rooted) I went with the the second set of firmware above (r6-desire-root-alt.zip).
Now, once the firmware is downloaded:
- Unzip the file you downloaded to a directory, then open a command prompt / terminal window at that directory.
- Copy the ‘update.zip’ file (which is part of the firmware download zip) to your microSD. Do NOT rename it.
- Turn off your HTC Desire, then turn it back on with the Back button held down. You’ll see FASTBOOT written on the screen in a red box. Connect the phone to the computer.
- In the terminal window, enter either ‘step1-windows.bat’, ‘./step1-mac.sh’ or ‘./step1-linux.sh’ as appropriate.
- Navigate to the BOOTLOADER and then the RECOVERY option on the menu, using the volume buttons to move and the power button to select.
- When a black screen appears with a red triangle (don’t worry, you’ll know it when you see it), press and hold the Volume Up button on your phone and then tap the Power button.
- Your device should now be at the ‘recovery’ screen. Select the wipe data/factory reset option, then select the option to Apply sdcard:update.zip. This will take a little while, so go make a nice cup of tea. When the flash has finished, reboot, and you are DONE!
My information for this section came from this guide should you run into any trouble: r6 riskfreeroot – HTC Desire Rooting Guide
With all this done, you will be the proud owner of a de-branded, rooted HTC Desire with no more branded unremovable bloatware apps hogging up your application list, a new Superuser Permissions application (which I have, as yet, no idea what it does – but it proves the phone’s rooted!), and the ability to flash custom firmware to the phone like DeFroST or DJ DROID Android 2.2 (froyo) stuff, with all the lovely, bleeding edge goodness that provides, as well as over-clocked and under-volted kernels so speed up your phone and lower the power consumption!
To be perfectly honest, I haven’t as yet installed any of that cool stuff – but I’m pretty sure that I’ve done the hard part with the rooting process, and when I get the time to install some 2.2 goodness, I’ll document it to the hilt, too.
Update: (23/10/2010) – It’s been a while since I wrote this article, during which time I’ve installed a whole heap of different firmwares for my Desire – and once you’ve done the initial root it’s an absolute doddle to do through ROM Manager. I used to install the latest T-Mod releases because they’re tailored specifically for the Telstra HTC Desires, but now I just install a standard LeeDrOiD ROM (which T-Mod is based on anyway), then update the APN details to a configuration that works for me (Name: telstra.wap, Proxy: 10.1.1.181, Port: 80, Authentication: CHAP) and that’s it – everything works beautifully.
Thanks: Shouts out to the Android community for all their good work, from the devs and hackers to the pioneers and bit-players, without whom none of this would be possible! And of course many thanks to the people writing guides whose work I based this guide on in an effort to plainly state and illustrate the process with minimal ambiguity.