Skip to content

Instantly share code, notes, and snippets.

@Couto
Last active April 17, 2022 16:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Couto/4eedfa4b3d2ff58985389f316b1ece83 to your computer and use it in GitHub Desktop.
Save Couto/4eedfa4b3d2ff58985389f316b1ece83 to your computer and use it in GitHub Desktop.
Fix GPS settings in One Plus One with LineageOS

Connect to the phone via adb

adb shell

Request root access (has to be enabled in Developer settings).
Re-mount the /system with write permissions.
Edit the relevant configurations.

su
mount -o rw,remount /system
vim /etc/gps.conf

We need to replace the almanac files to a more secure protocol while updating the NTP servers Comment the current ones, and add these below

XTRA_SERVER_1=https://xtrapath1.izatcloud.net/xtra3grc.bin
XTRA_SERVER_2=https://xtrapath2.izatcloud.net/xtra3grc.bin
XTRA_SERVER_3=https://xtrapath3.izatcloud.net/xtra3grc.bin

Also, comment the US NTP servers and uncomment the closest one to your localition.

When you're ready, remount the /system with read-only permissions

mount -o ro,remount /system

Restart your phone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment