yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Bruno25:
Did you set the location to device only, start GPS Status, reset AGPS, download AGPS data, set the telephone to airplane mode, clear the "Google Service Framework" data (Settings / Apps / All / Google Service Framework / Clear data), reboot and restart GPS Status?

Well, I am not sure that AGPS patch is the villain: it's only a custom gps.conf pointing, basically, to a specific server to get xtra.bin and defining a good ntp server... The estimated remaining time may be based on the current drain rate... If you are testing things that are draining fast the battery (e.g. using GPS Status and Toolbox), your phone may think it will continue this way... underestimating the remaining battery time.

I will do that too, just to confirm.
[Galaxy S II Android Development] nospamboz:
Crazy battery drops: HW reset

I'm not sure about anyone else, but unbelievable battery drops are common on my i9100 between reboots. My feeling is that there is something strange about whatever part of the system it is that translates between the battery voltage (the only thing it can really measure) and the charge percentage. I figured out a way to reset it.

1) Power off the i9100.

2) Remove the battery for a few seconds, then put it back in.

3) LEAVE THE I9100 POWERED OFF and plug it into a charger.

The "power off" charge monitor then kicks in, typically reporting a much improved charge percentage. For some reason, this "fixes" the reported battery drop. I've seen it jump 50%!

At this point it's up to you. Once the new percentage is reported by the "power off" charge monitor, you can stop charging and boot you phone, and it will use the "correct" percentage. Or you could just let it charge up to 100%, confident that it's "accurate". I use "quotes" because I'm just guessing.

Hope this helps someone.
[Galaxy S II Android Development] rINanDO:
I confirm this behavior is common. I have them also with my new original Samsung battery (2016/8). It gets worse when the battery is old. You can see the voltage drops on heavy loads when you use Battery Log app. The boot process of Android N is quite heavy for our phone and forces the CPU on max load/freq. After boot/heavy load the voltage recovers slowly. When you reboot quickly again, it brings the voltage more further down. The battery driver estimation logic will give a poor estimation based on the low starting voltage. But after a while when idle/deep sleep, the battery restores again and the percentage increases. I guess this is how li-ion batteries works I general. When connected on charger the starting voltage is obviously boosted.

My first original battery of 2011 fails on heavy load on 35% (so I replaced it). Its voltage drops rapidly even below 2.9v causing screen flicker, ril fallout and immediately power off before android detects it. (Like 35% to -10% in 10 seconds)
[Galaxy S II Android Development] ale5000:
Wouldn't reduce the problem discarding all voltage values get during boot phase and start using values only when boot is completed?
[Galaxy S II Android Development] Boolian:
Yeah, that works, I do the same thing.

I've often seen the gauges report a complete discharge of a known full battery after a reboot, It's a PIA.

You can reset gauges etc... but It's just a thing I've lived with since stock ICS even.

Though I have to say, there usually appears to be some serious CPU/memory thrashing before you see this phenomenon.

It's a dead giveaway. Though I've never discovered exactly why.
[Galaxy S II Android Development] nospamboz:
An i9100 HOWTO

Yes, XDA can seem that way. It's complicated by various necessities.

First thing to understand is that you have to do a lot of things in "recovery" mode, a separate boot accessed though VolumeUP+Home+Power on the i9100. With most recoveries (there are several) what you can do is limited, but some (like TWRP, more below) are very powerful.

https://xdaforums.com/galaxy-s2/development-derivatives/recovery-twrp-3-0-0-0-t3330457

The i9100 originally had kernel+recovery in one "bundle", even though the Android standard allowed separate kernel and recovery. Most i9100 kernels you find contain only this old "native" recovery system. Eventually a clever guy patched the i9100 kernel to use an "isolated" recovery (IsoRec), if it's present.

https://xdaforums.com/galaxy-s2/orig-development/isorec-isolated-recovery-galaxy-s2-t3291176

So if your i9100 is already IsoRec-compatible, all you have to do (once rooted) is use the Play Store TWRP app to install a separate TWRP recovery, which comes in handy for the rest of the process.

If your kernel is not IsoRec, though, then you can use a special kernel with an old version of TWRP built-in, as a "stepping stone" toward installing both an IsoRec-compatible ROM and more advanced TWRP. To do that you need "Odin" (look it up) and the i9100 download mode (VolumeDOWN+Home+Power). Install that kernel, boot into the old TWRP recovery, and start flashing.

https://xdaforums.com/showpost.php?p=65198193&postcount=1364

The reason you need "advanced" TWRP is to use Lanchon's re-PIT script to non-destructively re-partition your i9100 so you can install LineageOS (1GB system).

https://github.com/Lanchon/REPIT

Once properly partitioned, use TWRP to install the LineageOS ROM and su-root-enabler (both on the LineageOS website) and your choice of OpenGapps, all at once. Then boot, let the i9100 chew on it for about 10 minutes, and start setting it up.

Don't worry about "emulated storage". It's optional, not the default, and not really necessary. All it does is give you some performance improvements on the "SD card" part of the i9100's 16 GB flash. Me, I like to use TWRP to allow me to mount the SD Card on my computer as if it were a USB flash key, which you can't do when you have "emulated storage". It's old-fashioned, but it works.

https://xdaforums.com/galaxy-s2/orig-development/mod-switch-emulated-to-emulated-t3539651
[Galaxy S II Android Development] Boolian:
Yeah, I don't think your custom gps.conf file is a problem.

Though I must ask - Is Derek Gordon still maintaining his servers? - That name was a blast from the past to me !

The SUPL_TLS_HOST line though is undefined, I'd expect a carrier specific address or IP address. Otherwise both that variable and it's dependencies are pointless.

The Accuracy Threshold is something I do usually tweak

(with Intermediate_POS flag set to "1") because the normal default value in gps.conf files of "0" is the one which will chew battery.

Basically, "0" is 0- metres it's asking for a position as accurate as possible by constantly pinging satellites.

By increasing the value up to say 2000+ metres gives a quick approximate fix while the AGPS is synchronising.

After that, accuracy will continue improving - it doesn't stick at that figure.

Of course sometimes super accuracy from the start is wanted (geocaching etc) in which case also search for "Static Navigation" But be prepared for battery drain.
[Galaxy S II Android Development] nospamboz:
But when is a boot "completed"? Isn't that like asking "how long is a piece of string"? ;)

Seriously, if you ever monitor the boot process with apps like "System Panel" or "OS Monitor", there is a LOT happening, and it can vary between one boot and the next. It may take a minute or more to come down to a steady 20% of CPU. I sure wouldn't want to be the one to declare the boot "over".

Yes, I know there is some kind of "boot over" message apps can get. I'm just wondering how accurate it is, and whether that accuracy can affect the battery voltage/percentage accuracy.

I think that's why the "power off" charger is so accurate; it's all that's happening.
[Galaxy S II Android Development] ale5000:
Maybe there could be an option to discard any voltage value received before the BOOT_COMPLETED Intent is received.
[Galaxy S II Android Development] Sub_Zero2:
I understand what you're saying. Yeah should not make a difference, but according to earlier posts in the official cm13 thread, some users had luck in changing baseband (don't ask me why), and then also modifying the gps conf file...

---------- Post added at 06:30 AM ---------- Previous post was at 06:24 AM ----------

Yes time to change your battery is my guess.

I was using a battery from 2012 until recently. Replaced it with a new replica battery i had laying around., and there's a huge difference. And yes i had the same "problem"
[Galaxy S II Android Development] todonormal:
I don't know if it's battery solution problem:

https://translate.google.es/transla...cmania.com/showthread.php?t=454012&edit-text= (originally: http://www.htcmania.com/showthread.php?t=454012)
[Galaxy S II Android Development] dumdidum123:
Don't know if anyone remembers my problem with the not/only sometimes working bluetooth speaker control keys. The problem has been solved. I am not sure if it was the last update or one or two versions before but for a few days the control keys are working in 100% of the time I use them.
[Galaxy S II Android Development] hypern0va:
Hi guys, I have an S2 which is not mine and since I need to flash a new ROM on it I would like to flash the latest LineageOS build.

I would like to ask: does this have any major bug? Is it good for being used as a daily driver? Can I flash it on a smartphone used by an absolutely non-tech guy, basically?

If it isn't, which is a good, recent ROM that you would recommend for the job?

I know that I should test it by myself but as I said the smartphone is not mine and I can't keep it for weeks in order to test it completely. Thanks in advance! ;)
[Galaxy S II Android Development] rINanDO:
This is about the internal button battery which powers the internal clock when you remove the main battery. I applied it already on one of my s2's because it was beginning to leak. This is not related to the percentage drops after boot.
[Galaxy S II Android Development] rINanDO:
Yes, it will be in the next nightly.
[Galaxy S II Android Development] the.gangster:
Did you read what I had linked you to? It was just 2 clicks away.

I didn't try it out myself but the documentation tells us, that Google Assistant is disabled by default unless you make use of a keyword (which will add a property to the build.prop).
[Galaxy S II Android Development] hedgehog99de:
Yes, I did it in the same manner. No success. Only 3 or 4 satellites, GPS fix after 5 minutes.

But with the search function I came to this thread:

https://xdaforums.com/showthread.php?p=17081413#post17081413

And this ist the solution for my GPS problem: Now I have up to 8 satellites, GPS fix in 10 seconds and no additional battery drain.

Greetings, Heiko
[Galaxy S II Android Development] Boolian:
It's a very good Rom and absolutely fine as a Daily Driver.

There are a few niggles as with any ROM.

This one has occasional MTP errors appearing, but they can just be ignored.

Also a 3rd party File manager of your choice is recommended.

Some people report issues surrounding auxiliary bluetooth device functions, OTG usb can be hit or miss, and occasional random GPS issues.

Installing tips:

Ensure the device is correctly partitioned (1Gb minimum system partition required) Search "REPIT" on here for info.

Oh and make sure the unused Preload partition gets formatted, even if you choose to have a smaller residual one when you repartition.

Ensure the latest TWRP recovery is installed.

If Gapps is required, get the latest OpenGapps ARM version you want (Nano & Pico sizes are popular)

When Downloading the latest ROM nightly, also download and flash the Arm SU add-on (ignore any "..Signal4 error messages you see when flashing the add-on, they are erroneous)

Sorry for not posting links but there are many how-to's in the thread here with a little searching.

It's an excellent ROM, good luck.
[Galaxy S II Android Development] gm0:
I strongly discourage rooting a device of "an absolutely non-tech guy". Root is never needed for everyday usage of the phone, anyway.
[Galaxy S II Android Development] marzametal:
Can someone check if the following behaviour is encountered on their phone?

I am using the 19/04/17 build...

Settings - Apps - (top right - click on Show System) - (Apps List) Select "Advanced Settings" - Select "Data Usage"

... it shows information for "Extra Tiles" instead of Advanced Settings"

... this behaviour also occurs when I check others, such as "Android System", "Call Management", "CM Settings Storage", "com.android.wallpaperbackup", "Dev Tools", "Fused Location", "Input Devices", "Key Chain", "LineageOS Settings", "LineageOS System", "Settings", "Settings Storage", "Setup Wizard".

Settings - Apps - (top right - click on Show System) - (Apps List) Select "Contacts Storage" - Select "Data Usage"

... it shows information for "Call Log Backup/Restore" instead of "Contacts Storage"

... this behaviour also occurs when I check others, such as "User Dictionary".

Settings - Apps - (top right - click on Show System) - (Apps List) Select "Download Manager" - Select "Data Usage"

... it shows information for "Media Storage" instead of "Download Manager"

... this behaviour also occurs when I check others, such as "Downloads", "MTP Host".

Settings - Apps - (top right - click on Show System) - (Apps List) Select "Messaging Service" - Select "Data Usage"

... it shows information for "Phone and Messaging Storage" instead of "Messaging Service"

... this behaviour also occurs when I check others, such as "Phone Services", "Service Mode", "SIM Toolkit".

I might have missed some...

Quick question... is there any way to get around the dodgy Contacts export to vcf bug? EG: Would export work if I make use of a third party Contacts app?
[Galaxy S II Android Development] gm0:
Yes, happening for everybody, that's an AOSP thing actually. The reason is that stats for several apps & services are grouped here. If you scroll down you'll see a list of "Apps included in usage". Whichever comes first in that list (before sorting) is used for the title. It's not very elegant, I agree.

What's the bug? I just tried it and all my contacts exported just fine on the phone and the vcf opened just fine on my PC. Was the first time I ever used this feature though so I'm likely not aware of the specific use case that's causing trouble.
[Galaxy S II Android Development] Sub_Zero2:
Hi.

How is the easiest way to get lineageos recovery back?

I see no option any more to flash it on updates. (Using TWRP atm...)
[Galaxy S II Android Development] DevisG79:
I guess you must flash isorec disabler
[Galaxy S II Android Development] Boolian:
Fair comment, I'll concede that.
[Galaxy S II Android Development] Sub_Zero2:
Where can i find that?
[Galaxy S II Android Development] hypern0va:
Thanks mate, very helpful! ;)
[Galaxy S II Android Development] gm0:
No idea (tried googling it?), but as far as I understand how IsoRec works something like mkfs /dev/block/mmcblk0p6 via console or adb shell should do it, too. Can't really recommend getting rid of TWRP though, hope you know what you're doing.
[Galaxy S II Android Development] MigoMujahid:
Why the bother?

Isorec disabler is already available in lanchon's AFH:

https://www.androidfilehost.com/?fid=24369303960682947
[Galaxy S II Android Development] gm0:
Matter of perspective. Googling something, downloading it, looking through it's code to see whether I want it to do what it's doing (in this case I guess the author's name vouches for that), and then flashing it is several times more bothersome to me than typing a one-liner into a terminal window. ;)
[Galaxy S II Android Development] Sub_Zero2:
Ofcourse :) I did an official commit to cyanogen recovery on cm13.

I have downloaded the los14 sources. Want to test some recovery stuff.
[Galaxy S II Android Development] the.gangster:
All respect for arnab and his work. But the IsoRec stuff was developed by Lanchon (as well it is his AFH download that you linked to) ;)

Well then IMHO for you the official thread's OP should have been a must-read already. Then there will be no secret to what the disabler does anymore.
[Galaxy S II Android Development] Sub_Zero2:
Thanks
[Galaxy S II Android Development] MigoMujahid:
Ooops, my mistake, i got confused between arnab's isorec twrp and lanchon's isorec mod ?

---------- Post added at 08:23 PM ---------- Previous post was at 08:21 PM ----------

No pb man, but i would prefer the flashing than the terminal :p
[Galaxy S II Android Development] HutchGuy:
2017/04/19 update doesn't work... Tried to flash it but it stuck at 80% (not sure the exact percentage but it doesn't go further)

Using TWRP, clean install, did factory reset and wiped system, data, cache, etc

Old updates work but this one no luck
[Galaxy S II Android Development] gm0:
Np either, I realize preferences and expectations differ depending on where you stand.

What old updates are you referring to? Just asking because 80% of the ROM is what would fit into a default sized system partition, i.e. one that is too small to hold LineageOS, so that number usually points to not having read the installation instructions. Otherwise, if you are just trying to update an existing LineageOS install then you've possibly got a corrupt download. Needless to say, the update works fine for the rest of us.
[Galaxy S II Android Development] HutchGuy:
My lineage version was for March, and I was told to not update through OTA cuz it's buggy and causes bootloop and other problems. Guess I should wait for next update :/

---------- Post added at 08:49 PM ---------- Previous post was at 08:46 PM ----------

Well I know how to flash, and as I said in my previous post which was a reply to another person, my lineage version was for 03/07... I'll try to redownload the file :(

---------- Post added at 08:55 PM ---------- Previous post was at 08:49 PM ----------

Oh man, you are right gm0, just inserted my sd card into my laptop and opened the zip file with Winrar to see if it gives any errors or not and yep it was corrupted... What the freak, I can't even trust download managers anymore lol ADM is literally in my blacklist now because my connection was pretty good last night. Sorry for the wrong information guys, I will definitely check my files next time before complaining about everything
[Galaxy S II Android Development] gm0:
No worries, happy I could help. OTA updates should work fine now, at least with TWRP v3.1.0.0 (if you've got an earlier version best update). In your case they have the added advantage that the built-in updater will verify the downloaded file's signature and discard it if corruption is detected.

But remember to still make a nandroid backup now and then in case an update goes wrong for real, something the built-in updater does not do for you and the reason I'm never using it to actually install the downloaded updates (after symlinking its download directory to my external sdcard it's useful for downloading though).
[Galaxy S II Android Development] HutchGuy:
Good stuff, I never believed in nandroid backup and I've never done that because I always keep the old updates so in case I messed up my phone I can recover it back but I might actually give it a try. Btw just a quick question, do you have any problems with sim card and data? Like do you have any signal drop issues? I sometimes get the "MTP has stopped working error" and my signal drops randomly (pointing to this post: https://xdaforums.com/showpost.php?p=71963493&postcount=1102)
[Galaxy S II Android Development] gm0:
Nandroid backups are mainly about taking a snapshot of /data, not so much of /system itself because the latter is usually indeed easily restored by simply flashing the ROM directly.

As to MTP host has stopped working, that's an old bug that's been around forever. I suggest you go into settings>apps, check "show system" in the upper right corner, then find the mtp host and simply disable it. There aren't many cases where you'll actually need it (if you do you'll notice - but it won't interfere with connecting the phone to your computer in mtp mode).

I do not have signal drop issues. I even checked my radio log out of curiosity but the connection uptime is 100%. Generally I'd say it's something about your local cell being overloaded, but if you say it's an issue specific to and reproducible with LineageOS then your logs will probably be welcome in a bug report over at https://jira.lineageos.org/projects/BUGBASH/summary.
[Galaxy S II Android Development] s2l9100:
Hello,

Few weeks ago I downgraded to 4.4.4 because I needed to export my contacts to the SIM card, which was impossible with 7.1.1 .

Is that problem fixed with 7.1.2?

Thanks!
[Galaxy S II Android Development] MigoMujahid:
Not for me, i get a error "unable to read sim contacts"
[Galaxy S II Android Development] gm0:
You can import but not export. But I remember that already being a problem with Cyanogenmod (LineageOS predecessor) and having to use an app to handle SIM contacts instead. Which would also be my suggestion to you, just use an app rather than switch out the entire ROM just for that.
[Galaxy S II Android Development] marzametal:
Thanks for the information... turns out I misread a bug report on the LineageOS website. But yeah, I export to vcf, and it stays at zero kb, even after waiting a while it stays at zero kb... but if I copy the contacts.vcf file to another directory, its filesize updates... no biggie, can still backup contacts!
[Galaxy S II Android Development] Yurienu:
Sorry I don’t have faith to read all 116 pages before, I don’t know if this issue has been discussed but we have wake locks issues with call apps such as Signal, Ring, etc.

Is there any way to fix it or workaround it? github.com/WhisperSystems/Signal-Android/issues/6537
[Galaxy S II Android Development] Bruno25:
[SOLVED] GPS vs. SIM card, LOS 14.1 (7.1.2, 20170419-nightly), 2G/3G

I thought I had understood my GPS fix problem... But after I tried to reproduced the "solution" from scratch (format / clean install + process described above), I reach the sad conclusion that I did not understand anything, since I was not able to get a proper fix anymore :mad:.

I almost gave up.

I remember there was another parameter that I changed when I found my "solution":

mobile data set to 2G

(I wanted to check if I could improve a little bit my battery life).

Then I started the whole process again, both with C11 and LOS14.1 using only 2G.

Conclusion (in my case): no need to apply A-GPS, no need to set the location parameter to device only, possibly no need to update modem, just need to set the mobile data to 2G :o.

But first, I had to set the phone to airplane mode and to reboot to get a first GPS fix. After that, I can get very fast GPS fix in all configuration (wifi, 2G mobile data, airplane mode), excepted with 3G mobile data. Maybe my SIM card is faulty...

Hope it could help someone else.
[Galaxy S II Android Development] gm0:
Unlikely going by your description, maybe something particular about your carrier. Have you tried on different networks (if available)? You could also try putting in another SIM just for testing. Feels more like a hardware issue to me though (frequency issues which this one sounds like are usually due to a damaged antenna).

However, a quick google turns up plenty of people complaining about GPS only working on certain network types since Android 6 so might also be a code issue (AOSP seems to have an open issue for this from 18 months ago: https://issuetracker.google.com/issues/37066870). edit: I suppose you could flash the Android 4.x stock ROM to test that if you wanted to.

The only thing I can say for sure is that GPS works for me both on 2G and 3G, Wi-Fi, or neither, so in theory it can work. That's why it feels hardware or network-specific to me.
[Galaxy S II Android Development] toy_story:
Hello, you can help Here it is and this ...