HTC Wildfire - Unlock Bootloader and Flash CyanogenMod under Ubuntu



HTC Wildfire

Last week I recovered an old HTC Wildfire and I decided to give it a new youth with latest Stable CyanogenMod 7.2.

Since HTC has changed its policy toward developpers, I decided to unlock its bootloader directly with HTC procedure available on HTDDev Unlock Bootloader official site.

To my surprise, procedure is not that simple, especially if you don't have any Windows OS under the hood.

In fact, you need to upgrade your phone bootloader with one of these HTC specific RUU.exe files, which is not supported under Linux. But, as always under Linux, some people made it possible ...

This guide explains how to convert your fully locked HTC Wildfire mobile phone to a fully open CyanogenMod device, by using only a Linux computer, without the help of any proprietary OS.

It deals with following steps :

  • Unlock bootloader
  • Flash up-to-date ClockworkMod Recovery
  • Flash latest stable CyanogenMod

Even if the target is a HTC Wildfire, you may use this procedure as a framework to unlock bootloader of many other HTC phones (it has been tested on HTC Wildfire S).

All the following steps are done on a Ubuntu workstation, but it should be easily adapted to any other Linux flavour.

As a pre-requisite, you need to have installed Android Tools (ADB, Fastboot, ...) on your computer.

1. Create Udev rule for Fastboot

To be able to detect your HTC Wildfire in fastboot mode on your Ubuntu workstation, first thing is to create the proper udev rules that will allow the system to detect the phone. This udev rule should also handle other HTC phones in Fastboot mode.

Start your HTC Wildfire in fastbot mode (Vol- and Power at the same time when switching on the phone) and connect it thru USB.

# lsusb
Bus 002 Device 082: ID 0bb4:0fff High Tech Computer Corp. Android Fastboot Bootloader

Your HTC Wildfire has been detected. Its Vendor ID and Device ID are 0bb4 and 0fff.

The udev rule will be declared in /etc/udev/rules.d/99-android.rules. If file already exists, just append the content at the end of it.


# HTC Fastboot mode
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0666", OWNER="your-login" # Fastboot mode

Replace your-login with your own Ubuntu login.

Once done, udev service has to be restarted.

# sudo service udev restart

2. Unlock Bootloader

Go to, register and follow instructions for HTC Wildfire.

At some stage you'll be directed to page where you need to download a RUU corresponding to your device.

For HTC Wildfire, this RUU brings HBOOT 1.002 which is needed for the boot unlocking procedure.

Download it. It should be named PC4910000_Buzz....exe

As we are under Linux, we can't run this RUU as it is.

We will need to extract the embedded ROM and to convert it to a file that can be flashed straight from the SD card.

2.1. Install Unruu

To convert this RUU exe file into a flashable ROM, we will use a tool called unruu.

This tool extracts the file embedded in the RUU exe.

A binary snapshot of unruu is available from

We will download it and instal it under /usr/local/sbin.

# wget -O - | gunzip > /tmp/unruu
# sudo mv /tmp/unruu /usr/local/sbin/unruu
# chmod +x /usr/local/sbin/unruu

2.2. Extract & Flash the ROM

We can now extract the ROM from the RUU exe file.

# unruu PC4910000*.exe
Extracting temporary files...
Extracting rom zip files...
Cleaning up...

We you have a file in our current directory. This ROM is directly flashable thru SD Card, but it needs to be renamed.

In fact, during its fastboot process, HTC phones look for a flashable ROM at the root of the SD Card :

  • HTC Wildfire :
  • HTC Wildfire S : (thanks to Michal Skuza)

This filename is different for every HTC model.

As we are dealing with HTC Wildfire, we just have to rename to and to copy it at the root of the Wildfire SD Card.

Next step is to reboot Wildfire in fastboot mode (Vol- and Power at the same time).

After few seconds, the phone will propose to flash HBOOT. Just accept it.

Your phone will reboot at the end of the operation.

2.3. Get Unlock Code

Remove from the SD card and reboot in fastboot mode again.

Now that your HTC Wildfire is running HBOOT 1.002, you can extract the Identifier Token.

The first command will make sure that the device is detected in fastboot mode.

# fastboot devices
HT168V408897 fastboot
# fastboot oem get_identifier_token 2>/tmp/bootloader
# cat /tmp/bootloader | grep "(bootloader)" | sed 's/(bootloader) //g'

< Please cut following message >
<<<< Identifier Token Start >>>>
<<<<< Identifier Token End >>>>>

You can now cut & paste the Identifier token according to the instructions given on the HTC Unlock site.

You'll receive a mail with a Unlock_code.bin attachment.

We can now use this attachment to unlock the phone.

Unlocking your bootloader will erase all your data for safety reasons.
So if you go ahead, make sure you've backed-up all your important data.

# fastboot flash unlocktoken Unlock_code.bin
sending 'unlocktoken' (0 KB)...
OKAY [ 0.140s]
writing 'unlocktoken'...
(bootloader) unlock token check successfully
OKAY [ 0.009s]
finished. total time: 0.149s

On your phone, validate the unlocking operation.


Your HTC Wildfire is now having an unlocked bootloader ...


3. Flash ClockworkMod Recovery

You are now ready to flash a custom ClockworkMod Recovery that will allow to wipe partitions, flash ROM and handle backup & restore.

Different versions of ClockWorkMod recovery are available from

ClockWorkMod v5.0.2.0 works pretty well. I've uploaded ClockWorkMod v5.0.2.0 for HTC Wildfire to my Google Drive.

Connect your Wildfire in fastboot mode and flash the recovery :

# fastboot flash recovery recovery-clockwork-
sending 'recovery' (3032 KB)...
OKAY [ 0.916s]
writing 'recovery'...
OKAY [ 1.259s]
finished. total time: 2.174s

Then :

  1. Select Reboot Bootloader
  2. Select Bootloader
  3. Select Recovery

You now enter ClockworkMod Recovery v5.0.2.0.


You can navigate thru the menus and select them with the lower joystick.

4. Flash CyanogenMod 7.2

It is now time to install CyanogenMod 7.2 and Google Apps on your HTC Wildfire.

# wget
# wget

On your phone, within CWM Recovery, select Mount & storage / Mount USB storage.

Copy both zip files to your USB storage, eject the drive and select Unmount on the phone.

You are now ready to flash CyanogenMod 7.2 and Google Apps.

From CWM Recovery, follow carefully these steps in this specific order :

  1. Wipe data / factory reset
  2. Wipe cache
  3. Format System
  4. Install
  5. Install
  6. Fix permissions

That's it !

You can now reboot your HTC Wildfire into Gingerbread 2.3.7.


Enjoy !

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus