# [HOWTO][Gingerbread] Fix GPS that will NOT lock! YMMV



## wizayne

*did this fix your gps woes after successfully following these steps?*​
yes 758.33%no 433.33%it did at first18.33%


----------



## wizayne

If you've been having GPS issues when running Gingerbread, and in my case CM7 on your SCH-I500, then you are not alone. My GPS was malfunctioning to the point where I could lock onto 6 GPS satellites (I'll say sats for the rest of this) with an Signal to Noise Ratio (SNR) of 20-30 which is great for 802.11b/g wifi speeds of 24mbps. And it should be good enough for GPS, but it may not be. My phone simpy would not lock, at all. Not in 15 minutes, not in 30, without using AGPS I got no lockons regardless of how good my SNR to the Sats were or whether I rubbed my head while chanting a Keebler Elf chaingang song standing on one foot with a tinfoil hat on.

I paid for GPS Aids Donate (about $3.00 from Market) which is supposed to be a one-click solution. I guess it works for a lot of people but what if it doesn't work for you or you don't want to pay that much to find out it didn't work?

Fret not, for there may be a cheaper solution (free, my fave) which just requires some work. First off you'll need to know a few things about your ROM like where the gps folder is and where the /etc files are stored. You can find them (btw, your phone may not even have a gps.conf or secgps.conf yet, mine didn't have secgps.conf but it did have gps.conf) using command line or something like Root Explorer app and searching the root "/" of your filesystem recursively.

You will also need to download the two files which I've attached. gps.conf and secgps.conf have values that have been tweaked to maximize the phones GPS capabilities the way they used to work under Touchwiz ROMs or better. By the end of this guide I was getting a lock within 4 seconds from 4 of the 6 Sats which I had in view, an average SNR of between 25-35dB and it was accurate to within 24 feet, first try!

Grab the files, find out where /etc is (for CM7 MTD it is /system/etc), and place gps.conf into /system/etc, and make sure to chmod 777 gps.conf. If you already have a gps.conf file when you search for one, back it up and take note of it's permissions. I have a theory that the permissions were the problem for me but I would need others to report back. Anyways throw the gps.conf from here in there (I take no credit for this file, it was provided by both GPS Aids and the awesome people in #samsung-fascinate, thanks for the help guys!) and then place secgps.conf into your /data/gps folder if it exists. Make note of the permissions of any files which may already be in there, and if gps.conf is in there too, throw another copy of it in there for good measure after back up the original again if needed.

Now see if there is a file with the name lto*.bin, where * may be a number, for me it was "lto2.bin". This file is a "Long Term Orbit" file and helps your phone locate the Sats more quickly.

Now, in my case these files had weird permissions in spite of running TWO paid apps from market to fix it. Your milage may vary, of course. Now set chmod 777 any gps.conf/secgps.conf/lto*.bin files you see. Reboot into recovery. Wipe Dalvik (which may not be necessary but I did it for good measure 'cause I'm sick of broken GPS) and then reboot.

Now run the app "GPS Fix" from Market, or if you have GPS Aids (free or donate versions) you can grab the LTO update. Basic mode should be all you need at this point. OK. Now with GPS Fix or GPS Aids, check out how long it takes to get a fix, how accurate it is, the Sat SNR, how many your phone can find, and how many it can actually connect to. If all worked you should have a working GPS again with a fast, accurate lock.

Whatever your results, please post back.

View attachment 2118


----------



## wizayne

I've found that the files keep getting their permissions reset, and I think the culprit in my case may be GPS Aids which I've setup to automatically download the new LTO file
on every reboot. So I'll be posting a bug report to the app author, but in the meantime, some kind of shell script run from init would definitely do the trick. It'd be something like:

(be sure to remove anything inside */ and /* as it may not be ignored, not sure..but somebody smarter than I could rewrite this way better too and it still needs to be be run automatically from init.rc somehow?? 

#!/system/bin/bash
sleep 120 */give gps aids time to download and write the LTO file/*
chmod 777 /system/etc/secgps.conf
chmod 777 /system/etc/gps.conf
chmod 777 /data/gps/lto*.dat */the lto file might be variably named, not sure, so use a wildcard just in case/*
chmod 777 /data/gps/ltoStatus.txt */dunno if it's required.. /*
chmod 777 /data/gps/xtra.bin
chmod 777 /system/etc/secgps.conf
exit 0 */end of what i've got so far until it gets improved or obsoleted /*

I assume that would work? save it as something like /system/etc/init.d/gpsfixer and make sure it's chmodded to be executable and it should fix it every boot after two minutes,
even if you have gps aids set to automatically download a new lto/xtra file. however, if 120 seconds isn't enough time post back so we can get this going!


----------



## Not_So_There

This did work for me. GPS aids would never download a lto file before but now it does. I still have to force it to download one after I have been indoors for a while but it then gets a lock quickly.


----------



## Tyler1234567

This worked temporaily yes. But what about not having to rely on another app. Cyanogenmod team broke jt's gps fix. If only jt could make a gps patch for the nightlies.


----------



## wizayne

well, tyler, if it worked at first, you may need to recheck your permissions. mine worked at first and when i checked the permissions, it was effed again.

try using the shell script if your permissions are screwed again. anytime gps stops working, run it as root after updating your LTO file (which needs to be done 
once a week or so at minimum as the sats change position!)

also, i doubt gps aids is required, but the free version will work just as well..however the shell script i wrote may not even work, i haven't tried it.. so there is zero chance of myself recoding jt's gps fix. this is the best i can do..

i would suggest running the shell script as root after updating your lto file since i think the permissions bug lies with gps aids or something..try that and let me know your results.


----------



## Not_So_There

I was running Nightly 27 before when I tried this and while this worked sometimes other times it would still take 10 minutes to lock. I installed nightly 31 over 27 Saturday wiping only dalvik and since then my gps works great locking on very quickly without using any gps tools. I don't understand why though as there are no changes listed http://cm-nightlies.appspot.com/?device=fascinatemtd that I understand would effect gps.


----------



## pfink42

This mod did nothing for me.
Sorry, but there are a a few similar "fixes" around. Some very elaborate with different gps.conf files for different regions. Some say just to change the ntp settings. None have helped me.

I did have gps working a while back. It was great. Then it was like it was switched off. I get nothing. 
Can't see any satellites, can get any locks.

BTW: /etc & /system/etc are the same directories. One is just a link. At least its that way on my phone.


----------



## iammaxus

I also have the can't see any satellites, can't get any locks problem. Please post if you come across anything that helps. I might just have to go back to a Samsung-based ROM...


----------



## jpaulwaite

Try nitsuj's gps permissions fix. It's a flashable file. It's in the mesmerize/teamheiz/8-27-11 Heinz57 rom thread. Hard to miss, the package is linked at the bottom of the op. Give it a try. And use GPS status and GPS essentials. Beats the pants of gps aids.


----------



## gunm3tal

jpaulwaite said:


> Try nitsuj's gps permissions fix. It's a flashable file. It's in the mesmerize/teamheiz/8-27-11 Heinz57 rom thread. Hard to miss, the package is linked at the bottom of the op. Give it a try. And use GPS status and GPS essentials. Beats the pants of gps aids.


Thanks for the info; where can i find this permissions fix?

EDIT: NVM i'm with stupid.
EDIT2: Here's the link to thread: http://rootzwiki.com/showthread.php?3937-ROM-8-27-11-EH09-TW-Heinz_57-TouchWiz-GingerBread-ROM-Stock


----------



## luis2k10

gunm3tal said:


> Thanks for the info; where can i find this permissions fix?
> 
> EDIT: NVM i'm with stupid.
> EDIT2: Here's the link to thread: http://rootzwiki.com/showthread.php?3937-ROM-8-27-11-EH09-TW-Heinz_57-TouchWiz-GingerBread-ROM-Stock


Thanks for that. That fixed my GPS


----------



## jpaulwaite

Thats why we have a thanks button under our names now


----------



## UUkirby

None of this has worked for me, I have tried every method and aid their is including those listed here.

My GPS will not lock anymore rendering it useless to me.

Maybe I did something wrong, the instructions in the beginning are not very clear at all on where things are located.


----------



## HardcorePooka

"UUkirby said:


> None of this has worked for me, I have tried every method and aid their is including those listed here.
> 
> My GPS will not lock anymore rendering it useless to me.
> 
> Maybe I did something wrong, the instructions in the beginning are not very clear at all on where things are located.


I just did the GPS permissions fix and it solved my problems


----------



## wizayne

UUkirby said:


> None of this has worked for me, I have tried every method and aid their is including those listed here.
> 
> My GPS will not lock anymore rendering it useless to me.
> 
> Maybe I did something wrong, the instructions in the beginning are not very clear at all on where things are located.


The OP states to search your phone using CLI (terminal emulat/or) or
an app like root explorer. I also said you may not have one of the files
But you more than likely will have the other. Because some ROMs have
/etc symlinked to /system/etc, I can't account for everything. Where did
You eventually put the files?

I have a feeling that the GPS permissions .zip is 
the same as my fix, just flashable.I also have a
feeling that if instructions are followed properly
And attentively there would not be a single no answer
it seems likely this has always been the fix but until 
Recently no one noticed it.

If you post back with more details perhaps I could help 
More but with the flashable zip I see no reason to continue
Doing this fix as its obvious my howto skills are (I can say 
what worked for me but its up to you to adapt it for your 
Phone) shit.

Good luck though, I know not having GPS sucks bad. And this 
Was not all at uukirby, as I know partly the op may be hard to 
standunder like I said, but at the same time time one guy was
Acting like I said /etc and /system/etc are different directories, no 
Wonder this didn't work for him, he obviously can't follow directions.

Rooting and ROMs are very easy and most of the problems I've had 
And that I've seen others have are usually from not following the OP
closely, and the same holds true for everything tech doesn't it?

Of course I have a mesmerize and some have a fascinate, I run trigger
And some run stock, cm, vgb, nighties, etc.


----------



## Wessiide

GPS aids donate is half of this week 1.50 it certainly helped make my GPS faster and more accurate on a cm7 mtd based rom on fascinate. Def give it a try if you are having issues

Sent from my SCH-I500 using Tapatalk


----------



## mdietz

Your gps.conf file that is in the zip download looks *awfully familiar*...


----------



## deadpool631

I have also had trouble getting this working I used CWM to install this file: Heinz_57_colored_CWM3_pack_v1.zip it says it installed successfully but nothing changed.

I also tried doing chmod 777 gps.conf through adb discussed earlier but i got this error: 
Unable to chmod gps.conf: Read-only file system

I tried running the find command to find the lto finds but never located any .bin files
I am running the pre-rooted stock rom posted here: http://www.megaupload.com/?d=5I045CCR That I got off of Team US Cellular's forums.


----------



## docgreen

I'm at a loss...

I have 2 Samsung Fascinates, both with non-working GPS. Both phones are running the same CM10.1 nightly build, and are basically identical.

I followed the OP's instructions on phone 1 and it worked like a charm... GPS is more accurate on this than it is on my new S3!

I followed the OP's instructions on phone 2 and it didn't do a damn thing! WTF? lol

I've checked and rechecked permissions (although on the working phone, permissions for gps.conf were reset to 444 and it still works fine)

I've tried a different version of the GPS.conf (one with 8 NTP servers)

I've checked permissions on the lto* files (though I never did find a .bin file)

I've tried GPS Aids, GPS Status & Toolbox

Nothing has gotten phone 2 working. Like I said, I'm at a loss...

Any ideas? (is anyone still active in this thread? lol)


----------

