[Verizon LG G2] acejavelin:
GPS.CONF - Part 1

First off, some good tips and pointers are here and here

This is my part 1 posting... it is just information and looking for feedback at the moment, testing and custom gps.conf will come later in part 2.

So I have found some "inconsistencies" in the GPS.conf file from stock to other android ROMs... of all the AOSP/CM/AOKP builds I checked, only ParanoidAndroid is running the stock GPS.conf, all others have some inconsistencies, some of which are inconsequential, others I don't know, here are major inconsistencies I found...

XTRA_SERVER entries - QUERY specifically set to 0 in all non-stock ROMs, in stock there is no settings (meaning it should be 0) but the servers are listed. Query flag should be inconsequential, it is noted as a test flag, but XTRA has to do with timing and A-GPS data, servers are consistent across all files. Interesting that some other devices point the first few server entries to area specific pool.ntp.org time servers instead of the defaults.

NTP_SERVER - most non-stock ROMs use time.gpsonextra.net for time settings, should work fine, but using a closer host is better, PA and Stock use north-america.pool.ntp.org, using this server (or us.pool.ntp.org) should speed up GPS lock, but either entry should work, multiple entries could speed up the lock as well, but no G2 GPS.conf I looked at had multiple entries but several other devices use multiple entries based on location.

DEBUG_LEVEL - Set to 2 or 3 in most non-stock ROMs, 5 in PA & Stock. This shouldn't matter, I think, not sure how the phone uses the DEBUG messages though.

CAPABILITIES - this setting is all over the place, stock is 0x31, meaning SCHEDULING, ON_DEMAND_TIME, and GEOFENCE/ULP are active, many custom roms have this set to 0x37, adding MSB and MSA, some to 0x33, adding MSB, and AOKP using 0x17 (all except GEOFENCE/ULP) (. I can't really find an explanation of what these do or mean, but capabilities seems significant... If anyone more familiar could chime in here I would appreciate it.

SUPL - These settings deal with Secure User Plane Location architecture, it is used to supplement data information on satellites, basically to get the timing and positioning information via IP rather than the satellite data stream, it requires a data connection. This is disabled in the stock profiles, but enabled in most AOSP/CM ROMs, as it should be, interesting to note that AOKP has this set to v1 where all other ROMs use v2. Some ROMs use port 7275 and others 7276. It is said this will not work without the file /system/etc/SuplRootCert being in place with a valid certificate, interesting that some ROMs I looked at did not have this file. You can create your own with these instructions. I need to do some more research here though, as it is noted that TLS is not needed anymore in some forums. BTW, SUPL directly conflicts with C2K PDE and both should not be enabled simultaneously.

LPP_PROFILE - In stock this is 3 (Enable both LPP_User_Plane and LPP_Control_Plane) and in AOSP/CM is 0 (Enable RRLP on LTE). I had a hard time finding what this does, but on several Reddit threads it was noted that this is important on the G2 and should be set to 3 for all ROMs to get consistent GPS signal.

NMEA_PROVIDER - Stock is 1 (Modem Processor), AOSP/CM is 0 (Application Processor). This seems important, the NMEA data stream is the positioning information provided to apps.

It is also interesting to note that ACCURACY_THRES is not defined in any G2 device, meaning all messages will be processed irregardless of accuracy, which could in theory throw off GPS position for poor signal or accuracy references, on many devices this is set and can be all over the place, from 50 to 5000.

Any comments, corrections, or more info on this information could be great.

Anyway, I will be doing some testing with these values and trying to make a better, faster, smarter gps.conf file over the next few days... I will let you all know and pass on any information I get.