How-To Install a Custom ROM in a stock ROM HTC Desire. (Cyanogen Mod 7).

Posted: 24 December, 2012 in Android, Computers, Linux, Mobile
Tags: , , , , , , , , , ,

android profThis tutorial will explain how to install a custom ROM  in a device, HTC Desire, when it’s brand new.

It is focused on HTC Desire, installing Cyanogen Mod 7, but can be used in a similar way to install other ROMs and on another devices.


First of all, since you are going to install a new ROM you will have to delete everything, so you better start backing up all your important data.

You only need to save things that are on the phone, as contacts, SMSs, call log, bookmarks, or whatever you find important. (All things that are on the SDCARD will still be there after this.)

MyBackup RootSMS Backup & Restore, and Call Backup & Restore are all free applications that can assist with backing up your data.

Gaining S-OFF access

NOTE: If you come from another custom ROM you probably have S-OFF access, so you can skip this step.

This step will allow you to have full access to your device, unlocking some features and restarting some settings that Mobile Operators may changed:

– sim lock
– hboot lock ( this is the bootloader lock, you will be able flash cooked rom after this)
– cid lock (region lock so you can’t flash it with other roms, unbrand it, or downgrade it)
– user lock (will be set to factory default)
– pattern lock (will be set to factory default)
– phone usage counter (helps you refurbish the phone)

Here we go:

  1. Windows Only: Download & install the HTC Sync drivers: Download. (Linux has native drivers for this.)
  2. Make sure USB debugging is enabled on the HTC Desire (GSM) (Settings » Applications » Development » USB debugging).
  3. Write down the Hboot version and serial number of the device.
    1. To find out the Hboot of the device, boot into the bootloader by powering off the device and power back on holding down Volume Down & the Power button or via adb reboot bootloader. The version will be at the top of the screen.
    2. The serial number can usually be found under the battery, on the box or via adb devices / fastboot devices.
  4. Download Revolutionary 0.4pre4: Download
  5. Fill out the form on the Revolutionary site to get a beta key.
  6. Once you have the beta key, launch the Revolutionary beta and enter in the beta key minding that the key contains both upper- and lower-case letters.
  7. Revolutionary will now attempt to temporary root the HTC Desire (GSM), set S-OFF & install a custom recovery image. The device will reboot on its own and the entire process should only take a few minutes. If the process takes longer than 15 minutes, reboot the device and attempt again. Some users have had to attempt gaining S-OFF multiple times before achieving success. NOTE: If any time during this process you are having excessive amounts of issues, please join the RevolutionaryIRC channel for further help.

Flashing CyanogenMod

Now you should have installed one Recovery, if not you can do by flashing it with fastboot command:

sudo ./fastboot flash boot boot.img

To launch it you must have Google plataform-tools in order to execute this command. I will make another tutorial about using easy adb/fastboot commands to control your phone, but for now just Google it if you don’t know how to do it.

Now that you have a recovery you should proceed like this:

  1. Download the latest version of CyanogenMod.
    Optional: Download the Google Apps for the device.
  2. Place the CyanogenMod file on the root of the SD card.
    Optional: Place the Google Apps .zip on the root of the SD card also.
  3. Boot into Recovery.
  4. Once you enter Recovery, scroll up & down with the trackball, and the trackball button to select.
  5. Select Wipe, then Wipe data/factory reset
  6. Select Flash zip from sdcard.
  7. Select the CyanogenMod (ROM file).
    • Optional: Install the Google Apps by performing steps 6 & 7 again and choosing the Google Apps
  8. Once the installation has finished, select Reboot system. The HTC Desire (GSM) now should boot into CyanogenMod.

NOTE: This is not only for CyanogenMod, you can apply any other ROM following this method.


If you only want root access, you can only use unrevoked to get root access in the original ROM, you need to launch it after you gained S-OFF access, without the need of flashing any new ROM.

Best site for development of Android Custom ROMs:

HTC Desire Section:

@VIA: Cyanogen Mod Wiki

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s