My goal with this blog

I write about relevant changes in the way that people use the web and how startups are built to provide services and products for this ever changing wonderful thing we still know as "the web." As a former entrepreneur turned early-stage investor, my greatest hope is for this to be useful to other folks that are like me in the hopes that they can avoid some of the mistakes I've made.

How to hack your Nexus One to run Cyanogen for a good performance boost (and some serious geek cred)

It is a mystery to me how the hobbyist hacker community can make Android so much better than the stock images that Google ships, but if you've got a Nexus one, Cyanogen has just made things much much better. As an iPhone owner from day 1, I can tell you that the simple fact of moving from the stock 2.1 image that comes with your Nexus to the latest Cyanogen creates about the same feeling of improvement that moving from an iPhone 3G to a 3GS provided— except that in this case, you aren't changing your hardware. It is software's true magic!

If you've got a Nexus One, and are interested, read on.

Unfortunately, the process is far from simple and the Android mod community has a lot of new jargon that you have to get used to. If you've ever jailbroken an iPhone or iPod Touch, I'd say this is about 30-50% more involved, so get ready to rumble.

Fortunately, I had the benefit of Eddie's amazingly good notes to guide me through it all. I am reproducing them below, along with a mini glossary at the front, and some comments in places that I found tricky. Your mileage may vary on these, and be aware that you could in theory brick (or destroy) your phone, though practically speaking, I've found this to be almost impossible to do with how well the boot loading sequence has been thought out on Android.

--

Some basic terms:

In Android land, the equivalent of jailbreaking is "rooting" which refers to getting access to the root directory of the phone's ROM (which is not really Read Only since both Google/HTC and you overwrite this with every update). In the steps below, you will be using a command line program called "fastboot" to do the unlocking on that root directory and install custom software. Fastboot is also the name of a mode in the Nexus when you first boot up (it is actually available to all Android phones) that gives you a sort of minimalist OS/boot loader thing to take actions that affect the OS in the phone. It's not quite like a PC BIOS menu, but it can be helpful to think of it that way. Below you'll see the key combination required to get the phone to that which can vary a little by model.

Also, there are three basic software bundles you will be applying after the phone is "rooted:" the recovery image which basically provides a more powerful fastboot environment (to do things like unlocking and backing up), the baseband update (which is just like the iPhone one is that it updates the separate system that runs the radio), and the Cyanogen custom ROM which is the magic that will make your Nexus instantly better.

There is an additional step required which has to do with the crappy licensing around the proprietary Google apps (that you will definitely want on: Market, Gmail, Maps, etc.). Because Google asked the Cyanogen guy to stop including those with his mods, you'll have to apply them as a sort of patch when you are done. This is ok and is actually the easiest part of the update.

We did all of this on a Mac and the instructions below are for that platform— however, I am sure the Android SDK is good enough that it will be a relatively simple exercise to transpose the instructions for Linux and Windows. We did assume however that you are comfortable with the command line.

Finally one important note: in doing this, you will lose all of the data on the phone. Because of Google's phenomenal sync, this won't affect email, contacts, or calendars, and because the media (pictures) are stored on the SD card, you will be fine there, but depending on which apps you've installed, you may lose some local data. You will also have to reinstall all of your apps. You have been warned.

Let's get started:

1. Take a deep breath. It is just software and you are going to master it!

2. Download and install the Mac OSX Android SDK. I am going to assume for the purposes of this list that you have put it in /Applications/android-sdk-mac_86/tools/ but it doesn't matter.

3. Get fastboot-mac from here. Rename it 'fastboot' and put it in /Applications/android-sdk-mac_86/tools/.

4. Get Radio_20100203_2_Signed_PASSION.img,
update-cm-5.0.4.1-N1-signed.zip AND gapps-passion-ERE36B-2-signed.zip
from here and put them in /Applications/android-sdk-mac_86/tools/.

5. Get recovery-RA-nexus-v1.6.2.img from here and put it in /Applications/android-sdk-mac_86/tools/

6. Put Get Radio_20100203_2_Signed_PASSION.img,
update-cm-5.0.4.1-N1-signed.zip and gapps-passion-ERE36B-2-signed.zip
on the root of the SD card. You can do this by mounting the phone via a USB cable (this works just like any USB stick except you have to click a button on the phone's UI).

7. In your phone settings > applications > development, set usb
debugging to enabled.

8. Turn off your phone and put the SD card with the 3 files on it
into your phone.

9. Hook up the USB connection to your phone and your mac.

10. Reboot phone into fastboot: Hold down trackball, push the power
button and hold both until you see the fastboot screen. (The fastboot
screen is the one with the Androids on skateboards)

11. In Terminal on your mac, cd to /Applications/android-sdk_mac_86/tools

12. Type ‘./fastboot devices‘ to make sure your phone is recognized
(it should list a device number rather than simply returning to
command prompt with no feedback).

13. Type ‘./fastboot oem unlock‘ to unlock the bootloader (wohoo, your phone is now rooted!)

14. Use volume keys on the phone to navigate to yes and press the
power button to confirm.

15. When the phone finishes booting, in your phone settings >
applications > development, set usb debugging to enabled, then power
it down.

16. Reboot phone into fastboot: Hold down trackball, push the power
button and hold both until you see the fastboot screen. (The fastboot
screen is the one with the Androids on skateboards)

17. (you're still in terminal in /Applications/android-sdk_mac_86/tools)
Type ‘./fastboot flash recovery ./recovery-RA-nexus-v1.6.2.img‘. (Note
filename will change as recovery image is updated)

18. Type './fastboot flash radio ./Radio_20100203_2_Signed_PASSION.img'
to also update your radio at this point

19. Once the Recovery flash is complete (should be almost instant),
press the Power Button. The highlighted blue text should now say
HBOOT. Use the volume down button to highlight "Recovery" and hit the
power button to reboot into recovery.

20. if this step fails, power down the phone, and try this: hold down
the VOLUME DOWN button and then hold the POWER button until you get to
the skateboard screen; use volume down to highlight RECOVERY and hit
the POWER button

21. You should now be in the Recovery screen after a reboot -- this
screen has 9 green text options at the top and an android x in the
center of the screen

22. Once in Recovery Mode, use the trackball to scroll down to
"Backup/Restore" and press the trackball three times, and wait until
the backup is complete.

23. Once backup is complete, wipe, since you're coming from stock
(even fastboot oem unlock may not fully wipe, do it just in case) many
users report the phone not booting properly without a wipe at this
point.

24. Scroll down to "Flash zip from sdcard", and press the trackball.

25. Select the CyanogenMod update (update-cm-5.0.4.1-N1-signed.zip),
and press the trackball again to confirm. Wait until the flash is
complete. (Note: this will take a little while).

26. Once again, Scroll down to "Flash zip from sdcard", and press the trackball.

27. This time, select the Google Apps File
(gapps-passion-ERE36B-2-signed.zip), and press the trackball again to
confirm. Wait until the flash is complete.

28. Once you are back in the main menu, press the trackball select the
first option (Reboot system now) and reboot the phone.

29. If everything was done correctly, the phone should boot into CyanogenMod!

Eddie's extra bonus section— only for the adventurous (I have not tried this!)

Follow the instructions here to download your kernel and associated .ko module, your overclocking tool, and go
to town with undervolted and overclocked goodness!

Good luck. If it works correctly, it should take about 35-45 minutes to do it. And at the end of it, you will not only have one of the coolest hacker phones, but you will have done it! And trust me, it is worth it!

[A big thanks to Eddie, who both plied me with drinks last week to convince me that I should take this on, and then produced the first draft of this document so that I could not end up bricking my own iPhone]

REFERENCE

http://forum.xda-developers.com/showthread.php?t=611829
http://androidandme.com/2010/01/hacks/video-how-to-unlock-and-root-a-nexus-one/
http://forum.xda-developers.com/forumdisplay.php?f=559
http://wiki.cyanogenmod.com/index.php/ADB
http://developer.android.com/guide/developing/tools/adb.html
http://forum.xda-developers.com/showthread.php?t=459830
http://andblogs.net/fastboot/
http://developer.htc.com/adp.html
http://wiki.cyanogenmod.com/index.php/Full_Update_Guide_-_Nexus_One_Firmware_to_CyanogenMod
http://www.mahalo.com/how-to-hack-a-nexus-one#cite_note-4
http://www.cyanogenmod.com/home/cyanogenmod-5-0-nexus-one
http://forum.xda-developers.com/showthread.php?t=633238&page=66