yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Mike60:
About GPS

Best : Before I get out from my home I turn on WiFi and GPS and wait couple of minutes. It work inside building. After I get out all are OK. GPS working.

Slower connection : If I go outside building without WiFi connected and turn on GPS take more like 20 - 30 minutes to catch satellites.

:(

No connection : Some times are not working at all.
[Galaxy S II Android Development] Matthew4020:
Some bugs?

Ok so I'm new to this but I think I found some bugs. So I have a 32 GB micro SD card and it will read it fine but if I go to format as internal it will bootloop, and the only way I have found to stop the bootloop is to go into twrp and format data. I'm on build 15 I believe. It also bootloops at a couple other things but I wasn't paying attention to what it bootlooped at though I believe it was when I was updating apps.

Thanks for all your hard work on this ROM!
[Galaxy S II Android Development] Mike60:
" AGPS broken again .. investigation in progress "

Thank you
[Galaxy S II Android Development] xdalurker1:
I can confirm that after 4 days with continuous use - phone RIL remains connected with Build #15. Battery lasts longer too. Big difference from the twice-daily 'no service' I got. Congrats on another bug smash, rINanDO! Awsome!!
[Galaxy S II Android Development] rINanDO:
Wel I can't figure out why exactly, but I guess /system/etc/gps.conf is missing. We use gps_debug.conf since agps was fixed. I copied this file to gps.conf and I got quick location fix within 10 seconds again. But I'm still in doubt this is the fix. Can someone test this on build #15 also and share his experience?
[Galaxy S II Android Development] Mike60:
" Build #15 2020-08-18 " !

day ?
[Galaxy S II Android Development] ze7zez:
If without a root, it can be done in TWRP.

Mount the system partition, then type in the TWRP terminal:

cp /system/etc/gps* /system/etc/gps.conf

From now on, the 3D fix works properly after a temporary connection to the Internet.

After obtaining a fix, you can turn off the mobile data for battery saving.

It's just a typo.

Change to 2020-08-08 and you'll be calm.
[Galaxy S II Android Development] rINanDO:
Woops!, corrected. Thanks!
[Galaxy S II Android Development] Ben Garp:
Hi would like to help but for your code i get the answer:

cp can't stat '/system/etc/gps*': too many symbolic links encountered, what did I wrong?
[Galaxy S II Android Development] tyrionmx:
Hello, thanks for the rom!

Is there anyway I can build this by myself from source? I cannot figure it out on my own, could you please give me any hints?

Thanks :)
[Galaxy S II Android Development] ze7zez:
You'll find out when you see what you have in the folder.

ls -l /system/etc/gps*

It should definitely work

cp /system/etc/gps_debug.conf /system/etc/gps.conf
[Galaxy S II Android Development] ran000:
Please, look here: https://github.com/linusdan/lineage_manifests
[Galaxy S II Android Development] tyrionmx:
Thanks for the instructions! I tried to follow them, however I get this error when running `brunch i9100`:

error: ninja: 'Android.bp', needed by 'out/soong/.bootstrap/build.ninja', missing and no known rule to make it

Any idea what might be causing it?

Thanks again
[Galaxy S II Android Development] ran000:
I think you have not prepare build environment in right way.

Please, check: https://source.android.com/setup/build/initializing
[Galaxy S II Android Development] rINanDO:
Brunch i9100 is not enough. See build-los.sh in devices/samsung/i9100 repo. Start this one to build. The problem is that the ramdisk is build parallel with kernel, but our phone has the ramdisk in the kernel so it normally fails missing the ramdisk.cpio.
[Galaxy S II Android Development] bersem:
Lost network after few days :( Had to reboot

Build 15 the latest

Regards !
[Galaxy S II Android Development] guest4711:
Switching aeroplane mode on and off was not enough?
[Galaxy S II Android Development] bersem:
:good: have to try next time :p
[Galaxy S II Android Development] rINanDO:
Yes, I had that too. It was after navigating using waze after 1.30 hour drive. Ril was still operational, only no data. I didn't got a logcat unfortunatly.
[Galaxy S II Android Development] rINanDO:
New build is up!

I only added gps.conf besides gps_debug.conf and updated sources. It should fix AGPS. I don't found any source changes which broke AGPS in the first place, nor I can see something in verbose logging. But I have most of the time a quick GPS lock. Please share your experience :)

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
[Galaxy S II Android Development] Aussiewaterdragon:
Updated to build 16. Flashed zip and image a micro-gapps.. Rebooted google play loaded and 5 apps needed updating, downloaded and updated ok. Its all good and location icon appears.

Thanks for your work, much appreciated
[Galaxy S II Android Development] OllieW:
I've installed the new #16 build (no magisk) yesterday after full wipe with latest Pico OpenGApps - no problems so far! No battery drain until now (related to SIL RIM problems which are gone now) and still 86% after 15 hours connected to WiFi (mobile network also activated). Network search is also finally working again - really great work!

Perhaps one problem: First WiFi connection in setup assistant doesn't work (no data sent/received) - after the error message touching same network (still connected) again in WiFi list, setup assistant can check for updates without any errors. I guess that setting up all drivers is not finished when assistant will start up after fresh install with full wipe.
[Galaxy S II Android Development] eoghan20s:
I wanted to test android auto and get a permission problem saying draw over other apps has been disabled to improve performance. How can I switch it back on?
[Galaxy S II Android Development] rINanDO:
It is because of GO. Without GO Android 10 is too heavy for our S2.
[Galaxy S II Android Development] tonymonaghan0:
Still get the no SIM card message with build 15

Still get the no SIM card message with build 15. Is there a way to restore an older version of lineageOS? Have tried to restore version 15.1 but get only the boot logo and the phone won't boot any further. Thanks for all the great work.
[Galaxy S II Android Development] rINanDO:
You probably need to format the preload partition and use the PIT from that version of LOS.
[Galaxy S II Android Development] ze7zez:
Now up time 152h. I don't know since when, but now mobile data doesn't work (the icon in the bar has an "x"). It is not

possible to change the preferred network type to something other than 3G (LTE appears again :confused: ).
[Galaxy S II Android Development] ze7zez:
failed: exit code 128

I wanted to send a report, but it turns out that this is impossible with the "bug report in power menu". The GUI resets itself.

edit.

I tried to make a bureport from PC, but there are problems.

E:\>adb devices
List of devices attached
XXXXXXXXXXXXXX device

E:\>adb bugreport .
adb: error: failed to get feature set: no devices/emulators found8-24-27.zip
Bug report finished but could not be copied to '.\bugreport-GT-I9100-QQ3A.200805.001-2020-08-26-08-24-27.zip'.
Try to run 'adb pull /data/user_de/0/com.android.shell/files/bugreports/bugreport-GT-I9100-QQ3A.200805.001-2020-08-26-08-24-27.zip <directory>'
to copy it to a directory that can be written.

E:\>adb pull /data/user_de/0/com.android.shell/files/bugreports/bugreport-GT-I9100-QQ3A.200805.001-2020-08-26-08-24-27.zip .
adb: error: failed to get feature set: no devices/emulators found

E:\>adb devices
List of devices attached

E:\>

Password to the attachment in a private message.
[Galaxy S II Android Development] tonymonaghan0:
Thanks, did manage to sort it by using a stock ROM an PIT and starting from scratch.
[Galaxy S II Android Development] Aequita:
Newest TWRP for initial setup

Good work on that ROM!

Before flashing, a question comes to my mind tho.

Can the initial flash from stock-ROM to 17.1 be done with TWRP 3.4 directly (link from latest build),

or do I need to do the initial setup with TWRP 3.3.1 as stated in the step-by-step-instruction?

If so, can the TWRP-3.4x.IMG be installed the same way as the TWRP-3.3.1x.MD5 via PDA (?) in Odin?

Thanks in advance!
[Galaxy S II Android Development] rINanDO:
I don't know if 3.4 works directly with initial setup. If you try it out and it works, I can update the instructions.

.img and md5 are different formats. I haven't created a md5 image.
[Galaxy S II Android Development] Dundee930:
You can install twrp 3.4.img via twrp 3.3.1 recovery

Install >install image>select image>install to recovery
[Galaxy S II Android Development] Aequita:
Thank you for your advice, but that I did already know.

What I was unsure about is, if it's possible to do the initial setup (Upgrade from Samsung stock ROM using ODIN 3.07) with the newer TWRP 3.4 version, or if - as described in the step-by-step-guide - TWRP 3.3.1 is necessary.
[Galaxy S II Android Development] a3956978:
Since three builds I'm not able to dirty flash anymore. Especially with last builds minor changes (just fix for GPS) I would've assumed a dirty flash is good to go. But no, I always end up in boot taking forever/boot loop.

Also since three builds we are using the new TWRP which I took from the OP.

So either I'm doing something wrong or there is a problem with recent builds or TWRP.

Anyone else facing this problem?

This might sound like a luxury problem, but having to fully set up the phone every couple of weeks is very annoying to me. Dirty flash worked always in the past...

Thanks for any advice
[Galaxy S II Android Development] DevisG79:
There's no tar.md5 version for twrp 3.4. Just go like discribed in the step by step guide on the first page.

@ a3956978 If I were you I would do a clean flash with format data.
[Galaxy S II Android Development] a3956978:
That's what I do now and of course it works.

But something must have broke dirty flash capability...
[Galaxy S II Android Development] Dundee930:
1. DON'T INSTALL TWRP APP directly via TWRP recovery. This will cause bootloop!

2. To avoid bootloop after restoring ROM from a TWRP backup

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

The invaluable [MENTION=3044346]arco68[/MENTION] prepared the fix_rootfs_label.zip file for flashing in TWRP after restoring the ROM,

which fixes the rootfs label.
[Galaxy S II Android Development] js-xda:
Working all fine with dirty flashing without Magisk and no GAPPS here - also with latest TWRP version. As you seem to have some experience, I guess you are wiping Cache/Dalvik after flashing?
[Galaxy S II Android Development] DevisG79:
I think it must be because of updating twrp version in combination with Magisk already installed. There were many changes. From now on you can dirty flash.
[Galaxy S II Android Development] a3956978:
Thanks for all your replies :)

I do not use Magisk or any other root method.

Also I do not install the TWRP app (of course not ;) ) [MENTION=9384875]js-xda[/MENTION] I did not wipe dalvik and cache, because I thought this was obsolete since ART was introduced with Android 5. Will try next time :svetius:

As I said, I did not change anything in my workflow nor on my phone except using the recommended new version of TWRP. Since build #13 all releases failed dirty flashing for me. Only full wipe worked.

I never had root installed with Android 10. And I had and have Opengapps installed.
[Galaxy S II Android Development] tonymonaghan0:
Hotspot question

The network connection seems to be lost more often when I am doing a large download via the hotspot. I have noticed that the hotspot IP address is not fixed now. It used to be always at 192.168.43.1 but now the last part of the address is different each time you reboot. Is the hotspot IP address meant to be static and could this be causing the network to drop?
[Galaxy S II Android Development] ze7zez:
I confirm to interrupt the connection after the download is finished for a long time.

The next file is no longer downloaded.

On the hotspot side it is SwiFTP and on the PC side it is FileZilla.

The "Turn off hotspot automatically" option is turned off, and yet the hotspot turns off the connection after 20 seconds of some fictional inactivity.

Command:	PASV
Response:	227 Entering Passive Mode (192,168,43,166,144,44).
Command:	RETR lineage-14.1-20181216-nightly-i9100-signed.zip
Response:	150 Sending file
Error:	Connection timed out after 20 seconds of inactivity
Error:	File transfer failed after transferring 245*192*076 bytes in 205 seconds
Status:	Disconnected from server
Status:	Connecting to 192.168.43.166:2121...
Error:	Connection timed out after 20 seconds of inactivity
Error:	File transfer failed after transferring 253*561*868 bytes in 212 seconds
Status:	Disconnected from server
Status:	Connecting to 192.168.43.166:2121...
Error:	Connection timed out after 20 seconds of inactivity
Error:	Could not connect to server
Status:	Disconnected from server
Status:	Delaying connection for 5 seconds due to previously failed connection attempt...
Error:	Connection timed out after 20 seconds of inactivity
Error:	Could not connect to server

edit.

1. In Lineage 17.1 in Xperia SP, after the lock screen was turned off, the transmission was no longer interrupted, but in this ROM this trick does not work. Sleeping the hotspot operation launches some other process.

2. Security considerations require a changing IP for the hotspot.
[Galaxy S II Android Development] OllieW:
Update after some days of intensive use: Unfortunately the SIM RIL problem returned - four days no problems and battery drainage was gone, but this night suddenly "no SIM card" and huge battery drain...:(
[Galaxy S II Android Development] aschejcm:
I also experience sim card problems after some time. Usually it takes about 1 day for the problem to appear and I need to restart the phone (airplane mode does not help). I do not have gapps, no hotspot, no bluetooth, no microg, no magisk.
[Galaxy S II Android Development] joaocandeias:
Same here
[Galaxy S II Android Development] hulahala:
for me it works when i install gapps again
[Galaxy S II Android Development] rINanDO:
Yes, I see it still happens and still very hard to reproduce because of it is randomish. Now trying to hexedit the blob instead of hacking ipcthreadstate in libhwbinder.
[Galaxy S II Android Development] OllieW:
The behavior is a bit different - only the large battery drain problem is reproducible when the SIM card won't work correctly! But the last 10 days I realized that sometimes a working SIM card with full signal is shown, but no data is transferred (no mobile data like H+/3G/...) and USSD codes won't be executed instead of "no SIM card". Today I received a SMS about one hour later although full signal strength is displays all the time. I guess another wake/dead lock is occurring and sometimes releasing again..:confused:

Like every test before: Using latest build (no magisk) with latest OpenGapps Pico after full wipe and fresh install with TWRP 3.4.0 and modemRIL firmware (I9100XXMS4) installed on phone (I flashed latest official unbranded Galaxy S2 stock firmware I9100XWMS1 NEE with stock PIT before switching to CyanogenMod/LineageOS and rePITting). Perhaps the SIM RIL behaviour changes on different modemRIL versions?!
[Galaxy S II Android Development] rINanDO:
New build is up!

Updated sources and I tried another attempt to get our fully RIL stable... This time it doesn't require a hack in libhwbinder/IPCTreadState. The last fix didn't fixed it properly also. Sometimes the data is gone, only phone works. Or the simcard is suddenly missing. This all because of corruption between the communication between Android and our legacy libsec-ril.so. I hexedited libsec-ril.so and disabled set_wakelock-method calls because this is the call which corrupts the binder randomly corrupting other messages because of binder changes in Q. Hopefully it works now properly, but we need to test a few days and wait if RIL still works.

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
[Galaxy S II Android Development] ze7zez:
Thank you [MENTION=2222292]rINanDO[/MENTION]. Bug report works well in Power menu and with adb:

adb bugreport > %DATE%_bugreport_i9100.txt
[Galaxy S II Android Development] bersem:
I noticed battery has increased enormously on latest build. About RIL its stable for now after flashing but as before on previous build it booted once with no network..

Good work [MENTION=2222292]rINanDO[/MENTION]. :good:
[Galaxy S II Android Development] mdurkin:
Anyone got SDcard to work as internal storage? I tried, phone crashes and reboots, had to wipe data from recovery to get it to boot. SDcard as internal storage would be handy given limited amount built in.
[Galaxy S II Android Development] a3956978:
Flashed new build with wiping cache and dalvik. Also flashed gapps package afterwards.

Dirty flash worked :good:
[Galaxy S II Android Development] OllieW:
Also tried dirty flash over last build: No problems here! ;)

One bug I realized with last build and is still existing in 20200908 version: Incoming and outgoing calls can't be done via bluetooth handsfree mode and will be directed to the phone ear speaker and phone microphone although the bluetooth device is connected and displayed in call menu. Switching manually to phone and back to bluetooth in call menu has no effect. Playing music via bluetooth will work flawlessly before and after a phone call.
[Galaxy S II Android Development] bersem:
RIL down atm :(
[Galaxy S II Android Development] rINanDO:
Very nasty bug this RIL-issue... Do you have logs?
[Galaxy S II Android Development] rINanDO:
Hmmm did this broke in previous builds? Or this never worked properly?
[Galaxy S II Android Development] bersem:
Sorry didnt. I was not at home. Will do it next time.

Regards !
[Galaxy S II Android Development] bersem:
[MENTION=2222292]rINanDO[/MENTION] idk what you exact did but there is now a huge battery drain on latest build. can you revert changes ?

Regards !
[Galaxy S II Android Development] rINanDO:
Most changes are update sources. I addressed selinux denials and alternative fix for RIL. Reverting these changes makes previous build ;) Can you provide logs? Battery drain has a cause and it could be anything.
[Galaxy S II Android Development] ze7zez:
This is true.

Right after the upgrade of the previous version, everything was working in a flash.

Now up time 91:58.

Selecting anything causes a delayed reaction.

The power key has stopped opening the menu.

It is difficult to call up Screenshot from Power Menu even with Button Savior, although turning off the screen with the power key works correctly. GPS Fix does not work.

Sensors are not visible in CPU_z and Phone INFO.

But there is still internet! :good::)

I don't have a drain on the battery, because I only check the network periodically.

After clearing the cache in recovery mode, everything works smoothly again, except for the GPS, which does not catch the fix.

.
[Galaxy S II Android Development] bersem:
logcat.

Regards !
[Galaxy S II Android Development] bersem:
done. seems to be better. lets test
[Galaxy S II Android Development] xdalurker1:
Fatal RIL caught in logcat file

Background:

I did a dirty flash of the new build over the one before (system and magisk), with a clear of the cache partition.

My experience with this build:

Booting - This has not changed: On many boots I get either 'no service' or 'Emergency calls only'.

Once boot works and the service is found (this can take 3 or 4 reboots) - and this is a big improvement from the previous build - the RIL seems to work well, for days without failing into 'no service'. I still get some freezes when using the (generic) phone app but I also had that on PIE. On the previous build I would get 'no service' so often - 5,6 times daily that I gave up on 10 and switched to android 9 - the phone wasn't usable as a drive. Now it is, once I get a good boot.

Captured on logcat:

See the logcat here:

https://pastebin.com/aLPHkB9g

that I captured right after a boot that ended in a 'no service' - line 654 caught a FATAL related to RIL.

Hope this helps and Thank you for all this effort!
[Galaxy S II Android Development] rINanDO:
Thanks for the logs. Can you create full logs using "adb logcat -b all"? This will give me more hints which ril command causes the RIL service to crash. Your logs suggest new issue unknown for me. And ril fails so many times at boot for you is also weird. I haven't experience this now with this build. Maybe it is country related? Who knows.
[Galaxy S II Android Development] OllieW:
Bluetooth calls in hands-free mode are broken at least the last two builds, but bluetooth audio is working perfectly. Maybe the cause is the former fix for the phone calls via internal loudspeaker?!

Since I'm using my S2 as daily driver for two weeks now, I can confirm that the SIM RIL problems cause the huge battery drain. The latest build has a new behavior: The "service not available" appears less often, but the phone is not registered property with the operator although full signal strength is shown. This morning I got the notification for two SMS about half an hour later - the new RIL routines seem to get "out of order" but will rearrange after some time. I guess that the battery drainage is extremely high in this time frame.

I'm quite sure that different SIM cards won't have the same behavior. I'm using a very old full-size o2 Germany GSM/UMTS SIM which will switch between o2-de (former VIAG Interkom) and o2-de+ (former E-Plus) operators. It's receiving (emergency) cell broadcast messages if connected to a cell with the old "Genion Homezone" support which can only be disabled manually (editing configuration file or disabling CellBroadcastReceiver.apk service). Like mentioned before there will also be differences in RIL behavior if another modem driver version is used.
[Galaxy S II Android Development] bersem:
here once again,. booted without network. after trying some USSD code to check balance, network appears by itself.

i have huge battery drain on wifi. tried to turn off wifi overnight and i got 2-3% lost. with wifi overnight over 20%....

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

I'm still focused on RIL. Thanks to those who provide me logs. When catching a logcat for me, make sure you use 'adb logcat -b all' so all internal RIL-messages are in those logs too. Also set the log-sizes in the 'Developer Options' to maximum at first so the logs are not truncated loosing essential info about RIL.

I have reproduced and caught a logcat at boot when "No Service" appeared. My guess it is the Parcelsize because of Android Q but it just happens very rare. So I gave it 4 bytes more memory and hope this works. Please test and share your experience. This RIL-issue is a very nasty one.

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
[Galaxy S II Android Development] bersem:
2nd logcat booted without network on latest build. buffer size set to 1 Mio.

pass same

regards !