[Galaxy S II Android Development] rINanDO:
/*
** Your warranty is now void.
**
** We are not responsible for bricked devices, dead SD cards,
** thermonuclear war, or you getting fired because the alarm app failed. Please
** do some research if you have any concerns about features included in this ROM
** before flashing it! YOU are choosing to make these modifications, and if
** you point the finger at us for messing up your device, we will laugh at you.
**
**/

Hi all,

This port was a hard one! In Q it is mandatory to use System-as-root. Real pain in the neck, because our S2 as a Ramdisk within the zImage... and our embedded recovery... and IsoRec recovery. Anyway, I found a way after almost about a 1000 forward ports from several kernels in 5-6 attempts in our ancient 3.0.101 kernel. It finally boots and a lot of stuff is working. So let's ship the very first build of LOS 17.0 on Samsung Galaxy S2 (i9100).

For all of these builds you NEED ISOlated-RECovery because I had to eliminate the embedded (.cpio) ramdisk-images in zImage.

Upgrade from Samsung stock ROM using ODIN 3.07

lineage-17.1-20200526-UNOFFICIAL-i9100.zip (Selinux permissive)

Micro SD-card before flashing.

Pit: i9100-LOS-16.0-Emulated-Storage.pit

PDA: i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

1. Boot your phone into Download-mode (Volume down + Power/Standby + Home and hold for 10 seconds).

2. Start ODIN 3.07 on your PC.

3. Connect your phone via USB to your PC.

4. Press volume up on your phone, ODIN should detect your phone.

5. In ODIN:

Auto Reboot : unchecked

Re-Partition: checked

PIT : i9100-LOS-16.0-Emulated-Storage.pit

PDA : i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

6. Press Start.

7. After succesful flash, reboot phone into Recovery:

- Press Volume up + Power/Standby + Home and hold for 10 seconds.

The phone shuts down.

- Repeat Press Volume up + Power/Standby + Home and hold for 10 seconds

Phone boots in recovery TWRP 3.3.1-1.

8. Swipe to Allow Modifications

9. In TWRP 3.3.1-1 you need to format partions

- Wipe -> Format Data -> Type [yes]

- Wipe -> Advanced Wipe -> Select:

* Davik / ART Cache

* Cache

* System

* Non-emulated Storage

-> Swipe to Wipe

10. Install LOS-17.1 + Gapps or MicroG

To prevent "Uncryption unsuccessful" error of GAPPS at first start:

- Reboot to recovery and Wipe -> Format Data -> Type [yes] again

11. Boot System

DON'T INSTALL TWRP APP. This will cause bootloop!

12. For MicroG users:

You need manualy grant permissions via ADB to get things working properly.

These are the commands:

adb shell pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE

adb shell pm grant com.google.android.gms android.permission.FAKE_PACKAGE_SIGNATURE

13. Before flashing a newer build, make sure you update the required TWRP Recovery-image. From build #14 and further you need TWRP 3.4.0-i9100-Android 10. Otherwise it won't flash properly and comes with the error "No OS installed"-message when you reboot.

After this

To avoid bootloop after restoring ROM from a TWRP backup

You no longer need to reinstall the same ROM that was restored.

The invaluable @arco68 prepared the fix_rootfs_label.zip file for flashing in TWRP after restoring the ROM,

which fixes the rootfs label.

Thanks To

@ChronoMonochrome

@lee.wp14

@ze7zez

arco68

Team Infusion

LineageOS team

and all prior developers that were working on this phone.

I hope I didn't missed someone, please let me know.

Last but not least @channel48 which reviews custom ROMS from all kind of phones including my work on this ancient one :)

Source code:

https://www.github.com/lineageos

https://www.github.com/rinando

Current state:

Working:

- LiveDisplay

- PowerHAL

- Audio, including headset, bluetooth

- Wifi

- IMEI

- Touchkeys

- Camera Pictures

- Camera Videorecording

- Hardware encode/decoder

- Display

- Sensors

- BLN

- RIL (Phone/SMS)

- GPS

- FM-Radio (using Spirit2)

- Magisk v21.1 support via optional kernel image

- DRM, for e.g. Netflix

- Screencast (Chromecast)

Not working/known issues:

- GPS not working, is hanging on native_init (is disabled in this build)

- Display has vsync issues and glitches

- Selinux is permissive

- No SU, via Magisk v20.4

- No Magisk

- SIM Pin on RIL is currently disabled

- RIL works fine but crashes 1 or 2 times a day.

- Google Chrome crashes after few minutes

- AudioFx

- A-GPS not working, Time first fix takes minutes

- Speaker volume control during call

- RIL is still crashing after several days uptime causing no SIM card message. Fixed in build #18? Please test!

- HDMI (MHL) (support broken/removed since CM 10)

- RIL is resetting when it fails to suspend. No libc crash (so far) but a silent reset with same 'no service/no simcard' message. Fixed in build #19? Please test!

- Bluethooth headset voice out goes via speaker instead of headset

Build #23 2021-03-01

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Magisk v22 supported kernel image

- Fixed voltage control

- Adjusted PegasusQ profile for more responsiveness,

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20210301-UNOFFICIAL-i9100.zip

lineage-17.1-20210301-UNOFFICIAL-i9100_boot_magisk.img

Build #22 2021-02-11

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Magisk v21.4 supported kernel image

- Network/Firefox crash fix thanks to florencebirée

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20210211-UNOFFICIAL-i9100.zip

lineage-17.1-20210211-UNOFFICIAL-i9100_boot_magisk.img

Build #21 2021-01-07

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Magisk v21.2 supported kernel image

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20210107-UNOFFICIAL-i9100.zip

lineage-17.1-20210107-UNOFFICIAL-i9100_boot_magisk.img

Build #20 2020-11-27

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Fixed audio on Bluethooth headset

- Magisk v21.1 supported kernel image

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20201127-UNOFFICIAL-i9100.zip

lineage-17.1-20201127-UNOFFICIAL-i9100_boot_magisk.img

Build #19 2020-09-27

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Added blobs for bluetooth APT and APT-HD support

- Fixed conversion error for accelerator and ril suspend methods. Will this fix RIL?? please test.

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20200926-UNOFFICIAL-i9100.zip

lineage-17.1-20200926-UNOFFICIAL-i9100_boot_magisk.img

Build #18 2020-09-17

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources (Security update 05-09-2020)

- Hexedited libsec-ril.so, increased Parcel-size with 4 bytes

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20200916-UNOFFICIAL-i9100.zip

lineage-17.1-20200916-UNOFFICIAL-i9100_boot_magisk.img

Build #17 2020-09-08

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Removed IPCThread-hack and hexedited libsec-ril.so disabling set_wakelock-method

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20200908-UNOFFICIAL-i9100.zip

lineage-17.1-20200908-UNOFFICIAL-i9100_boot_magisk.img

Build #16 2020-08-19

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- AGPS should be fixed.... Please test

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20200818-UNOFFICIAL-i9100.zip

lineage-17.1-20200818-UNOFFICIAL-i9100_boot_magisk.img

Build #15 2020-08-08

Overall state: Stable

Android build: 10.0.0-r41

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Fixed network selection

- Removed (again) 4G/LTE network option

- Fixed binder RIL issues

- AGPS broken again :(.. investigation in progress

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20200808-UNOFFICIAL-i9100.zip

lineage-17.1-20200808-UNOFFICIAL-i9100_boot_magisk.img

Build #14 2020-07-19

Overall state: Stable

Android build: 10.0.0-r40

Required recovery: TWRP 3.4.0-i9100 for Android 10

Changes:

- Update sources

- Fixed 9GAG video playback

- Bluetooth firmware properly loaded

- Properly implemented first_stage_mount

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

TWRP-3.4.0-i9100-Android-10.img

lineage-17.1-20200719-UNOFFICIAL-i9100.zip

lineage-17.1-20200719-UNOFFICIAL-i9100_boot_magisk.img

Build #13 2020-07-13

Overall state: Unstable

Android build: 10.0.0-r40

Required recovery: TWRP 3.3.1-1

Changes:

- Update sources

- Fixed 9GAG video playback

- Bluetooth firmware properly loaded

- Properly implemented first_stage_mount

Broken:

- In/Outgoing call

- Clean install via TWRP 3.3.1-1 doesn't install ("No OS installed" when reboot system)

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200715-UNOFFICIAL-i9100.zip

lineage-17.1-20200715-UNOFFICIAL-i9100_boot_magisk.img

Build #12 2020-06-13

Overall state: Stable

Android build: 10.0.0-r37

Required recovery: TWRP 3.3.1-1

Changes:

- Update sources

- Fixed audio volume control

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200613-UNOFFICIAL-i9100.zip

lineage-17.1-20200613-UNOFFICIAL-i9100_boot_magisk.img

Build #11 2020-06-07

Overall state: Stable

Android build: 10.0.0-r37

Required recovery: TWRP 3.3.1-1

Changes:

- Update sources

- Selinux enforced

- A-GPS fixed

- Speaker volume control during call

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200606-UNOFFICIAL-i9100.zip

lineage-17.1-20200606-UNOFFICIAL-i9100_boot_magisk.img

Build #10 2020-05-27

Overall state: Stable

Android build: 10.0.0-r35

Required recovery: TWRP 3.3.1-1

Changes:

- Update sources

- Changed buildtype to user (was userdebug)

- Fixed Wifi with PMF enabled

- Fixed FullHD recording

It was actually recording at 720p but saved as 1080p

- Removed 4G/LTE from preferred network type thanks to @lee.wp14

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200526-UNOFFICIAL-i9100.zip (Update 6-6-2020: Selinux enforced because of user-build)

lineage-17.1-20200526-UNOFFICIAL-i9100_boot_magisk.img (Selinux enforced)

Build #9 2020-05-13

Overall state: Stable

Android build: 10.0.0-r35

Required recovery: TWRP 3.3.1-1

Changes:

- Update sources

- Fixed Screencast (Chromecast)

- Fixed Wifi Hotspot

- Enabled Restrict USB feature, thanks to @TALUAtXDA

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200512-UNOFFICIAL-i9100.zip (Selinux permissive)

lineage-17.1-20200512-UNOFFICIAL-i9100_boot_magisk.img (Selinux enforced)

Build #8 2020-05-06

PLEASE TEST FOR DAILY DRIVE

Overall state: Stable-ish

Android build: 10.0.0-r33

Required recovery: TWRP 3.3.1-1

Changes:

- Update sources

- Selinux enforced for Magisk kernel image

- Browser crashed fixed. This is because of missing DRM HIDL services.

- Netflix, DRM playback fixed!

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200505-UNOFFICIAL-i9100.zip (Selinux permissive)

lineage-17.1-20200505-UNOFFICIAL-i9100_boot_magisk.img (Selinux enforced)

Build #7 2020-04-13

PLEASE TEST FOR DAILY DRIVE

Overall state: Stable-ish

Android build: 10.0.0-r33

Required recovery: TWRP 3.3.1-1

Changes:

- Update sources

- Fixed graphical glitches and screen tearing by using Triple Buffering

- Magisk v20.4 support via separate flashable kernel image

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200412-UNOFFICIAL-i9100.zip

lineage-17.1-20200412-UNOFFICIAL-i9100_boot_magisk.img

Build #6 2020-03-26

PLEASE TEST FOR DAILY DRIVE

Overall state: Stable-ish

Android build: 10.0.0-r31

Required recovery: TWRP 3.3.1-1

Changes:

- Kernel uses ramdisk again instead mounting mmcblk0p9 directly as root

- FM-radio fixed with Spirit 2 thanks to @lee.wp14

- AudioFx fixed thanks to @lee.wp14

- Magisk v20.4 support via seperate flashable kernel image

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200326-UNOFFICIAL-i9100.zip

lineage-17.1-20200326-UNOFFICIAL-i9100_boot_magisk.img

Build #5 2020-03-19

PLEASE TEST FOR DAILY DRIVE

Overall state: Stable-ish

Android build: 10.0.0-r31

Required recovery: TWRP 3.3.1-1

Changes:

- Update binder Kernel code from 3.18 kernel

- Hopefully fixed RILD crashes with this patch:

https://github.com/rINanDO/android_...mmit/c402c62eb419561232f593e8ca8a1d34ec78583b

- Updated sources

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200318-UNOFFICIAL-i9100.zip.

Build #4 2020-02-11

!! NOT SUITABLE FOR DAILY DRIVE !!

Overall state: Unstable

Android build: 10.0.0-r27

Required recovery: TWRP 3.3.1-1

Changes:

- Fixed notification LED via BLN

- Disabled some crashing services

com.google.android.mdh/com.google.android.mdh.service

com.google.android.gms/com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService

- Updated sources

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200212-UNOFFICIAL-i9100.zip

Build #3 2020-02-05

!! NOT SUITABLE FOR DAILY DRIVE !!

Overall state: Unstable

Android build: 10.0.0-r23

Required recovery: TWRP 3.3.1-1

Changes:

- Fixed RIL

- Updated sources

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200205-UNOFFICIAL-i9100.zip

Build #2 2020-01-12

!! NOT SUITABLE FOR DAILY DRIVE !!

Overall state: Unstable

Android build: 10.0.0-r18

Required recovery: TWRP 3.3.1-1

Changes:

- Moved to LOS 17.1

- Fixed AKM-sensors, rotation and other stuff now works

- Addressed some selinux denials (Build is still permissive)

- Reworked audio_policy_configuration.xml which fixed the following issues

Video recording audio quality

Audio to bluetooth devices

Audio to headphone/-set

- Wifi

Updated some wifi kernel patches.

Now using LOS Legacy Wifi HIDL v1.3 which fixed some connectivity issues.

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.1-20200111-UNOFFICIAL-i9100.zip

Build #1 2019-12-21

!! NOT SUITABLE FOR DAILY DRIVE !!

Overall state: Unstable

Android build: 10.0.0-r11

Required recovery: TWRP 3.3.1-1

Working:

- LiveDisplay

- PowerHAL

- Audio (Speaker is working, other stuff like Bluetooth, headphone/-set not working)

- Wifi (works but unstable)

- IMEI

- Touchkeys

- Camera Pictures

- Camera Videorecording (low quality audio, possibly due audio_policy_configuration.xml)

- Hardware decoder

- Display (but with, vsync issues and glitches)

Not working:

- Rotation (not working, akmsensor is working)

- RIL (runs but doesn't work)

- GPS not working, is crashing (is now disabled in this build)

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.tar.md5

i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img

lineage-17.0-20191220-UNOFFICIAL-i9100.zip

XDA:DevDB Information

[ROM][UNOFFICIAL][10.0.0][r41][I9100] LineageOS 17.1, ROM for the Samsung Galaxy S II

Contributors

rINanDO

ROM OS Version: Android 10

Version Information

Status: Testing

Created 2019-12-20

Last Updated 2020-11-27