Related
A number of us, on a variety of ROMs, including stock, have had difficulty getting our GPS systems to acquire a location fix. This can be temporary, or may happen so often it can appear permanent.
Background
When there is satellite reception, it can take a GPS receiver as much as 12.5 minutes to acquire a fix, depending on the number of satellites being received and their relative positions in the sky. To speed this up, our phones use a technology called Assisted-GPS (A-GPS), using location information obtained via mobile data and/or WiFi connections to more accurately and quickly determine a position.
Sometimes, A-GPS data seems to be incorrect, leading to no location fix.
What can we do?
Option A
The GPS Status application, available from the Market, can show you the location, signal strength, and acquisition data from GPS satellites above. It can also flush and reload Assisted-GPS data. This will clear any existing A-GPS aberration, and reset the acquisition sequence.
Option B -- Root required
Google provides Assisted-GPS data to Android phones via an A-GPS standard called Secure User Plane Location (SUPL). Cyanogen's team has determined that for some CM ROM users, disabling Google's SUPL connection in the phone's GPS receiver configuration can improve fix speed. As I understand it, his team is not yet sure of the root cause.
I'm not on Cyanogen's team. Even so, I could guess at a root cause, but it is only a guess. Perhaps the data packet is never received, due to a problem at the server. Perhaps the data packet is received but is missed by the GPS software. Perhaps the data packet is invalid and rejected, but a new replacement packet is never received and the GPS software just waits ....
Whether those guesses are right or wrong doesn't matter. When Google's SUPL service is removed from the phone, other A-GPS location data is used, allowing a GPS fix to proceed. Reportedly, with good speed. From my own experience, also, it seems to work well without SUPL service configured.
1. Mount the /system partition read-write. This can be done from adb, from the Root Explorer application, or from a terminal emulator
2. Edit /system/etc/gps.conf, and remove the lines that begin with "SUPL". For CM7, as an example, this is lines 5 and 6, "SUPL_HOST=supl.google.com" and "SUPL_PORT 7276"
3. Reboot.
i use gps status when i'm having issues. it works pretty well
is this pretty standard for most devices...gps issues?
One resolution that seems to work consistantly for me when in a "no sats" situation is to flush A-GPS data and immediately reboot.
The cause seems to be multiple apps having requested location data (such as browser and map), and may be related to the ROM I use (CM7), but this fix works for me every time.
Lockeskidney said:
is this pretty standard for most devices...gps issues?
Click to expand...
Click to collapse
Nope, i've never had a problem with my GPS.
had GPS issues when i was using CM7 nightlies prior to the RC1 release. but since flashing to RC1, GPS has been working flawlessly and barely takes 3-4 seconds to get a location fix.
I want to try Option B on my Evo before I try flashing a new radio. I'm rooted and using CM7, so I thought this would be an easy first step.
Even after the mount system app says it has successfully mounted with R/W access, I cannot edit the file with a text editor like this.
I know Google is my friend but alas I give up, I cannot figure out how to edit that file. What am I doing wrong?
skeene85 said:
I want to try Option B on my Evo before I try flashing a new radio. I'm rooted and using CM7, so I thought this would be an easy first step.
Even after the mount system app says it has successfully mounted with R/W access, I cannot edit the file with a text editor like this.
I know Google is my friend but alas I give up, I cannot figure out how to edit that file. What am I doing wrong?
Click to expand...
Click to collapse
Just install SQL Editor from market, and you are good to gther alternative is to copy the gps.conf file to your pc,make a backup of the original and then edit it with Notepad or some similar text editor and then bring back the file to the root of the phone.Just be careful to set the permissions as they were on the original conf file.
cevi said:
Just install SQL Editor from market, and you are good to gther alternative is to copy the gps.conf file to your pc,make a backup of the original and then edit it with Notepad or some similar text editor and then bring back the file to the root of the phone.Just be careful to set the permissions as they were on the original conf file.
Click to expand...
Click to collapse
You know that that post is more than 10 months old right? You are in trouuubbbblllleeee
The following seemed to have helped some people on my post on AF so figured I'd post it here as well.
If you're still having GPS issues in an area where you have data coverage, and you've tried changing the gps.conf and possibly updating your libraries as noted in other threads, have you tried changing your GPS settings to MS Based instead of the default of "Standalone"?
From wikipedia:
Mobile Station Based (MSB) - In MSB mode A-GPS operation, the A-GPS device receives ephemeris, reference location, reference time and other optional assistance data from the A-GPS server. With the help of the above data, the A-GPS device receives signals from the visible satellites and calculates the position.
You can do that by doing the following, as noted in my previous post:
My GPS was really taking a long time to lock. Usually 10 minutes or so using GPS Status before it would lock. I tried both just using gps only and then also with wireless network and it still took a long time. So I updated the lbstestmode.apk to use MS Based and the gps.conf file that was mentioned earlier and now I get a lock in GPS Status in about 8 seconds from a cold boot using only the GPS with no wireless network.
If anyone wants to try, I've attached a flashable zip. I took the zip posted by merkuralex earlier in the other gps thread (thanks merkuralex) and added the lbstestmode.apk posted in this SDX thread:
http://forum.sdx-developers.com/index.php?topic=13593.0
The following flashable zips are attached:
lbstestmode_mt_gps_conf.zip - contains the gps.conf file from the other thread + the lbstestmode.apk file.
lbstestmode.zip - contains only the lbstestmode.apk
I'll repost the instructions here (thanks to cornaljoe on sdx for the actual instructions):
Pre-1. Flash the one of the attached zips in CWM first to install the lbstestmode.apk (or just copy the lbstestmode.apk into /system/app/ if you'd rather) and then reboot your phone.
Follow these directions:
1. After boot create a shortcut to Activities -> LbsTestMode -> .LbsTestMode
You may have to install LauncherPro if your launcher doesn't support the activities option under shortcuts. Once installed all launchers will have this option.
My note: Just an FYI, LauncherPro can be downloaded from the Market for free if you don't already have it. Or any other app that allows you to create shortcuts (such as AnyCut I think can also do that)
2. Start LbsTestMode and goto the application settings and set it to MS Based and press back until you exit app.
3. Reboot phone and then use GPS Status under a clear sky until you get a lock.
The main thing to pay attention to is the numbers labeled Error(m) and Fix/Sat in the lower corners of the compass.
Error(m) is the accuracy of your location in meters which shows after you get a lock. Fix/Sat is the number of satellites locked and in view prospectively.
In GPS Status, you can do the following to force aGPS data to download:
3A. Click Menu --> Tools --> Manage A-GPS state --> Reset . This will clear all previous A-GPS data.
3B. Click Menu --> Tools --> Manage A-GPS state --> Download. This will download fresh A-GPS data.
3C. Let GPS Status lock. The first time will take longer as your gps/phone syncs the data.
After you get a lock, you can try powering down your phone and then restarting and see if your lock is faster from a cold start.
This may or may not help you. All I can say is that changing to MS Based helped my gps lock time--I usually have data access where I am.
I have done this, and it works perfect!
Cloudy and raining here today. I will definitely try it. Quick question though, you saying use either zip or use one before the other? I'm not really clear on this.
Also do You have to keep the short cut?
You need to apply the zip first (in CWM) or else you won't have the option to create the shortcut
Wich one, there's 2 zips? I've got it all installed and working. Even though its cloudy, I got instant lock on. I'll test it again tommarow when I go out of town. So far so good though.
Edit: indoors is about 10 sec lock on. Great find OP. Has anyone posted this over at hofo? Another question, will clearing data cache from apps hurt it any?
Sent from my MOTWX435KT using XDA App
Everything went great today. I left my phone off all night so it could get a solid cold start this morning. Its cloudy and rainy again today too. I hit the road this morning and fired the GPS up and it locked in about 15 seconds. Great job on this fix. Also since then it has been instant lock times when i try it.
Sent from my MOTWX435KT using XDA App
tcross8361 said:
Everything went great today. I left my phone off all night so it could get a solid cold start this morning. Its cloudy and rainy again today too. I hit the road this morning and fired the GPS up and it locked in about 15 seconds. Great job on this fix. Also since then it has been instant lock times when i try it.
Sent from my MOTWX435KT using XDA App
Click to expand...
Click to collapse
Which ZIP did you use? I used the lbstestmode_mt_gps_conf.zip
idbl_fanatic said:
Which ZIP did you use? I used the lbstestmode_mt_gps_conf.zip
Click to expand...
Click to collapse
Actually I installed them both...lol But that's the last one I used.
I did have a bit of a hiccup on my way home. After lunch I turned my phone off. When I got back on the road 3 hours later I turned it back on and started up Navigation. It took a minute or so on the first lock. I exited out of Navigation and waited 20 minutes or so. I started it up again and it took about 30 seconds. Every time after that it was instant lock. Still very impressed. It was very cloudy and rainy today though. I was getting 1.1 mb down and 500 kb up today also. I would post this over at HoFo for all the nay sayers, but I wouldn't be able to answer any technical questions if anyone had them.
This place is starting to remind me of Seatle, rain every day...lol. I guess Fall is here to stay.
You are wasting your time.
I have traced this code extensively. For those who are unaware the GPS works on RPCs, which are internally processed by the kernel and passed to the chipset.
The chipset on this phone does not know how to handle AGPS requests - XTRA requests to inject the time (NTP time) and the orbital data are flatly refused.
You can set whatever you want, the data will never get to the chip. The Froyo base load intentionally discards such attempts and never sends them. If you load Gingerbread (and build it from source, as I have) and FORCE it to be sent it will return an error every time.
The problem appears to be in the silicon and/or the radio driver itself, which there is no source for. If someone's going to fix this, it's going to be at the radio interface level - not in user space.
My CM7 port is capable of cramming the data in there but it's turned off right now as when I enable it there's a fairly decent chance that the consequence of trying to do so is that the radio locks up and forces a watchdog reset (that is, a reboot on the phone)
Good evening guys-
After updating from ICS to JellyBean, my gps cannot find or lock onto any satellites.
If I enable wifi, its accurate to 20meters.. If not, it won't lock even after 15 minutes.
Any help is greatly appreciated-
mine has been similar in PA2.00 and CM10.
It actually will lock after a long time. Sometimes up to 30 minutes.
Interested in any answers... I noticed in the gps.conf file agps appears to be off. I don't know if that is the issue.
Unfortunately searching for a fix just reveals too much information with a lot of supposed fixes, but no consensus so far as i can tell.
brian Marshall said:
mine has been similar in PA2.00 and CM10.
It actually will lock after a long time. Sometimes up to 30 minutes.
Interested in any answers... I noticed in the gps.conf file agps appears to be off. I don't know if that is the issue.
Unfortunately searching for a fix just reveals too much information with a lot of supposed fixes, but no consensus so far as i can tell.
Click to expand...
Click to collapse
Actually agps was turned off to improve lock times...some people noticed no difference with it off, others noticed huge improvements with half the lock time
You can change it to true, then wipe cache and dalvic cache in recovery and see if it makes a difference
Sent from my SGH-I997 using Tapatalk 2
mg2195 said:
Actually agps was turned off to improve lock times...some people noticed no difference with it off, others noticed huge improvements with half the lock time
You can change it to true, then wipe cache and dalvic cache in recovery and see if it makes a difference
Sent from my SGH-I997 using Tapatalk 2
Click to expand...
Click to collapse
is that a 'go ahead and try it, it wont work, but go ahead and try it anyway' ?
It seems like a lot of people are having problems with GPS in jellybean, and some aren't. There's so many 'this worked for me' solutions, but I'm starting to think it's coincidence.
Someone mentioned installing and running copilot once. Did that. it didn't work. Without root permissions what could it really change to improve anything?
I ran Faster Fix. It edited my gps.conf file (which it doesn't tell you that it does) It didn't help. it might have made it slightly worse.
I found a few other gps.conf files for jellybean ROMs, but haven't tried those yet.
This is how we learn and share our info, by trying. Just make a back up of anything that you want to change or replace.
GPS works perfect on my PA Jelly Beaned Infuse. First I ran GPS Test, it took a good twenty minutes if not more for it's first lock.
But now, I get a lock in a few seconds.
GPS Test, is free in the market.
Planning my escape!
GPS Test has kicked my GPS in the butt and got it working with almost every ROM I've flashed. Once you get over that first delay (downloading satellite data?) the first time you run it, it locks on fairly well afterward. At least, that's been my experience
Truckerglenn said:
This is how we learn and share our info, by trying. Just make a back up of anything that you want to change or replace.
GPS works perfect on my PA Jelly Beaned Infuse. First I ran GPS Test, it took a good twenty minutes if not more for it's first lock.
But now, I get a lock in a few seconds.
GPS Test, is free in the market.
Planning my escape!
Click to expand...
Click to collapse
I've already done that. It helped the next time I ran maps. When i left work yesterday I had maps give me turn by turn directions home. It took a couple minutes to lock, but after that it was working.
Then this morning I tried again. It wouldn't lock at all on the way in to work this morning. (only a 15 minute drive)
I also tried editing my GPS conf file this morning. I tried using ES file explorer, root explorer, and flashing. All three resulted in an empty file. ES says it was successful. Root explorer gives an error message 'there was not enough free disk space to complete the paste operation'
Flashing says it was successful, but again, it ends with an empty file. 0 bytes.
The file i used for the flash attempt is here. http://forum.xda-developers.com/showthread.php?t=1817558
With the gps.conf file I'm going to go leave the phone out in my car with gps on and see if it locks.
I understand that developers do a lot of work on this. I'm not trying to be a jerk. I just see a lot of people having the same issue and no agreement on a solution or even what the actual problem is.
brian Marshall said:
...
I understand that developers do a lot of work on this. I'm not trying to be a jerk. I just see a lot of people having the same issue and no agreement on a solution or even what the actual problem is.
Click to expand...
Click to collapse
I believe this is because there is no solution. If you want to try to help solve the problem, "adb shell" in and start tinkering.
You'll quickly find that GPS is anything but an easy thing to fix. A good SUPL provider for you may be completely different for others.
I can't find the Answer that fixed it for me,
but what I did:
Plug phone in, disable wifi, leave phone near window, and let
https://play.google.com/store/apps/...251bGwsMSwyLDYsImNvbS5hbmRyb2lkLmdwc3Rlc3QiXQ..
that app run... :45 minutes later it locked (GPS icon on Status Bar stopped blinking and showed locked, solid) with 7 satellites.
waited, rebooted the phone, and it locked in about 3 minutes.
-hope this helps.
other than that, love this ROM!
choffman said:
I believe this is because there is no solution. If you want to try to help solve the problem, "adb shell" in and start tinkering.
You'll quickly find that GPS is anything but an easy thing to fix. A good SUPL provider for you may be completely different for others.
Click to expand...
Click to collapse
Now that is an actual answer.
I suppose part of the problem for us noobs sorting through 300 page threads is all the filler with people saying "great rom omgz so awesome" even when they are posting on the first page and the ROM hasn't even been up long enough to do much more than flash it and swipe through the home screen.
All through out the CM10 and PA threads there are people saying GPS is working flawlessly... and then other people saying they have some fix. I guess people aren't supposed to post frivolous stuff in the dev threads, but they do.
Anyway, I ended up going back to GB as GPS is something I really need.
Hey guy's, i've also been having allot of issues with GPS just not being what it used to be, and it's pretty obvioius that this is an issue across the board for all JellyBean roms. I think those who mention that "GPS works flawlessly" don't quite understand the issue with AGPS (Assisted GPS), or they are not quite testing it thoroughly enough to see the problem.
To get an understanding of what AGPS is, and how it helps improve initial lock times, have a read here: http://en.wikipedia.org/wiki/Assisted_GPS
Also, to gain a better understanding of what I mean by "cold start" as you read below, and how it differs from a warm or hot start please read the following: http://m.gsmarena.com/glossary.php3?term=gps
That being said, i have been doing allot of digging in the hopes that someone out there has a solution to the problem with AGPS on the CM10 based ROMs on our phone.
To clarify the problem: AGPS does not seem to work and Initial lock times from a cold start can take several minutes, (this is not normal if AGPS is doing it's job). To clarify further, no one is saying that GPS does not work, it does in fact work, it just takes it's sweet time to lock and it seems to rely on pure GPS to download ephemeris data from the actual GPS birds for satelite lock acquisition, rather then downloading AGPS data over the network to speed things up. After the initial lock though, GPS functions as it should. After this point, if you do not use the phone again for several day's, it seems that upon first firing it up again you will experience the long delay in first lock. This is especially true if you keep GPS services turned off ussually to conserve battery. Those who report GPS is fine are probably keeping GPS services on all the time, and your GPS is probably working in the background at times and obviously will start up allot faster then it would from a cold start. (This is where i believe all the conflicting info comes from!)
The only info i have been able to find that did actually have an impact on my lock times was the thread below.
http://forum.xda-developers.com/showthread.php?t=1881655
I just started testing this out yesterday and i have seen some positive results. But i would caution those of you out there, and say that this is probably not a "fix" per se, but it did help cut down lock times in my case and at the very least it is a very inoformative thread that everyone should read.
What i have realisticly been able to achieve from a cold start is about 75 seconds to lock at the fastest. i.e. GPS services were off, i turned them all on, and now i started up GPS Status or GPS Test to get a lock. After that, as long as I haven't rebooted my phone it takes only a few seconds to lock.
How i tested, i started GPS Status, I then went to Tools --> MANAGE A-GPS STATE -> RESET (This is important to ensure you are clearing previously cached data. We want to make sure your previous cached info does not skew the effects of your changes.
I then replaced the gps.conf with the one contained in that thread, and i also made the change that was suggested in the Notes section that suggested modifying or adding a line in your build.prop file to "ro.ril.def.agps.mode = 1". This change set's your gps to use AGPS in Mobile Station Based (MSB) mode. For reference, setting it to "2" would set your AGPS to function to Mobile Station Assisted (MSA) mode. (Mode 1 - gave me more accurate initial locks at the expense of a bit longer lock times, Mode 2 gave me slightly quicker initial lock times, but was rather flaky and my position drifted quite a bit until GPS was running for quite some time.)
If your curious what is the difference between the two modes, see here: http://en.wikipedia.org/wiki/Assisted_GPS#Modes_of_operation
After making the changes to gps.conf and build.prop i rebooted my phone. When phone reboots, i then go back into GPS Status app, select settings, Tools --> MANAGE A-GPS STATE -> RESET, and then back to settings, Tools --> MANAGE A-GPS STATE -> DOWNLOAD (This should force the phone to attempt an AGPS download, if it hasn't already done so upon launching the app).
I have seen this same gps.conf being used in the newer RemICS-JB build. However based on the lack of feedback in that thread, i don't know if this is the golden fix we have all been looking for.
Even though this may not fix all your issues, i hope at the very least it helps clear up what the actual problem is, and how AGPS is supposed to work.
** Important Notes: **
- The version of the config that i was using was the Download the Google Specific No-SSL v3.1
- If you use the SSL version, then it will also require that you download the certifcate file. It's best to just stick with NO SSL as is explained in the thread.
- You should also note that i have cleaned out all the live wall papers, face unlock, and allot of other crap that i don't use to free up space in the /SYSTEM partition. I now have aproximately 21MB free in this partition. I think at least part of the problem with certain ROM's is that they have the /SYSTEM partition filled to the max with virtually no free space at all. I'm no expert on the subject, but i'm guessing that the AGPS data get's downloaded to this partition some where. Obviously if there is no space, then that would cause issues. Several others have reported shortened initial lock times after making room in the /SYSTEM partition.
- Another mistake people are making when testing AGPS and reporting false info, is having their WIFI on when testing GPS. To isolate the issue guy's you need have wifi off and you need to use a tool like GPS Status or GPS Test that shows that actual lock to satelites. You cannot properly test this and see the issue by using WIFI and turning on Google maps. Google maps will look at your reported wifi position and to you it looks like bamm.. i just got a lock in 2 seconds to withing 50 meters, wow these guy's are nut's, my GPS is awesome. Guess what.. your wifi and google maps is awesome.. not your GPS.. lol
- If anyone is familiar with running log's, it would be great if you could do a comparison of before and after. Showing the log of a completely fresh JB build, that shows that the AGPS data is not being downloaded, and then another log after all the changes above (including freeing up space in /SYSTEM) and hopefully it will show that AGPS data is now being downloaded and utilized. I myself am not familiar with logging data on the infuse, so i cannot and will not call this a fix until someone can actually show with real log's that AGPS data is now being utilized after these mods.
Thankfully, I'm one of the lucky ones who have always had a working GPS. It worked great when I was running AT&T stock Froyo, really good while I was on XDA GB roms, and fair > good after I went to PA JB. By far Scott's latest release of PA JB has been the best in this respect, but I can't help but tinker now that I've turned into a Droid zombie Strictly speaking the stock GPS configuration included on Scott's PA JB ROM worked charmingly, but I still had an issue whenever the phone went into deep sleep (say overnight without using it) the GPS lock the next morning took almost as much time coming from a sleep state as a cold boot. So, Like DaMeatMan I decided to give http://forum.xda-developers.com/showthread.php?t=1881655 a go. I chose the flashable option, and like DMM also edited the prop file. I picked the Google "no SSL" version 3.1 instead of the AT&T specific version. I figured I would give that one a try.
I'll keep everyone posted, buy my first impression (could be placebo effect) is that this configuration file and modification actually does improve over the original PA JB configuration by a small margin. Reported accuracy is better (by 10ft on average). Satellites in view and actually locking are 1-2 better than before. My main hope is that I can actually fire up Navigation in the morning and get working directions without having to fire up GPS Test first and relock all the NA satellites. I travel a lot, both for business and outdoor sports (hunting and fishing), and I have come to rely pretty heavily on GPS. I got spoiled when I got my first GPS capable phone because that meant I could leave my handheld GPS at home most of the time and that was one less thing I had to carry.
wevsspot said:
Thankfully, I'm one of the lucky ones who have always had a working GPS. It worked great when I was running AT&T stock Froyo, really good while I was on XDA GB roms, and fair > good after I went to PA JB. By far Scott's latest release of PA JB has been the best in this respect, but I can't help but tinker now that I've turned into a Droid zombie Strictly speaking the stock GPS configuration included on Scott's PA JB ROM worked charmingly, but I still had an issue whenever the phone went into deep sleep (say overnight without using it) the GPS lock the next morning took almost as much time coming from a sleep state as a cold boot. So, Like DaMeatMan I decided to give http://forum.xda-developers.com/showthread.php?t=1881655 a go. I chose the flashable option, and like DMM also edited the prop file. I picked the Google "no SSL" version 3.1 instead of the AT&T specific version. I figured I would give that one a try.
I'll keep everyone posted, buy my first impression (could be placebo effect) is that this configuration file and modification actually does improve over the original PA JB configuration by a small margin. Reported accuracy is better (by 10ft on average). Satellites in view and actually locking are 1-2 better than before. My main hope is that I can actually fire up Navigation in the morning and get working directions without having to fire up GPS Test first and relock all the NA satellites. I travel a lot, both for business and outdoor sports (hunting and fishing), and I have come to rely pretty heavily on GPS. I got spoiled when I got my first GPS capable phone because that meant I could leave my handheld GPS at home most of the time and that was one less thing I had to carry.
Click to expand...
Click to collapse
I have been have many of the same problems as others in this thread but I tried the fix in the S3 thread quoted above and it seems to have helped for right now. The first time I ran GPS Test after rebooting it did take a while (5-8min), but after that I get a lock in few seconds. I used the Google "no SSL" package also. I will do some more testing tomorrow and see if its reliable.
So I have been on AOSP for a good bit but somewhere along the way a few weeks ago my GPS started going from great to bad.
Normally it would find a lock in under 10seconds outside, and pretty quick inside too, about the same depending on the building and such.
Recently it has gotten really bad, taking a minute or more to find my location and even then the location is pretty bad.
On TouchWiz(CleanROM), my GPS is great and locks in about 5 seconds with about 2-4 less satilltes from the total on GPS Status app such as 19/22 Sat's. It also has a very low error range, like under 15ft.
On AOSP(CM, Liquid, Carbon), I am getting awful locks taking 1-3 minutes to lock. Even then it is only 5/17 sats, dunno how it even has a lock but the lock is horrible, showing 100+Ft of error.
This is all happening off of clean wipes, doing nothing but booting up and downloading GPS Status app.
I also tried doing the "Wipe GPS data" in the GPS app with no luck.
This is a common issue. TW comes with a qualcomm gps server stock that is very accurate, while many custom Roms come with a very general one (such as all of north america) or none at all. This sever provides the a-gps data to help the phone find the satelites. Download FasterFix from the play store, this allows you to specify your gps server as well as see what it is currently set to. If you're in the US, try selecting 'custom' and enter us.pool.ntp.org for good results. Stock TW uses gpsonextra.net which I have not tried on AOSP, but may still work well. Alternately, you could google some local ntp servers in your area (universities are good ones) for a hyper accurate fix, however this may or may not create issues traveling far from home. If you're feeling like tweaking, you can even modify your gps.conf file for multiple sources. Just be sure to make a backup first. YMMV
Sent from my SCH-I535 using xda premium
Hi,
came from CM12.1 (GPS not working at all in the end) to CM13. Unforunately, the GPS works after a few minutes of searching but will disconnect more often. I'm testing the signal with several apps. Back in GMaps the signal is lost again. Today it won't get a signal for about an hour. This all with a clear blue sky..
In the gps.conf are the (standard) american NTP-servers noted. As I'm in germany, i would change them to those (with the hope of better signals). Instructions were given a lot in the web.
But everytime i change the gps.conf by copying/direct editing and "using" the GPS (High Accurate or only Device) i get a freeze and an instant restart.
I tried also with a clean file with only one line (just NTP-server): i get a restart. Tried also to clear Dalvik afterwards.
Tested this with different CM13 versions: Official, Resurrection Remix, Tesla. All with stock kernel and without any mods.
Always wiped the Cache, Dalvik, Data.
Could you please help me?
Thx in advance.
That's because you most likely replaced the gps.conf file without reading what's inside of it. I faced the same problem on my Mi 4.
Go to YouTube. Search for "How to make your gps lock faster?". You should get a video on the official xdadevelopers channel. Go to that video's description. You'll get a link to various gps.conf files per country/continent. Download the one which corresponds to your region.
(Sorry, but I'm not able to post links here as of now.)
I suggest you do this on a PC.
1. Download the file that corresponds to your region.
2. Get the gps.conf file that you have in your phone: /system/etc/gps.conf and copy it onto your PC.
3. Open both files, the one that you downloaded and the one that was in your phone with a text editor(Notepad++ recommended).
4. For convenience, I'll call the gps.conf file that you downloaded as "1" and the one that you copied from your phone as "2".
5. Whatever lines are present in 1, add them to 2 WITHOUT REMOVING any of the existing lines in 2. If there is any line in 2 that begins with a "#" that isn't with a "#" in 1, remove that specific # from 2. If there is any line that's present in both 1 and 2 but has different values, edit the line in 2 to match the VALUES in 1.
6. Most important thing again, don't remove any line in 2 just because it is not there in 1.
After this, your GPS should lock a lot faster and should be more accurate.
Thank you very much for your reply!
First i have to say that i did the GPS hardware fix for the Mi 4 --> http://en.miui.com/thread-173141-1-1.html
Result: found much more satellites with standard config and quicker (but still interrupts).
I followed your instructions and had a look on every line in detail.
Seems that the main issue for the restart was the XTRA_SERVER.
The gpsonextra won't connect or connection timed out. Let it at izatcloud (recommended for Qualcomm ARM?).
Then i did a ping on every NTP_SERVER and ordered them by response time.
Tested this in the last 3 days. First fix on the day will take some time (1-2 Minutes) but the following are within seconds and do not interrupt.
Not perfect, but much better than no fix at all :good:
2. Get the gps.conf file that you have in your phone: /system/etc/gps.conf and copy it onto your PC.
I dont seem to have a system or etc folder in my Mi4?
Back to stock, get a gps lock and reflash custom
This is definitely not solved. With the stock gps.conf and with all the other modifications suggested by MI4 owners, there is no significant change in GPS performance. GPS works, but there's no AGPS support, and that's why it takes 1 or more minutes for satellites to appear, and at least 2 minutes for a lock.
A look at the logcat shows this:
Code:
GpsXtraDownloader E No XTRA Servers were specified in the GPS configuration
I tried with both gpsonextra.net and izatcloud.net servers. This has to be a software issue, and boo to Xiaomi for ignoring MI4 owners.
I had the same problem with miui (I'm in Spain). Now I have LineageOS and much better.
I recommend you to try FasterGPS (needs root), in Google Play. This edits the gps.config with the countri in wich you are. Basically, it's the same you do manually, but this way you can not do a mistake.
I left away google maps and use Waze instead, that uses same maps and do not lose signal as gMaps (I don't know why...)
Good luck.
i have the same problem before, turns out it was my aluminium casing that blocks the antenna signal. i tried everything from faster gps, etc none really works. so the solution was to flash the rom into global rom miui and avoid using any metal casing for ur phone. this totally works for me?. questions please pm me