Home Learn Linux Linux Tutorials How to Install CyanogenMod on an Android Phone

How to Install CyanogenMod on an Android Phone

CyanogenMod offers a customised open-source firmware version of Android for a variety of phone and tablet hardware. It provides some features not available in the vendor-supplied firmwares, it's more customisable (if you want, you can build CyanogenMod for yourself), and it allows you to avoid the bloatware that comes with vendor firmware. It also tends to give quicker access to updates. There are a few more reasons, too, why you might want to try CyanogenMod; for me, the opportunity to lose a particularly annoying piece of proprietory software on my Galaxy S2 was a big gain. Read on for my experience installing CM on a Galaxy SII.

As per CyanogenMod's general disclaimer, you mod your phone at your own risk!cyanogenmod boot screen

Getting started

If you have any irreplacable data on your phone that's not already backed up elsewhere, now is a good time to back it up. (Discovering that my phone was refusing to connect correctly to my laptop to do this further encouraged my modding efforts.) User data stored on the SD card should not be lost, but this sort of process is always a bit risky (and not all apps obey correct data storage expectations).

The details of install will vary between devices. The list of supported devices links to an install guide (to install a pre-built image) and a build guide (if you want to build your own image). I'll look here at the install process, but if you're interested in building your own version, the CM docs are pretty helpful. Unless you're experienced, it's best to try out a pre-built release first before starting down the DIY route.

In my case (with a Galaxy SII), I downloaded the Heimdall Suite and ClockworkModRecovery to my laptop to get started. I then followed the wiki instructions to boot the phone into download mode and used Heimdall to push ClockworkModRecovery onto it. (A note: I was using my Mac laptop to do this rather than a Linux box, and ran into problems with an "ERROR: Claiming interface failed!" error. This page (including the comments) got me sorted.) At this point, I had a custom recovery image on my device, which would allow me to install the CyanogenMod firmware.

Installing the firmware

Next step was to download the relevant build for my device (again, note that this is device-specific! Check the location of the files for your own device on the wiki.). To push this onto the device SD card, the instructions give the command

adb shell mount /data

According to the docs this should indeed work, but I got an (unhelpful) error message from ADB. Instead, I used the interactive shell, exited it, and then pushed the image to the SD card:

$ adb shell
~ # mount /data
~ # exit
$ adb push /sdcard/

Having done that, I booted into recovery mode on the phone. The SII requires you to hold down Volume Up, Home, and Power (all at once; bring your extra fingers!) to do this, and you need to keep holding them down until you see the recovery screen.

Note! At this point, there is a backup/restore option on the ClockworkModRecovery screen. I strongly recommend using this, even if you already backed up any irreplaceable data. But then, as an ex-sysadmin, I am professionally inclined to backup paranoia. It's your data; it's up to you what you do with it.

This brought me to the scary part: choosing 'wipe data / factory reset' from the CWM menu. After this, you should be able to choose 'install zip from sdcard', choose the CM file you installed with adb push above, and away you go. However, I was unable to find this file on the sdcard. Instead, I installed it to the internal sdcard with

adb push /emmc

and was then able to find it via the 'install zip from internal sdcard' menu option.

More troubleshooting: While doing this, I also had the problem that adb failed to recognise my device. After a few rounds of removing and reinserting the USB cable (both ends), restarting the adb server, and restarting the phone into recovery mode, I finally had success with using the 'advanced - reboot recovery' option on the phone's CWM menu. To be honest this is just voodoo as I have no idea why it stopped working in the first place or why it started again; but if you have the same problem, give it a go.

The install complete, it was time to hit 'reboot system now' on the phone's CWM menu.

How bleeding-edge are you?

Your options when choosing the CM file to download are:

  • Stable: What it sounds like. This ought to work OK. The link from the device page may not work if there's no very recent stable release for your device. Try Google or browse through the download site.
  • Monthly: A bit less stable than stable, a bit more up-to-date. Being considered for release, so ought to basically work.
  • Nightly: Bleeding edge. Use at your own risk. May well not work properly.

I tried a nightly build first, since ideally I wanted CM 10.1 (based on Android JellyBean). Sadly it crashed (literally) every second, so I retreated to the stable (9.1.0) version for my phone (based on Android Ice Cream Sandwich). To do this, I botted back into the CWM menu, used adb push to install the stable version to the internal SD card, did another factory wipe (when I tried without this it hung on boot), installed the 9.1.0 zip to my phone, and rebooted, this time successfully.

Google Apps

CyanogenMod no longer includes any of the Google Apps (Play Store etc) due to copyright issues. To install these, I had to download from, and install using adb push. (Alternatively you may be able to download and save the file straight to your phone.) I installed the zip file by shutting the phone down again and booting back into recovery. I installed to/emmc/ as before, but this time it was accessible under 'sdcard' rather than 'internal sdcard'. This may be a reflection of the way that CyanogenMod organises the internal storage as compared to the default Samsung method. This went smoothly; the only really annoying thing was that I then had to go through all my old apps reinstalling them one by one, and updating preferences. On the upside, that meant I could not install a whole load of rubbish that lingers around in my history; and unlike with a stock vendor install, there are very few restrictions on what you may and may not install or remove.

Final thoughts

So far, my phone feels faster and works fine. I'd like to get the JellyBean version running so will keep an eye on the release candidate downloads; I lack the patience to keep up with bleeding-edge. I have however found the CyanDelta app which should simplify the process of updates; as yet I haven't used it so cannot vouch for it directly. I confess that the process was a little nail-biting at points, but for most hardware (check the specifics for yours!) you should be able to reinstall the vendor's stock firmware if it all goes horribly wrong. Certainly worth the hassle for me; that dreadful vendor app will never pop up unbidden again!



Subscribe to Comments Feed
  • loper Said:

    Your article is great! But for newbies, CWM installation process probably may be helpful too. I think, some articles about android devices program architecture may be helpful. For example, describing what is boot-loader, what is recovery-mode and fastboot.. I use HTC phone with custom firmware, but still don't know enough, to.. feel free =). Professional forums, like XDA, oriented on professionals, who already knows anough, and end-users, who just consume, but NOT on the newbie-devs.. It's hard to explain, but you are standing on a right way! So please, continue!

  • ThomasM Said:

    I've the SGS2 too and what I missed when I upgraded first to ICS then jellybean was now my radio didn't work and Google isn't interested in supporting but fortunately Mike Reid came along with his Spirit FM app which does the job rather nicely :)

  • Ziggy Said:

    It's a shame job isn't working for you. I am in the US with Sprint with the D710 (Sprint's version of the SGS2) and am running 4.1.2 fine. As a matter of fact, I am running the i9100 kernel with the FF18 modem (albeit I believe the newest modem available is the FK23 or so). Given that I can run the kernel from your phone on my D710, one would think it to be a trivial matter to tweak the ROM for essentially what boils down to key mapping and making sure that you incorporate the proper HSPA modem versus the CDMA which we use over here on Sprint... Z

  • Sam Varghese Said:

    I'm a little confused - don't you first need to root the device before you can install Cyanogemnmod?

  • Andrew Greig Said:

    Hi Sam I am looking forward to your article on this. Do I practise on my HTC desire? or do I mess with the Galaxy S2 and if I screw it up just get the S34G on the Telsta staff plan?

  • andres Said:

    no need to root from what i have seen in tutorials. i plan on trying out replicant only free software! instead of play store f-droid is really good!

  • tray Said:

    AOKP has JB roms for my SII where cyanogenmod does not.,but I havent tried them yet. According to the forums they are stable and are built off of the cyanogenmods cm10. Of course there are several versions of the galaxy SII so make sure you match the model numbers for the best outcome.

  • Said:

    always had the cheapest mobiles - pay as you go - just for emergency! I had a mad moment one nite and bought myself an android phone - ticks all the boxes - gingerbread cyanogemod etc with lots of numbers\1 I have been just using it as pay a go - but have decided to learn how to use it1 iv ordered 2 giffgaff sims? - what will be the first steps after signing in -so far I cant even get email.- google wont load? any books that could help?

  • gopinaidu Said:

    sir..plz provide a custom rom /cynogenmod for micromax begging..coz am facing a lot of problems with my current firmware..plz someone help

  • vishal Said:

    Does cyanogenmod is available for Nokia N900. Please post the installation steps of cyanogenmod for Nokia N900

  • mario Said:

    can you put cyanogenmod on the xperia miro?

  • venkatesh Said:

    please made a rom for micromax is aindia made phone.processoris spreadrum sc 2860.please made a rom for it as earlier as possible.

  • naga ChaitanYa Said:

    does this work on micromax ninja a89.?plz, help phone me 9849120712

  • dzana Said:

    I have installed cyanogenmod on my lg optimus L7, I ran zips from SD card that i previously downloaded, and everything was smooth. The only thing is that the first boost of my phone is taking too long. There is this cyanogenmod logo spinning around and I don't know what to do. Help, please ?

  • sameer Said:

    hello sir , can i install Cynogen for my micromax A35 bolt . plz tell me about that.. can i do..????

  • rajesh Said:

    Sir, can i install ccynogenmod in my gionee CTRLV3.

  • renjoy joseph Said:

    Is there any canogen mod custom ROM for micromax bolt a58 plz help

  • Jessin Said:

    Sir can i install cynogenmod in my micromax aq5001

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Linux Training / Board

/** BC-056 Ameex changes to add tracking code - 2016-01-22 **/ ?>