Rooting HTC Desire and installing CyanogenMod7

A couple of months ago I rooted my HTC Desire and installed Cyanogen Mod 7 (CM7).  The process was a bit fiddly as I worked my way through various guides and a couple of discussions on the CM7 IRC channel, but I got there.  Now, three months later I’m doing it again on another phone, and have had to go digging through the same websites!

For future reference, I’m going to document the process here.  I’ve taken most of this from two or three other sources, which I’ll link to at the end of this post.

I’m currently running Windows 7 Professional, but when I rooted the first phone I was on a computer with Windows XP Professional.  The same steps and software are applicable for both these operating systems.

I have broken the guide into 7 steps:

  1. Make a back-up
  2. Install HTC Sync on your computer
  3. Install the HBOOT driver on your computer
  4. Gain S-OFF and install a Custom Recovery Image
  5. Flash CyanogenMod with Clockwork
  6. Partition SD Card and move apps
  7. All done!
If you have trouble along the way, check out the CyanogenMod Wiki or jump in the CyanogenMod IRC channel.  If you have no luck there, feel free to post in the comments below and I’ll do my best to help.

1) Make a back-up
Everything on the phone will be wiped during this process, so it’s a good idea to make a back up of important content.  Contacts are generally synced to your Google account so should flow through.  There are various apps available for backing up SMS messages (SMS Backup+ is one that I use all the time) and a quick search of the Google Play store will return a selection of backup apps for other aspects of your phone.

2) Install HTC Sync on your computer
Although you don’t need the HTC Sync software on your computer, it is necessary to have the HTC Sync driver so that Revolutionary is able to connect to your phone and install the custom Recovery image.

You can download the HTC Sync driver here.  Just download and run the EXE file, then follow the prompts to complete set up.

3) Install the HBOOT driver on your computer
During the rooting process, your phone will reboot into the bootloader.  So that your computer can connect to your phone during that time, you will need to install the HBOOT driver.  Download the driver here, then follow these steps:

  1. Turn off your phone.
  2. While your phone is off, remove your battery and take note of the serial number (you’ll need this in the next section).
  3. While holding down the Volume Down key, press and hold the Power button. Your phone will boot into the HBOOT menu.
    Note: You navigate the HBOOT menu by using the Volume Up and Volume Down keys to select items, and press the Power button to make a selection.
  4. Write down your HBOOT version (you’ll need this in the next section).
  5. Connect your phone to your computer via USB. Windows should identify the device, but will most likely fail in installing the drivers.
  6. When prompted to install the drivers, select the ‘Have Disk’ option and navigate to the HBOOT driver you downloaded earlier.
  7. Once the driver is installed, your phone should be recognised on your computer as an Android Bootloader Interface.
4) Gain S-OFF and install a Custom Recovery Image

Warning: Gaining S-OFF will void your warranty. Proceed at your own risk.

This section will gain S-OFF and install a customer recovery image called Clockwork.  This is required to root your phone and will allow you to install CM7 in the next section.

  1. Download Revolutionary from this site.
  2. Select the Windows version, and fill out the Beta key form (you will need the HBOOT version and serial number you noted in the previous section).
  3. Turn on your phone.
  4. Connect the phone to your computer via USB and select the option to connect your phone with HTC Sync. (If you only installed the HTC Sync drivers and don’t have the full program, your phone won’t be able to perform a sync. This doesn’t matter – just make sure you are in HTC Sync mode).
  5. Once Revolutionary has downloaded, launch the program and enter your beta key (take care of upper and lowercase letters).
  6. Revolutionary will root the HTC Desire (GSM) and set S-OFF. You will be prompted to install a custom recovery image – select yes to proceed.
Congratulations! At this point, you have now rooted your phone and are ready to install CM7.

5) Flash CyanogenMod with Clockwork

  1. Download the latest stable version of CM7 from this page.  Note that CM7 does not include the Google Apps.  I suggest you also download the Google apps file here, which also includes the Market / Google Play Store app.
  2. Copy the CM7 and Google Apps zip files into the root of your SD card (they should not be in any folders).
  3. While holding down the Volume Down key, press and hold the Power button. Your phone will boot into the HBOOT menu.
    Note: You navigate the HBOOT menu by using the Volume Up and Volume Down keys to select items, and press the Power button to make a selection.
  4. Select Recovery and press the Power button to select.
  5. Select Backup & Restore to create a backup of your current system.
    Note: In Recovery, make a selection by pressing the Trackball button.
  6. Select the option to Wipe data/factory reset.
  7. Then select the option to Wipe cache partition.
  8. Select Install zip from sdcard.
  9. Select Choose zip from sdcard.
  10. Select the CM7 zip file you downloaded earlier.
  11. Once the installation is complete, select +++++Go Back+++++ to get back to the main menu, and select the Reboot system now option. Your phone should now boot into CyanogenMod 7.
Important note
At this point, I encountered a number of force close issues for core functions like the phone and Android OS as well as the phone getting stuck during the boot process.  To get the phone starting again, I had to remove the battery, boot into HBOOT then Recovery and select Advanced > Wipe Dalvik Cache.  From here you should then be able to reboot back into the phone.
When setting up the phone I had not signed in to my Google account and as such had not installed any apps.  I found that it was required to sign in and let the Market App update to the new Google Play store.  Once this had happened the force close issues seemed to resolve.
6) Partition SD Card and move apps

For me, the main reason for installing a custom ROM was so that I could mount my SD card and move away from the limited amount of internal memory that came with the phone. It’s recommended that you use a Class 6 or higher Micro SD card (Wikipedia has a handy article on Micro SD Card speeds).  I bought  a 16GB Sandisk Micro SDHC Ultra Class 10 card ($19 from CPL).  Mounting 2GB has left me with 13GB or SD card for photos and music, and I haven’t encountered any performance issues running apps installed on the card.

Once you have your SD card, follow these steps to format the card and then move your phone apps across to the card:

  1. With the SD card already inserted in your phone, boot into HBOOT then navigate to Recovery.
  2. Select Advanced > Partition SD Card.
  3. Select your preferred partition size. I went with 2048 MB which seems to be plenty of space.
  4. Select 0 MB for the swap memory.
  5. Once the card is partitioned and formatted, reboot the system.
  6. Download and install S2E Free from the Google Play Store.
  7. Launch S2E and grant it Super User permissions.
  8. Select Applications, Application Data and Dalvik cache to move to the newly created SD-EXT partition.
  9. Reboot your phone. During this reboot S2E will move your apps and data across to the SD card.  This is a once of activity – from now on the SD-EXT partition on the card will be mounted and used as standard phone memory when you start the phone.
You’re done!  Your apps and app data will now be stored directly on the SD-EXT partition of your card.  You do not need to move apps to the SD card.  This just moves them from the SD-EXT partition to the standard SD card partition, reducing app performance.
7) All done!
Congratulations!  At this point, you should have a shiny new HTC Desire running CM7 and with a significantly larger amount of memory since you are using your SD card as phone memory.
Hopefully this guide has been useful. If you have any questions or suggestions, please post them in the comments!
Know someone who might be interested? Share this with your friends!
Share on Facebook
Tweet about this on Twitter
Share on LinkedIn
Email this to someone
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x