MI 8 - GPS Fix for MIUI EU 10.0.5.0

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
I was having trouble getting GPS to work properly and consistently in EU MIUI 10.0.5.0. Tried several things but finally ended up modifying gps.conf in /vendor/etc/gps.conf and voila, it connects with 4 meter accuracy inside my home. Before, it will struggle a lot and will not get any locks.

Download the attached gps.conf.txt to your phone and rename it: /sdcard/gps.conf

Mount /vendor partition to rw in a shell (su to get root). Following code will backup the original gps.conf to sdcard as gps.conf.orig, make the changes, and reboot the phone.

Code:
adb shell 
su
mount -o rw,remount /vendor
cp /vendor/etc/gps.conf /sdcard/gps.conf.orig
cp /sdcard/gps.conf /vendor/etc
chmod 644 /vendor/etc/gps.conf
mount -o ro,remount /vendor
reboot
Make sure the permissions are as follows (644): -rw-r--r--

PS: I rebooted couple of times to see whether it connects and it does within 10 seconds!

I updated the servers in gps.conf to point to USA as most of them were pointing to Europe as it's a Europe based ROM ;)

EDIT: This should work in Global ROMs too.

Dual GPS bands (L1 and L5) really work as I compared it with Samsung S7 Edge and iPhone 7 from the same location - MI 8 connects with far better accuracy than the Sammy and Apple!

EDIT #2: I found an easier way to deploy the change.

Get Solid Explorer from Play Store (one of the best File Explorer app) and copy the gps.conf file from your sdcard and paste it in /etc folder (/etc is a symlink to /vendor/etc). It will prompt you to overwrite it, confirm to replace the file and the file gets copied and the mount/permissions are setup automatically by Solid Explorer.

Reboot and check the changes!

I tried it today as I flashed EU 10.0.6.0 and copied it using Solid Explorer and it worked!

EDIT: Created a TWRP flashable zip (GPS_US.zip) as the EU Pie version (8.10.12) is a little finicky with Solid Explorer! Enjoy!
 

Attachments

Last edited:

jxl69

Senior Member
Jun 16, 2007
122
10
0
Would it be possible to share fixed gps.conf for EU? Or is the only thing changed to US servers? Also what kind of problems did you experience? I've a problem when sometimes GPS stops working and I can only reboot my Mi8 via hard reboot. Soft reboot doesn't reboot the device.
 

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
Would it be possible to share fixed gps.conf for EU? Or is the only thing changed to US servers? Also what kind of problems did you experience? I've a problem when sometimes GPS stops working and I can only reboot my Mi8 via hard reboot. Soft reboot doesn't reboot the device.
Please see the attached file for Europe and rename it to gps.conf.

GPS never stopped for me before as I use GPS only when needed. GPS was taking long time to get any locks and the accuracy was around 16m or 24m and once I started to research, found out that the gps.conf is messed up for us. Now, it connects every time and within few seconds and accuracy is much better (4m or 6m inside my house) than my other devices.
 

Attachments

  • Like
Reactions: jxl69

jxl69

Senior Member
Jun 16, 2007
122
10
0
When GPS is working for me I get 4m accuracy more or less instantly with about 30ish satellites. But after a while GPS stops working completely, and something even "bricks" the phone so I can't restart. GPS will not work until forced restart :(
 

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
When GPS is working for me I get 4m accuracy more or less instantly with about 30ish satellites. But after a while GPS stops working completely, and something even "bricks" the phone so I can't restart. GPS will not work until forced restart :(
Did you clean install 10.0.5 with format /data partition? If not, I will try that.

I haven't experienced that reboot issue with this EU ROM and have been playing/configuring it for the past week or so. But, I don't keep the location turned ON all the time. Only when needed, I turn it on as I don't want all the crazy apps to track my every move ;)
 

motherninja

Senior Member
May 13, 2011
620
185
0
Paris Van Djava
Nice finding! As I also have the same exact issue like yours. However, since I live in Indonesia, do you have any suggestion for Asia Pacific based optimization?

Currently, I'm with Global Stable 10.0.2.0 for around 5 days and GPS just works flawlessly. But if I can fix the GPS issue within EU ROM I would like to go back to it as it feels more optimized than the official releases.
 

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
Nice finding! As I also have the same exact issue like yours. However, since I live in Indonesia, do you have any suggestion for Asia Pacific based optimization?

Currently, I'm with Global Stable 10.0.2.0 for around 5 days and GPS just works flawlessly. But if I can fix the GPS issue within EU ROM I would like to go back to it as it feels more optimized than the official releases.
Try the attached for Indonesia...
 

Attachments

  • Like
Reactions: harryntq

Paolo7297

Member
Sep 26, 2018
14
2
0
I was having trouble getting GPS to work properly and consistently in EU MIUI 10.0.5.0. Tried several things but finally ended up modifying gps.conf in /vendor/etc/gps.conf and voila, it connects with 4 meter accuracy inside my home. Before, it will struggle a lot and will not get any locks.

Download the attached gps.conf.txt to your phone and rename it: /sdcard/gps.conf

Mount /vendor partition to rw in a shell (su to get root). Following code will backup the original gps.conf to sdcard as gps.conf.orig, make the changes, and reboot the phone.

Code:
adb shell 
su
mount -o rw,remount /vendor
cp /vendor/etc/gps.conf /sdcard/gps.conf.orig
cp /sdcard/gps.conf /vendor/etc
chmod 644 /vendor/etc/gps.conf
mount -o ro,remount /vendor
reboot
Make sure the permissions are as follows (644): -rw-r--r--

PS: I rebooted couple of times to see whether it connects and it does within 10 seconds!

I updated the servers in gps.conf to point to USA as most of them were pointing to Europe as it's a Europe based ROM ;)

EDIT: This should work in Global ROMs too.

Dual GPS bands (L1 and L5) really work as I compared it with Samsung S7 Edge and iPhone 7 from the same location - MI 8 connects with far better accuracy than the Sammy and Apple!
Is it possible to make a magisk module for this?
 
  • Like
Reactions: mattheusnetto

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
Is it possible to make a magisk module for this?
I found an easier way to deploy the change.

Get the Solid Explorer app (one of the best File Explorer app) and copy the gps.conf file from your sdcard and paste it in /etc folder (/etc is a symlink to /vendor/etc). It will prompt you to overwrite it, confirm to replace the file and the file gets copied and the mount/permissions are setup automatically by Solid Explorer.

Reboot and check the changes!

I tried it today as I flashed EU 10.0.6.0 and copied it using Solid Explorer and it worked!
 
Last edited:
  • Like
Reactions: motherninja

motherninja

Senior Member
May 13, 2011
620
185
0
Paris Van Djava
I found an easier way to deploy the change.

Get the Solid Explorer app (one of the best File Explorer app) and copy the gps.conf file from your sdcard and paste it in /etc folder (/etc is a symlink to /vendor/etc). It will prompt you to overwrite it, confirm to replace the file and the file gets copied and the mount/permissions are setup automatically by Solid Explorer.

Reboot and check the changes!

I tried it today as I flashed EU 10.0.6.0 and copied it using Solid Explorer and it worked!
Thank you very much for the pro-tips! I plan to flash the latest EU Stable ROM tonight after work.

However, I wonder if I managed to replace the default EU ROM gps.conf file with your configuration, will it be still work if I travel to nearby neighborhood countries such as Singapore or Malaysia? Because, sometimes I need to go to those countries for some work related task and for sure I need my GPS to works there.
 

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
Thank you very much for the pro-tips! I plan to flash the latest EU Stable ROM tonight after work.

However, I wonder if I managed to replace the default EU ROM gps.conf file with your configuration, will it be still work if I travel to nearby neighborhood countries such as Singapore or Malaysia? Because, sometimes I need to go to those countries for some work related task and for sure I need my GPS to works there.
Since you backed up the original, all you have to do is copy/paste using Solid Explorer and reboot - you get the default config. So, with reboot, you will spend about a minute to make the change ;)

Reboot is very quick in the *stable* EU ROM (10.0.6.0) - takes about 15 seconds or so.
 

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
Look at the attached screenshots taken inside my home. Impressive. 33/34 satellites in use with 13 ft/20 ft accuracy.

I had GPS turned off and turned it back on and within 15 seconds, those were the readings. If I walk outside, the locks happen even quicker!
 

Attachments

motherninja

Senior Member
May 13, 2011
620
185
0
Paris Van Djava
Look at the attached screenshots taken inside my home. Impressive. 33/34 satellites in use with 13 ft/20 ft accuracy.

I had GPS turned off and turned it back on and within 15 seconds, those were the readings. If I walk outside, the locks happen even quicker!
Good to know it! Finally, we know the culprit from EU ROM GPS issue! :D

However, I still wondering how long it will gonna hold? Since with default configuration, the GPS is working fine for the first few hours or days and then be completely dead after that. So, if your GPS is working consistently for the next few days, I'm sure that we can held the default EU GPS.conf file are responsible for all of this GPS issue. :good:
 

RainGater

Senior Member
Aug 5, 2013
1,106
678
0
Good to know it! Finally, we know the culprit from EU ROM GPS issue! :D

However, I still wondering how long it will gonna hold? Since with default configuration, the GPS is working fine for the first few hours or days and then be completely dead after that. So, if your GPS is working consistently for the next few days, I'm sure that we can held the default EU GPS.conf file are responsible for all of this GPS issue. :good:
But, I don't keep the GPS ON all the time. Only turn it on when needed.

I may not even turn it on for several days as I don't want all the crazy apps tracking my every move ;)

Since last week, after my updates, whenever I turn it on, it works consistently!
 

b4mb1_

Senior Member
Aug 14, 2014
350
48
0
112.210.147.32
twitter.com
Hi, I'm using MI8 MIUI 10.6 but my gps is inaccurate it gives me different locations and sometimes doesn't detect my location at all.

Can someone please upload the fix (gps_conf) for South East Asia, specifically in the Philippines. Thank you!

Sent from my MI 8 using Tapatalk
 

ordor2k

Member
Sep 4, 2018
10
4
0
Hi, I'm using MI8 MIUI 10.6 but my gps is inaccurate it gives me different locations and sometimes doesn't detect my location at all.

Can someone please upload the fix (gps_conf) for South East Asia, specifically in the Philippines. Thank you!

Sent from my MI 8 using Tapatalk
You can use this site to change the servers address:
http://support.ntp.org/bin/view/Servers/NTPPoolServers
 
  • Like
Reactions: b4mb1_