Getting CyanogenMod on the Galaxy Nexus

Screenshot from a Samsung Galaxy Nexus phone running CyanogenMod 10.1. The screenshot shows a black strip along the top, with a Facebook logo, network and battery status indicators, and a clock. Below that is a calendar display showing a forthcoming "Asperger's employment assessment" and St Patrick's Day in Northern Ireland. Below that is a weather widget showing -1degC and "partly cloudy" in Surbiton. Then symbols representing a phone, an address book, a menu, a smiley representing the SMS program, and a Dolphin symbol representing a web browser. Below that are white buttons for Back, Home, recent apps and Search.A month or so ago I bought a second-hand Samsung Galaxy Nexus phone — I had intended to get a Nexus 4, but there were the usual supply problems at the time, and I bid on the Galaxy on eBay and won (much to my disappointment as the N4 came back on sale hours before the auction closed). Prior to that I had been using a Samsung Galaxy S, which I had upgraded to Jelly Bean using the third-party firmware CyanogenMod. This had produced a dramatic performance boost, but had also led to much reduced battery life, although this could be remedied by turning off mobile Internet except when I actually needed it. Last week, CyanogenMod released their latest milestone for Android 4.2, and after some inquiries I decided that was the time to install it. There was also a feature in the UK’s Android magazine, in the “Hacker Zone” section, on how to install CyanogenMod on a rooted phone; however, it gives no indication as to how to root in the first place.

My main worry about installing CM on my phone was that the battery life might be similarly affected as it was on my old Samsung. I found out that the processor is totally different, the forums had conflicting responses although a friend told me that he had used nightly builds on his Galaxy Nexus and the battery life was fine. He also said that the nightlies were solid; a look at the forums and CM’s Google Plus page showed that not all of them were, and they were not meant to be. I decided to wait until the Milestone 2 release came out, which it did last Monday. There are instructions on the CM website here about how to install CM (which is a two-stage process), but as with the instructions regarding the Galaxy S, there are places where they are incomplete and there are better ways of doing some things. I should add that my Mac dual-boots into both OS X and Ubuntu, and they do different parts of the process better: OS X is better when it comes to transferring files, while Ubuntu is better for actually installing the OS.

The easiest way of installing CM is to first use Fastboot to install the recovery utility (which allows you to install operating systems); however, to get that, you’ll need to download the entire Android software development kit. As I was using Ubuntu, I could download them from the Ubuntu repositories, using APT; however, if your phone is already running Android 4.2 rather than 4.1, you will need to download the two packages from the 13.04 (Raring) repositories. You will need the packages android-tools-adb and android-tools-fastboot, and having installed them on the current release (12.10 Quantal), I can confirm that they both install and work fine. How to just get those programs on a Mac or a PC, I don’t know. Installing the whole Android SDK is quite a long and complicated process; I’ve done it quite a few times.

You might also like to back up your data, especially your text messages (if your contacts are synchronised to Google, they will be restored once you log into your new OS). I’ve seen a package called Titanium Backup recommended, but your phone needs to be rooted to use that, and mine wasn’t. There is a free app called SMS Backup & Restore which saves your exported messages as a file, which you can then send via Bluetooth, if your computer supports it, to your desktop ready to transfer back when CM is installed. All your data will be wiped, so if you have images and audio/video files on your phone that isn’t duplicated anywhere else, you might like to download the contents. Note that if you let it download everything, you will find that just about every image file from every web page you ever loaded (in my case, including pictures of old Twitter friends that I had long since fallen out with) will download, so I recommend against doing that. If your computer doesn’t support Bluetooth, there is a file manager called ES File Explorer which lets you transfer files over a local area network (which you will have if you have a wireless router). Failing that, you may be able to just attach your phone to your computer with a USB lead, and that will let you transfer files (make sure you choose “Connect as a Media Device”, not as a camera, which will only expose the images in the camera folders.

The instructions for installing CM on the Galaxy Nexus are here. Note: if you are using Linux, you need to be root, so if any command does not work, repeat it and preface it with ‘sudo’ (you will need your password, or the root password if there is one — there isn’t on Ubuntu). The three files you need before you start are the ClockworkMod Recovery utility (you can find the link for that on CM’s instruction page), the CM bundle itself (available here — if you’re installing M2, or if there’s an M3, you need to click “M snapshot” and download the one at the top; otherwise, “Stable build” if there is one), and the Google Apps bundle, which includes the Play Store which is where you download apps from, which is to be found here. The latest version of CM is 10.1, which corresponds to Android 4.2. If you download something further down the list, you’ll get an old version of Android.

You will need to be in Fastboot mode before you flash the recovery utility; to do this, first connect the phone to the computer with a USB cable, then power the phone off (by long-pressing on the power button on the right). When the phone has shut down, hold down both the volume buttons (i.e. both ends of the long button on the left hand side of the phone) and then press the Power button again. When in Fastboot or using recovery, the two volume buttons act as cursor keys to move up and down in a menu, while Power selects. Install the recovery program as instructed, then make sure you reboot into the recovery, not the old OS (this will wipe recovery and you will have to do it again).

While in recovery, if you’ve used your phone at all, you need to wipe the remaining data. To do this, use the main menu options “Wipe data/factory reset” and “Wipe cache partition”, then choose the main menu option “Mounts and storage” and select “Format /system”. You do not need to format /sdcard. If you have already uploaded CM to that directory, this will wipe it. If you do not do this, your phone will hang when trying to load CM the first time — you will see their animation and it will not go away; you will have to pop the battery out and back in again.

Most instructions for uploading CM tell you to upload the CM and Google Apps bundles before you start. You no longer need to do this as of Android 4.1; you can sideload them now. From the main menu, choose “install zip from sideload”, and you then need to enter the sideload command on your computer (adb sideload followed by the filename) to transfer the files — first CM, then the Google Apps — to your phone. It will then install them as soon as the file transfer (CM takes longer than Google Apps, but it’s only about a minute) finishes. When the second of those is complete, you can reboot into your new OS, and it will take you through the same process of linking to your Google account and doing a few app updates that it went through when you first turned on your phone.

The results will not be as dramatic, of course, as installing CM10 on a phone that had previously ran Samsung’s geriatric Gingerbread, and some of the advanced features that were exposed in earlier versions have now been hidden as security measures. However, the added configurability that I missed when I started using stock Android on my Galaxy Nexus is restored, including the more powerful lock screens and more flexible settings, which I had quite missed and didn’t realise were not part of stock Android. You can also restore the buttons at the bottom, including the permanent menu button if you like (some call that a “user-interface blunder” but it always made perfect sense to me and it’s nice to have the menu button in the same place from app to app). The battery life is fine, with no noticeable difference from stock and I can still keep it going for 12 hours with Internet and Wi-fi enabled (it’s mainly the screen that drains power, so not spending too much of your day out browsing the web on the phone is a good idea). The sound equaliser, the biggest feature of CM that’s not in stock Android, looks impressive, but I’ve not had the opportunity to use it yet.

If you have a Galaxy Nexus, you will not gain as much advantage from CyanogenMod as if you have a phone with a manufacturer’s version of Android on it. This is because the Nexus’s version of Android is the first to be updated; manufacturers’ versions take months, and sometimes never appear (the Galaxy S, for exmaple, was never updated beyond Gingerbread (Android 2.3), though CM has proved it more than capable of running every version since). CyanogenMod is somewhere in between: version 4.2 was first released in November, and the CM version is still not officially stable, although I have not noticed any bugs in mine since installing a week ago (CyanogenMod 10 took four months from the initial release of Jelly Bean to a stable release). Stable versions of CM are based on more stable versions of Android, so you’ll wait until, say, version 4.2.2 to get Android 4.2, which will have had most of the bugs ironed out. So, CM is less risky to install on a Galaxy Nexus than it might be on a vendor-locked phone, but the performance and feature advantage is not huge. The added features are somewhat convenient, but may not be worth the hassle of having to wipe and then restore all the apps and data on your phone.

Possibly Related Posts:

  • I’ve had CM on my SGS2 since early last summer. It works a charm and when it moved to JB in December/January the responsive was hugely improved thanks to the ‘Project Butter’ updates in Android.

    If you’re using a Samsung phone I think everyone should move to CM. The phones are great in terms of the actual hardware but I absolutely hate the Samsung Touchwiz implementation of Android. They have the odd decent app or flourish but it’s clunk and annoying, has bloatware and as you said, they take ages to update.

    I tend to update to the latest nightly once a week rather than everyday. The only thing that is weird is that on the SGS2 CM10 doesn’t recognise external SD cards properly. It still works but it’s a bit confusing at first.

  • Keep in mind, CM doesn’t work on some recent Galaxy models, particularly the S3 (only American S3s are supported, which have a completely different processor to the international one). Not sure if the Note devices available here are supported. I also found problems with my SD card on my old GS1, with persistent “out of space” errors and failures to report how much free space there was. It was my main reason, beside the battery life issues, for wanting to upgrade (beside the fact that my sister has an S3 and my mother an S2 - I was getting left behind!).

  • The S4 is announced tomorrow, tossing up whether to upgrade to it. The Xperia Z and HTC One are both compelling alternatives.

    If CM can’t be run on the S4 that would be a pretty big mark against it for me.

  • If your intention is to run CM, I suggest getting a Nexus 4, especially if you’re going to buy outright (probably the cheapest quad-core on the market).

  • Abdulmusawwir Khatri

    Quite informative!! I have the Galaxy Nexus and would like to know your opinion: - How was/is the battery on the Galaxy Nexus?

    • I flashed a stock ROM 4.2.2 yesterday (as I didn’t receive the update), it’s “laggy” at times which is why I’m considering flashing CyanogenMod 10.1.2; What is your advice about CM 10.1.2 ? Thanks!
  • CM 10.1.2 is just CM 10.1 with a couple of security fixes. In my experience it’s been excellent — it adds some useful features that aren’t in stock Android, mostly in terms of configurability. The battery life on the Galaxy Nexus is its biggest weakness because the screen is big and has a very high resolution and so the battery will drain in some 4 or 5 hours with continual use; if you don’t use it that much, it will last the day, even with the internet and wi-fi enabled.

  • Abdulmusawwir Khatri

    Thanks! I might go for it… One more thing, is it bad to flash ROMs on your phone every now and then? Because I’ve seen people flashing different ROMs on their phone, I don’t wanna damage my phone as I want it to last as long as I can make it. (by “Bad” I mean… does it reduce the phone’s life or it’s hardware’s life span)

  • It won’t damage your phone. True, there is a limit to how many times flash storage can be written to, but that is thousands, not a few times. It is the same process as when any data or program is written to your phone, like your contacts, photos you take or new apps. Flashing a “ROM” a few times in the phone’s lifetime will not push the limits of the storage. If that were so, the phone would not offer you automatic updates to your OS, whether you used CM or the stock Android.

  • Abdulmusawwir Khatri

    That surely cleared my doubts! I think I’ll flash CM in a week or so :)

  • Pingback: CyanogenMod 10.2 and the Nexus 4 | Indigo Jo Blogs()