[Vibrant Android Development] chui101:
Yet Another GPS Fix

YAGF Version 2

For users running AOSP Gingerbread (CM7) and ICS (CM9/ICS Passion) ROMs​

Why another GPS Fix?

This GPS fix is a modification of the GPS fix by strictlyrude27 (link). The newest builds of CM7 don't play nice with that GPS fix and hang at the kernel boot screen for 10 minutes waiting to download GPS LTO data.

This fix does several things differently:

It addresses the 10-minute hang time by removing GPS LTO data download altogether. I have no problem getting a GPS fix without it! You can see the test results below.

It uses a modified GPS library that actually reads config files (even if you don't have AngryGPS installed), now finally allowing Google's SUPL server to be used.

It lets the GPS use hot fixes now. After getting an initial fix, if you leave and come back to the GPS later you can get a fix in as little as 2 seconds.

It cuts out AngryGPS. You can still use it if you want to do GPS performance testing, but the configuration it writes will not be of any use. You can uninstall AngryGPS if you want now! This is to allow the fix to work properly even if you do not have AngryGPS installed.

Important for ICS users: If you are getting issues with GPS locks after deep sleep, you may need to try WallaceLau's addendum to this fix. As I am not having issues with GPS dying after deep sleep, I cannot vouch for the effectiveness of copying over HTC Desire GPS files, but as it does not overwrite any existing files, it should be fairly harmless.

Note for ICSP RC1 (v13): This fix is only halfway onboard. You should flash this fix after flashing the ROM and cleanup zips to get the proper configuration files.

What does this work on?

This works on the latest CM7 and CM9/ICS PASSION builds.

This has been tested with the stock CM7 kernel, Eugene373's Streamline kernel (EB7 build), and the Glitch V13 kernel.

Users have reported it working with MIUI as well.

I have not tested this on any other configurations! YMMV even on these configurations!

Testing method

To test the GPS effectiveless, the time to first fix (TTFF) was tested using the S/W test mode in AngryGPS. Interval 5 seconds, cold fix, with XTRA download enabled. Timeout was set to 255 seconds.

I wiped and reinstalled nightly 182 between each set of tests. The phone was connected to a wifi network during all the tests to obtain the best possible speed for XTRA data download.

10 TTFF data points were obtained for each test configuration. Error bars are calculated as the standard error of the mean (SEM) of each data set.

Test results

The stock installations of CM7 and the Glitch kernel do not have any sort of GPS fixes built in and fail to lock within 255 seconds. The Streamline kernel has a GPS fix but only acquired a lock 5 out of 10 times (50%).

Comparing only the GPS fix from strictlyrude27 and this fix:

What do the graphs mean?

This shows that these two GPS fixes essentially perform the same, and that removing LTO download (and the 10 minute hang time on boot) has no statistically significant effect on GPS performance.

In addition, one can conclude that using either Streamline or Glitch kernels offers significant GPS performance benefits over the stock CM7 kernel.

Is it safe to flash?

Most likely (though I offer no guarantee of this)! All this does is delete your old GPS fixes if they are present, delete the agpsd daemon that was causing problems on my CM7 Vibrant, and flash the gpsd and gps.conf that were in strictlyrude27's fix. If that fix didn't give you problems, this one definitely won't.

INSTRUCTIONS

Have CM7.1.0.1 or a newer nightly installed on your Vibrant

Transfer yagf2.zip to your phone

Turn off the GPS!

Reboot into recovery

Flash your kernel of choice (if you have not done so already)

Install yagf2.zip from wherever you put the file

Reboot and turn on the GPS. Enjoy!

Download below as an attachment

Mirror

Version 1 (Old version)