1 minute read

If you run a Samsung Galaxy S2 with stock ROM, you cannot install LineageOS in the usual, straight forward way: Partitions have to be resized and flashing custom recovery is not as simple as for other phones. This summarizes the necessary steps for setting up LineageOS on the device running a stock ROM.

Preparation

Download the following tools/files

Flashing

  1. Boot in download mode (Volume Down + Home + Power)
  2. Execute the driver setup for Heimdall (the relevant device is Gadget Serial)
  3. Execute the following command as priviledged user(boot.img is part of LineageOS)
    heimdall flash -repartition -pit I91001GB_4GB.pit -RECOVERY twrp-3.1.0-0-i9100.img -KERNEL boot.img -no-reboot
  4. Power off phone, remove battery, insert battery, and boot into recovery (Volume Up + Home + Power)
  5. Resize Partitions (do this for system, data, internal storage and ignore shown errors)
    1. Advanced wipe - select partition - repair or change file system - resize
    2. Back - change file system - ext4
  6. Power off phone, remove battery, insert battery, and boot into recovery
  7. Wipe dalvik cache, cache, system, data, internal storage
  8. Push zip files of LineageOS and OpenGapps to sdcard0
  9. Install zip files

Sources

I used the manual of Lukas Knauer that has been written in German.