LineageOS on Samsung Galaxy S II

by Volker Diels-Grabsch

How to install LineageOS on a Samsung Galaxy S II (GT-I9100, i9100).

Created 2018-02-09, Last updated 2018-02-15
Articles

Why?

The Samsung Galaxy S II is said to be "the best phone of its era", but also "the least fun device to install LineageOS on". Yet, this isn't too hard: just a few more steps than usual. And anyway, what's the alternative? If you keep its ancient stock operating system, you'll hold one of the many Android phones with outdated security patches.

Alas, the current official LineageOS installation instructions for i9100 don't work: crucial steps are missing. This article is meant to help out until that is fixed. It is based on Noah Jacobson's Reddit comment.

Caution!

Follow each step closely. Perform every single verification. Pay attention to every displayed warning message. If you aren't careful, you might brick the phone or install malware.

The goal is to minimize the Google cruft and to use as much independent Free Software as possible. If your goal is different, feel free to deviate from some steps, but know what you do.

Prepare and verify phone

You will void the phone's warranty. Verify that this is not an issue for you.

You will lose all data on the phone and its SD card. Verify that this is not an issue for you. Always keep multiple copies of everything important.

Verify that the phone is the original Samsung Galaxy S II, also known as GT-I9100 or i9100. Verify that it is not one of the variants.

Get a 32 GB microSDHC card. Verify that it is microSDHC, not microSDXC.

Charge the phone's battery to 100%. Verify that the battery lasts at least 30 minutes. After those 30 minutes, charge it again to 100%.

Prepare computer

Install ADB, Heimdall and Unzip on your computer.

If you use Debian, MINT or Ubuntu, the following command installs everything you need:

sudo apt-get install adb android-sdk-platform-tools-common heimdall-flash unzip

Download files

Download the following PIT file:

Rename it to:

Visit TWRP for i9100 and download the following files:

Visit Open GApps and select:

Trigger the download button as well as as the "MD5 CHECKSUM" download. This will download the following files:

Visit LineageOS for i9100 and download the latest version:

Click on the corresponding "sha256" link and save the result as:

Visit F-Droid and download the latest version:

Verify downloaded files

Verify all downloaded files by running the following commands from the download directory:

echo 'f47f484d26475920e1ab76b003589d0664c705ac4ea7ae221b0f9c20ae483ff8  i9100.pit'|sha256sum -c

gpg --recv-key 0x95707D42307C9D41D09BF7091D8597D7891A43DF
gpg --trust-model always --verify twrp-*-i9100.img.asc

md5sum -c open_gapps-arm-7.1-pico-*.zip.md5

sha256sum -c lineage-*-i9100-signed.zip.sha256sum

gpg --recv-key 0x37D2C98789D8311948394E3E41E7044E1DBA2E89
gpg --trust-model always --verify FDroid.apk.asc

Install TWRP

Turn the phone off. Press all of the following keys at the same time to start the phone in "download mode":

Confirm the warning:

Connect the phone with the computer via USB cable. Use exactly the USB cable provided with the phone.

Run the following commands:

unzip lineage-*-i9100-signed.zip boot.img
heimdall flash --repartition --pit i9100.pit --KERNEL boot.img --RECOVERY twrp-*-i9100.img --no-reboot

Wait for the last command to finish. If it fails, try again and verify you use exactly the USB cable provided with the phone.

Turn the phone off:

Install LineageOS and Open GApps

Press the following keys to start in "recovery mode" (TWRP):

Perform the following actions:

Run the following command:

adb push lineage-*-i9100-signed.zip open_gapps-arm-7.1-pico-*.zip FDroid.apk /sdcard1/

Perform the following actions:

Wait patiently until LineageOS is started. The first start is very slow, subsequent starts will be fast.

Configure Open GApps and LineageOS

Perform the following actions:

Install F-Droid

Perform the following actions:

Wait a minute while F-Droid displays "Updating repositories" on top.

Click on the magnifier symbol to start the search for interesting Free Software applications to install.

Install applications

This is an incomplete list of applications you might want to install via F-Droid:

Once those are installed, you might want to disable the following default applications:

Feedback