Note: The Android 2.2 Froyo update for the Samsung Galaxy S/Vibrant/Captivate fixes these issues, but I'm keeping it on 2.1 for dev purposes.
Apparently the Froyo update has GPS which connects almost immediately, so that might be worth checking out.Update 3/7/2011: Apparently not. There's still a lot of complaints about the GPS after installing Froyo/Gingerbread.
To make your GPS connect quicker
Please use the following instructions to speed up the GPS "lock in" time.
*update 3/7/2011*
While reading dangrayorg's lengthy and technical post about how the GPS works, he linked to Da_G's highly successful tutorial with GPS daemon hacks.
That clever bastard has managed to port over the firmware for the GPS from the Nexus S to the Samsung Galaxy S i9000.
He's even figured out some of the settings and tweaked them to be as accurate as possible.
All you really have to do is download it for phone!
Disclaimer
To follow this guide, you will need to know the exact model of your phone, the firmware you're running and be comfortable enough to use the command prompt/terminal "black screen" to type in commands.
It involves replacing the GPS driver files on your phone, which may or may not work and could potentially (although the chance is quite slim) brick your phone.
I've tested it for a week before posting this. The test were done in my car, on a train, on a bus and in the house under a roof. This worked for me with an 80% success rate of connectivity, which was far better than the 10% before fixing.
And lastly, I do not take any responsibility for you messing up your phone.
Downloads
- Unless you're on AT&T, get "dagnarf-gps-tweak-google.zip"
- ClockworkMod ROM Manager from the Android app market (if you don't already have it)
- Root your phone
- adb (Android debugger from the SDK)
Backup your files!
Of course, any hack of this sort will require you to back things up in case shit goes wrong. We've all been there, we've all had the horrible sinking feeling when something goes awry and there is no way of reverting it. Don't make the same mistake again.
Using adb, follow the steps below to make a backup of files which are about to be changed.
mkdir /sdcard/gps_backup
mkdir /sdcard/gps_backup/system
mkdir /sdcard/gps_backup/system/etc
mkdir /sdcard/gps_backup/system/bin
mkdir /sdcard/gps_backup/system/bin/gpsd
mkdir /sdcard/gps_backup/data
mkdir /sdcard/gps_backup/data/gpsbusybox cp /system/etc/jupiter.xml /sdcard/gps_backup/system/etc/
busybox cp /system/bin/gpsd/glgps_samsungJupiter /sdcard/gps_backup/system/bin/gpsd/
busybox cp /data/gps/secgps.conf /sdcard/gps_backup/data/gps
This will make a folder called "gps_backup" on your phone and then back up the files there. Once that's done, you should copy them to your PC for safe keeping.
Note for Eclair (Android 2.1) users
If for some reason you're weird (like me) and have stuck to the slower Android 2.1 Eclair for development reasons instead of upgrading to the faster Froyo/Gingerbread releases, then you'll need to make the following changes to "dagnarf-gps-tweak-google.zip".
In the zip file, you'll need to modify "system/etc/jupiter.xml". Extract it, replace the following lines:
gpioNStdbyPath="/sys/class/sec/gps/GPS_PWR_EN/value"
gpioNResetPath="/sys/class/sec/gps/GPS_nRST/value"
Replace with:
gpioNStdbyPath="/sys/class/gpio/gpio121/value"
gpioNResetPath="/sys/class/gpio/gpio120/value"
Add it back into the archive, replacing the old file. Check it to make sure it's been modified.
Preparing the hack
- Rename "dagnarf-gps-tweak-google.zip" to "update.zip"
- Copy it over to the root folder of your phone memory under "/sdcard"
- Using adb, set your phone into recovery mode by typing:
adb reboot recovery
You should now see a screen full of yellowish writing.
- Using the volume up/down buttons, select "Apply sdcard:update.zip"
- Select it using the home button
- It should now install and reboot your phone
- When you get back into the recovery mode screen, just select "Reboot system now" to complete the process.
Errors?
If you're seeing the "installation aborted" error message, make sure you have CWM (ClockworkMod recovery bootloader) installed.
- Install "ClockworkMod Rom Manager" from the app market
- Get root access
- Grant it superuser access
- Flash the recovery bootloader with whatever matches your model
- Select "Reboot into recovery" to get into recovery mode and try the installing "update.zip".
Settings
When you're back into your phone, you'll still have some things to configure.
- Go to "Settings" > "Location & Security"
- Uncheck the option "Use Wireless Networks"
You'll also have to first clear your old GPS data. Otherwise, the GPS icon will appear for half a second then disappear as it stops trying to connect.
- Get into "LBSTestMode" by going to the phone dialer and pressing
- *#*#1472365#*#* (Eclair)
- *#*#3214789650#*#* (on Froyo onwards)
- Click on "Delete GPS Data" to wipe out the old cache
- Go to "Application settings" and use the following settings
- Session Type: Tracking
- Test mode: S/W Test
- Operation Mode: Standalone
- Start Mode: Hot start
- GPS Plus: ON
- Dynamic accuracy: ON
- Accuracy: 80 (meters, not percentage)
- Use SkyHook: OFF
- Use PC Tool: OFF
- Press back and get into SUPL/CP settings
- Use the following settings
- Server FQDN Type: Custom config
- Server: supl.google.com
- Server Port: 7276
- SUPL Secure Socket: OFF
- AGPS Mode: SUPL
- This should now be enough to get you up and running with the GPS.
- First start, enable 3G or WiFi and wait for it to connect
- Enable GPS
- In LBSTestMode, open up "Get Position Test"
- "Satellite Informations" should disappear once the satellite information has been downloaded from the SUPL server.
- After that, it should take a moment to connect to the satellites.
- Wait for a lock-in.
That's it. Restart and try it out with Google Maps. I managed to get a signal from my room, so I tested it by watched it track me walking from the back of my house to the front door.
Old method which does not work
Ignore the stuff below, it was from the original post. This was back when I first got the phone and was trying anything from the internet to tweak the settings.
Go to "Settings" > "Location & Security"Uncheck the option "Use Wireless Networks"Go back to the menu and open up your dialer.Key in *#*#1472365#*#*It should take you straight to the hidden configuration screen. If it doesn't, check the code or press the "DIAL" buttonIn the LBSTestMode app, select "Application Settings".Change "Operation Mode" from "Standalone" to "MS Based"Change "Accuracy" from "50" to "100"Press the back button.Now go to "SUPL/CP Settings"Ensure that "Server" and "Port" are "supl.google.com" and "7276" respectively.Press back to get back to the LBSTestMode menu.Go to "Get Position Test" and let it run until it picks up 10 satellites.Press back to get back to your phone menu.Restart the phone.Re-enable "Use Wireless Networks" (it uses your mobile cell area to approximate it first)
My GPS signal now connects in approximately 10 seconds. Still rather slow, but much more reliably and faster than before (either took 30 seconds or timed out after 60 seconds).
*edit 12/01/2011* Re-enabling the "Use Wireless Networks" makes GPS lag again. I turned it off and it worked much better.
*edit 07/02/2011* Added note about testing the positions
*edit 3/7/2011* Added information on how to use Da_G's daemon replacement hack. After a week of testing, this is definitely the best fix to date and actually makes the GPS usable!