yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Faffendecker:
Installed recently and also getting random reboot, random hangs and over past 2 days the battery gets totally discharged within 10 hours. Looking forward to a more stable update as this looks really good.

Thanks for all the work and stay safe all.
[Galaxy S II Android Development] the_real_grumpazoid:
Thanks so much for this.

First time installing a custom ROM and I had been struggling to get it all working.

Your instructions worked and sorted out my mess !

Big Thanks
[Galaxy S II Android Development] rINanDO:
New build is up!

Still making slowly some progress. Hope you all doing fine and are healthy.

In this build I ported kernel's network stuff to get rid of network weird errors. Wifi should be more stable now, but 5Ghz is not working properly yet. I have disabled GPS and libsecril-client.so to get the phone more stable. With SIM and wifi active I had it running about 19h (in idle) before next charge.

I have not tested GAPPS. I can't find any ARM version for Android R. Has anyone a link?

I have some issues I can't resolve, maybe someone can help:

- I suspect something with sockets in R has changed preventing libsecril-client.so (via audio hal) and gps.exynos4.so (via Gnns hal) to communicate with RILD. For now I disabled this.

- lmkd. I reverted a patch "lmkd: Restrict process record modifications to the client that created it" in lmkd which requires to get a pid/credential from kernel (I guess), but I have no idea where to look. lmkd works now but not 'clean'

- Some security issues in framework, probably the same cause of lmkd. Some app permission can't be found (specially bluetooth/tethering/wifi stuff) so I disabled some security checks to get R running. Of course this isn't a fix but a temporary hack.

greetz,

Rinando

Build #2 2021-01-11

Overall state: Unknown, but hopefully better than #1

Android build: 11.0.0-r19

Required recovery: TWRP 3.3.1-1

Changes:

Fixed receiving and making a call

Disabled GPS

Disabled libsecril-client.so (eg. volume control during call not working)

Enabled Vibrator HAL

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210111-UNOFFICIAL-i9100.zip
[Galaxy S II Android Development] ze7zez:
The newer the version of android, the more services running in the background that drain the battery. It is obvious that you should disable those services that are unnecessary. Unfortunately, this is not possible in many cases.
[Galaxy S II Android Development] rINanDO:
Hi there,

Sorry late response. I cant' find the ARM R version of BitGapps. I really don't know if GAPPS is working.
[Galaxy S II Android Development] rINanDO:
I hope it is fixed with build #2. GPS was causing crashes and some issues in networkstack.
[Galaxy S II Android Development] rINanDO:
That could be great. I have posted the issues I can't figure out how to fix in my build #2 post. I hope you can help :)
[Galaxy S II Android Development] ran000:
Thank for well prepared subj. Two days without crush and really all my apps ( exept GPS) working well.

Find it here: https://drive.google.com/file/d/1TZKKrKhb7ybf-p4A1SKXxP0iy0evIP9W/view?usp=sharing
[Galaxy S II Android Development] SaudMujahid:
I can confirm that the 12h standby time has been fixed and is working ok(i do not use gapps or have a sim registered to the phone). it would be great if you made the performance even better like adding a low ram enabler .

regardless, amazing work!
[Galaxy S II Android Development] :
What is i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1.img
[Galaxy S II Android Development] Faffendecker:
I can confirm that crashes have stopped and battery life is back to normal. Thank you for the quick response to my "can't wait for the next update" rINanDO.
[Galaxy S II Android Development] the_real_grumpazoid:
Thanks or this.

A couple of noob questions:

Do I have to wipe the partitions to flash the new version?

Does GAPPS have to be flashed at the same time as the main ROM?

Thanks
[Galaxy S II Android Development] ran000:
I have done so both for clean and dirty flash without problem.
[Galaxy S II Android Development] ran000:
Hello

In connection with the release of the new version of Lineage, I want to raise before the community members a issue that I had a long time ago. The issue has been raised repeatedly in different places, but so far I have not found a solution.

Issue description:

1) For default security setting: wpa+psk

- Wifi connection to Hotspot with default setting under Windows at my notebook work well. Here is log of successful connection:

https://drive.google.com/file/d/15IQqqaAHaOYIQBS7LAJ9L0XHmWZ5hIdE/view?usp=sharing

- Wifi connection to Hotspot with default setting under Fedora at my notebook does not work. Here is log of connection attempt:

https://drive.google.com/file/d/1QTHcjPQX0drKRe-FRMIcPbuI0osHljrH/view?usp=sharing

- Wifi connection mostly work well with other Hotspots, only few unsuccessful case I can remember.

2) For non default security setting: none

- Wifi connection to Hotspot with default setting (exept security) under Fedora at my notebook work well.

I have not any issues to use Wifi Hotspot from my Fedora (it is my mostly working system) system with other client devices. The problem is not critical for me, but I am interesting to find solution. Please, any help
[Galaxy S II Android Development] Mike60:
Hi and thank you " rINanDO " for you work.

I am happy with what are working now. Contacts, calling, answer, send txt, receive txt, Wifi, H+.

Some test today. Install manually Google play services, Google Play Store and more.

I know you try to manage with this. I want only one think more. Working GPS. This phone ar used only as back-up calling and for location. But GPS are not working. Al software app installed want to run with Google Play Services. It is possible what I installed are not working with this 18.1. I will check and battery how it work.

I suppose you understand what I mean.

Thank you again.
[Galaxy S II Android Development] Mr.cyrux:
New Version is very smooth with BitGapps, thx a lot!
[Galaxy S II Android Development] MaddogIT:
Hi Mike60,

is a known issue as you can read from the first page:

" - GPS (Disabled, crashes for AGPS communication with RILD) "

We can just hope he has time and luck to fix it.
[Galaxy S II Android Development] DualJoe:
Does this generally work for any rom or do you have applied any patches for MicroG?
[Galaxy S II Android Development] rINanDO:
New build is up!

Little change, building with LineageGo to save more memory in Trebuchet.

GPS is still broken so is Magisk support and libsecrilclient.

Not much progress, but still working on it.

Build #3 2021-02-12

Overall state: Stable-ish

Android build: 11.0.0-r29

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Added network fix caused Firefox to crash, thanks to @florencebirée

- Build with LineageGO (more memory, but also more limitations (no widgets))

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210212-UNOFFICIAL-i9100.zip
[Galaxy S II Android Development] ran000:
Two day stable work here after dirty flash. Thank for your work!
[Galaxy S II Android Development] joam280:
gran trabajo del desarrollador, voy a probarlo ahora mismo

Translation: great job from the developer, I'm going to test it right now
[Galaxy S II Android Development] ms_saber:
Thanks for the great work, though I have a big problem. I could run the first build with Odin, but for the latest build the i9100-LOS-16.0-Emulated-Storage-TWRP-3.3.1-1 is an img file instead of tar.md5 which Odin does not accept. I appreciate if anyone can tell me what to do. Besides, where can I get the Gapps for the latest build?
[Galaxy S II Android Development] DevisG79:
Read the first page. There's an tar.md5.

For Gapps Mod edit: Pling link removed.
[Galaxy S II Android Development] DevisG79:
Sorry didn't know that. For Gapps use BiTGApps.com
[Galaxy S II Android Development] Boltie:
Hi All, I've just installed and I seem to be having issues with the WiFi not staying connected. Is anyone else experiencing this? Wi-Fi is fine for all my other devices.

*EDIT*

I've also noticed that when I enable the "Auto-connect" option for the saved network, it never remembers the setting and sets it back to off.
[Galaxy S II Android Development] ran000:
Compare, please, with my problem. May be it is common problem?
[Galaxy S II Android Development] Boltie:
Don't think so.

My problem is that it finds networks, I connect to my router and then it drops the connection and everything disappears. It then continually scans for networks again. It doesn't find networks again until I reboot or enable/disable Airplane Mode. Then it just repeats, finds networks, loses them and then continually searches until I reboot or enable Airplane.

*EDIT*

Process I've just followed. Wi-Fi still not connecting.

Reset phone to stock using Odin:

Auto Reboot unchecked

Repartition option checked

PIT: I9100_STOCK-System_2GB-Data_512MB-Preload.pit

PDA: I9100XWMS2_I9100BULS3_I9100VODLSF_HOME.tar

Phone details are now as below. Wi-Fi finds networks, doesn't continually scan and connects to my router just fine. Phone is good, just very outdated.

Android: 4.1.2

Baseband: I9100BULS3

Kernel:

3.0.31-1484249

dpi@DELL177 #3

SMP PREEMPT Tue Dec 3 20:24:29

KST 2013

Build: JZO54K.I9100XWMS2

Recovery: Android system recovery <3e>

Now I flash the below recovery via Odin PDA.

GT-I9100_JB_ClockworkMod-Recovery_6.0.2.9.tar

This allows me to now install the below via Recovery:

kernel-Lanchon-20160406-cm-13.0-i9100.zip

recovery-Lanchon-IsoRec-TWRP-2.8.7.0-20160113-i9100-(by-arnab).zip

I now have a stock ROM with an IsoRec recovery and a kernel that supports that IsoRec recovery. Not sure why this is required since the kernel and recovery are going to be flashed over again straight away but the guide here states you need to start off with a stock ROM and an IsoRec recovery.

I now follow the steps here to install LineageOS 18.1.

Using Odin:

Auto Reboot unchecked

Repartition option checked

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

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

Restart into recovery.

Allow Modifications

Wipe Data -> Format

Wipe Data -> Advanced

Davik/ART Cache, Cache, System, Non-emulated

Install via recovery:

lineage-18.1-20210212-UNOFFICIAL-i9100.zip

BiTGApps-arm-11.0.0-R20_signed.zip

Restart into recovery and format data again as GApps installed.

Restart system.

Wi-Fi borked. I can return to stock and wi-fi is fine again so pretty sure it's not a hardware issue.
[Galaxy S II Android Development] rINanDO:
New build is up!

Finaly I made some real progress. I was stuck why the ROM needed permission hacks at framework-level and lmkd hacks. GPS causes RIL to crash and RIL crashes when the audio driver (tiny-alsa) uses libsecril-client to send phone audio commands. It was a pain in the neck. I also tried replicant drivers (which almost worked) but I got lost nevertheless. (for months... :( )

Suddenly by accident I stumbled upon some kernel patches which fixed the framework-level patch. A few hours later I found the missing kernel code to fix lmkd hacks (merge conflict resolve from kernel v3.4.113). It still left me stuck with crashing RIL. I hoped it had the same root cause... unfortunately not... So I tried libsec-ril.so from i9300, patched it for R and hope for the best.... And that fixed RIL! GPS runs stable, audio control works, calling/receiving calls, data 2G/3G works! My guess is that i9100's libsec-ril.so is missing some newer socket codes which were handled by i9300's version. I can't change that because it is proprietary blob and I don't know assembly/ARM.

I tried BitGapps and try to stress the ROM. Yes it is slow compared for nowadays Android R phone but it doesn't crashed yet. Apps are installing and working. Magisk doesn't work. It has something to do how i9100 boots with Android R which skips starting Magisk at boot. Need to figure that out.

I'm now running it for a day so, lets ship it and mark it as BETA :)

Build #4 2021-04-06 (BETA)

Overall state: Stable-ish

Android build: 11.0.0-r32

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Finally fixed RIL (using i9300 blob) and GPS!

- Removed temporary permission hacks due missing kernel commits

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210406-UNOFFICIAL-i9100.zip
[Galaxy S II Android Development] MaddogIT:
Nice to hear this good news!

Thank you for you not easy work
[Galaxy S II Android Development] bersem:
good work @rINanDO.

Clean flashed lineage-18.1-20210406-UNOFFICIAL-i9100.zip with open_gapps-arm-11.0-pico-20210130-TEST.zip

some missing things:

-widgets

-audio recorder ( screenrecorder moved to quick settings tile )

-icons raster ( only 4x4 available )

Regards !
[Galaxy S II Android Development] florencebirée:
For the widgets or the icon grid, you can install an alternative launcher, there is a lot in F-Droid. I use OpenLauncher, wich is similar to the old Trebuchet launcher with widgets.
[Galaxy S II Android Development] Boltie:
Why are img files provided now for the recovery instead of a tar like in the original post? Why instruct people to flash via Odin but then provide a file not usable via Odin? The S2 also doesn't seem to support fastboot so not even able to flash via adb. Please can someone explain the reason for the img files?

When I enable USB debugging, connect my phone, allow adb on the device, reboot into bootloader and then try to flash the img, the device is never found unlike before I reboot in which case it is detected.
[Galaxy S II Android Development] bersem:
.img file is for those who have already flashed a custom recovery so they already have a custom ROM on their S2 ( for example LOS 17.1 and TWRP for Android 10 + repited already ). They have to flash the isoRec recovery .img file only ( through TWRP ) and upgrade to LOS 18.1 according OP instructions. A clean installation from Stock ROM to LOS 18.1 is described in the OP. This file must have a .tar extension in order to be able to flash it with ODIN.

S2 doesnt support fastboot. Search for heimdall.

EDIT: If u are on Stock ROM so use the files and instructions from OP !

Regards !
[Galaxy S II Android Development] Boltie:
So, the part about needing IsoRec only applies to those doing a dirty flash. That should really be made clear in the OP as it appears as though you need to put everything back to stock and then flash an IsoRec recovery before starting the procedure.

Anyhow, I have also tried just following the OP install guide without IsoRec and I still have the wifi issue which nobody else appears to be having. Any ideas on what is wrong as it works in stock? I could try changing the Kernel to something else but why would the Kernel provided with this ROM not work for me but everyone else? Same hardware isn't it or are there different wifi chips used?
[Galaxy S II Android Development] bersem:
So, the part about needing IsoRec only applies to those doing a dirty flash. That should really be made clear in the OP as it appears as though you need to put everything back to stock and then flash an IsoRec recovery before starting the procedure.

Anyhow, I have also tried just following the OP install guide without IsoRec and I still have the wifi issue which nobody else appears to be having. Any ideas on what is wrong as it works in stock? I could try changing the Kernel to something else but why would the Kernel provided with this ROM not work for me but everyone else? Same hardware isn't it or are there different wifi chips used?

--------------------------------------------------------------------------------------------------------

Quote from OP. IsoRec recovery is for clean and also dirty flashing needed.

Follow exactly the instructions from OP. Maybe its a different chip but i guess not. Try to enable WLAN randomization in Developer Options. Check ur WLAN MAC adress too. Try to set an Static IP on ur network. Are u having an GT-I9100 ? Did u have these problem on earlier releases ?

Regards !
[Galaxy S II Android Development] Boltie:
I have followed them exactly. There isn't anything you can deviate on really. It also doesn't say when to install an IsoRec recovery so I installed one after flashing stock rom, before the procedure starts. It also doesn't provide examples of which IsoRec recovery to use so I went with "recovery-Lanchon-IsoRec-TWRP-2.8.7.0-20160113-i9100-(by-arnab).zip" as that was the latest provided in the IsoRec thread found here. To flash that recovery though I first needed to flash a recovery over the stock recovery. This is where saying follow the OP doesn't work as the OP is not clear and doesn't state any of this.

It is a GT-I9100. I haven't used this phone in years so the last ROM on it was Resurrection Remix. WiFi worked fine on that too. I went from Resurrection Remix to stock and then followed the instructions here to install LOS. Everything appeared perfect apart from the WiFi.

Just installing once more so will look at the dev options once finished.

Which IsoRec recovery is everyone else using before installing since one isn't listed in the OP?
[Galaxy S II Android Development] Netsab:
In my case, I didn't flash anything else but the lineageos zip, once Odin process done. Everything seems to be working, even bluetooth which were faulty under 17.1
[Galaxy S II Android Development] rINanDO:
Hi,

Yes widgets and icon rasters are missing, but it is because of Lineage's GO build profile for Trebuchet.

Regards
[Galaxy S II Android Development] js-xda:
Thank you for your continuous great work!

Did upgrade from the latest LineageOS 17.1 via TWRP 3.4 (the one provided in LineageOS 17.1 thread) - at first dirty flashing only wiping Cache/Dalvik, later full clean install.

One issue: While before on LineageOS 17.1 no issue, device can't connect anymore to mesh WiFi operating on both 2,4 and 5 GHz (AVM router and repeater both on FRITZ!OS 7.2x). Connection to mobile phone hotspot operating on 2,4 GHz functions.
[Galaxy S II Android Development] SethGeckoXDA:
I just want to say, I really like it when you elaborate on your development process. I'm always looking forward to reading your updates.
[Galaxy S II Android Development] js-xda:
Update on this issue: I tried on a S4 I9505 with LineageOS 18.1 (build 20210415) and mentioned mesh WiFi operating on both 2,4 and 5 GHz (AVM router and repeater both on FRITZ!OS 7.2x) works. So, it is not an issue with LineageOS 18.1.
[Galaxy S II Android Development] Lachty1:
Best gapps for android 11.0.0-r32? Need only Google play. Thx. Piko gapps maybe. Can you send mi link for download?
[Galaxy S II Android Development] DevisG79:
You can try bitgapps. But I suggest you to read carefully. Installing without read is not recommended. Here's the link: https://xdaforums.com/t/custom-gapps-bitgapps-for-android.4012165/
[Galaxy S II Android Development] Lachty1:
It works bad with bitgapps. I need another gapps. Small size.
[Galaxy S II Android Development] Mohammadne82:
Hi Mr.rINando

First of all thank you for your great job on project s3 i9300

The new release ( lineage-18.1-20210416-UNOFFICIAL-i9300.zip ) was pretty stable thank you but there's some bugs like in advance restart menu rebooting to custom recovery doesn't work I am using the latest twrp ( 3.5.2_9.0 )

And also if you enable display over other apps permission instead of notification access it would be awesome because display over other apps permission Is more important than that. After all thank you thank you and thank you . Best hopes for you.
[Galaxy S II Android Development] joam280:
Is this rom compatible with the i9100P model?
[Galaxy S II Android Development] bersem:
Yes it is. I have this running on an I9100P.

Regards !
[Galaxy S II Android Development] joam280:
What google apps do you use? they give me an error when installing 😅
[Galaxy S II Android Development] bersem:
https://sourceforge.net/projects/opengapps/files/arm/test/

Opengapps arm pico. Did u repitted your System partition to 1GB before ?

Regards !
[Galaxy S II Android Development] joam280:
SIf I followed the detailed instructions
[Galaxy S II Android Development] joam280:
solved thanks 😉
[Galaxy S II Android Development] branev:
Great job (still can't belive it was possible), can't wait for widgets to work :)
[Galaxy S II Android Development] Gaudens:
I can't recreate this problem. I am using an AVM FRITZ!Box 7520 with an AVM FRITZ!Repeater 3000. The mesh network works fine with my S2 GT-I9100 smartphone. The only weakness is the WPA2 connection instead of WPA3-Personal encryption. Maybe someone knows if WPA3 is possible with an S2 and LOS?
[Galaxy S II Android Development] rINanDO:
New build is up!

After digging around in Magisk code, I just couldn't figure out why its post-fs-data routine bails out. No errors in logcat. Manually starting the Magisk service runs without any problems. By accident I found out Android R is killing the services almost directly after start! It wrote a suspicious log 'This is new behavior' and that pointed me to this commit which prevents Magisk to boot properly. I don't know if this problem occurs on other phones... https://github.com/rINanDO/android_system_core/commit/43d2ee2dc1a3db3c58aa1f9f7ea32979a7013322

Magisk v22.1 has updated it's boot.img patch routine, so I need to create a new patch script too. Well that is done so now we have the latest Magisk again :)

This build is as complete as LOS 17.1 build and without RIL problems so far I can tell. Good for daily drive until the providers switches 2G &3G off. My provider will switch of 3G end this year and 2G in 2025. So my S2 daily drive phone will retire end this year :(.

I didn't check Wifi yet. I have trouble connecting to my 5Ghz Wifi, but my kernel has no problems with my i9300 -builds connecting to the same Wifi.

Happy testing!

Build #5 2021-05-04

Overall state: Stable-ish

Android build: 11.0.0-r34

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Disabled low_ram flag, but other GO optimized memory-settings are still applied

- Disabled Lineage GO configuration, so we have Widgets againin Trebuchet

- Magisk v22.1 support!

Download Magisk v22.1 from here and install APK.

Reboot into recovery and flash lineage-18.1-20210504-UNOFFICIAL-i9100_magisk_patched.img via TWRP "Install image" and choose "Boot".

Reboot and enjoy Magisk!

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210504-UNOFFICIAL-i9100.zip

lineage-18.1-20210504-UNOFFICIAL-i9100_magisk_patched.img
[Galaxy S II Android Development] K9100ii:
FYI, you can still install Magisk using a recovery. You now just need to change the file extension for the Magisk app from .apk to .zip. Things needed for it to be installable via a recovery are included right in it since v22.0: https://github.com/topjohnwu/Magisk/releases/tag/v22.0

You didn't need to do that.
[Galaxy S II Android Development] rINanDO:
Ow, thanks! I didn't knew that.
[Galaxy S II Android Development] ran000:
The subj work well here. Thank for your work!

Unfortunately I steel have a problem with Wi-Fi ( WPA2 work well with Windows10 hotspot, but does not work with Fedora34 hotspot)
[Galaxy S II Android Development] js-xda:
I am using FRITZ!Box 7490 and FRITZ!Repeater 1750E on latest FRITZ!OS.

Could it be that not the mesh but rather the 5 GHz network (same SSID) is the issue? Matching that I have no issue on a pure 2,4 GHz WiFi. @Gaudens - do you have a separate 2,4 and 5 GHz network or combined?

Update: Not that I expected a change based on rINanDO's observation but also no change with latest build.
[Galaxy S II Android Development] Oxydeme:
Still impressed by how far you got in such environment,

Porting that kind of rom to our old beloved phones has surely be a rude task,

And just for that, you deserves a big thanks!
[Galaxy S II Android Development] fgh11:
Awesome. Thanks for the ROM. Our old S2 is atm probably more actual than the most other new phones out there.
[Galaxy S II Android Development] mirhl:
Did you check this?