yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] rINanDO:
New build is up!

I've been trying to free some more memory to let some apps load better and overal performance. I managed to free 70MB of memory at the cost of (Exynos) ION-heap. If it has any effect on games or new glitches on our old S2, please let me know.

After updating sources, bluetooth crashed. I needed to fix that too. Found that patch on LineageOS quite fast :) by using component-override to enable the required bluetooth services by default.

I experienced some stability issues when waking up the phone. Finally I captured some logcat/kmsg of this crash and it seems when under memory pressure Android can't allocate frames to animate ColorFade-out. Memory allocation fails and the display and other parts of Android crashes during entering suspend... To prevent this (hopefully) I disabled ColorFade (like in GO-builds) and hope this gives more stability.

Suddenly one of my S2's is suffering battery drain on a 'new' original battery (2019). At first I thought it was a bad build but after reading an old topic https://xdaforums.com/t/galaxy-s2-i9100-troubleshooting-hardware-issues.3365504/ it seems my S2 was bad and not my battery. When I measured the pinout's on the phone's battery pins it measures 50ohm. That's way to low, so it drains the battery when doing nothing and possibly destroys it due fast drain. My daily phone reads 52k ohm, so it is in good shape. Removing the capacitor didn't work for my bad S2. But it still works, not for daily usage though.

Build #9 2021-07-15

Overall state: Stable-ish

Android build: 11.0.0-r39

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Applied WifiOverlay to disable WPA3, please test, I don't have WPA3 router

- Decreased Exynos_Ion_Heap and TV-out to free 70MB memory

- Fixed reboot issue when using Magisk kernel

- Addressed unknown netlink mapping (SOCK_DESTROY) in kernel

- Disabled ColorFade, ColorFade indirectly trigger sometimes blackscreen crash when in high memory pressure. It allocates multiple fullscreen frames to animate fadeout effect when pressing powerkey to turn off/lock phone.

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210715-UNOFFICIAL-i9100.zip

lineage-18.1-20210715-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] ran000:
Thank for new build.

Do not see any changes in WiFi behevior at least for me ( see above https://xdaforums.com/t/rom-unofficial-11-0-0-r38-i9100-lineageos-18-1.4199759/page-3#post-84300637 )
[Galaxy S II Android Development] Ben Garp:
to disable? My english is not so good but I can tell you WPA3 dont work but WPA2 works, like the last build.
[Galaxy S II Android Development] rINanDO:
Yes, some users experience connection issues and gave me a hint to disable wpa auto upgrade overlay. So I just applied this patch and hope for the best. At least it still works as in previous build.
[Galaxy S II Android Development] js-xda:
Heureka ... I am back online on my home network! It is connecting now either via 2,4 or 5 GHz using WPA2 both on router or repeater in mesh mode with WPA2/3 mixed mode activated. Thank you!

I triggered a few installs after flashing the new build (as now possible ...) and the device turns fairly warm. Just an observation so far.
[Galaxy S II Android Development] rINanDO:
Great! So it did work disabling wpa3 auto upgrade!

I think cpu is warming up because of dex2oat processes in the background causing lagging and 100% cpu usage. Should be better when androids optimization procedure is finished.
[Galaxy S II Android Development] rINanDO:
Has anyone suffer deep sleep issues with latest build (100Mhz, but no deep sleep)? Not sure if an app is going rogue or something did changed unintentedly breaking deep sleep...
[Galaxy S II Android Development] Spatzendame:
Hello, why is TWRP for LineageOS 18.1 still on 3.3.1-1 and not on 3.5.2_9-0?

I want to install latest TWRP 3.5.2_9-0, but it always failed.

Can someone please tell me step by step what I need to flash? I tried all Odins and it did not work. I need the .pit file and Odin just do nothing when I click on Start.
[Galaxy S II Android Development] xdalurker1:
Attached is the CPU usage typical profile I'm seeing - deep sleep is working on this i9100T.

Also want to take this opportunity to marvel on this BEST ROM EVER for i9100. I could not upgrade from 16.0 because every attempt brought a set of problems like hangups, extreme battery drain, reboots. This is a first upgrade in more than a year and a half, skipping 17 version entirely - and what I have now, with this latest build is the MOST STABLE ROM I EVER HAD! A technological miracle and a super achievment for rINanDO.

Running 18.1 on a i9100 so smoothly is not just a phone, it's a statement!
[Galaxy S II Android Development] js-xda:
Out of curiosity: Which app have you used for monitoring and logging the CPU frequencies?
[Galaxy S II Android Development] xdalurker1:
Kernel Adiutor (from F-Droid)
[Galaxy S II Android Development] xdalurker1:
It may be related to microg core services: When I installed it and gave it permissions as it required, deep sleep was never reached. Once removed, I got percentages of deep sleep, as on my previous post
[Galaxy S II Android Development] js-xda:
Well, I don't dare to claim that I understand the full technical details but there is some statement in the OP explaining that you need an adapted recovery for this custom ROM - not saying that it can't be newer than 3.3.1.

It appears generally to be possible to use the adapted 3.4.0 - I am doing so myself too:

You can find the TWRP 3.4.0 (TWRP-3.4.0-i9100-Android-10.img) in the OP of i9100 LineageOS 17.1 thread.
[Galaxy S II Android Development] anton-:
I am not able to connect to my wifi with wpa, only without wpa I can connect to my wireless. It doesn't work also with a clean install. I can see the different access points but when I put my password and I try to connect to my network it doesn't connect anymore. It is like wpa_supplicant is not working.

Edit: Sorry, it looks that it is a problem with my router (with OpenWRT). I can use the wifi with another router.

Edit 2: This resolved the issue with OpenWRT router and LineageOS:

"OK, so, after doing some testing I pinpointed the WIFi option that creates trouble:

option ieee80211w '1'

Forcing this to '2' does not solve the problem, but setting it to zero (or, to be precise, removing it altogether) fixes the issue. I also tried to install the full wpad but nothing changes.

This option is a security feature, so disabling it is not a long-term solution."

After update, Android 11 device cannot connect to OpenWrt WiFi

OK, then you have to follow the procedure, and temporarily switch off the features one by one to find the root cause. I do not suggest to keep the features switched off forever, but for an error analysis you have to do that. Once you found the root cause, you can google and check what others did...

forum.openwrt.org
[Galaxy S II Android Development] OllieW:
So here's my feedback for the latest 20210715 build of LOS18.1 for the i9100. Update from previous version in TWRP was working flawlessly together with latest pico OpenGApps 20210724 build.

- Everything seems to be OK so far after first reboot, but initial connection to wireless network resulted in no internet - disconnecting and reconnecting did the trick, so all settings are correct (no such problems after second reboot).

- Unfortunately bluetooth calls are still broken - I can't hear the caller and the caller cannot hear me! Curiously Bluetooth Advanced Audio Distribution Profile (A2DP) for web radio or MP3 player is working without any problems, so it's only related to Headset Profile (HSP) and/or Hands-Free Profile (HFP) perhaps in combination with A2DP?!

- Receiving SMS only works if display is on - I guess it's sleep mode related (no wakeup if new message received via SIM when display is off) because every new SMS will be displayed some seconds after display is turned on and unlocked...

I will try wi-fi connection to WPA3 network with WPA2-transistion mode the next days.
[Galaxy S II Android Development] rINanDO:
New build is up!

Only updated the sources and adjusted brightness levels and enabled auto-brightness.

Build #10 2021-08-10

Overall state: Stable-ish

Android build: 11.0.0-r40

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Adjusted OLED brightness levels

- Enabled auto brightness

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210810-UNOFFICIAL-i9100.zip

lineage-18.1-20210810-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] ran000:
Hello

Thank rINanDO for new build. I successfully flash it here ( dirty flash ).

For me only issue with WiFi still problematic. I raised up the issue some times and repeat it now:

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] js-xda:
Thank you! Installed and works overall.

Observed nevertheless a moment ago a sudden reboot. No SIM installed, flight mode active but WiFi on (and connected). No Magisk, no GApps. Just FYI in case more users observe such incidents.
[Galaxy S II Android Development] retiredtab:
@rINanDO , I'm trying to fix a problem with exynos 5433 device where I'm getting constantly (over and over every 1 second) spammed by lmkd messages below. By any chance, when you wrote "lmkd works now but not 'clean'", you saw these messages?

08-10 22:34:41.497 3758 3786 I ActivityManager: Connection with lmkd established
08-10 22:34:41.497 3280 3280 I lowmemorykiller: lmkd data connection established
08-10 22:34:41.498 3280 3280 E lowmemorykiller: Failed to retrieve sender credentials
08-10 22:34:41.499 3280 3280 I lowmemorykiller: closing lmkd data connection
08-10 22:34:41.502 3758 3786 W ActivityManager: Lost connection to lmkd

When doing a strace, I found that scm_credentials were missing "msg_control, cmsg_type and cmsg_data".

constant lmkd spam t710

recvmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\0\3", iov_len=52}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 4

working lmkd no spam p550

recvmsg(6, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\0\0\0\0H\0\0\0\0\0\0\0Z\0\0\0\0d\0\0l\0\0\0\0\310\0\0~\0"..., iov_len=52}], msg_iovlen=1, msg_control=[{cmsg_len=24, cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, cmsg_data={pid=2841, uid=1000, gid=1000}}], msg_controllen=24, msg_flags=0}, 0) = 52

I noticed your solution was to fixup scm.c, scm.h and af_unix.c at

"Copied some code from android_kernel_samsung_msm8226 for SCM_CREDENTIAL"

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

I'm going to try your fixes to see if that helps 5433 lmkd spam.

Thank you.
[Galaxy S II Android Development] rINanDO:
I recently bought my first bluetooth headset. I used to use my car radio "Car-BT" for calls which works perfectly. So I was quite surprised my new headset didn't work like you reported. But now I can reproduce the problem and fix it ;)
[Galaxy S II Android Development] rINanDO:
I thought I answered your question a while ago, but I don't see my answer here... I hope you have succesfully fixed the lmkd spam. You have the right kernel commit to fix this.
[Galaxy S II Android Development] rINanDO:
New build is up!

(Finally) Fixed bluetooth headset since I bought my first one last week. I guess it broke since LOS 15.1.

Build #11 2021-08-27

Overall state: Stable-ish

Android build: 11.0.0-r40

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

- Fixed Bluetooth headset

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210827-UNOFFICIAL-i9100.zip

lineage-18.1-20210827-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] retiredtab:
@rINanDO , yes thanks to your github repo fixes, I was able to fix the lmkd spam. I gave you credit for authorship of the Aug 21 fixes at

https://github.com/universal5433/android_kernel_samsung_universal5433/commits/lineage-18.1

There's no way I would have figured out that on my own.

I'm now looking through the rest of your github for another problem that I'm having with adbd NOT starting before boot animation. I wonder if I could ask you to hookup a microusb cable to your 9100 and issue

adb reboot
adb logcat

and tell me if your adb logcat appears on the PC screen before the LineageOS boot animation appears on the 9100. BTW, if this is off topic in your thread, perhaps we can move it to PM?

Or if you don't have time to do it, that's fine, I understand and still grateful for your lmkd spam fix. Thank you again.
[Galaxy S II Android Development] Sir Charles82:
Hey all,

i have still LOS 14.1 on my S2. I have read that I have to do some re-partioning to get LOS 18.1 working on the S2 but i'm unsure (can't remember) what i have already done to get LOS 14.1 working.

Do you have some advice on how to get LOS 18.1 on the system? Delete everything, update TWRP to this special version (3.3.1-1 or this special version 3.4.0 from LOS 17.1-Thread?), then flashing LOS 18.1 and nano gapps.

Would this be the right procedure ?

The phone is just sitting around so a bit of testing would be possible

Thanks :)
[Galaxy S II Android Development] jo-so:
You have to update the PIT, too. My steps were:

Run a backup of images and documents, because everything gets lost.

Boot in ODIN mode and flash the PIT and the recovery. (this is only needed one time on the first update to a version >= LOS 16.0)

Boot in the recovery and flash the images from a SD card or via sideload.
[Galaxy S II Android Development] rINanDO:
New build is up!

Only updated sources.

Build #12 2021-09-13

Overall state: Stable-ish

Android build: 11.0.0-r43

Required recovery: TWRP 3.3.1-1

Changes:

- Updated sources

Downloads

i9100-LOS-16.0-Emulated-Storage.pit

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

lineage-18.1-20210912-UNOFFICIAL-i9100.zip

lineage-18.1-20210912-UNOFFICIAL-i9100_magisk_boot.img
[Galaxy S II Android Development] Mike60:
Thank you again.
[Galaxy S II Android Development] xerrrman:
Amazing job, thanks for all the efforts. I'm intalling it and will give a deep try in the following days.

I can't believe this trustly old phone is getting android 11, just awesome!
[Galaxy S II Android Development] Stefan_Stojsic:
Hi rINanDO, thanks for your amazing LineageOS ROM for old legend i9100, i was wondering if you can make a flashable zip for bootsplash, i made some remastered edition for Galaxy S2 i9100. Maybe i should remove Secured by Knox, since he is not in whole system...
[Galaxy S II Android Development] Stefan_Stojsic:
Hi rINanDO, thanks for your amazing effort for old legend Galaxy S2. I made some remastered bootsplash for our legend!​

I was wondering if you can make some flashable zip for bootsplash. Here is 4 variants black and white with and without Secured by Knox logo :​
[Galaxy S II Android Development] Harebal:
Thank You very much for your build! For me everything works great exсept GPS positioning .

(connection to satellites is sometimes lost for a few tens of seconds, then re-established)
[Galaxy S II Android Development] 2faraway2:
Interesting ... Do you use magisk kernel ? With magisk I do have a similiar issue: https://xdaforums.com/t/rom-unofficial-11-0-0-r43-i9100-lineageos-18-1.4199759/post-85321849
[Galaxy S II Android Development] Harebal:
Yes, I use magisk kernel. I need rooted device. So I returned to LOS 14.1. https://androidfilehost.com/?w=files&flid=125946&sort_by=date&sort_dir=DESC

Everything works fine except Magisk Hide.
[Galaxy S II Android Development] 2faraway2:
Yipp, I can confirm that 14.1 works perfectly, even the latest 18.1 build without magisk ... only 18.1 with magisk seems to kill gps ...
[Galaxy S II Android Development] Octopus2:
I would like support with crazy behavior. I installed LOS 18.1 on the S2 exactly according to the instructions. However with adapted TWRP 3.4. The installation of LOS 18.1 + Gapps ran without any problems and the mobile phone runs surprisingly well with LOS. But now to my problem:

I tried to boot into the recovery via the extended restart from LOS. The mobile phone also announces the booting of the recovery, but then it simply stops when the system is restarted. Even without success: When I try to get into the recovery using the key combination when switching on. The cell phone then just goes off.

Crazy, this ROM runs fine regardless. Does somebody has any idea?
[Galaxy S II Android Development] ggpv:
Can anyone help me? I'm having a really hard time trying to install magisk. I have the magisk_boot.img installed to the boot through TWRP, of course LOS 18.1 installed already, but when I attempt to flash magisk through TWRP as a .zip or try to patch the boot.img with magisk installed as an .apk is gives the same "Unsupported/unkown image format" message after it starts unpacking the boot image.

I see some other people in this thread have installed it so it must be possible, right? This is my first time trying anything like this so please forgive me.
[Galaxy S II Android Development] rINanDO:
Hi there,

you need to download the original Magisk v23.0 and rename that zip to apk. It will install Magisk in android like a normal app. The Magisk-app will detect the kernel is patched. If not, then you didn't installed the magisk_boot.img in TWRP yet. Hope this helps.
[Galaxy S II Android Development] ggpv:
Sorry, I don't understand... I definitely do have magisk_boot.img flashed to the boot in TWRP... it's not flashed to the recovery... Magisk is installed as an app/apk... Is Magisk supposed to look different when it is installed correctly? I see online that when it's done correctly the title says "Magisk Manager" and both the Magisk Card and App card say "Update" instead of "Install, but mine both still say install...

Sorry, I don't mean to turn this into a magisk help thread, but i'm truly lost <:)
[Galaxy S II Android Development] jo-so:
My phone crashes sometimes and the screen looks like this:

I can't reproduce it. Sometimes it happens twice a day and sometimes not in a week. Often when I pull the phone out of the pocket.

Yesterday, it happened when I was connected via adb and I could look-up the process table:

2172 system 12 -8 20M 1.7M 1.4M R 100 0.2 2:40.00 android.hardware.graphics.composer@2.1-service
859 root 20 0 0 0 0 R 93.3 0.0 2:15.01 [s3c-fb]
7756 root 20 0 9.1M 2.4M 1.7M R 2.6 0.3 0:00.51 top
2388 system 18 -2 1.5G 103M 55M S 2.0 12.3 3:02.97 system_server
6296 u0_a140 20 0 0.9G 53M 26M S 0.3 6.3 0:27.21 com.github.catfriend1.syncthingandroid

I've captured the adb-log: https://files.jo-so.de/adb.log

Does anyone else see this problem or knows what to do?

I'm running version 20210912.
[Galaxy S II Android Development] jimbob00:
this also happens to mine. ?
[Galaxy S II Android Development] bersem:
+1 or black screen and soft reboot
[Galaxy S II Android Development] andreoide:
A very wild guess, could it be, since it happened when pulling it out the pocket, it is related to the flipflap function? What if you disable it?
[Galaxy S II Android Development] jo-so:
What's this »flipflap function«?
[Galaxy S II Android Development] andreoide:
I don't know if it's build into this lineage version, but the flipflap is when having a phonecover wich cover the screen goes on when opening the cover like a book

https://www.reddit.com/r/LineageOS/comments/6yzpn1
Also I wonder. Don't you have Google? ;-)
[Galaxy S II Android Development] jo-so:
I couldn't find flipflap, neither in the app list nor in /system/app. I've also disabled settings→display→lock screen→inactivity→pocket, but this didn't help too.
[Galaxy S II Android Development] js-xda:
Same issue with same build once so far - if I recall right, it was related to charging and disconnecting but can't recall the circumstances in detail. But for sure no pocket involved.
[Galaxy S II Android Development] andreoide:
If I look at the picture Jo So sent before it looks like a defective screen (I know its not defective, just say it looks like it) and therefor your remark charging and disconnecting is more likely....

I keep reading posts about it here, but had no time to flash my old S2 with this ROM so far.
[Galaxy S II Android Development] rINanDO:
Screen is not broken ;) I'm hunting this bug for months. This is the first time someone reported this bug specifically. It is hard to grab a log because it happens after weeks or sometimes twice a day. It is kernel related and it is happening when the display is suspending or resuming. I added some debug lines in my kernel to troubleshoot when it happens and having useful log.

For as far I know there is a racing condition which is prevented using a spinlock. However it sometimes happens when the spinlock is hanging... When this happens, the lcd is not turned off because the display is suspending and hangs during this proces...

Other sympton is that some values while suspending are invalid. This causes a kernel crash due invalid pointers. Hard reboot happens. I have a dirty fix for these issues and testing it for 3 weeks now. It looks promising but the main cause of the corruption is still unknown. I will include these dirty fix in next build.
[Galaxy S II Android Development] Bryanthta:
This bug was happening with my SII too, what solved it was disabling "Screen saver" (Settings -> Display) and "Ambient display" (Settings -> Display -> Lock screen), after that it never happened again.
[Galaxy S II Android Development] andreoide:
I think you just made a few people very happy 😊 😃
[Galaxy S II Android Development] jo-so:
If you have a kernel to test, I'm happy to try it. Also with debug messages and anything more that might help you.
[Galaxy S II Android Development] zpunout:
It was funny to upgrade my friend's SII to your build of Android 11 and then hand the phone back to him for a surprise. I'm guessing Android 12 might be a bit of a stretch due to its OS size and getting it to work on an old kernel would be a hurdle and then all the other things.
[Galaxy S II Android Development] Chicko24:
let's be surprised what the Devs get, at least they have always managed to offer something
[Galaxy S II Android Development] js-xda:
I am having a rather vague issue regarding sleep state and battery drain.

The following situation: I am using a SII currently pretty much only as a MP3 player (using Vinyl from F-Droid) incl. sleep timer. While this was working pretty OK for some time (early September til end September) with battery lasting several days (WiFi off, airplane mode on), I am having lately issues that the devices is often drained after one night and the sleep timer in Vinyl hasn't ended either. Especially due to the last, I assumed that something is plainly getting stuck as the music doesn't last until the battery dies but rather somewhere in the range of what I set the sleep timer. I tried already different performance profiles (saver vs. balanced) and with and without WiFi on (just out of curiosity).

I can"t say for sure whether it is related to the last build which I installed around September 20th but I can say for sure that it hasn't been present before.

Anyone else having issues that could be linked a same underlying issue? Or anyone an idea?