CyanogenMod installed on my Galaxy SII using Fedora
As I am on vacation with some time to kill, I decided to free my Samsung Galaxy SII from all the Samsung crapware and install an open-source version (GPLv2 and Apache 2 licenses) of Android on it : CyanogenMod. Here is how I did it, using Fedora 17 only.
I do not take any responsibility for what you do with your device. YMMV with your Android version and hardware model. This kind of operations voids the warranty of your smartphone and may damage it irreversibly. (But, hey, it’s fun
)
First, let’s compile and install the tool that will help us to root our Android mobile phone “Heimdall”. We start by installing the development tools and needed libraries.
# yum -y install “Development Tools”
# yum -y install libusb1-devel
Then we compile and install the actual program
$ git clone git://github.com/Benjamin-Dobell/Heimdall.git
$ cd Heimdall/libpit
$ ./autogen.sh
$./configure
$ make
$ cd ../heimdall
$ ./autogen.sh
$ ./configure
$ make
# make install
After that, we download the tool that will root our Android phone: ClockworkMod Recovery, our CyanogenMod operating system as well as Google Apps.
$ wget http://cmw.22aaf3.com/c1/recovery/recovery-clockwork-5.5.0.4-galaxys2.tar
$ md5sum recovery-clockwork-5.5.0.4-galaxys2.tar
364315cb9a499d50638d05b93bb44422 recovery-clockwork-5.5.0.4-galaxys2.tar$ wget http://download.cyanogenmod.com/get/jenkins/4627/cm-9.0.0-RC2-galaxys2.zip
$ md5sum cm-9.0.0-RC2-galaxys2.zip
ee62fd69d305d8af79e65cd7c8bdd459 cm-9.0.0-RC2-galaxys2.zip$ wget http://goo.im/gapps/gapps-ics-20120429-signed.zip
$ md5sum gapps-ics-20120429-signed.zip
7c524e1e078164f681e0aa6753180b2c gapps-ics-20120429-signed.zip
We then extract the following file
$ tar -xvf recovery-clockwork-5.5.0.4-galaxys2.tar
The extracted file is a kernel image called “zImage” that we will boot on later on
Put the CyanogenMod as well as the GoogleApps in the root directory of your SD card, then, let’s get rid of the Samsungoid ! This is also the right moment to backup your data and configuration, in case anything goes wrong.
Power off the Samsung Galaxy S II and connect the microUSB to the computer but not to the Samsung Galaxy S II.
Boot the Samsung Galaxy S II into download mode by holding down Home & Volume Down & Power while connecting the microUSB to it.
Change the directory back to where the previously extracted zImage file is and execute the following command
# heimdall flash –kernel zImage
A blue transfer bar will appear on the phone showing the kernel being transferred. But, unlike CyanogenMod’s documentation mentionned, my Galaxy SII did not reboot automatically. I tried to boot it by pressing on the power button on the right side, but it did not work. The only thing that worked was starting the phone by pressing on Home & Volume Up & Power at the same time, until the ClockworkMod Recovery booted.
In ClockworkMod Recovery, select the following options
“Wipe data/factory reset” then “Wipe cache partition”
“Install zip from sdcard” -> “Choose zip from sdcard” and choose first CyanogenMod and redo the operation for the Google Apps zip file
Once the installation has finished, select “Go Back” to get back to the main menu, and select “Reboot system now” and CyanogenMod should boot as it did for me.
So far, the user experience is much better and my phone is way faster than it used to be. The process was not as straightforward as I described it here and I had a couple of “interesting” moments when the Galaxy did not boot as expected, but I hope it will make your switch to a freer operating system smoother.
Technology and leadership in an international environment
it’s always easy until your only hope left is to put your smartphone in the oven… =D
I did not say it was easy
But another good side effect of CyanogenMod : my battery time seems to be much longer now
Thanks a lot for recording this! Let me just add that not all of these comands require root, and it’s generally best not to run them as root. The commands that require root are:
# make install
and
# heimdall flash –kernel zImage
Actually I only suspect that heimdall actually needs root, didn’t try without.
Also, it might be nice to include some mention of the wisdom of making a backup, probably right before the wipe step (although anyone embarking on this procedure should know better themselves).
Thanks Jon for your excellent comments, I corrected where needed and added the backup step.
[...] more here: CyanogenMod installed on my Galaxy SII using Fedora – hmarcy.com [...]
Thanks for the steps. You mention that we use ClockworkMod to root our phone, but exactly which step does that?
I am currently on Rescurstion remix 3.0 base kernel by codeworkx@cyanogenmod.
And i want to update my galaxy S2 GTI9100 with CM9 9.0.0 RC2. But i am confused regarding the steps to do so. Please help me out completeing this.
Hello Francois,
the step that will root your phone is when you upload the ClockworkMod Recovery kernel using heimdall.
Hi Anuj,
I am not familiar with the technologies you mentioned and don’t want to give you a false advice, so I need to pass on that one, sorry !
Hi,
I only install dev-tools using
sudo yum groupinstall “Development Tools”
sudo yum install libusb1-devel qt-devel
as I see in
http://www.sysadminworld.com/2012/compile-and-install-heimdall-on-fedora/