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.
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!
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
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
-
138.3 KB Views: 2,351
-
3.1 KB Views: 2,694
-
3.1 KB Views: 2,155
-
783.7 KB Views: 1,607
Last edited: