[Galaxy S II Q&A, Help & Troubleshooting] GNUDroid:
>> A working GPS on the S2 i9100. Finally - after feeling to tried 1000 times to find a solution – a fix for the bad gps fixing times.<<

Background

Since I got my S2 1,5 years ago I always had many troubles to get a gps position fix:

I tried to flash many modems, in my history had been on many ROMs (resurrection remix several versions, rootbox several versions, neat CM 10.1 nighties, now on Carbon 1.7)

Nothing, absolutely nothing helped me to get a quick and reliable gps fix. Tried within this years also many apps on each ROM, faster fix, SIRFIV, GPS Status, GPS fix) and additionally tried many A-GPS patches out of forums…. Last week I got serious lost in Paris (holiday) and was so frustrated that I cannot get a GPS fix within 10 minutes, so that I’m really disassembled my i9100 yesterday, to look if all contacts, and antennas are connected. (Didn’t helped also, here described finding was made after checking that).

I do not know, what made the trick definitely this is a solution for all who are pained by the bad, bad GPS fix of the S2. Who has time – and developers are highly appreciated!! – let us find out together, which is the most critical part of this solution or is it the combination? … I would highly appreciate, if these things get investigated and speculate also about a necessary step to update the code bases for all AOPK and CM ROMs.

[B]Finally ONE combination which is working (< 2 min cold start, then 5-10 sec)[/B]

1) A Patch which disables static navigation:

StaticNav-1.0.zip

http://xdaforums.com/showpost.php?p=38603894

That patch can be run in recovery by flashing. It detects three different gps.exynos4.so files inside your rom, which are taken as binaries from the Samsung stock-ROMs (blame Samsung for not open all sources). Because there are mostly these libraries in use in all custom ROMs, it should be able to patch yours too. Otherwise go to the thread “GPS SirfIV Tool Development - Disable Static Navigation” and get you working version of these gps hw-library.

2) Two Apps (not sure which did the trick):

2.1)

"GPS booster"

(a very very tiny 44 kb service in background) got from Playstore. Install, start once and fine.

2.2) And the app

“angry gps”

which is also not designed for our i9100. But it works fine. It is hard to get it. In some threads the people have made a copy, because it is out of the Playstore since month/years. Google hard; don’t give up! Or one copy at http://xdaforums.com/showthread.php?p=32240488 (see update 20130510 below)

After applying the flash-able patch (obvious has to be applied every time you flash your rom) (THANK the Dev!) and starting the small service “gps booster” (THANK the DEV) and start any gps testing app. and then changing just the two following settings in “angry gps”:

- Operation Mode: „MSASSISTED“

- Accuracy: „0“ (see update 20130510 below)

I get a fix after reboot within 1 minute (Germany), every new fix whenever you turn of your GPS is now really within 5-10 secs there.

I’m so glad that there is finally one solution to this problem which is bothering me since 1,5 years.

All invited to test!!! We should find out what is the detailed trick and give ROM Devs input to patch

I would be very happy if others can confirm this, let us find the problem together. Is it the static navigation? Is it GPS booster service (I don’t can debug this app, to see what it is doing (maybe increase some gps acquiring rates?))? Or is it the “angry gps” which is able to apply the right settings?

Advanced comments:

Interestingly the “angry gps” app seems to set values, which should be also be influenced by the gps.conf. Before I got this solution. Also a gps.conf file like following did not the trick (note the “ACCURACY_THRES=0”. – This is confusing. But I think there is something really messed up in the lib gps.exynos4.so since years. – Definitely the described way did the trick for me, but it would be great to open the way for all ROM devs to find the failure and patch their ROM. As far as I know the gps.exynos4.so is not open source, so it or other hw-libs would need to be patched, if we find out, why this app/patch combination is working so GREAT. – Never be ashamed of your S2 again, when anybody else got already the position in the unknown city!

Good working example gps.conf for me.

NTP_SERVER=de.pool.ntp.org

AGPS=http://xtra3.gpsonextra.net/xtra.bin

XTRA_SERVER_1=http://xtra3.gpsonextra.net/xtra.bin

XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin

XTRA_SERVER_3=http://xtra4.gpsonextra.net/xtra.bin

DEFAULT_AGPS_ENABLE=TRUE

DEFAULT_USER_PLANE=TRUE

DEFAULT_SSL_ENABLE=FALSE

INTERMEDIATE_POS=1

ACCURACY_THRES=0

QOS_ACCURACY=50

QOS_TIME_OUT_AGPS=95

QOS_TIME_OUT_STANDALONE=80

QosHorizontalThreshold=1000

QosVerticalThreshold=500

SUPL_HOST=supl.google.com

SUPL_PORT=7276

SUPL_SECURE_PORT=7275

SUPL_NO_SECURE_PORT=3425

SUPL_TLS_HOST=FQDN

SUPL_TLS_CERT=/etc/SuplRootCert

REPORT_POSITION_USE_SUPL_REFLOC=1

AssistMethodType=1

AgpsUse=1

AgpsServerType=1

AgpsServerIp=3232235555

AgpsMtConf=0

AgpsMtResponseType=1

CURRENT_CARRIER=common

PHONE_TYPE=UMTS

ENABLE_WIPER=1

Note that we lowered the ACCURACY_threshold=0 (most use 1000). So one can get some position jumps and position moving of gps coordinate within 50-15 m. But better this, as no fixing at all.

State of Investigation:

Modem: Could be one factor, but I doubt

ROM: Should not have too much influence since most use the same gps.exynos4.so because of same sources or binary sources)

Kernel: This has for sure no influence

Update 20130510:

Rebooted sometimes and excluded the angry gps app. it also overwrites your custom gps.conf.

for now, it seems that either the modem, and/or the gpsboost app and/or the lib-patching and/or the gps.conf is responsible for the huge improve. So it seems the app `angry gps` is out this game and can be excluded.

Update 20130517:

Meanwhile I changed a lot the ROMs and kernels and modems and apps. Not at Carbon_21030516 and Dori 9.17, but this does not matter. But the switching of settings show, that the two things, which do the trick are: gps.conf (you can also use app NTPtop) and most important, the patching with the mentioned StaticNav-1.0.zip make the trick for fast GPS fixes. - I think this is the final finding.

Update 20130605:

Meanwhile I did a lot of other investigations. Now I got my S2 fixing position in 10s - also after 2 days after the last gps use (without a reboot). I found that each boot requires a long initial GPS fix of approx 30s.

The guide will be updated if I have time (at the moment 6 days/week work). - For the impatient a short, short guide:

1) apply the staticnavigation patch from cwm

2) use above gps.conf. (new slightly changed and sirfgps.conf will follow by time)

---- must be repeated after each reboot ----

3) use angrygps after each reboot to set the operation mode to MSASSISTED. - Change just that setting, and exit the app.

4) settings --> apps --> all --> google.serviceframework. ------> clear data

---- for daily gps position fixing ----

4) the use 2 GPS apps seeking for satellites seems speed up the fixing. - If I need a quick fix, I start "GPS Test" (not closing, just switch away) and afterwards "GPS status".

--> I get a TTF of approx 30s if a reboot had been made. All following gps fixes less than 10-15s! By the way: the Modem_NELS1_CWM.zip model is very, very good. Much more satellites than all other modems I tried before :)

------------------

Other conditions:

Modem: Modem_NELS1_CWM.zip

(over the years had been before on SGS2-M250K-UB23.zip, ModemRIL_XXMS2.zip, I9100_radio_XXLS6_CWM.zip, XXLPX-CWM.zip, Modem_XXLQ6-CWM, tested-ModemRIL_XXLS6, tested-ModemRIL_XXLS9)

Actual ROM/kernel: Carbon 20100510 nightly / Dorimanx 9.16