21 Sept 2012

Install CyanogenMod 7 on HTC Wildfire (buzz - HBOOT 1.01.0002) with Linux [EN]

You have a HTC Wildfire with HBOOT 1.01.0002?
You want to get the latest CyanogenMod 7 (CM7) on your phone?
You're using Linux and don't have any Windows installation?

Then let's get started!


Disclaimer: First things first; you're about to void your warranty with those next steps; even though many have succeeded in installing CM7, there's still a possibility that you may brick your phone. I'm simply providing the information about how I did it, so you can do it on your own responsibility!

Those steps were done on Ubuntu 12.10 Beta 1, and only the USB cable for the HTC Wildfire (as I don't have an adapter for the micro sd-card).

Downloading some needed stuff


Now some links for downloading the software which is needed to S-OFF the phone (done through downgrading the ROM to HTC Froyo WWE), installing the recovery ROM and finally flashing CM7:

Open up a Terminal and keep it open, you'll need it for a while.
Install the Android SDK with the instructions on the website. Once installed, you should - for simpleness sake - do the following in the Terminal:
PATH=$PATH:/home/your_user_name/sdk_install_folder/platform-tools/

This allows you to execute the adb without having to indicate the full path. 

And while on it, decompress the buzzdowngrade.tar.gz to a folder of your choice.


Before we go any further, plug your phone to your PC and save the content of your sd-card, when you didn't use your Google account to save your contacts - well, then find a way to save your contacts otherwise. You can always use paper and a pen ;-).

Create a GoldCard


To get the rest working, this part is important as it will decide if you have the right sd-card or not. For my HTC Wildfire I tried the one I already had in it and failed, but I still had my other sd-card from my HTC Tattoo, and it worked once more.

In the Terminal create a file so your phone gets detected by your system:
$ sudo nano /etc/udev/rules.d/51-android.rules

with the following content:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

Save the file and attribute the correct rights on it:
$ sudo chmod a+r /etc/udev/rules.d/51-android.rules

Put your HTC Wildfire into USB Debugging mode in "Menu > Settings > Applications > Development" and change your USB connection type to charge only.

Let us see if everything is right until now in the Terminal:
$ adb start-server
$ adb devices

If you get an output something similar to this:
List of devices attached
HTxAxLGxxxxx    device
then you're ready to proceed!

Downgrading the ROM


Back into the Terminal, go into your buzzdowngrade folder and do the following steps:
$ adb push dmisc.img /data/local/
$ adb push flash_image /data/local/
$ adb push psneuter /data/local/

$ adb shell chmod 755 /data/local/psneuter
$ adb shell chmod 755 /data/local/flash_image

$ adb shell /data/local/psneuter

That will reboot your HTC Wildfire. Now we downgrade MISC:
$ adb start-server
$ adb shell /data/local/flash_image misc /data/local/dmisc.img

We need now the CID of the sd-card:
$ adb shell "cat /sys/class/mmc_host/mmc1/mmc1:*/cid"

The output should look like 532600bd227d9c0347329407514d5402, copy that code, open a new browser-tab and go to Soaa's HEX Reverser, paste your code and hit submit. Again, copy the resulting code and open another tab (or in the same) and go to RevSkills free HTC goldcard generator, paste the hexcode you just copied and download your goldcard.img.

Get the sd-card from your phone and put it in your card reader:
$ sudo dd bs=512 if=/path_to/goldcard.img of=/dev/sdx1
(I did set my phone in "Mass Storage" mode, mounted it and did it over the USB cable)

You can check the dmesg output or df to find out where your sd-card is mounted. Once done, put the sd-card back into the HTC Wildfire and start it up.

When started, let us continue:
$ adb start-server
$ adb shell sync
$ adb reboot bootloader

Your phone will reboot now, just wait until your in the bootloader still in your buzzdowngrade folder:
$ ./fastboot erase cache
$ ./fastboot oem rebootRUU

Your phone's screen will show now the HTC logo, now we will downgrade it:
$ ./fastboot flash zip rom.zip

Now if you get a "Customer ID" error while doing this, your goldcard is not working, get another sd-card (another manufacturer) and go back where you retrieved the CID for the first one and repeat the steps once more.

Else you'll see many lines in the Terminal, and a status bar on your phone.

When finished, do:
$ ./fastboot reboot-bootloader

Now check on your phone if your HBOOT version is 1.01.0001 (on top of the screen), if so, we're ready for the next step. Shut down your phone for now.

S-OFF your phone


Open a browser-tab and go to Revolutionary's website scroll down and click on the Linux download link - now this is important: clicking the link will open a form which will allow you to generate a beta key which you'll need to proceed!

The form will ask you for the serial number of your HTC Wildfire, so open it, remove the battery and look inside for S/N :HTXXETDXXXXX. Fill in the form and generate your key.

Start up your phone (mine took almost 5 minutes to start, so don't be scared if it takes a while), skip the "First Run" installation routine wherever possible - as you won't keep it long enough on this ROM.
Put your phone again into USB Debugging mode (like shown above).

Go to the folder where you just stored the downloaded file and extract it, go into it and then execute it:
$ ./revolutionary

When asked, copy & paste your beta key you've got from the Revolutionary's website, and when it asks if it should download and install ClockworkMods Recovery ROM, confirm it!

Update your phone to CM7


Reboot your phone. And in the meantime let's go to CyanogenMod's website and get the latest stable CM7; you should as well get the Google Apps ROM.

Transfer the two files to your phone sd-card root folder - in the Terminal:
$ adb start-server
$ adb push cm-7.2.0-buzz.zip /mnt/sdcard/
$ adb push gapps-gb-20110828-signed.zip /mnt/sdcard/

When finished, we'll reboot it into the recovery mode:
$ adb reboot recovery

Once in the recovery mode, select the option Wipe data/factory reset. Then select the option Wipe cache partition. Select now Install zip from sdcard and on the following screen Choose zip from sdcard. Find the cm-7.2.0-buzz.zip and confirm. Repeat the last two steps for gapps-gb-20110828-signed.zip.

Select now Go Back and reboot your phone. You're done!

Have fun with your HTC Wildfire running Android Gingerbread!


Thanks to Google Web Search, the XDA-Developers Forum  and the CyanogenMod wiki for all the information needed to do this.

Please, if you find some errors, something is missing or you have suggestions, leave a comment so I can fix it, thanks!

[EDIT]
After some digging in my backups I finally found the original buzzdowngrade.zip file which I used to create my ZIP file which was hosted on filecloud.io. So I updated the link way above to the new download place (http://goo.gl/KDIha). Sorry for the delay!

16 comments:

mhartillo said...

Thank very much for the post.
I am following it, because I also have a HTC Wildfire, and no Windows. I have installed android SDK, and created 51-android.rules but when I plug the phone in charge only mode, and ask for the list of attached devices it gives an empty list.
Have you got any idea of what is happening? Thank very much in advance

Unknown said...

First of all, do you use Ubuntu 12.xx? It might be another rule file (take a look on Googles Android development website). Furthermore, the content of the rule file has to be in one line (I should add that to the post)! And make sure you have USB Development active on your phone (see in the beginning of the post).
Tell me if everything is done as explained but still not working !

mhartillo said...

I use linux mint 13, that is, mainly ubuntu 12.04. The rule file is in one line. At the beginning of your post I don't find what do you mean as the USB Development active. Sorry! and thank you for the answer.

Unknown said...

It's just between the Save the file and attribute the correct rights on it: rule-file part and the first `$ adb start-server` part ;-).

Unknown said...

Ok, not entirely at the beginning of the post, I beg your pardon :-).

mhartillo said...

Yes, the phone is in charge only mode. But it doesn't work :-(

mhartillo said...

Sorry for all the messages. I was confused, I thought that being in charge mode was the only thing to do. When I have changed the USB Development to active adb works. Sorry again and thank you very much :-)

Anonymous said...

Hello,
iwill try your method but the link http://filecloud.io/y7g2r6aq doesn't work any more ?

Anonymous said...

I too am having problems with the filecloud link - after requesting a download ticket, a message that the file doesn't exist appears

Anonymous said...

Indeed, sadly buzzdowngrade at filecloud is no longer available

Anonymous said...

I seem to be getting stuck at "fastboot flash zip rom.zip, which is returning:

sending 'zip' (0 KB)...
FAILED (remote: unknown command)
finished. total time: 0.000s

Is this a CID error?

Unknown said...

I don't think it is CID related, as the error states, it seems to be a problem with the command.

Unknown said...

I updated the post with the new download link to the original ZIP file I used to create mine, hosted on filecloud.io. The file can be downloaded here: http://goo.gl/KDIha. Sorry for the delay!

Unknown said...

The sharing settings for the file weren't set correctly, should work now.

Anonymous said...

Thanks for this nice tutorial who works fine for me !
And thanks a lot for finding workaround with SD card !

Anonymous said...

Hi, the goldcard page is down, but you can use this one:

http://huygens.hoxnet.com/goldcard.html

The command to create the goldcard should actually read


dd if=./pathto/goldcard.img of=/dev/sdx bs=512 count=1

(without the 1 in the end).
The goldcard is only written in the MBR of the card.

Cheers