[OnePlus 3 Guides, News, & Discussion] Asiier:
/*
* Your warranty is... still valid?
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this Kernel
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
*/

Hello guys!

On this guide, I'll guide you on how to fix the GPS of your OP3/T. Technically this should work on any device as some of the techniques used are just universal for all devices, but some of the stuff shown is only applicable to the OP3/T and therefore the guide will be focused on this 2 devices.

Both the OP3/T are known for not having the greatest GPS on the market, although, that doesn't mean it shouldn't work. It's still more than capable (If working fine) to be used on Google Maps, Waze and some Fit apps like Strava, RunKepper etc

First of all, let's narrow down the problem. A normal working GPS should be able to get a full 3D Fix in about 30 seconds outside on a clear sky. If you are testing this inside your house or office the times may variate.

This is a what a properly working GPS Looks like.

And this is a what a not working GPS Looks like.

I recommend GPS Test for all the test we're going to do.

It will give you pretty much all the information you need to know.

GPS Test

​

[*]If your GPS takes a while to get a Fix/Or it's quite inaccurate then I recommend trying Method 1 & 2

[*]If your GPS can see the GPS Satellites but won't connect to any of them I recommend trying Method 3

[*]If you are having problems with GPS just while using 4G/LTE, I recommend Method 2 or Click HERE

[*]If your phone is not detecting your GPS Sensor I recommend Method 3 & 4

[*]Although I'd suggest trying all the Method until you can get your GPS properly working

Method 1: (Non-Root Method)

Let's get the obvious things over.

Make sure that Location Services are enable

Turn OFF and ON location

Switch from all 3 different modes. Devices Only, Battery Saving and High Accuracy

Reboot the Phone

Make sure Location History is enabled. Not sure why and how, but this seems to help with getting faster and better location.

Most likely this won't fix it, but it was worth to try.

Now let's try other methods.

Download the following app.

GPS Status

Open the app and go to the Sensor Diagnostic.

Press the GPS sensor and do Reset and then Download GPS Assistance.

Calibrate as well your Magnetic Field Sensor.

Test GPS.

Method 2: (Root Method)

I recommend performing a full backup before attending any of the following steps.

Once again let's get the obvious thing over.

Wipe both Cache and Dalvik

Try changing ROMs or Update your current ROM

Try updating or reflashing the lastest or your current Firmware/Modem

Try changing Kernel

Doing this we eliminate most of the possible problem related to your apps or configuration that you're currently using.

You might turn off or blocked some Alarm/Service/Wakelock that left you completely with GPS or Location service at all.

Now we are going to tweak our gps.conf file!

This should fix Slow Fixing or Not Accurate GPS.

I found this 2014 XDA Article about Faster GPS.

Open the link found on the Article or just click HERE

Search for your country/region and download the zip file there

Transfer it over your devices

Now we have a couple options to do.

You can replace your whole gps.conf for the one that you've downloaded or modify your current one.

On both case:

Open your fav File Explorer

Go to /system/etc/

Search for the gps.conf and back it up to a safe location

From here you can unzip the file you did download previously and copy and paste on /system/etc/ make sure that it's set to perms 644 or rw-rw-r--

There are a couple apps on the Google Place that does this as well.

The best ones in my option:

Faster GPS | TopNTP

What I like to do is take the default gps.conf and modify it with the additional setting found in both the apps and the zip file from above.

I like to this file and apps just substitute the whole gps.conf file and there is some additional information found in the default gps.conf that's not found on the replaced files. These settings are particular to the device, so it'd be interesting to keep it. Anyways, this what you have to do:

Do a backup of your current gps.conf

We are going to search for the new active NTP service for your region.

Go to http://www.pool.ntp.org/en/

Lock for "Active Servers". Click your region

For example, If you click Europe it will show: 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 at the list down below. Example: Spain — 2.es.pool.ntp.org; 1.europe.pool.ntp.org; 2.europe.pool.ntp.org

Write down all this information somewhere, take as well the NTP information from the zip files you've downloaded previously.

We should have something like this.

NTP_SERVER=hora.roa.es

NTP_SERVER=hora.oxixares.com

NTP_SERVER=europe.pool.ntp.org

NTP_SERVER=0.europe.pool.ntp.org

NTP_SERVER=1.europe.pool.ntp.org

NTP_SERVER=2.europe.pool.ntp.org

NTP_SERVER=3.europe.pool.ntp.org

NTP_SERVER=es.pool.ntp.org

NTP_SERVER=0.es.pool.ntp.org

NTP_SERVER=2.es.pool.ntp.org

Now we are going to modify our gps.conf file

Open it and add or uncomment (remove "#" before the line) the following lines of code.

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

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=5000 //This can be reduced If you are not quite getting all servers (Even by 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

####################################
# LTE Positioning Profile Settings
####################################
# 0: Enable RRLP on LTE(Default)
# 1: Enable LPP_User_Plane on LTE
# 2: Enable LPP_Control_Plane
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
LPP_PROFILE = 3 //There's controversy where this setting should be set to 0,1,2 or 3, I personally get best result with 3 but 1 should
work as well.

Make sure the file was the right perms 644 or rw-rw-r---

Reboot your phone

This is how my gps.conf looks like. Use it as a comparison, but I don't recommend just copying and pasting into your own file unless you live in Spain.

#Uncommenting these urls would only enable
#the power up auto injection and force injection(test case).
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

#ifdef VENDOR_EDIT
# zuoyonghua@oneplus.cn add gps xtra server for speed up gps cold start
XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra3grc.bin
XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra3grc.bin
XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra3grc.bin
#endif

#ifdef VENDOR_EDIT
# songhao@oneplus.cn,XTRA download config for debug
XTRA_TEST_ENABLED = 1
XTRA_THROTTLE_ENABLED = 0
#endif

#Version check for XTRA
#DISABLE = 0
#AUTO = 1
#XTRA2 = 2
#XTRA3 = 3
XTRA_VERSION_CHECK=0

# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0

#NTP server
NTP_SERVER=hora.roa.es
NTP_SERVER=hora.oxixares.com
NTP_SERVER=europe.pool.ntp.org
NTP_SERVER=0.europe.pool.ntp.org
NTP_SERVER=1.europe.pool.ntp.org
NTP_SERVER=2.europe.pool.ntp.org
NTP_SERVER=3.europe.pool.ntp.org
NTP_SERVER=es.pool.ntp.org
NTP_SERVER=0.es.pool.ntp.org
NTP_SERVER=2.es.pool.ntp.org
#NTP_SERVER=time.izatcloud.net

#XTRA CA path
XTRA_CA_PATH=/system/etc/security/cacerts

# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
# If DEBUG_LEVEL is commented, Android's logging levels will be used
DEBUG_LEVEL = 0

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

# Below bit mask configures how GPS functionalities
# should be locked when user turns off GPS on Settings
# Set bit 0x1 if MO GPS functionalities are to be locked
# Set bit 0x2 if NI GPS functionalities are to be locked
# default - non is locked for backward compatibility
#GPS_LOCK = 0

# supl version 1.0
SUPL_VER=0x10000

# Emergency SUPL, 1=enable, 0=disable
SUPL_ES=0

#Choose PDN for Emergency SUPL
#1 - Use emergency PDN
#0 - Use regular SUPL PDN for Emergency SUPL
USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0

#SUPL_MODE is a bit mask set in config.xml per carrier by default.
#If it is uncommented here, this value will overwrite the value from
#config.xml.
#MSA=0X2
#MSB=0X1
#SUPL_MODE=

# GPS Capabilities bit mask
# SCHEDULING = 0x01
# MSB = 0x02
# MSA = 0x04
# ON_DEMAND_TIME = 0x10
# GEOFENCE = 0x20
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
CAPABILITIES=0x37

# 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

# Bitmask of slots that are available
# for write/install to, where 1s indicate writable,
# and the default value is 0 where no slots
# are writable. For example, AGPS_CERT_WRITABLE_MASK
# of b1000001010 makes 3 slots available
# and the remaining 7 slots unwritable.
#AGPS_CERT_WRITABLE_MASK=0

####################################
# LTE Positioning Profile Settings
####################################
# 0: Enable RRLP on LTE(Default)
# 1: Enable LPP_User_Plane on LTE
# 2: Enable LPP_Control_Plane
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
LPP_PROFILE = 3

################################
# EXTRA SETTINGS
################################
# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=0
# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
SGLTE_TARGET=0

##################################################
# Select Positioning Protocol on A-GLONASS system
##################################################
# 0x1: RRC CPlane
# 0x2: RRLP UPlane
# 0x4: LLP Uplane
#ifndef zuoyonghua@oneplus.cn enable all bit mask for GLONASS
#A_GLONASS_POS_PROTOCOL_SELECT = 0
#else
A_GLONASS_POS_PROTOCOL_SELECT = 15
#endif

##################################################
# Select technology for LPPe Control Plane
##################################################
# 0x1: DBH for LPPe CP
# 0x2: WLAN AP Measurements for LPPe CP
LPPE_CP_TECHNOLOGY = 0

##################################################
# Select technology for LPPe User Plane
##################################################
# 0x1: DBH for LPPe UP
# 0x2: WLAN AP Measurements for LPPe UP
LPPE_UP_TECHNOLOGY = 0

##################################################
# AGPS_CONFIG_INJECT
##################################################
# enable/disable injection of AGPS configurations:
# SUPL_VER
# SUPL_HOST
# SUPL_PORT
# C2K_HOST
# C2K_PORT
# LPP_PROFILE
# A_GLONASS_POS_PROTOCOL_SELECT
# 0: disable
# 1: enable
AGPS_CONFIG_INJECT = 1
# AP Coarse Timestamp Uncertainty
##################################################
# default : 10
# or as per clock uncertainty of product
AP_TIMESTAMP_UNCERTAINTY = 10

#####################################
# GNSS PPS settings
#####################################
#AP DR engine availability status
# 0 : NO AP DR (default)
# 1 : AP DR enabled
#EXTERNAL_DR_ENABLED = 0

#####################################
#DR_SYNC Pulse Availability
#####################################
# 0 : DR_SYNC pulse not available (default)
# 1 : DR_SYNC pulse available
DR_SYNC_ENABLED = 0

#####################################
#PPS Device name
#####################################
PPS_DEVICENAME = /dev/pps0

#####################################
#AP Clock Accuracy
#####################################
AP_CLOCK_PPM = 100

#####################################
#MAX ms difference to detect missing pulse
#####################################
MISSING_PULSE_TIME_DELTA = 900

#####################################
#Propagation time uncertainty
#####################################
PROPAGATION_TIME_UNCERTAINTY = 1

Alright, after this I'd recommend Downloading again AGPS Data (Assistance GPS), you can use GPS Status again or any other app that does this.

They are called AGPS Injectors, you can use them for getting it faster GPS fix by the AGPS from time to time, but If your GPS is not working this most likely won't do anything.

Method 3: (Using Un-Brick Tool)

If nothing of the above have worked for you, don't worry there is still hope.

This is the method that actually Fixed my GPS which was not getting a fix. It would find the Satellites (See them) but could connect to them.

As I said, we are going to use the MEGA Unbrick Tool. Credits to [MENTION=5641921]Naman Bhalla[/MENTION]

Backup everything and transfer it to your PC!!!

Go to the following link

Download the Method 2 and follow the instructions there

But wait, now there is no need to backup everything as Method 2 does no longer erase your Internal Storage.

Yes and No, it's true that now deleting a line will make it so it doesn't delete your Internal Storage, but we DON'T want this.

I have found that If we don't delete the internal it won't fix anything. If you want to try you can do it without the Data wipe, but If that doesn't work you have lost a lot of time...

Once you have performed the FULL Method 2

Boot to System (OOS 3.1.2)

There try downloading the apps mentioned before and test whether your GPS is working or not

If it's working you can install TWRP and start getting everything restored

I recommend doing a CLEAN install of the ROM and then install all your apps, just in case something was wrong with your previous System partition

Method 4: (Hardware Issue)

If anything has worked so far a possible case is that it's a Hardware and not software issue.

That means as well, that when open GPS Test or any GPS app the GPS Sensor WILL NOT BE FOUND.

If it does not the case and the GPS is Found but it cannot get a FIX (But sees the different GPS Satellites) or straight doesn't see any GPS Satellites.

*DISCLAIMER* Opening your phone avoids you Warranty, so If your phone is under warranty I'd recommend sending it back to One Plus

What can be done?

Well... If your phone is still under warranty I'd recommend opening an RMA Ticket and sending your phone for repair.

If your phone is not under warranty, and your GPS Sensor is not found at all, most likely your GPS is just broken, you can attempt the following method, but instead of putting tin foil you should reconnect the pins or buy a new replacement and installing it.

If your phone still sees GPS Satellites you can do the following guide.

This guide was designed for the S4 but it will work on the OP3/T (and any other phones)

http://www.instructables.com/id/Galaxy-S4-GPS-repair/

Here is a video from JerryRigEverything on the disablement of the OP3/T

https://www.youtube.com/watch?v=Hh_XgrcQ9oo

With all this, you should be able to Fix your GPS no matter what had happened to it.