In January 2011 I wrote a step by step tutorial how to install CyanogenMod (Froyo) on a Motorola Milestone. One year later I got myself a new phone, a Samsung Galaxy S II (2) and it's time to see what new features are available on the newest Android version (currently Android 4.0, Ice Cream Sandwitch), which is nicely delivered by CyanogenMod 9 (short: CM9).
First let me start by saying that in general the stock ROM (that's the Android version your Samsung Galaxy S2, short SGS2, ships with) is very fast and nicely done. At least MUCH better than its predecessor, the first generation Galaxy. But still, it is still running on Gingerbread (Android 2.3) and one day or later, Samsung will most likely stop delivering updates to the device - like Motorola did it on the Milestone. Or if you need another reason to install CyanogenMod: Just to try something different. It's fun.
***Step by step guide how to install CyanogenMod 9 (Ice Cream Sandwich)***
1. Warnings/Read before doing anything
Warning: Installing a custom recovery image on the Samsung Galaxy S II will void the warranty.
CyanogenMod 9 is currently not released as a 'stable' version, so there can be bugs.
You're doing this at your own risk, this tutorial is only showing how it is possible. I'm not encouraging anyone to take these steps. You're responsible for this and in case something breaks then you're on your own. If you're scared now then close this page, shut down your computer, leave the house, go on the street, stop the next car and ask the driver if he knows how to install CyanogenMod on your SGS2.
If you read carefully and you follow each step, then you still have a backup of your working Android system and you can return to it, if anything bad happens. I had to do this myself twice, until I got CM9 running correctly on my phone, so a restore is always possible.
The following steps are based on the official CyanogenMod Installation Guide for the Samsung Galaxy S2, which basically explains everything but not everything is fully understandable, especially if you come from another phone (like me).
If the download links below are dead, please check out the official guide for new download links.
Please check out the list of known issues so you know what kind of bugs to expect.
2. Download required software/packages
codeworksx's Kernel with ClockworkMod Recovery 126.96.36.199: Download [mirror]
Microsoft Visual C++ Package: Download (Heimdall requires this)
Heimdall Suite 1.3.1: Download [mirror]
CyanogenMod 9: Download (choose the latest nightly file, I downloaded update-cm-9-20120302-NIGHTLY-galaxys2-signed.zip)
Google Apps for Android 4.0: Download
3. Unpack and prepare image, install Visual C++ package
Unzip the content of the file heimdall-suite-1.3.1-win32.zip.
Untar recovery-clockwork-188.8.131.52-galaxys2.tar. There is only one file (zImage). Move or copy this file into the unzipped folder of the heimdall suite (heimdall-suite-1.3.1-win32).
Install the Microsoft Visual C++ Redistributable package.
4. The download mode
Power off your phone.
Connect the microUSB cable to your computer, but not yet to the phone.
Power on your phone by pushing and holding the following buttons at the same time:
Volume Down + Home Button + Power Button. This will start the so-called "download mode".
The following message appears on the screen:
A custom OS can cause critical problems in your phone and installed applications.
If you want to download a custom OS, press the volume up key. Otherwise, press the volume down key to cancel.
Push the Volume Up Button to confirm to enter the Download Mode.
Connect the microUSB cable to your phone.
5. Installation of phone drivers
On the computer, launch the program zadig.exe which can be found in the unzipped heimdall folder, in the Drivers subfolder.
The program Zadig starts up.
In the menu, click on Options and make sure that "List All Devices" is selected.
From the Drop-Down-Menu (USB Device) select "Samsung USB Composite Device" or "Gadget Serial" (in my case it was "Gadget Serial").
Click on the big "Install Driver" button below.
On my Windows 7 machine, a prompt came up with a warning, that the installer couldn't verify the driver's publisher. In this case click on "Install this driver anyway".
After the installation, you can close the program Zadig.
6. Installation of ClockworkMod Recovery
Launch the Command Prompt (cmd.exe).
cd to the folder where you have unzipped the heimdall suite. In my case this is D:\Downloads\Android\Samsung Galaxy S2\heimdall-suite-1.3.1-win32.
Launch the following command (still in the command prompt window):
heimdall.exe flash --kernel zImage
The following text will be shown in the command prompt window:
D:\Downloads\Android\Samsung Galaxy S2\heimdall-suite-1.3.1-win32>heimdall.exe flash --kernel zImage
Heimdall v1.3.1, Copyright (c) 2010-2011, Benjamin Dobell, Glass Echidna
This software is provided free of charge. Copying and redistribution is
If you appreciate this software and you would like to support future
development please consider donating:
Setting up interface...
Checking if protocol is initialised...
Protocol is not initialised.
Handshaking with Loke...
Session begun with device of type: 131072
Downloading device's PIT file...
PIT file download sucessful
KERNEL upload successful
If you're quick, you're able to see a blue bar for about 1-2 seconds on your phone.
The phone reboots itself.
7. Copy CyanogenMod installation files to phone
Once the phone has started Android (still the original version of the phone), it should still be connected with your microUSB cable to your computer.
If you have removed the cable after the reboot, re-connect the cable.
On your phone, select the option to transfer files from your computer. In case Windows needs to install drivers, wait until the driver installation is completed.
On your computer, copy the CM9 (update-cm-9-20120302-NIGHTLY-galaxys2-signed.zip) and the Gapps (gapps-ics-20120224-signed.zip) zip files you've downloaded in step 2 onto the phone (important: To the internal SD card, in case you added a SD card yourself).
Once copied, disconnect the USB transfer mode on the phone.
Remove the microUSB cable.
Power off your phone.
8. Boot into Recovery Mode
Similar to the download mode, press and hold several buttons at the same time:
Volume Up + Home Button + Power Button. Note that this time it is Volume Up!!
Keep on holding the three buttons, until you see the orange menu.
Use the buttons Volume Up and Volume Down to navigate through the menu. Use the Home Button to confirm a selection. Use the Power Button to return to the previous menu.
I can't urge you enough to create a backup! It was absolutely necessary to me that I had a version to return to if something fails (and it did at my very first try!).
In the Recovery Mode menu, select and confirm the option "backup and restore".
In the submenu (Nandroid) select and confirm the first option "backup". This will create a full backup of your current system and save it in your internal SD card.
Note: The SGS2 has an internal SD card which has nothing to do with the SD card slot next to the battery. I would have preferred that they call it something like "Internal flash card" because it isn't an SD card...
Depending on how many apps and data you have on your system, this backup process will take several minutes. Go and make a coffee.
After the process has finished, verify that there are no errors. You can ignore errors like "no ext-sd found" or "no /sdcard/.android_secure found".
Use the Power Button to return to the main menu of the recovery mode.
10. Install CyanogenMod and Google Apps
Back in the main menu of the recovery mode, select and confirm the following option: Wipe data/factory reset.
Then select and confirm the option Wipe cache partition.
These two steps "clean" your phone, which is necessary before you install CyanogenMod.
Now select and confirm option install zip from sdcard.
A submenu opens where you see the content of your internal sd card. Select and confirm the CM9 zip file (update-cm-9-20120302-NIGHTLY-galaxys2-signed.zip).
The zip file will be unpacked and CyanogenMod installed, the process will let you know once this is done.
Select again install zip from sdcard and this time select the Google Apps zip file (gapps-ics-20120224-signed.zip).
Once this package is installed as well, select reboot system now in the main menu.
The phone will now boot CyanogenMod 9 aka Android 4.0 Ice Cream Sandwich on your Samsung Galaxy S2!
You will have to reconfigure your phone, meaning to declare your Google account once more. The brand new setup assistant will guide you through the steps.
(11. Optional: Restore in case of problems)
Let's say you're not happy with CM9 or you encounter problems, you can always restore the working Android version from before (from step 9. Backup).
To do that, boot into the Recovery Mode (see step 8. Boot into Recovery Mode).
Important note: The Recovery Mode which comes with CyanogenMod is newer than the one installed in step 6 (in my case 184.108.40.206).
The font (text) is blue and the navigation is a little bit different: Use Volume Up and Volume Down buttons to navigate in the menus. Use the Power button to confirm the selection. The Home button doesn't do anything in this version.
Select and confirm backup and restore.
In the sub-menu (Nandroid) select and confirm restore.
You should see the date and time of your last backup. Select and confirm the backup you want to restore.
The phone will now restore everything, therefore also removing CM9.
Once the restore process finished, select and confirm reboot system now and your phone will start up the original Android version with everything you've had before.
Update March 11th, 2012:
Meanwhile I've installed the latest nightly version (update-cm-9-20120309-NIGHTLY-galaxys2-signed.zip) which works well. But some bugs are still bugging me:
- Broken USB File Transfer: "Thanks" to this yet not resolved bug, I came across AirDroid which allows you to transfer files over your WIFI network. Great app! You should give it a try!
- Broken GPS: With all the different nightlies installed, no version resolved that issue. This is still bugging me... :-(
Update March 13th, 2012:
I forgot to add the Microsoft Visual C++ package, which is required for the Heimdall Suite. I've added this in steps 2 and 3.
Update March 22nd, 2012:
The official Ice Cream Sandwich source code for the SGS2 has been released by Samsung a few days ago (on March 19th). This means that from now on the open bugs can be fixed by using the 'official' drivers from Samsung, which can be found in the source code. For the CM9 devs as well as for us users these are great news, as the open bugs are probably fixed very soon!
As one can see in the SGS2 CM9 changelog, German CyanogenMod developer codeworkx already started to use the official sources in the nightly version 20120319. Exciting new nightly versions lay ahead of us!
Update March 23rd, 2012:
I just installed the latest nightly (update-cm-9-20120322-NIGHTLY-galaxys2-signed.zip) and USB File Transfer works now!
Update March 25th, 2012:
The GPS problems seem to be fixed as well - but I am starting to think that this was actually never a real bug... The Galaxy 2 seems to be very sensitive about GPS signals. As soon as you're covered (in a house) it doesn't seem to work at all. Outside though it takes a couple of seconds (maybe 30s) and your position is then determined by GPS.
In the latest nightly from today (update-cm-9-20120325-NIGHTLY-galaxys2-signed.zip) the new CyanogenMod 9 boot animation has been activated.
Update April 4th, 2012:
It seems that all issues are fixed now. In the latest nightly (update-cm-9-20120402-NIGHTLY-galaxys2-signed.zip) a lot of open issues have been fixed:
- Camera recording works now (in all resolutions)
- GPS position is now fixed (can be verified with GPS Status app). To increase speed of fixing your position, apply this patch.
- Video Stream apps (like Zattoo) work now
- MTP (USB File Transfer) works
synthestechsia from wrote on Sep 26th, 2013:
Thank you so much for the tutorial. It helped me a lot back in April 2012, when I rooted and flashed my phone for the first time.
I've just finished writing a tutorial in Spanish about flashing the stock ROM on the i9100, and I've mentioned yours at the beginning, when I explain how I started "playing" with my phone.
neelesh from India, jaipur wrote on Mar 22nd, 2012:
prsdnt: yes...after step 6 the rom gets rooted as i used an official samsung rom(2.3.6)
claudio: this was an awesome tute and i never felt at unease nytime..
JakeRizzo from wrote on Mar 22nd, 2012:
Yes I already have a nightly version installed =)
Thanks for your help.
Claudio from CH wrote on Mar 21st, 2012:
I think you already have a nightly installed (for example 20120309)?
If yes, then you just download a newer nightly, put it on your internal SDcard folder (the root folder of the internal SDcard) and reboot to the Recovery Mode. From there you do Step No 10 again. You don't have to do a factory reset this time, but a 'Wipe Dalvik Cache' or 'Wipe cache partition' is recommended. Then just install the new nightly zip and then the gapps zip.
Jakerizzo from wrote on Mar 21st, 2012:
Hi.. Can you tell me how can I upgrade my CM9 build version to a newest version?
Great tut though, gratz ;-)
Claudio from Switzerland wrote on Mar 16th, 2012:
To be honest, I'm not quite sure... After these steps I installed CM which automatically roots the phone. But with the Stock ROM I don't know.
Once your phone has booted, you can install a Root-Checker application (like Root Checker Basic) to see if you rooted your phone or not.
prsdnt from holland wrote on Mar 15th, 2012:
I read everywhere to root your phone first. Does it get rooted in step 6?
Personal Internet VMware PHP Linux Shell Bluecoat Proxy Windows Hardware Virtualization Nagios MySQL DB Monitoring Mail Android Network Wyse Hacks Tomcat Postgres Apple Mac Backup BSD ZFS Solaris SmartOS Unix Multimedia Perl Database MongoDB CMS OTRS FreeBSD Wordpress LXC Nginx Proxmox DNS Graphics GlusterFS Security Chef HAProxy Icinga Ansible HTML MariaDB Containers Rancher Docker AWS ELK Kibana Logstash Filebeat Varnish PGSQL PostgreSQL ElasticSearch CouchDB Bash Macintosh Container Minio Grafana InfluxDB Databases NFS OSSEC SystemD Java Zoneminder Surveillance Elasticsearch SSL TLS Icingaweb2 Cloud Wireless Kubernetes Ubuntu