Installing CyanogenMod on HTC Legend

For various reasons, I decided that it was time to do away with the stock firmware on my HTC Legend and install CyanogenMod.
The CyanogenMod wiki details the process for rooting the phone, installing a custom recovery image, an installing CM, but I found the following process much simpler:

NB: You will need a Windows PC.

  • Sign up for an account at and log in
  • Select “HTC Legend*” from the –Select your device– menu
  • Follow the process to unlock your bootloader – As the warnings say, this may void your warranty, and attract extra repair costs if your phone breaks.
  • When complete, download the custom recovery image
  • Place the image in C:\Android and rename it to recovery.img
  • Install the custom recovery image with the command fastboot flash recovery recovery.img. You can now boot into Recovery by selecting “RECOVERY” from the bootloader menu.
  • Install CyanogenMod using the Method via Recovery

Apparrently some phones have issues with this method as the kernel needs to be flashed seperately from CM, but I didn’t find this necessary with the Legend.

Update 12/1/13: There’s a developer on the XDA-Developers forum who’s creating unoffical ports of newer CyanogenMod releases based on Android 4.x. I’ve just installed his CM 10 ROM using the same method as 7 and it runs great.

Setting up CoffeeScript on ubuntu

As I mentioned in a previous post, I recent learnt about CoffeeScript, a quick way of writing nice clean Javascript. The CoffeeScript website has instructions for installing the compiler, first requiring installation of Node.js, which a lot of tutorials show you how to install from Git, and also requiring NPM which is usually installed by curling a shell script directly into bash(!). On Ubuntu, the install process is much simpler and less ripe for security holes:

  1. Only required if running 10.04 LTS (Lucid Lynx):
    sudo add-apt-repository ppa:chris-lea/node.js
    sudo apt-get update
  2. sudo apt-get install nodejs npm
    sudo npm install -g coffeescript

Check that CoffeeScript is installed correctly by running

coffee -v