How to install CyanogenMod 7 on an HTC Desire

Quick post because I wrote most of this out for a friend and figure it was internets worthy.

Firstly, why would you want to do this?

  1. CyanogenMod gives you Apps2SD functionality which means you can store apps on your SD card regardless of whether they support being moved to SD. The Desire has some or other issue with storage space and you’re forever running out.
  2. Android 2.3.3 is slick and should almost double your battery life.
  3. CyanogenMod has hundreds of tiny tweaks that make your phone better and faster.

Warning: This should be obvious but following the steps below will essentially factory reset your phone and you will lose all apps etc. Since your contacts are probably backed up with Google and all the apps are available via Market, you shouldn’t need to stress.

From start to finish this entire process should take less than an hour.

  1. Plug your phone into a computer and copy everything off your SD card. This is only necessary if you care about your photos and movies etc.
  2. Use unrevoked to root your phone. Don’t stress if it automatically reboots once or twice. It does that… no idea why.
  3. Install Clockwork ROM manager from the Market. (the free one is fine)
  4. From inside the Rom Manager, “Flash ClockworkMod Recovery”. Takes a minute and will give you a success message when done.
  5. From inside the Rom Manager, “Partition SD Card”. This partitions and formats your SD card to give you Apps2SD functionality and also a bit of swap memory. I used a 512mb Ext partition and a 32mb swap partition. (Your phone will reboot and do the partitioning in the recovery mode)
  6. From inside the ROM manager, use “Download ROM” to get the latest Stable CyanogenMod. It’ll ask if you want the Google apps as well, tick the box to say yes.
  7. Wait for it to finish downloading (might take a while since it’s about 90mb of downloads)
  8. When done it it will ask if you want Backup Existing ROM and Wipe Data and Cache. If this is your first CyanogenMod you’ll want to tick the last two (Data and Cache). Additionally you probably also want to backup your existing rom. (it backs it up to the SD Card)
  9. Your phone will reboot into recovery and start doing stuff. It’ll do the backup first (take about 10 minutes) and then it will install the new ROM (takes about 8 minutes) and then it will reboot.
  10. The first reboot is slow. Don’t stress.
  11. Boom, you have CyanogenMod 7 with Android 2.3.3 (at time of writing)

Why you probably shouldn't buy an HTC phone in South Africa.

Update October 2010: It looks like Leaf have stopped messing with the phones. I have a Vodacom Desire and it doesn’t have any Leaf stink on it. Maybe someone at Leaf read this post?

My mobile phone has a weird bug. The wifi works perfectly and then I leave the house and it never switches over to 3G unless I reboot the phone.

That’s a pretty annoying bug, but what makes it even more annoying is that the problem was actually fixed 8 months ago with the release of Android 1.6. There are also a whole bunch of cool updates as part of that 1.6 release, but still, I’m stuck with version 1.5.

So why not upgrade? Well, the problem lies with a company called Leaf. Leaf are the HTC importers for South Africa. Sadly, if all Leaf did was import the phones we’d be fine, but the over-reaching company gets involved in the process of managing the software on the phones and this is a job they fail at miserably.

When I phoned Leaf to ask when there will be an update made available they said that they were busy “testing” and that I should wait 3 to 4 weeks… This sounds reasonable but unfortunately I can’t believe them. You see, Leaf have a long history of completely stuffing up Android phones in South Africa. This dates back to many many months ago when Leaf first launched the HTC Magic (my phone).

Regular Android phones have an application called “Market” which contains thousands of applications (much like the Apple App Store). You can find all kinds of things like Google Sky Map (hold it up to the sky and it shows you which stars you’re looking at) to apps that make farting sounds. Great stuff, generally.

But when Leaf launched the Magic it came bundled with an app called “Open Market” and no regular “Market”. Open Market had a few (ie, like 30) really really bad applications on it… I think the top rated app was something with wallpapers of dogs. When pressed for an explanation Leaf said that Google didn’t give them permission to use the Market app. After chatting to some people from Google who work on Android it sounds like this “permission” excuse was made up. The more likely explanation is that Leaf were hoping to start selling applications via their Open Market app. Yes, Open Market is developed (used losely) by Leaf. Once they realised that nobody cares about them they buckled and said they were working on an update that included Market… they suggested we wait 3 to 4 weeks while they tested the new version. This was in May.

Eventually, late in August, 5 months after promising something in 3 to 4 weeks, Leaf quietly released an update on their website. The phone was finally what I’d paid for… a fully fledged Android phone… but only for a few weeks as Android released version 1.6 a few days later.

One of the big attractions of Android, and certainly why I bought my phone, is the Open Source and constantly evolving platform… The idea that your phone’s operating system isn’t frozen in time for 2 years and can get updates (automatically if you want)…Unfortunately Leaf are just plain incompetent and don’t seem to care that they’re selling a device that isn’t quite what the customer paid for… Our phones are stuck in time… and, when pushed for an answer we’re told again “3 to 4 weeks”.

When I eventually lost my cool and tracked down Peter, Leaf’s marketing person, he said I should send him an email and that he would get me some answers in a few days… He then got his PR agency to phone me and promise that they would get me some answers the next day… Perhaps ironically it has been 3 weeks and I’m yet to get anything out of them.

So here are the questions I asked Peter in that email 3 weeks ago.

  • When will the HTC Magic get a 1.6 ROM
  • Why has it taken so long? (8 months and counting)
  • What is Leaf doing to correct the problems with the process and how are they going to convince consumers that buying via Leaf is a good idea?

Until Leaf can answer these questions I would advise against buying any HTC products in South Africa.You’re just not getting what you paid for.

The end.

ps. I heard that Leaf are bringing in two new HTC phones, the Legend and Desire… Both look like sweet phones, it’s a pity that if Leaf will probably ruin it for anyone who buys the phone by never releasing any updates. Cash in hand baby, cash in hand.

Android for noobs and Heroes!

Some of my non-technical friends mentioned that all this Android stuff sounds great but they don’t understand any of it. So here is a very brief introduction. Android is a (mostly) Open Source operating system initially developed by Google and subsequently taken over by the Open Handset Alliance (OHA). This means that instead of every phone manufacturer working on building their own operating systems in isolation, the members of the OHA all work together to make Android better, fixing bugs and writing new apps.

Just a little teaser... I've subsequently installed the Hero ROM... and it is beautiful.
My Magic running Hero with TouchFLO.

This does mean that a relatively unknown manufacturer like Huawei could build a phone to Android specifications, install Android on it and reap the rewards of work that HTC employees had done. Phone manufacturers can chose to keep applications to themselves, like HTC has done with the user interface app called TouchFlo that they released on their new Hero Android phone. However the Open Source license states that if HTC makes any changes to the core Android system (ie, fixing a bug or adding a new feature) those changes have to be shared with the rest of the the Android community.

While all the OHA members, (Google, Intel, Nvidia, HTC, LG, Motorolla, Samsung, Asus, Garmin, Huawei, Sony Ericsson, Toshiba, Acer and more)  work together to build a better phone operating system, there are also a bunch of independent nerds in their nerd rooms building cool apps and fixing bugs for free. (Some developers can charge for their apps)

This is great for the consumer because not only do you get a great operating system and great apps but you also get well priced phones because there is always pressure from the little known phone manufacturers in China etc bringing out a really cheap Android phone. This also means that phone manufacturers can focus on building good quality phones with great cameras etc instead of wasting time with the OS.

While Apple’s iPhone does have a more mature ecosystem, the speed at which Android is currently moving makes me think that their lead will only last for a few more months. Case in point is the ridiculous speed at which new ROMs (A ROM is basically a big file containing the entire operating system) are being released by the Android community. I don’t think I’d be exaggerating if I said there was a new ROM available ever second day.

Which brings me to the part that my nerd friends want to hear about. Running the HERO Rom on my Magic. To clear this up for the non-nerds, what I’m doing here is running an Operating System theoretically built for HTC’s newest phone, the Hero, on my HTC Magic. The fact that this is even possible is entirely due to the fact that these phones run Android. While it may have been possible to do it with other phones in the past, the process would have been exceedingly complicated and probably impossible.

The Process: It was easy, I put the on my phones’ SD card, booted into fastboot mode, fastbooted the recovery image and applied the It took about 2 minutes in total.

The OS: There are a few new things:

  • New keyboard with longpress for things like numbers and symbols ($%#()!) etc. This is great.
  • New Social Networking integration. When you’re setting it up it asks for your twitter, facebook and flickr details. From then on uploading a picture to any of those is a one “click” process. The built in Twitter client, Peep, is pretty nice too.
  • TouchFLO is very pretty but it really needs to be equated to Vista… It is CPU intensive and therefore your battery life is decreased. I used Touch Flo for a few days and then turned it off, which essentially makes the phone look like the traditional Android interface and increase the battery life. TouchFLO does have some nice widgets that are not available once you disable TouchFLO.
  • There are some new non-TouchFLO widgets that come bundled with the image (A neater calendar widget is one) but I think these are probably all available on Android Martket.

Now that I’m back to running the standard Android UI, I do believe that the Hero ROM has increased my battery live compared to the stock image that the phone came with.

All in all I’m very happy with the Hero ROM and I certainly won’t be going back. 😉


Rooting a Vodacom HTC Magic and upgrading the firmware in South Africa to get Android Market and more.

If you’re in South Africa and you own an HTC Magic Android phone you’ll soon realise that it’s missing Android Market, which to be honest, is pretty much what makes Android so damn amazing in the first place. In its place is the Leaf Open Market. Leaf are the South African HTC importers. Open Market is about as awesome as getting stabbed in the eye with a pencil, repeatedly. The application works okay, but the selection of applications is incredibly dismal.

Update 30/06/09: There are rumblings that Leaf is going to “release” Market in “two weeks”. Supposedly they’re going to be sending out instructions on how to ROM your phone or allowing you to take it into a vodacom store and getting it ROM’d there (most likely they’ll need to send it away). I have no idea how true these claims are. Maybe someone wants to phone Leaf and ask them?

Update 23/07/09: A really good resource for anyone looking to hack their Magic is the XDA-Developers Forum. Some kind souls have also recently added a Wiki specifically put together for hacking the Magic (Sapphire) which every one of you should read from start to finish.

Anyway, the primary reason I love Android is because it’s hackable. Commence hacking. Warning: Yes, this probably will void your warranty. Yes, it’s possible that the real Android Market will eventually be released in SA, but I’m not holding my breath.

Basically what we’re doing here is updating the phone’s firmware to the version HTC originally intended the Magic to ship with… There are stacks of other firmwares (called ROM’s in the ‘community’) floating around, I’m just pointing to one that definitely works. Using the wrong ROM can put your phone in a state where it refuses to boot… Never fear, see below ‘Recovering from a bricked Magic‘.

General Steps

I’m going to explain the general steps you go through first… This will help you understand what it is you’re about to do so that you aren’t just blindly following instructions.

  1. We get the Android SDK and Fastboot applications installed on our computer
  2. We copy the ROM we want to install onto the SD Card and rename it ‘’
  3. We boot the phone into FASTBOOT mode.
  4. Using the FASTBOOT program we temporarily upload and ‘install’ the daldroid-recovery.img ROM over USB. (This is a special boot loader app that lets us do cool stuff like made Nandroid backups and install that ROM from the SD Card.)
  5. The phone boots into the daldroid-recovery mode.
  6. We backup our original ROM to the SD Card using Nandoid, clear some settings and then install the new ROM.
  7. Congratulations, you have a rooted, real android phone 😉

Step by Step Instructions

Okay, now that you know the basic steps, here are the details.

  1. Enable USB debugging on the device in Settings->Applications->Development->”USB Debugging”
  2. Ensure you have the Android SDK downloaded, and the included USB driver installed correctly on your desktop.
  3. Download Fastboot. Since I use linux I just copied the ‘fastboot’ binary to the Android SDK’s tools directory and made it executable.
  4. Open up a terminal/dos prompt and “cd” to the tools directory in your Android SDK folder.
  5. Plug in your USB Cable.
  6. Run the following command:
    adb devices

    Linux users will need to run:

    sudo ./adb devices
  7. You should see your Android phone’s serial in the list. If you get an empty list, you need to sort out your USB driver.
  8. Download Daldroid’s Rooted (adb shell) Original HTC ROM for Magic and Daldroid’s Recovery Image
  9. Unzip the file and put it in the Android SDK’s tools directory.
  10. Connect the phone with the USB cable and from the notifications bar, mount the SD card. Rename to and copy it to the phone’s SD card.
  11. On your device, enter the bootloader FASTBOOT mode by turning off the phone and then, while it is off, pressing the volume down button while pressing the power button.
  12. You should get a screen with some androids on skateboards at the bottom…Give it a second to run whatever tests it runs.
  13. Pressing the back button will get you into FASTBOOT MODE and you should see the screen change to say ‘FASTBOOT USB’
  14. Type the following commands on your computer (not on the device):
    fastboot boot daldroid-recovery.img

    Again, Linux users will need to run:

    sudo ./fastboot boot daldroid-recovery.img
  15. This will upload (over usb) a mini recovery image and reboot your phone… It’ll take a few seconds and you’ll be prompted with the recovery interface.
  16. Select ‘Nandroid Backup 2.1’ from the menu. This will write a backup of your existing system to the SD card… useful in case something goes wrong.
  17. Select ‘Wipe Data/factory reset’. This erases settings etc that might not be compatible with the new firmware
  18. Select ‘Apply’. This essentially installs the system image from the file.
  19. Select ‘reboot system now’.
  20. Wait a long time for the first initialization. Congratulations, you have a real, rooted, Android phone with Android Market and thousands of quality apps to install.

The really nice thing about the Daldroid image is that it comes with all the APN settings etc required for Vodacom so your HSDPA will work straight away.

Recovering from a ‘Bricked’ Magic

I promised earlier I would tell you how to recover from a ‘Bricked’ Android phone… I’ve put ‘bricked’ in quotes because a lot of people seem to be thinking they’ve bricked their phones when in reality it’s quite easy to recover.

  1. Check if you can get to into Fastboot Mode:
    1. Remove the battery.
    2. Wait 10 seconds (or more)
    3. While pressing the volume down button, pop the battery back in.
    4. If it doesn’t turn on by itself, keep pressing the volume down button and press the power button.
    5. You should get the Fastboot menu.
    6. If you don’t get into Fastboot mode, try a few more times and then panic. I don’t know how to help you. Try Google.
  2. You now need to copy the right (see step 8 above) onto your SD Card. There are two ways:
    1. Get a usb card reader or use another cell phone that will allow you to mount the SD Card over USB and just copy it.
    2. or, the slightly fancier way, while your phone is in Fastboot mode run the following command on your computer (first put the new in your Android SDK tools directory):
      adb push /sdcard/

      Again, Linux users will need to run:

      sudo ./adb push /sdcard/

      This uploads the file directly onto the SD Card via USB. It takes a minute or two so do be patient.

  3. Now you just need to follow steps 11 though 20 from the instructions above and you should be golden.

Updated (21 June 2009) – Putting the original Vodacom ROM back

If for some or other reason you want to go back to the old version of the Vodacom ROM, you can do so quite easily.

Nandroid writes a selection of files to the SD Card:

2.5M  boot.img
339K  cache.img
60M   data.img
256K  misc.img
265    nandroid.md5
5.0M  recovery.img
78M   system.img

You should really make a copy of them on your local machine just in case. Once you’ve got those files on your local machine you can restore your phone using fastboot like so:

  1. Copy the nandroid files (*.img) from your backup into your SDK Tools Directory.
  2. Boot your phone into Fastboot mode (Steps 11, 12, 13) from the Step by Step guide above.
  3. Run the following commands from your computer:
    fastboot erase system -w
    fastboot erase boot
    fastboot flash system system.img
    fastboot flash userdata data.img
    fastboot flash boot boot.img
    fastboot reboot
  4. Congratulations, you now have your old Vodacom phone back. :/

Hope this helps, feel free to ask questions.