[Trick] Speed Up Satelite Fix for GPS on Android

Search This thread

antawnm26

Senior Member
Apr 3, 2008
1,563
212
Atlanta
Hm... In my tweak, the first step is to download, install, and run Fasterfix (not Fixit, i not sure whether they did the same thing or not). But i didn't mentioned that it is optional to use the faster fix or not. I suggest to run, to be a safer step. Yes, it will write the gps.conf (but currently not sure whether the app change other things or not until i verify with the app dev). So i just keep the whole process that i gone through to make my gps works :)

I dont see that in your first in your first step at all....
 

M3trixxx

Member
Jan 12, 2013
19
1
Piestany
I did everything like you wrote and after reboot I started experiencing problms with wifi...When I'm trying to turn it on it says "Error" :(

e: ah now it works...just ignore what I wrote above :)
 
Last edited:

turtleism

Member
Aug 21, 2013
24
4
Followed the instructions and applied the tweak to my HTC One. So far have been working flawlessly!

Able to get GPS lock on at amazing fast speed, even hiding indoors. Previously need to be under the clear blue sky..
 
Last edited:

djegoistic

Senior Member
Sep 10, 2011
213
9
Amritsar
I appreciate your work...but can you provide simple app or trick to do so...I'm lil lame...moreover i don't have pc...only mobile phone

Sent from my GT-S5570 using XDA Free mobile app
 

Anabta

Member
Aug 2, 2014
5
0
Hi,
I have just edited the gps.conf but even after 3 Restarts I don't get any connection. GPS Status tries to reach connection since 5 minutes. GPS does not work with any other app, too.

gps.conf:
NTP_SERVER=0.de.poolDOTntp.org
NTP_SERVER=1.de.poolDOTntp.org
NTP_SERVER=2.de.poolDOTntp.org
NTP_SERVER=3.de.poolDOTntp.org
NTP_SERVER=0.europe.poolDOTntp.org
NTP_SERVER=1.europe.poolDOTntp.org
NTP_SERVER=2.europe.poolDOTntp.org
NTP_SERVER=3.europe.poolDOTntp.org
NTP_SERVER=de.poolDOTntp.org <-This is changed from the top line to here. It may works better if we put it here.

Here comes the rest from OP just copied in.

Sorry for the DOTs but I am not allowed to post links.

Greetz
Anabta

EDIT:
Before trying this Tweak, it did not work, too.

EDIT2:
I am running a Sony Xperia GO with http://forum.xda-developers.com/xperia-u/go-development/rom-slimbean-v1-3-t2326120 ROM btw.
 
Last edited:

redeemed75

New member
Oct 30, 2012
4
0
2145

As per my testing, so far so good using below config (just replace "*" w/ "." (dot), "~" w/ "t") :

NTP_SERVER=0*id*pool*ntp*org
NTP_SERVER=1*id*pool*ntp*org
NTP_SERVER=2*id*pool*ntp*org
NTP_SERVER=3*id*pool*ntp*org
NTP_SERVER=id*pool*ntp*org
XTRA_SERVER_1=h~~p://xtra1*gpsonextra*net/xtra*bin
XTRA_SERVER_2=h~~p://xtra2*gpsonextra*net/xtra*bin
XTRA_SERVER_3=h~~p://xtra3*gpsonextra*net/xtra*bin
INTERMEDIATE_POS=0
ACCURACY_THRES=5000
ENABLE_WIPER=1
DEFAULT_AGPS_ENABLE=TRUE
DEFAULT_SSL_ENABLE=FALSE
DEFAULT_USER_PLANE=TRUE
REPORT_POSITION_USE_SUPL_REFLOC=1
DEBUG_LEVEL=0
CURRENT_CARRIER=common
SUPL_HOST=supl*google*com
SUPL_PORT=7276
SUPL_SECURE_PORT=7275
SUPL_NO_SECURE_PORT=3425

'though i'm from the Philippines, I'm using the Indonesia pool zone because they've more servers.

I'll continue to observe using above config.

BTW, my phone:

SGS2
Android 4.1.2
3.12.0-rc1 Siyah-Dorimanx-V8.41
XWLS8 NeatROM Lite v4.2
 

gnhuy91

Senior Member
Mar 20, 2014
53
5
Thanks, got it to work partially on m7 but sometimes no gps connection. maybe I need to look over again..
 

MacFett

Senior Member
Nov 7, 2011
236
39
Miskatonic
I have an HTC One M8 on Verizon. I have been trying to several days to get the GPS to work with CM11. This finally did the trick for me. I have tried every other fix for HTC devices and this is the only one that has done anything.

Thank you very much.
 

redeemed75

New member
Oct 30, 2012
4
0
Just an update. As of this post, my above config still working perfectly fine w/ regards to GPS satellite fix/lock. Getting GPS lock for just about 5 - 15 sec, even on a cloudy or rainy day. ;)
 

paul c

Senior Member
Nov 15, 2006
1,743
550
Madrid
I'm flashing (Lollipop) nightlies so it'd be nice to be able to add a flashable zip to the list, rather than having to go into an app to update the gps info.

Could someone post a gps.zip file which is valid for my Nexus 4, for Europe/Spain?

Many thanks
 

MacFett

Senior Member
Nov 7, 2011
236
39
Miskatonic
I'm flashing (Lollipop) nightlies so it'd be nice to be able to add a flashable zip to the list, rather than having to go into an app to update the gps info.

Could someone post a gps.zip file which is valid for my Nexus 4, for Europe/Spain?

Many thanks

I just created a file for my HTC m8 and replace the bad file when I need.
 

jongordo8

Member
Mar 18, 2011
36
4
I am trying to do this trick on my nexus 5. I just wiped my phone back to stock, then rooted with CF auto root. I installed ES file manager. When I go to move the gps.conf file that I created to the located it comes up with an error that says "open failed: EROFS (Read-only file system). How do I get it to allow me to write over the existing GPS.conf?
 

MacFett

Senior Member
Nov 7, 2011
236
39
Miskatonic
I am trying to do this trick on my nexus 5. I just wiped my phone back to stock, then rooted with CF auto root. I installed ES file manager. When I go to move the gps.conf file that I created to the located it comes up with an error that says "open failed: EROFS (Read-only file system). How do I get it to allow me to write over the existing GPS.conf?

Is your nexus rooted?
 

MacFett

Senior Member
Nov 7, 2011
236
39
Miskatonic
Yes it is rooted via CF auto root. I have superuser on my phone and have verified root via root checker.
Make sure your file explorer is set in preferences to use root permissions. Some are set by default to not, you have to tell them to allow or prompt. Also check in your superuser app to make sure you've granted permission to the file explorer or at the very least not denied it.
 

rirozizo

Senior Member
I am trying to do this trick on my nexus 5. I just wiped my phone back to stock, then rooted with CF auto root. I installed ES file manager. When I go to move the gps.conf file that I created to the located it comes up with an error that says "open failed: EROFS (Read-only file system). How do I get it to allow me to write over the existing GPS.conf?
You have to mount your system partition.

Either use the command "remount" on a terminal.
Or use "adb remount" on a PC with adb.
If both failed tell us, I have a backup solution to this.

Sent from my LG-H815 using Tapatalk
 

askpcguy

Senior Member
Aug 8, 2010
1,952
189
OnePlus One running Miui, I went from 0/0 Satellites before editing gps.conf and after I edited now I get at least some satellites. Big thanks!

What I did was make the first section:

Code:
#North America
NTP_SERVER=north-america.pool.ntp.org
NTP_SERVER=0.north-america.pool.ntp.org
NTP_SERVER=1.north-america.pool.ntp.org
NTP_SERVER=2.north-america.pool.ntp.org
NTP_SERVER=3.north-america.pool.ntp.org

#
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin

And changed Debug_Level from 3 to 1 (Info to Error).
 

3to4

Senior Member
Aug 13, 2009
395
43
Lyon
Working for my Galaxy Note 3

Since I bought it, I have always had gps problems with my Galaxy Note 3 (Stock rooted and deodexed 4.4.2). It took ages to get a fix, sometime never. I even tried applying electrically conductive grease on the contact for antenna without a result. I also tried soldering a small copper piece to improve the contact for antenna. Then, I broke the contact and had to replace the motherboard. With the new motherboard (used) it worked better but sometimes it took a long time to get a fix.

Then, I tried this fix, and it works!! I have been testing since only two days, but my Galaxy Note 3 gets a fix in maximum 20 seconds on cold start, and in a few seconds afterwards.!!

For the gps.conf file, I copied the text from the OP's post, but as someone said in a post in this thread (which I cannot find now) I used only one server, which is

NTP_SERVER=pool.ntp.org

and it seems to be working. If it works here, it should work on another continent, I presume.

Attached file is my gps.conf.

Thank you very much for the great thread.

PS: I copied the file to my phone, set permissions and rebooted while Wifi was connected.
 

Attachments

  • gps_conf.zip
    874 bytes · Views: 1,372
Last edited:
  • Like
Reactions: MarkusOSx

Top Liked Posts

  • There are no posts matching your filters.
  • 523
    Guys,

    I decided to write this because a lot of us here still facing GPS issue on their device. I almost give up on my HTC Desire HD because of the GPS problem. After I find this trick, now I realized that HTC devices have one of the most brilliant GPS hardware. It always get a location lock within 5 - 15 seconds.

    This trick not only to speedup the satelite fixing. Some also found that it increase the reception (strong signal even during cloudy, light raining, and inside building's window). I am one of this case :D.

    Here is the tricks. It is tested on HTC desire HD, SGSII, and speculated to work on most Android device (Please note that it is in sequential order):

    Requirements:
    • Rooted Device
    • File Manager: e.g. Root Explorer


    1. Searching for NTP server information
    • At the right side of webpage, there is "Active Servers". Go in and look for the setting of your 1)region and 2)country
    • For example, one's region is Europe then you write down the NTP server for that: 0.europe.pool.ntp.org; 1.europe.pool.ntp.org; 2.europe.pool.ntp.org; 3.europe.pool.ntp.org
    • Then the servers for your country from the list down there and click the link(Example: Switzerland — ch.pool.ntp.org; 0.ch.pool.ntp.org; 1.ch.pool.ntp.org; 2.ch.pool.ntp.org; 3.ch.pool.ntp.org
    • The "Italic" words are the information you need to jot down for later use


    3. Modify the gps.conf file (Most Crucial Stage)
    • Copy the codes in grey box (in first post) to a notepad, then change the extension name from .txt to .conf then copy to your phone
    • Use file manager to copy to this location: /etc/gps.conf and replace the original gps.conf
    • Open and Edit the gps.conf using rootexplorer or others file managers
    • Change the COUNTRY and REGION in following lines with the info you got from the website just now. Keep other values unchange unless you know what it is. Example of REGION such as NorthAmerica, Asia, Africa, Europe.
    • Your new gps.conf should look as below:


    NTP_SERVER=0.COUNTRY.pool.ntp.org
    NTP_SERVER=1.COUNTRY.pool.ntp.org
    NTP_SERVER=2.COUNTRY.pool.ntp.org
    NTP_SERVER=3.COUNTRY.pool.ntp.org
    NTP_SERVER=0.REGION.pool.ntp.org
    NTP_SERVER=1.REGION.pool.ntp.org
    NTP_SERVER=2.REGION.pool.ntp.org
    NTP_SERVER=3.REGION.pool.ntp.org
    NTP_SERVER=COUNTRY.pool.ntp.org <-This is changed from the top line to here. It may works better if we put it here.

    XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
    XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
    XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin

    # DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
    # 4 - Debug, 5 - Verbose
    DEBUG_LEVEL =0

    # Intermediate position report, 1=enable, 0=disable
    INTERMEDIATE_POS=0

    # Accuracy threshold for intermediate positions
    # less accurate positions are ignored, 0 for passing all positions
    ACCURACY_THRES=0

    # Report supl ref location as position, 1=enable, 0=disable
    REPORT_POSITION_USE_SUPL_REFLOC=1

    # Wiper (wifi positioning), 1=enable, 0=disable
    ENABLE_WIPER=1

    ################################
    ##### AGPS server settings #####
    ################################

    # FOR SUPL SUPPORT, set the following
    SUPL_HOST=supl.google.com
    SUPL_PORT=7276
    SUPL_NO_SECURE_PORT=3425
    SUPL_SECURE_PORT=7275
    SUPL_TLS_HOST=FQDN
    SUPL_TLS_CERT=/etc/SuplRootCert

    # FOR C2K PDE SUPPORT, set the following
    C2K_HOST=c2k.pde.com
    C2K_PORT=1234

    CURRENT_CARRIER=common
    DEFAULT_AGPS_ENABLE=TRUE
    DEFAULT_SSL_ENABLE=FALSE

    # TRUE for "User Plane", FALSE for "Control Plane"
    DEFAULT_USER_PLANE=TRUE​

    • Make sure the permission of the file is rw-r--r--

    4. Reboot
    • Go setting, turn on your "use GPS satelites" and "Integrate Google Navigation"
    • Restart the device (normal restart)[/B]

    5. Use GPS status and Toolbox
    • Tool available in market for free, please donate so developers are encouraged for better release in the future[/B]
    • Open app> tools> manage A-GPS state>Reset
    • Open app> tools> manage A-GPS state>Download
    • Optional restart device (not compulsory)
    • Use GPS status to start fixing satelites
    • Your satelite fixing speed should VERY FAST now
    • After get a successul GPS Lock, open your GPS applications and use like normal (e.g. Copilot, Sygic, or TomTom)

    Extra Suggestion: Please make sure your GPS is enabled before your device is turnoff or restart. It won't actually use GPS unless you open map-related app or google.com.
    CAUTION!!!: DO NOT use fasterfix after this. It will overwrite all the content in gps.conf


    Credits: Thanks for JMax and Vault Killer for the gps.conf file
    WARNING: Please do backup before messing with your device
    Do it at your own risk, I cannot be held resposible for any damage or dysfunctional of your device



    [Update: 17 August 2012]
    Sometime even my phone won't work consistently. It won't able to get fix within 30seconds everytime. And i found this tool can be very very help to make sure my agps 95% up to date and thus has the best performance.

    The tool is called "Leo AGPS Injector" developed by Tytung. Please click thanks or consider donation on the following post to thanks for the developer - Tytung. I have no credit at all for this tool. I just share it.
    Here is the link http://forum.xda-developers.com/showpost.php?p=16384028&postcount=1907

    Step to use the tool:
    1. Install and place the widget on your home screen
    2. Ensure your GPS setting is on
    3. Make sure you're conencted to Internet / Mobile data
    4. Press on the widget to inject AGPS data
    5. Now you're good to go. The internet can be turn-off now. and your gps should work well

    Note: I noticed once i connect to a big internet network (such as my university internet network). My GPS won't work anymore.
    This is what i do to make it back to normal:
    1. Connect to Mobile data (3G) and use "Leo GPS injector"
    2. if it is still not working, i switch to airplane mode and back to normal mode again, then repeat step 1
    And i notice, it works better if you use mobile internet, rather than fixed source internet at home. This is just what i feel, not necessary true.




    Please post your feedback to let others know it works on your device model

    Please click "Thanks" if you feel this post is useful for you
    7
    FasterGPS

    hi all,

    the trick is automated here, without all the fuss
    https://play.google.com/store/apps/details?id=org.fastergps&hl=en

    just for sharing ;)
    6
    Thank you very much for this post. :D

    Fortunately I've never had a GPS issue on my DHD, but still I would love to "fully" understand your solution ... ;)
    If it is possible, can you please explain what exactly these settings do, or can you post some links where I can find some extra info regarding these settings and their "ïmpact" for my DHD ..

    (Always curious, you know ! :D:D)

    # DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
    # 4 - Debug, 5 - Verbose
    DEBUG_LEVEL =0

    # Intermediate position report, 1=enable, 0=disable
    INTERMEDIATE_POS=0

    # Accuracy threshold for intermediate positions
    # less accurate positions are ignored, 0 for passing all positions
    ACCURACY_THRES=0

    # Report supl ref location as position, 1=enable, 0=disable
    REPORT_POSITION_USE_SUPL_REFLOC=1

    # Wiper (wifi positioning), 1=enable, 0=disable
    ENABLE_WIPER=1

    ################################
    ##### AGPS server settings #####
    ################################

    # FOR SUPL SUPPORT, set the following
    SUPL_HOST=supl.google.com
    SUPL_PORT=7276
    SUPL_NO_SECURE_PORT=3425
    SUPL_SECURE_PORT=7275
    SUPL_TLS_HOST=FQDN
    SUPL_TLS_CERT=/etc/SuplRootCert


    # FOR C2K PDE SUPPORT, set the following
    C2K_HOST=c2k.pde.com
    C2K_PORT=1234

    CURRENT_CARRIER=common
    DEFAULT_AGPS_ENABLE=TRUE
    DEFAULT_SSL_ENABLE=FALSE


    # TRUE for "User Plane", FALSE for "Control Plane"
    DEFAULT_USER_PLANE=TRUE


    and, what exactly is meant by

    4. Reboot
    Go setting, turn on your "use GPS satelites" and "Integrate Google Navigation" rw-r--r--
    Restart the device (normal restart)[/B]

    Do you want me to put permissions on a settings selection in the "Settings - Location" options ?

    Sorry if my question is unclear, but I'm a bit puzzled by that part of your solution post.

    AGAIN !! Thanks for the nice post and great effort .. Much appreciated !! :D
    5
    @Xenova

    For these reasons: https://wwws.nightwatchcybersecurity.com/2016/12/05/cve-2016-5341/

    I think you should update OP using https instead of http:
    XTRA_SERVER_1=https://xtra1.gpsonextra.net/xtra.bin
    XTRA_SERVER_2=https://xtra2.gpsonextra.net/xtra.bin
    XTRA_SERVER_3=https://xtra3.gpsonextra.net/xtra.bin
    5
    If I missed the answer, I apologize, but I noticed a lot of people wondering how / why this works.(Yes, I know it's an old thread, but figure people may still want an answer.)

    The biggest factor is that this gps.conf enables Assisted GPS (A-GPS). AGPS is a technique which uses the cell tower you're connected to to approximate your location, and using that approximate location and GMT (Grenwich Mean Time) to identify the satellites your GPS chip looks for.

    Normally, on a cold start, a GPS simply starts scanning the sky for all GPS satellites. There are currently, I believe, 31 functioning satellites in the US system. Since the GPS has no idea which of those 31 are visible to your receiver, it can take a long time to find and lock on to the minimum # of satellites to enable a location fix (3 for a 2 dimensional fix, 4 to get altitude).

    But the GPS satellites are in predictable orbits. If you know the time, and your approximate location, you can know which satellites are going to be visible in the sky above you. That's what A-GPS does. Your NTP time server tells it the time, the cell tower tells it your location. The GPS can then easily calculate which of those 31 satellites are overhead, and lock onto those very quickly while ignoring all the rest.

    There is a potential downside. If you're not connected to a cell tower, A-GPS doesn't know where you are. Some phones won't provide GPS lock at all in that case. So you might want to keep the original gps.conf on your phone, renamed as gps.conf.back, so that if you find yourself in an area without cell service, and GPS isn't working, you can revert back to the original file.