Installing Android Jelly Bean on an HTC Desire using Mac OS X

Installing Android Jelly Bean on an HTC Desire using Mac OS X

Hello all, This is as much a post to remind myself more than anything else, and also this time yesterday I didn't know the first thing about Android let alone rooting, flashing, S-OFF etc and all the other wonderful things I've had to learn - so go easy on me if I'm not using exactly the right terms!


 

This post will take you through the steps required to install Android 4.1.1 (Jelly Bean) on a stock HTC Desire (not X, HD etc).  It may look long and involved but it's not that bad and shouldn't take long.  Make a cup of tea, clear your desk, take a deep breath and let's get started!

DISCLAIMER : THERE IS NO WARRANTY OR GUARANTEE THAT ANY OF THIS WILL WORK.  IT IS QUITE POSSIBLE YOU MAY PERMANENTLY DAMAGE YOUR DEVICE.  THIS IS NOT MY FAULT - YOU PROCEED AT YOUR OWN RISK.

Required hardware :

HTC Desire phone.  Mine was sim-locked to Orange but this didn't seem to matter and I didn't have a SIM card in it either.

Mac OS X laptop. I was running 10.8 Mountain Lion.

A PC that can be used to boot a Live CD.  (Note : you may be able to use Parallels for this step - I didn't try it. VirtualBox didn't seem to work as it wouldn't allow the phone to be connected to the VM).

An HTC USB cable to connect the phone to your computer.

Required software :

AlphaRev 1.8 HBOOT reflash utility - get it from here : http://alpharev.nl

Unrevoked3 re-flash utility from here : http://unrevoked.com/#desire

The HTC-desire adapted Cyanogenmod 10 ROM image from here : http://d-h.st/Gy8

The Android SDK (for the "fastboot" utility) from here : http://developer.android.com/sdk/index.html

Description of the process

There are three parts of the phone that need 'replacing' with custom software before this will work properly - I couldn't get it to work without doing all three of these so I recommend you do them all.

HBOOT - this is the piece of software on the phone that boots the actual operating system.  Think LILO or GRUB for Linux, or NTLDR for older Windows versions.  HBOOT includes a 'switch' which turns security on that prevents Joe Public installing their own operating software on the phone.  We will need to turn this switch off.

Recovery - this is a part of the phone that allows you to re-install the operating system.  We will use this to install the custom operating system (called a "ROM" in Android parlance) but it needs to be replaced with an alternative to allow custom ROMs to be installed.

ROM - this is the actual operating system itself.  We will replace the standard HTC Android 2.2 with a custom version of Android from the community.

Let's get started!

One of the first things to get used to is booting your phone into the HBOOT menu.  To do this turn your phone off and then press and hold the Volume Down button while pressing the Power button.  The phone will turn on with a very simple text-based screen with four options - FASTBOOT, RECOVERY, CLEAR STORAGE and SIMLOCK.

The phone I used had HBOOT version 0.93.0001 which you can check on the top of the screen. I think the software used to perform the process works on multiple versions but it may be best to check elsewhere if you have a different version.

As this phone didn't matter to me I did a factory reset first and removed all the data and formatted the SD card from the phone's settings menu.

1) Installing a different recovery.

This is quite simple and just involved running the "reflash" program downloaded from unrevoked.com above.  Turn your phone on and plug it into your Mac and start the program.  There are no options - it will just get on with it.  Note that for me this took a couple of attempts to work but you should end up with the message "Done." and your phone looking much as it did before.

To test it boot into the HBOOT menu and use Volume Down to choose RECOVERY and press Power.  You should see a "ClockworkMod Recovery" screen with green on black text and a number of options.  Note that to scroll and select from the menu use the trackpad (up and down to move, press to select).

ClockworkModRecovery

1.5) Backing up existing ROM.

At this point it is a good idea to backup your existing operating system.  Ensure you have an SD card in the phone and boot into Recovery.  Choose "Backup and Restore" and then "Backup".  It won't take long and means you can go back to your stock HTC Sense based Android if you need or want to.

2) Replacing HBOOT

Unfortunately the standard HBOOT includes a security setting which will prevent us installing a file later on so needs to be replaced with a version with the security off - this is called "S-OFF'.  If you look on the existing HBOOT menu you'll see the top line says something along the lines of "BRAVO PVT4 SHIP S-ON".  This means security is on.   I tried lots of different methods of turning this off but the only one that worked for me was the AlphaRev LiveCD.  It's very small and easy to use - just download the .iso and burn it onto a CD and pop it into your nearest PC.  You *might* be able to do this with Parallels however I didn't try it as I have an old Dell here I used instead which worked great.

Boot off the CD and press Enter when asked and then you should see it waiting for the device.  Connect your turned on phone to the PC with the cable and ensure the screen is active (on).  If it's off you'll get "/tmp/cmdline" errors.  Your phone will ask for Super User permissions - allow this.  The process shouldn't take long and when it's done your HBOOT menu should have a nice, pink "AlphaRev" strap across the top.

AlphaRevSOFF

You'll also notice the scary "Why so serious?" image used when booting!

WhySoSerious

3) Install new ROM

Now you'll need to copy the "icsforumCM10_v1.2.zip" file onto the phone's SD card - you can either do this by mounting the phone as a disk or by removing the SD card and copying it over directly (but you'll need a MicroSD adaptor).  When this is on the SD card boot into HBOOT and choose RECOVERY.  Then I have got into the habit of running "Wipe cache partition" and "Advanced ->  Wipe Dalvik Cache".  Not sure if this is necessary but it can't hurt!

Choose "Install zip from sdcard -> Choose zip from sdcard" and then select the .zip file above and confirm.  Installation shouldn't take long and you can then reboot.

At this point I don't expect your phone to work - it will probably get stuck on the "Cyanogenmod 10" loading animation, however you may get lucky, in which case close this page and job well done!

4) Replace boot.img

The final step is to re-write the boot partition of the operating system (not the same as HBOOT!).  Reboot the phone into HBOOT menu with the phone connected but this time choose "FASTBOOT".

On your Mac find the "icsforumCM10_v1.2.zip" file and extract the "boot.img" file out of it.  Then open up Terminal and run the "fastboot" command - this is part of the Platform Tools installed when you installed the Android SDK.  Run this command :

$ fastboot flash boot boot.img

This will re-write the "boot" flash storage partition with the contents of boot.img.  If we hadn't replaced HBOOT earlier then we wouldn't be able to do this as the boot.img would fail the signature verification.

And now you should be able to boot into Cyanogenmod 10 and Android 4.1.1!

Android411

AboutPhone

Note that not all features work and this is experimental software so don't expect a fully working phone - but the good news is you can always restore HTC Sense from your backup in 1.5 above if necessary.  Once you get into the habit it's quite easy switching between various ROMs.

Good luck!


Comments (0)


Add a Comment

Please login to comment.