Sunday, August 31, 2014

Installing Android KitKat (4.4) on a Canadian Galaxy S II (I9100M)

I love my Galaxy S II (I9100). I don't have much to say for anything Samsung's released since then, but the Galaxy S II is one of the nicest phones I've ever owned. Unfortunately, Samsung's version of Android (called TouchWiz) is terrible, and they haven't released any updates for the phone in well over a year.

Determined to squeeze some more life out of my I9100, I installed Android KitKat, but for some reason the Bluetooth audio would not work at all. It would connect to the phone just fine, but whenever I placed a call I couldn't hear anything. I tried several different ROMs (CyanogenMod, OmniROM, SlimROM), and they all had the same problem.

I finally figured out my problem. For some reason the software on the Canadian version of the I9100 (the I9100M) is slightly different. To fix it, all I had to do was flash the stock I9100 software from Samsung onto my phone first. Now it works great with every custom KitKat ROM I've tried.

Okay, so first of all, these instructions are specific to Linux, but they should work fine on Mac and Windows. On Mac they'll be nearly identical, but they'll need to be tweaked to work on Windows (for example, you won't use the sudo command but may need to open the command line as an administrator). On Windows you'll probably also need some extra tools, like the Samsung USB Driver and 7-Zip for extracting tar files.

Second, a couple useful procedures:

Boot to recovery mode:
  1. If the phone is plugged into a USB cable or charger, unplug it
  2. Power off the phone
  3. Press and hold the volume up, home, and power buttons (you can let go once you see the I9100 screen)
Preparing for flashing using Heimdall:
  1. If the phone is plugged into a USB cable or charger, unplug it
  2. Power off the phone
  3. Boot the phone to download mode by pressing and holding the volume down, home, and power buttons (you can let go once you see the warning screen)
  4. Press the volume up button to continue past the warning screen
  5. Plug your phone into your computer using a USB cable
  6. Make sure heimdall can see your phone
    sudo heimdall detect
And now the steps to install KitKat:
  1. Download prerequisites
    1. The big thing you'll need is a stock I9100 (not I9100M) ROM. I used I9100XWMS2, but I'm not sure it matters which one you download (although it should be a Jelly Bean 4.1 ROM):
      http://www.sammobile.com/firmwares/3/?download=24707

    2. Heimdall, which is an open-source tool for flashing stock Samsung firmware (ROMs)

    3. This ClockworkMod kernel image:
      https://www.androidfilehost.com/?fid=24539867161559149

    4. The KitKat ROM you wish to install. There are many to choose from. I personally like CyanogenMod, which is the most popular and has been the most stable in my experience. OmniROM is a new up-and-coming ROM that looks promising, but when I tried it it was a little too buggy for my preference.

    5. The latest PA Google apps. Download the pico modular package (you can install other Google apps manually through the Play Store):
      http://forum.xda-developers.com/showthread.php?t=2397942

  2. Next, you need to be rooted. There are lots of ways to accomplish this, but I used Root_SuperSU.0.96-Busybox.1.20.2-S2-signed.zip from here and it worked fine:
    http://forum.xda-developers.com/galaxy-s2/orig-development/04-12-2012-universal-rooting-phones-rom-t1746794. You can flash it by copying it to your SD card and using recovery mode (see above).

  3. Now, back up any apps and data you wish. My preferred method for this is Titanium Backup.

  4. Copy the KitKat ROM and the PA Google apps package to either your SD card or internal storage on your phone.

  5. (Optional but highly recommended) Do a Nandroid backup, just in case
    1. Prepare your phone for Heimdall by following the instructions at the top of this post.

    2. Go to where you downloaded the ClockworkMod kernel image and flash it:
      sudo heimdall flash --KERNEL cwmr6047.img --no-reboot

    3. If for some reason it fails, redo the steps for preparing your phone for Heimdall and try again.

    4. Put the phone into recovery mode by following the instructions at the top of this post.

    5. Once you're in recovery mode, use the volume down button to highlight backup and restore. Once you've highlighted it, press the power button to select it. Then select Backup.

  6. Flash the stock Samsung ROM (if your phone isn't a Canadian Galaxy SII I9100M, you can skip this part)
    1. Extract the stock Samsung ROM
      unzip I9100XWMS2_I9100VODLSF_VOD.zip
      mkdir I9100XWMS2
      cd I9100XWMS2
      tar xvf ../I9100XWMS2_I9100BULS3_I9100VODLSF_HOME.tar.md5

    2. Prepare your phone for Heimdall by following the instructions at the top of this post.

    3. Flash the stock Samsung firmware by running this command from the same folder you extracted the firmware to:
      sudo heimdall flash --BOOT boot.bin --CACHE cache.img --FACTORYFS factoryfs.img --HIDDEN hidden.img --MODEM modem.bin --PARAM param.lfs --SBL1 Sbl.bin --KERNEL zImage --no-reboot

    4. If for some reason it fails, redo the steps for preparing your phone for Heimdall and try again.

    5. Once it's finished, put the phone into recovery mode by following the instructions at the top of this post.

    6. Once you're there, use the volume down button to highlight wipe data/factory reset. Once you've highlighted it, press the power button to select it. Then select Yes. Now select reboot system now.

    7. When it's finished booting, power the phone off.

  7. Flash the KitKat ROM
    1. Prepare your phone for Heimdall by following the instructions at the top of this post.

    2. Go to where you downloaded the ClockworkMod kernel image and flash it:
      sudo heimdall flash --KERNEL cwmr6047.img --no-reboot

    3. If for some reason it fails, redo the steps for preparing your phone for Heimdall and try again.

    4. Put the phone into recovery mode by following the instructions at the top of this post.

    5. Once you're there, use the volume down button to highlight install zip. Once you've highlighted it, press the power button to select it. Then select choose zip from /storage/sdcard0 (if you copied the KitKat ROM to internal storage) or choose zip from /storage/sdcard1 (if you copied the KitKat ROM to the SD card). Select the file for the KitKat ROM and select Yes to install. Do the same thing for the PA Google apps package.

    6. Now select wipe data/factory reset → Yes. Wait for it to finish.

    7. Finally, select reboot system now.

  8. Your new KitKat ROM should now boot successfully. At this point, one of the first things I'd do is install Titanium Backup and restore your app backups. After that, a few suggested tweaks:
    1. To save battery life, go to SettingsWi-FiMenuAdvanced → Uncheck Scanning always available

    2. To save even more battery life, disable apps you don't use: Settings → Apps → swipe to the right until you get to the All tab → click on each app you don’t use → Disable

    3. For better performance, enable ART runtime
      1. SettingsAbout phone
      2. Scroll all the way down and tap on Build number until it says You are now a developer
      3. Settings → Developer options → Select runtime (near the bottom) → Use ART → OK

0 comments:

Post a Comment