CyanogenMod just recently got officially discontinued but it seems LineageOS (apparently run by a community of former CyanogenMod active contributers and rumored to be lead by CyanogenMod “daddy” Steve “Cyanogen” Kondik himself) is continuing from where CyanogenMod (as supported/sponsored by Cyanogen Inc) stopped.
In the meanwhile though I wanted to install CM13 on Samsung Galaxy S2 (GT-I9105 international variant); CyanogenMod apparently never had official support for the GT-I9105plus version of the S2, only GT-I9100. However from the XDA-Developers forum I found links to unofficial builds of the CM13 ROM for GT-I9105plus.
The installation instructions I followed for installing TWRP recovery (v188.8.131.52) followed by CM13 + GApps 6.0 was a combination of instructions from TWRP i9100 page and the Archive.org version of CM wiki for i9100.
Obtaining firmware files for i9105plus
Obtain TWRP recovery binary
The phone I wanted to work with didn’t have a custom recovery yet so I needed to install it. twrp.me only had an official build for i9100 but I found XDA Developer Forum user GHsR’s unofficial TWRP build for i9105p. I used twrp-184.108.40.206-s2vep-20160407.zip for the simple reason that at the time it had most downloads (which I considered as “votes of trust”).
Just like for TWRP, GHsR has built CM13 and CM14.1 for Samsung i9105plus. I tried cm-14.1-20161223-UNOFFICIAL-i9105p.zip but it didn’t seem stable enough based on some 20 minutes of trying. As the phone was going to be used by a kid, stability was important and so I ultimately settled with the newest available CM13 build, which happened to be cm-13.0-20161228-UNOFFICIAL-i9105p.zip.
Obtain Google Apps
For Google Play integration I downloaded the Open GApps Nano variant for Android 6 (ARM build naturally as the i9105plus is ARM based). The end user wouldn’t be needing Gmail, Google Maps, Google Calendar etc, just the Play store to be able to install a few apps/games and be able to make regular calls; hence I downloaded with the Nano variant.
Copy CM13 and GApps installation files (.zip) onto a MicroSD card and insert the card into the phone. You’ll need these files immediately after installing TWRP recovery.
Installing TWRP recovery
- I used an Ubuntu Linux computer for this:
sudo apt-get install heimdall-flash-frontend
- Power off the phone, make sure it’s not connected the the computer by USB.
- Start the phone into Samsung’s so-called Download mode by Volume down + Home + Power.
- Connect the phone by USB to the computer running Heimdall
- In Heimdall’s Utilities menu
- Detect (Output should read Device detected)
- Download PIT => Save As… => save PIT (partition information table) into a file.
- In Heimdall’s Flash menu
- Browse (under Options / PIT) => select the prev saved PIT file.
- Add => in Partition Name choose RECOVERY
- Browse (under File) to select the TWRP recovery binary (.img)
- Select No Reboot checkbox
- Wait the blue progress bar on the phone to complete / Heimdall to tell you the process is complete.
- Power off the phone (even though the phone will instruct contrary).
- Power the phone back on (or if it powers on by itself, do this anyway) and enter into recovery mode by pressing Volume up + Home + Power until you get to TWRP recovery.
- Proceed to installing CM13 and GApps.
Backing up stock firmware
Use Backup menu in TWRP recovery to create a backup of the stock firmware on the MicroSD card. This will require a bit under 2GB of free space on the card.
Installing CM13 and GApps
- Wipe Dalvik cache and system data.
- In TWRP choose to add the CM13 and GApps .zip files to be installed.
- Wipe Dalvik cache and system data again.
- I don’t know if this actually needs to be done both before and after installing CM and GApps but I’m personally in the habit of doing it both before AND after based on prior experience.
- When installation completes, reboot the phone.
- The initial boot took some 5-7 minutes to complete.
After getting everything installed, the phone seemed to work pretty well based on brief poking around. I was happy with the result.