
I tried flashing CM11 (Android 4.4 Kit Kat) on my aging Samsung galaxy s2 GT-I9100G and along the line I encountered a bootloop. A bootloop occurs when the device is powered up and tries to load up the OS, shows the Samsung screen and then restarts repeatedly.
The fix is simple and has been well documented on many websites – Flash a new Samsung Firmware using ODIN. In this post, I’ll detail a couple of issues that complicated the otherwise straight forward process. I also include other issues and fixes while flashing CM11.
Before You Start.
- Pay attention to Compatibility issues before following any tutorial .. especially on device model . GT-I9100 is NOT the same as GT-I9100G. If your device is the samsung galaxy GT-I9100, please leave this tutorial immediately.
- Charge the device FULLY. Charge using a wall outlet (NOT USB) and give it a few hours to get FULLY charged before you begin any of the processes . At this point (battery full), the bootloop should STOP occurring and should just be a static screen showing the Samsung startup screen.
- Use an appropriate Cable.
If possible, use the cable that came with your Samsung device or a samsung table. I was using a Kindle cable at some point during the process and that made some steps to fail
See Also : Getting ADB to recognize Samsung Galaxy S2 running cyanogenmod 10.1
FIRST, Flash Stock Android OS on your S2
The best way to unbrick a bootlooped S2 is to restore it back to factory condition using a custom samsung image. The best tutorial I found for that can be read here.The solution outlined handles both a soft brick and a hard brick (NAND) corruption. Remember to wipe factory/reset, and wipe cache after stock android installation .
Flashing CM11 on Samsung Galaxy S2 GT-I9100G
The Cynanogenmod wiki for GT-I9100G provides a decent set of steps but a few errors still occur. They are highlighted in red. Now that your device works normally, you may first load up the CM11 ROMfiles to your sdcard, install clockwordRecovery and then flash the rom files to your device.
Copy the CM11 Files to Your device
- Download the prebuilt release of CyanogenMod you wish to install. (Or if you’ve built CM yourself, look in the
$OUTdirectory for the.zip.) - Optional: Download any supplemental 3rd-party applications packages for the device you wish to use.
-
- Place the CyanogenMod rom
.zipfile on the root of the SD card using adb:
-
- Transfer your file(s):
adb push YOURROMZIP.zip /sdcard/
- If you boot directly to recovery and have an internal sdcard, you may need to run
adb shell mount /sdcardor mount data through the recovery menu before transferring. - If you see “error: device not found” there is likely a driver issue on the PC.
- If you see “error: insufficient permissions for device”, try “adb kill-server” and then run “adb devices” to see if the device is attached.
- On some devices, the zip file can be copied to the device using standard USB Mass Storage or MTP support. Boot the device normally and transfer the file to it.
- Transfer your file(s):
- Place the CyanogenMod rom
- Optional: Place any supplemental packages (e.g. Google Apps[1] or kernel)
.zipfile(s) on the root of the SD card.
Install ClockWordRecovery
Samsung devices come with a unique boot mode called Download Mode which is very similar to Fastboot Mode on some devices with unlocked bootloaders. Heimdall is a cross-platform, open source tool for interfacing with Download Mode on Samsung devices. The preferred method of installing a custom recovery is through this boot mode. Rooting the stock firmware is neither recommended nor necessary.
- Download and install the Heimdall Suite
- Windows: Extract the Heimdall suite and take note of the directory holding
heimdall.exe. You can verify Heimdall is working by opening a command prompt in this directory and typingheimdall version. If you receive an error, be sure that you have the Microsoft Visual C++ 2012 Redistributable Package (x86/32bit) installed on your computer. - Linux: Pick the appropriate installation package based on your distribution. The
-frontendpackages are not required for this guide. After installation, heimdall should be available from the terminal; typeheimdall versionto verify installation succeeded. - Mac: Install the dmg package. After installation, heimdall should be available from the terminal; type
heimdall versionto verify installation succeeded. - Building from source: The source code for the Heimdall Suite is available on Github. For more details about how to compile the Heimdall Suite, please refer to the
READMEfile on Github under the relevant operating system directory. You can also refer to the Install and compile Heimdall instructions on this wiki.
- Windows: Extract the Heimdall suite and take note of the directory holding
- Download codeworkx’s ClockworkMod Recovery. You can directly download the recovery image using the link below, or visit clockworkmod.com/rommanager to check for the latest version (if your device can be found there). Be careful to select the right image!
KIT KAT WILL NOT WORK WITH ANY CLOCKWORK RECOVERY LESS THAN VERSION 6.0.4.5
Download the Latest PhilzTouch recovery file.
As at April 4, 2014 the most recent version (6.19.3) is hereIf you have a lower clockwork recovery installed, the
set_metadata_recursive some changes failed error
shows up during the installation process.
- Extract the recovery image
recovery.img.- Windows users: move recovery.img to the same directory where heimdall.exe is located.
- Windows (only) driver installation – Skip this step if you are using Linux or Mac
- A more complete set of the following instructions can be found in the Zadig User Guide.
- Run
zadig.exefrom the Drivers folder of the Heimdall Suite. - Choose Options » List All Devices from the menu.
- Select Samsung USB Composite Device or MSM8x60 or Gadget Serial or Device Name from the drop down menu. (If nothing relevant appears, try uninstalling any Samsung related Windows software, like Samsung Windows drivers and/or Kies).
- Click Replace Driver (having selecting “Installed Driver” from the drop down list built into the button).
- If you are prompted with a warning that the installer is unable to verify the publisher of the driver, select Install this driver anyway. You may receive two more prompts about security. Select the options that allow you to carry on.
- Power off the Galaxy S II G and connect the USB adapter to the computer but not to the Galaxy S II G, yet.
- Boot the Galaxy S II G into download mode by holding Volume Down, Home & Power. Accept the disclaimer on the device. Then, insert the USB cable into the device.
- At this point, familiarize yourself with the Flashing heimdall notes below so that you are prepared for any strange behavior if it occurs.
- On the computer, open a terminal (or Command Prompt on Windows) in the directory where the recovery image is located and type:
-
heimdall flash --KERNEL recovery.img --no-reboot
-
- A blue transfer bar will appear on the device showing the recovery being transferred.
- Unplug the USB cable from your device
- You can now manually reboot the phone into ClockworkMod Recovery mode by holding Volume Up, Home, & Power.
- The Galaxy S II G now has ClockworkMod Recovery installed. Continue to the next section.
Now Install Your CM11 ROM
- In you haven’t copied your CM11 files already to your device, refer to the “Copy your CM11 Files” instructions above.
- Boot to recovery mode on the device by holding Volume Up, Home, & Power.
- Once the device boots into the ClockworkMod Recovery, use the physical volume buttons to move up and down. On most devices, the power button is used to confirm your selection, although for some devices the power button is used as a “back” button to go up one level, in which case the home button is used to confirm the selection.
- Optional/Recommended: Select backup and restore to create a backup of the current installation on the device. If this option is missing, it’s likely because the stock ROM has overwritten your custom recovery on boot.
- Select the option to wipe data/factory reset.
- Select install zip from sdcard.
- Select choose zip from sdcard.
- Select the CyanogenMod file you placed on the sdcard. You will then need to then confirm that you do wish to flash this file.
- Optional: Install any additional packages you wish using the same method.
- Once the installation has finished, return back to the main menu, and select the reboot system now option. The device should now boot into CyanogenMod.
YOU ARE NOW GOOD TO GO!





