Install CM for i9100

From CyanogenMod
Jump to: navigation, search

This guide will walk you through the process of taking the Galaxy S II from stock to having a custom recovery image and the ability to flash the latest version of CyanogenMod.

Note: DISCLAIMER

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. No one affiliated with the CyanogenMod project is responsible for your actions. Good luck.


Contents

Important Notes

WARNING:

Some second-generation Samsung Exynos devices are potentially susceptible to a "superbrick" caused by performing a factory reset with the stock kernel, which effectively kills the internal memory in the device. It is highly recommended you do not perform this operation while using a stock kernel for safety reasons.

WARNING:

If you used a non-official method to remove a provider lock, your /efs partition may become corrupt! It is highly recommended you make a backup of this for safe keeping before attempting to modify your device, especially if you plan to remove such a lock.

The install guide assumes the device is already running stock Android 4.x.
This device used to be called galaxys2 on get.cm, so older builds of CM can still be found under that title.



Installing a custom recovery on Galaxy S II

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.

  1. Download codeworkx's ClockworkMod Recovery, and the Heimdall Suite:
    • codeworkx's ClockworkMod Recovery: download
      md5: 0bae3f80f298e0aaf3bd187e753a5336
    • Windows:
      • Heimdall Suite 1.4RC2 Command-line Binary: download
        NOTE: The Heimdall Suite 1.4RC2 requires the Microsoft Visual C++ 2012 Redistributable Package to be installed on the computer, which can be downloaded here.
    • Linux 32bit:
      • Heimdall Suite 1.4RC1 Command-line Binary: download
    • Linux 64bit:
      • Heimdall Suite 1.4RC1 Command-line Binary: download
    • Mac OS X:
      • Heimdall Suite 1.4RC1 Command-line Binary: download
        • Place the libusb-1.0.0.dylib library from the zip inside /opt/local/lib on the machine.
    • 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 README provided on Github or refer to the instructions to Install and compile Heimdall.
  2. Power off the Galaxy S II and connect the USB adapter to the computer but not to the Galaxy S II.
  3. Boot the Galaxy S II into download mode by holding down Volume Down, Home & Power while connecting via USB.
    Windows only:
    1. Run the included zadig.exe in the drivers folder of the Heimdall Suite.
    2. Choose Options » List All Devices from the menu.
    3. Select Samsung USB Composite Device or Gadget Serial or Device Name from the drop down menu.
    4. Click Install Driver.
      NOTE: A prompt may appear warning that the installer is unable to verify the publisher of the driver, ignore it and select "Install this driver anyway."
      NOTE: On Windows 8 you must disable driver signature enforcement in order to use zadig.
  4. Place codeworkx's ClockworkMod Recovery file into the Heimdall directory.
  5. On the computer, open a terminal and run the following command from the Heimdall directory:
    heimdall flash --kernel zImage --no-reboot
    Warning: if you want to modify the command or to use another recovery file (like the one from Replicant, as might be necessary for some devices), make sure you understand what the command does, i.e., how to flash a custom recovery with heimdall without touching the main system!
  6. A blue transfer bar will appear on the device showing the recovery being transferred.
  7. The device will not reboot, rather will wait for you to reboot it to give enough time to enter recovery with the button combination.
  8. The Galaxy S II now has ClockworkMod Recovery installed. Continue to the next section.

Helpful Tip

  • The stock ROM may overwrite your custom recovery on boot. To prevent this, boot immediately into ClockworkMod Recovery after leaving Download Mode instead of letting the ROM boot up normally. If your recovery is overwritten, simply redo the steps you followed above and catch it before it boots next time.
  • Some users have reported connection errors if the device is connected to a USB hub. If you experience such errors it is recommended that you try connecting your device to a USB port on the motherboard.


Installing CyanogenMod from recovery

Note:

Some devices do not have removable SD cards. Regardless, there should still be a partition on the device named "/sdcard" that can be used for flashing purposes, even though the contents of /sdcard may actually be in internal storage.

  1. Download the prebuilt release of CyanogenMod you wish to install. (Or if you've built CM yourself, look in the $OUT directory for the .zip.)
    Optional: Download any supplemental 3rd-party applications packages for the device you wish to use.
  2. Place the CyanogenMod rom .zip file on the root of the SD card:
    • 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 /data or mount data through the recovery menu before transferring.
    See adb documentation for additional help with this step.
    Optional: Place any supplemental packages (eg Google Apps or kernel) .zip file(s) on the root of the SD card.
  3. Boot to recovery mode on the device by holding Volume Up, Home, & Power.
  4. 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.
  5. Select the option to wipe data/factory reset.
  6. Select install zip from sdcard.
  7. Select choose zip from sdcard.
  8. 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.
  9. 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.

Helpful Tip

See something wrong on this page? Report it here.

Personal tools
Namespaces

Variants
Actions
Navigation
Get CyanogenMod
General Support
Community
Developer Resources
Toolbox