Installing Cyanogenmod on a Samsung S2 GT i9100G and Samsung S4 GT i9505

12th December 2013 – 794 words

I was using a stock Samsung S2 i9100G for some time now, but recently I experiences some bugs:

  • The Phone will just freezes/”turn off”, seems to none as a Sleep of Death. Happens 1-10 times a day, which makes the phone very unreliable to use. Only happened when running on battery.
  • Sometimes nobody can call me, they went straight to voice mail - probably related to the first bug.

After done a normal factory reset, removing a lot of apps, tried different battery, I decided to give Cyanogenmod a try. There are a lot of guides out there, Best the official one:

  • S2:
  • S4:

Nevertheless, I want to document my steps for later reference.

Samsung S4 GT i9505 I also tried all the steps with a Samsung S4 and annoted the differences. I installed a 4.4 (Cyanogenmod 11.2).

Step 1 Precaution

Legal notice Modifying or replacing your device's software may void your device's warranty, lead to data loss, hair loss, financial loss, privacy loss, security breaches, or other damage, and therefore must be done entirely at your own risk. I am not responsible for your actions. Good luck.
  • Make sure you have the right CM Version. E.g. there is a difference between a Samsung S2G and S2. Find the product code in Settings -> Phone (something like GT-…). Write done alle the numbers written there
  • Make Backups of your stuff - Photos, files, …
  • I did this guide with running Windows 7, your mileage may very on other OS.

Step 2 Download

We need some stuff

Cyanogenmod (Android 4.3 JB)

The replacement operation system

  1. just download (first nightly or stable)
  2. put the zip file in the root of your phone’s filesystem (via USB)

Samsung S4:


You might also want Google Maps, Mail, Play Store on the phone

  1. just download (Something like:
  2. put the zip file in the root of your phone’s filesystem

Samsung S4: as today (12/17/2013) no offical released versions on, but:

Visual C++ Runtime

Requirement for heimdall (Windows)

  1. Choose ‘x86’ version, even if you have 64bit computer!
  2. download and install. I didn’t needed to restart.


Heimdall is a tool to install new bootloader on Android phones

  1. download and extract
  2. Install/Patch USB Drivers:
  3. Run Drivers/zadig.exe
  4. Options -> List all devices
  5. Choose something related to “Samsung USB Driver” from the dropdown
  6. Replace/Install Driver

Clockwork Recovery

A bootloader/recovery mode replacement - kind of like a BIOS

  1. download, extract
  2. put the zImage into heimdall folder

Samsung S4: On Download

Step 3: Flash Bootloader Heimdall

This step will set a warranty bit on the Samsung S4!

  1. Disconnect USB from PC
  2. Bring phone into Download Mode: Press and hold Vol Down + Home + Power. You should get into the Download Mode (“Do not turn off target!”)
  3. on Windows: Shift + Right Click on the Heimdall folder “Open Command Window here”
  4. type: heimdall flash --kernel zImage --no-reboot

    Samsung S4: heimdall flash --RECOVERY recovery-clockwork- --no-reboot something should happen on the phone

After it finished, do not make a normal boot again, because the current operation system will undo our change. If you accidently reboot to the stock Android, you have to redo the steps.

Step 4: Install Cyanogenmod

You might want to remove the SD-card and/or SIM, but it is not required.

  1. Boot into Clockwork Recovery and flash Cyanogenmod: press and hold Vol Up + Home + Power. If the Samsung logo appears, you have to release the power button, otherwise the phone restarts again.
  2. wipe data/factory reset
  3. install zip from sdcard
  4. S2: choose zip from internal sdcard or so, last menu entry for me,
    S4: Navigate to folder /0, then you should be on your internal memory card
  5. Choose the CM-zip file
  6. Repeat the last 2 steps for GoogleApps zip file

After finishing installing, reboot your phone.


Didn’t had a crash since 2 days now.

Nice Side-effects:

  • No uninstallable Samsung Apps anymore
  • Rooted - finally can install good Backup-Tools, per-app-permissions, AdBlock, System-wide Proxies/VPN (Tor), …
  • Double tap on home button finally without function. Always hated the voice interaction of the Samsung OS
  • S2: Running Android 4.3 instead of 4.1 stock