[LG Optimus 2x] echo_21:
GPS performance boost for everbody!?

This was really really hard re-engineering work! Hundreds of P990 reboots with and without prior removal of /data/gps/gldata.sto . But now I am convinced that the following changes will bring a real GPS improvement and that they are no placebo at all. After every positive result I always made a negative test too (i.e. reverting my changes and see that GPS gets worse again). I successfully tested the changes on a CM10.2 ROM as well as on tonyp 's most recent CM11 Feb. 18 2015.

I believe that all other P990 ROMs (e.g. non CM ROMs) and even stock ROMs may benefit too as long as they make use of /system/bin/glgps with file size of 1,743,124 bytes (you may also compare MD5 3d8694828f6cfeb8bb2d3aa49f20ad72). This should be the case on almost all ROMs. So there is normally no need to replace any existing /system/bin/glgps! Please reply here if your /system/bin/glgps (if there is any!?) has a different number of bytes.

First the bad news: There is still no progress with making LTO work which is the main target of this thread. This means that you will need live IP connection (at least every 2 or 3 hours) to get the permament GPS performance boost.

Good news is that the following procedure should bring you at least great GPS improvement even without getting the advantages of LTO (Impatient readers may dowload and copy gps_brcm_conf.xml I attached to the opening post to replace /system/etc/gps_brcm_conf.xml):

Edit /system/etc/gps_brcm_conf.xml and make broadcom's LBS (but LBS without LTO) work. :

enable LBS for the first time (it seems to be disabled on stock ROMs too, right?)

gps_brcm_conf.xml:

LbsEnable="true"

/system/bin/glgps must not use DNS (as I tested at least under CM10.2 and CM11)

The /system/bin/glgps log under /data/gps/log clearly shows that DNS resolution of bcmlbsqa2.glpals.com does not work.

[MENTION=3605868]tonyp[/MENTION] , any ideas why DNS does not work?

Work-around it by replacing LBS server bcmlbsqa2.glpals.com in gps_brcm_conf.xml by the resolved IP4 address 216.31.208.121

LbsServer="216.31.208.121"

This change may not be required under ROMs that enable /system/bin/glgps to successfully use DNS.

Enable synchronizing of /data/gps/lto.dat

LbsSyncLto="true"

We use this setting as an indicator if LBS really works on your P990. If this is the case, /system/bin/glgps will generate a file /data/gps/ltoStatus.txt . If you don't find this file then something else is wrong with LBS.

[MENTION=3605868]tonyp[/MENTION] , this setting will also periodically download /data/gps/lto.dat . You implemented the same task in your ROM since Nov. 2013 which may yield in a confict now. Would you like to define a boolean build.prop property which we can use to allow or prevent the download?

Disable "LBS Cells":

LbsCellEnable="false"

I can only speculate about the meaning of this parameter (e.g. detecting coarse location from mobile phone cells in vicinity). I did not see any performance improvement by leaving this true. We may experiment with this setting later.

In /system/etc/gps_brcm_conf.xml disable SUPL, the glgps log clearly shows that it does not work

arp-supl-enable="false" arp-supl-cap-msb="false" arp-supl-cap-msa="false" arp-supl-cap-ecid="false" arp-supl-ssl-method="SSLv23"
acSuplServer="" SuplPort="7275" tlsCertPath="/system/etc/cert/lge.cer" ReAidingType="3" ReAidingRetryIntervalSec="10" ReAidingIntervalSec="1800"

Clear /data/gps directory

delete gldata.sto

delete lto.dat (if any)

delete ltoStatus.txt (if any)

delete all other files except virtual files lcs.socket and glgpsctrl

Further housekeeping if you like to keep everything tidy and to have exactly the same config I have

In /system/etc/gps_brcm_conf.xml delete the lines

acNtpServer="10.21.116.63" acUtc2GpsOff="13"
AsicIP="127.0.0.1" AsicPort="2375"

Believe it or not, IMHO they are of no use at all

delete /system/etc/gps.conf . Believe it or not, IMHO it is of no use at all

Shutdown P990

Remove battery for at least 30 seconds

Install battery

Boot P990

Unlike with LTO, the very first GPS fix after deletion of gldata.sto and battery removal will take a while and has to be carried out outdoors (but make sure the P990 has internet access)

As a result of this procedure my wife's P990 under CM10.2 and mine under CM11 show good GPS performance even indoors.

Please test and report results here.