[Android Q&A, Help & Troubleshooting] bashendriks2:
Since I had trouble getting updates from several apps in android version 5.x I switched to 7.x

I'm now using https://xdaforums.com/s7-edge/development/rom-crdroid-t3591336 (crdroid 3.8)

This is a relatively stable rom which reboots sometimes but work fine for me...except for the gps.

And as I understand from many posts I read .... other people have issues with gps fixes on Glonass and Beidou as well.

This rom has an issue with getting Glonass and Beidou fix on n9005 android 7.1. So I looked into this issue a bit:

The N9005 contains the wtr1605l chip which should support Glonass and Beidou (https://www.anandtech.com/show/6541/the-state-of-qualcomms-modems-wtr1605-and-mdm9x25/2 and page 11 on https://www.slideshare.net/jjwu6266/qualcomm-snapdragon-800-mobile-device

Wtr1605l chip is part of a izat. This is location service software of qualcomm. see https://www.qualcomm.com/products/izat and

https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_systems-on-chip#Snapdragon_800_and_801)

For android 7 there was (as for android 6) no rom from samsung. More on this and why see https://www.androidauthority.com/android-7-0-snapdragon-800-801-712930/ and https://www.xda-developers.com/in-d...why-msm8974-devices-are-excluded-from-nougat/

As Qualcomm did not provide a Board Support Package (BSP) there are no Qualcomm drivers available?

I tried several settings in gps.conf but none of them gave any fix in non navstar-gps like satelites.

e.g. https://android.googlesource.com/platform/hardware/qcom/gps/+/android-6.0.1_r20/msm8974/etc/gps.conf for more about these settings

So I read some articles on the architecture of gps in android

https://xdaforums.com/showthread.php?t=2063295

And what all these settings like LPP, SUPL, etc do:

http://gpsworld.com/wirelessexpert-advice-positioning-protocol-next-gen-cell-phones-11125/

I do get a quick gps fix on gps/navstar but when it's cloudy, rainy or snowing I do have issues getting enough satelites to fix and then the navigation (waze but other apps as well) have problems staying on track.

My gps.conf (I live in the Netherlands) looks like:

###################################################################################################

XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin

XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin

XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin

#SUPL_HOST=supl.google.com

#SUPL_PORT=7276

#SUPL_ES=1

#USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=1

# Error Estimate

# _SET = 1

# _CLEAR = 0

ERR_ESTIMATE=1

#Test

#NTP_SERVER=time.gpsonextra.net

#Asia

# NTP_SERVER=asia.pool.ntp.org

#Europe

NTP_SERVER=nl.pool.ntp.org

#North America

# NTP_SERVER=north-america.pool.ntp.org

# 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 = 4

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

INTERMEDIATE_POS=1

# supl version 1.0

SUPL_VER=0x10000

# GPS Capabilities bit mask

# SCHEDULING = 0x01

# MSB = 0x02

# MSA = 0x04

# ON_DEMAND_TIME = 0x10

# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING

CAPABILITIES=0x37

# Accuracy threshold for intermediate positions

# less accurate positions are ignored, 0 for passing all positions

ACCURACY_THRES=3000

################################

##### AGPS server settings #####

################################

# FOR SUPL SUPPORT, set the following

# SUPL_HOST=supl.host.com or IP

# SUPL_PORT=1234

# FOR C2K PDE SUPPORT, set the following

# C2K_HOST=c2k.pde.com or IP

# C2K_PORT=1234

####################################

# 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 = 0

################################

# EXTRA SETTINGS

################################

# NMEA provider (1=Modem Processor, 0=Application Processor)

NMEA_PROVIDER=1

##################################################

# Select Positioning Protocol on A-GLONASS system

##################################################

# 0x1: RRC CPlane

# 0x2: RRLP UPlane

# 0x4: LLP Uplane

A_GLONASS_POS_PROTOCOL_SELECT = 0

###################################################################################################

#note: I disabled SUPL since some posts suggested that this might slow down the fix.

# I found that using http://xtrax.gpsonextra.net/xtrax.bin (1,2,3) worked very well for a quick fix

# but using :

# XTRA_SERVER_1=http://gllto.glpals.com/7day/glo/v2/latest/lto2.dat

# XTRA_SERVER_2=http://gllto.glpals.com/4day/glo/v2/latest/lto2.dat

# XTRA_SERVER_3=http://gllto.glpals.com/2day/glo/v2/latest/lto2.dat

# which I found on a S7 (which has a very fast fix for GPS+Glonass) resulted in very slow 2 gps fix

# its unclear for me why this is.

###################################################################################################

I analysed the CAPABILITIES and I found to be:

#define GPS_CAPABILITY_SCHEDULING 0x0000001

/** GPS supports MS-Based AGPS mode */

#define GPS_CAPABILITY_MSB 0x0000002

/** GPS supports MS-Assisted AGPS mode */

#define GPS_CAPABILITY_MSA 0x0000004

/** GPS supports single-shot fixes */

#define GPS_CAPABILITY_SINGLE_SHOT 0x0000008

/** GPS supports on demand time injection */

#define GPS_CAPABILITY_ON_DEMAND_TIME 0x0000010

/** GPS supports Geofencing */

#define GPS_CAPABILITY_GEOFENCING 0x0000020

/** GPS supports Measurements */

#define GPS_CAPABILITY_MEASUREMENTS 0x0000040

/** GPS supports Navigation Messages */

#define GPS_CAPABILITY_NAV_MESSAGES 0x0000080

but setting it to 255 (of 0xff) did not work... no errors in alogcat...unclear why.

Still not sure what secgps.conf does, but see in alogcat that it searches for this file

https://xdaforums.com/showthread.php?t=1320626

I can not find any data in data\gps which should be there when downloading agps data (works fine, but there was no gps folder in data)

I tried some alternatives but none of them gave a solution e.g.:

https://git.pollonamid.de/pollonami...mmit/1f63b3f2bc08ec4f61bdf4e93b7c9e545fdcfaf3

this was a battery drain app/service which does not exist on the rom I installed.

Looked into if it might be a hardware issue as well.

https://xdaforums.com/showthread.php?t=1318892

but its not a Hardware issue, as with gps it works fine. Same chip and glonass gives with gnss api using tools not fix but receives enough to show this. Th Glonass signal strength is the same of more as for Navstar. But there is no fix.

Now I read some articles which explained that inside the GPS driver a line should be altered which would cause the info from e.g. Glonass and Beidou satelites to get into the apps. And even better get a Glonass FIX.

https://www.android-hilfe.de/forum/android-7-x-nougat.2811/glonass-gps-probleme.795008.html

https://stackoverflow.com/questions/17554320/glonass-satellites-are-supported-or-not

http://www.phonesdevelopers.info/1793890/

http://www.phonesdevelopers.info/1724161/

https://www.slideshare.net/PingChinHuang/the-gps-architecture-on-android-55316191 (older)

There is a new Gnss api in Android 7. Which supports different location services. Non-gps/Navstar satelites like Glonass and Beidou should work with this new api. more on this e.g. https://jira.lineageos.org/plugins/servlet/mobile#issue/BUGBASH-383

After some reading this is probably?

https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/gps.h

/** Maximum number of SVs for gps_sv_status_callback(). */

#define GPS_MAX_SVS 32

/** Maximum number of Measurements in gps_measurement_callback(). */

#define GPS_MAX_MEASUREMENT 32

In https://github.com/aosp-mirror/platform_hardware_libhardware/blob/master/include/hardware/gps.h I see:

#define GNSS_MAX_SVS GNSS_MAX_SVS_COUNT

#define GNSS_MAX_MEASUREMENT GNSS_MAX_SVS_COUNT

which is defined in

https://github.com/aosp-mirror/plat...ware/blob/master/include/hardware/gnss-base.h

GNSS_MAX_SVS_COUNT = 64u, // 64

So combined with the BSP of Qualcomm not being there and the possibility that either Samsung or Qualcomm altered it so it supports Glonass and Beidou satelites I expect that despite the many articles I read on changing the gps.conf file (and sometimes the secgps.conf file), the gps driver (and maybe some related files also) need to be altered to support more than just GPS/Navstar satelites Fixes.

I'm not a developer so changing and recompiling a AOSP rom, even if I get it to work, will take me much to much work. And i'm still unsure if its indeed a driver (and what more?) issue.

So now a question :

Which stable custom Rom does get a fix on Glonass and Beidou satelites next to GPS?

And uses at least android version 6.x?

thx.