29

Fix the horrible GPS

  1. G_Godfrey_H._vCHr Gingerbread Jul 26, 2017

    G_Godfrey_H._vCHr, Jul 26, 2017 :
    Turns out this didn't work. I'm still having issues. Pulled the gps.conf file back to verify it wrote correctly (it was), even tried the "long version" by @seether84. How's your gps going @KibbelKing?
     

    rkantos and KibbelKing like this.
  2. KibbelKing Donut Jul 26, 2017


    G_Godfrey_H._vCHr likes this.
  3. KibbelKing Donut Jul 28, 2017

    KibbelKing, Jul 28, 2017 :
    no problems so far

    what i have done
    1. upgrade from 3.x to 4.1.6
    2. supersu root
    3. changed the necessary parts of the gps.conf
    4. checked gps.conf with rootbrowser
    5. agps reset "only one time after upgrade"

    i hope this could help you
     

    G_Godfrey_H._vCHr likes this.
  4. G_Godfrey_H._vCHr Gingerbread Aug 4, 2017

    G_Godfrey_H._vCHr, Aug 4, 2017 :
    Ok, so I rooted and relooked my gps.conf. Updated to the following based on @seether84 's post and it now seems to work flawlessly. I did make a few changes, which are commented, but what I suspect (not tested) made the real difference for me was the NTP server - I found a list of the servers around the world and changed mine to my local one.
    Code:
    #Uncommenting these urls would only enable
    #the power up auto injection and force injection(test case).
    #XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
    #XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
    #XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.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
    
    #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
    
    #Test
    #NTP_SERVER=time.gpsonextra.net
    #Asia
    # NTP_SERVER=asia.pool.ntp.org
    #Europe
    #NTP_SERVER=europe.pool.ntp.org
    #North America
    NTP_SERVER=tt.pool.ntp.org
    #changed from North-America.pool.ntp.org
    ###choose your region,uncomment it (delete the #) and set it on the false region uncommented
    
    # 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 = 2
    
    # Intermediate position report, 1=enable, 0=disable
    INTERMEDIATE_POS=1
    #changed from 0 to 1
    
    # 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
    #changed from 1 to 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=0x31
    #changed from 37 to 31
    
    # Accuracy threshold for intermediate positions
    # less accurate positions are ignored, 0 for passing all positions
    # ACCURACY_THRES=5000
    
    ################################
    ##### AGPS server settings #####
    ################################
    
    # FOR SUPL SUPPORT, set the following
    # SUPL_HOST=supl.host.com or IP
    # SUPL_PORT=1234
    
    SUPL_HOST=supl.google.com
    SUPL_PORT=7275
    ###encrypted port didnt work for me, changed to 7275 from 7276
    
    # FOR C2K PDE SUPPORT, set the
    # C2K_HOST=c2k.pde.com or IP
    # C2K_PORT=1234
    
    # 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 = 1
    ###changed from 2 to 1
    
    
    ################################
    # 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
    
     

    KibbelKing likes this.
  5. KibbelKing Donut Aug 4, 2017

    KibbelKing, Aug 4, 2017 :
    Great news @G_Godfrey_H._vCHr
    I used the europe NTP and it worked for me.
    But i makes sense to me.
    If the time does not match, you will be out of sync an lose connection.

    have a nice weekend :)
     

    G_Godfrey_H._vCHr likes this.
  6. RubAnADUB Froyo Aug 8, 2017

    RubAnADUB, Aug 8, 2017 :
    So I too am having issues with GPS, when I drive google maps shows me driving down the road sideways. or still at home. I found this article here -> http://itechify.com/2016/08/04/how-to-fix-gps-oneplus-3-guide/ which is funny my 2nd OnePlus phone and different issues but same thing. I basically SETTLED. ugg. First it was the OnePlus 1 with piss yellow at the bottom of my screen. And now its my OnePlus 3 with faulty piss poor gps.
     

  7. KibbelKing Donut Aug 8, 2017

    KibbelKing, Aug 8, 2017 :
    Greetings @RubAnADUB,

    at the moment the best solution is a upgrade to OxygenOS 4.x with Android 7 and changing the gps.conf.
    This solution was tested by me and G_Godfrey_H._vCHr.

    i hope this works for you too.
    good luck
     

    G_Godfrey_H._vCHr likes this.
  8. jay_snake Donut Aug 9, 2017

    jay_snake, Aug 9, 2017 :
    Since I'm from Europe as well. can you upload your gps.conf for me?
     

  9. KibbelKing Donut Aug 9, 2017

    KibbelKing, Aug 9, 2017 :
    gps.conf for Europe

    Code:
    #Uncommenting these urls would only enable
    #the power up auto injection and force injection(test case).
    #XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
    #XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
    #XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.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=1
    
    # Error Estimate
    # _SET = 1
    # _CLEAR = 0
    ERR_ESTIMATE=0
    
    #NTP server
    # NTP_SERVER=time.izatcloud.net
    #Asia
    # NTP_SERVER=asia.pool.ntp.org
    #Europe
    NTP_SERVER=europe.pool.ntp.org
    #North America
    # NTP_SERVER=north-america.pool.ntp.org
    
    #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 = 2
    
    # 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=1
    
    #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=5000
    
    ################################
    ##### AGPS server settings #####
    ################################
    
    # FOR SUPL SUPPORT, set the following
    # SUPL_HOST=supl.host.com or IP
    # SUPL_PORT=1234
    
    SUPL_HOST=supl.google.com
    SUPL_PORT=7276
    
    # FOR C2K PDE SUPPORT, set the following
    # C2K_HOST=c2k.pde.com or IP
    # C2K_PORT=1234
    
    # 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 = 1
    
    ################################
    # 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
    
     

  10. ZiqKimi Froyo Sep 16, 2017

    ZiqKimi, Sep 16, 2017 :
    It's been long time since I realised my gps did has the same issue. Only working with Edge. But I had come across the solution (at least for me) by the same method these guys (above me) did. By changing the gps.conf file.

    Well, I found this website which is very helpful (thank you) (https://www.google.com/amp/www.tech...er-gps-locking-on-your-rooted-android-device/)

    Download your country gps.conf and continue the steps given. The LTE now work perfectly at least for me. Good luck

    Edited: I should mentioned that I am using the latest beta and rooted
     

    G_Godfrey_H._vCHr likes this.
  11. RealZac Eclair Sep 17, 2017

    RealZac, Sep 17, 2017 :
    A few weeks ago I switched location mode to "device only".
    It's not a solution but for now I can live with that. Maybe one or the other app wants me to change the mode back to "high accuracy" but I don't care.
     

  12. Endruuu Gingerbread Sep 19, 2017

    Endruuu, Sep 19, 2017 :
    I had the issue after one of the last updates, then was able to fix ist and yesterday after changing some settings it occurred again. So what helped in my case was:
    a) to clear the system cache (reboot->camera-down+power button -> clear cache)
    b) you must have Wifi>Settings>'Scanning always available' enabled. Turning off this option led to horrible GPS (jumping around, beeing off 200 meters, etc.) for me
     

  13. DJTooL Cupcake Nov 11, 2017

    DJTooL, Nov 11, 2017 :
    This guide does not work for me.
     

  14. DJTooL Cupcake Nov 11, 2017

    DJTooL, Nov 11, 2017 :
    @ oneplus software developer!

    Are you not able to fix this horrible bug?
    This is really sad.
    I like the company and their smartphones, but the software should be more efficient and without such horrible issues.
     

  15. RealZac Eclair Nov 11, 2017

    RealZac, Nov 11, 2017 :
    I'm on OxygenOS Open Beta 26 for two weeks now. Since I installed OOS OB 26, the GPS problems are gone.
     

  16. Q1510390797683 Donut Nov 11, 2017


  17. they-horned-outface Cupcake Nov 14, 2017

    they-horned-outface, Nov 14, 2017 :
    I had this all the time on my 3t (Android 7.1.1). Setting the Preferred network type to "2G only" during the journey seems to prevent the dropouts for me.
     

  18. f.jusdado Froyo Nov 29, 2017

    f.jusdado, Nov 29, 2017 :
    I am in Oxygen OS 5.0 and still happens the same, is dropping GPS connection, and no way to fix it up to now except being root, which I don't want for the moment.
     

    rkantos likes this.
  19. rkantos Cupcake Feb 1, 2018

    rkantos, Feb 1, 2018 :
    I'm also experiencing the same problem.. At first it worked, but after a while it doesn't. I'm pretty confident that restoring to factory settings would solve the issue. However the problem will appear again, so...
     

  20. KibbelKing Donut Aug 18, 2018

    KibbelKing, Aug 18, 2018 :
    A short feedback.
    I switched to the Mi8, so I can't run any future tests.
    But before the change I updated and tested to the latest stable OxygenOS.
    With the changed NTP_SERVER in gps.conf, the connection was almost instantaneous.
    No problems with 4G LTE.
    To change gps.conf, you don't necessarily need to root.
    It is enough to unlock the bootloader and boot by fastboot in twrp. "do not flash."
    Afterwards you can switch to the file manager via Advanced and copy the file to the internal memory. "sdcard"
    "/system/vendor/etc/gps.conf" or "/vendor/etc/"
    There you can edit them via Windows and copy them back into the system with the same steps.
    XDA-Developers is the best source for help with twrp and flashing.

    good luck @all

    edit:
    Additionally you could change the supl_host to google. "SUPL_HOST=supl.google.com"
    This is only for downloading agps-data and should have no effect.