Thanks but I’ll bounce that thanks right over to @nekron!
I can confirm that, as few reported, since few weeks ago GPS on XA2 4.4.0.68 works fine without the patcher. Still there is a big gap between SFOS and Android in matter of fix time, but it’s really workable now. Getting fix outdoors is easy and under a minute or so. Hot fix is like few seconds
Still @nekron your patch got me through the worst, so I really admire your work
Could you maybe propose this change at the source in Sony’s config, so it is fixed for everyone by default? https://github.com/sonyxperiadev/device-sony-common/blob/master/rootdir/vendor/etc/gps.conf
I wouldn’t call it a fix, rather a workaround. The whole point of SFOS is to not rely on google so having it at the core of gps system is not a good idea imo.
Especially now when some people (Me too) reporting gps working fine without the patch I prefer not to have google in any way.
In general, it’s better to have the phone working out of the box. Even if the user comes across this thread, it’s a mission and a half to find out what to do. EvenI found it intimidating (and got it wrong first time).
In addition to this patch, Storeman needs to be recommended as soon as the user opens the Jolla Store.
I’m finding GPS working pretty well these days with the patcher. Positioning is all over the place walking around these narrow pedestrian paths surrounded by 4+ story buildings in Annecy, but getting the initial lock keeps it on track. Can take 25s the first time every day, but usually 10s or less. Only the one crash in the GPS subsystem so far since a few versions back.
Of course it’s better. But jolla would never show itself relying on google. The point of this OS is security and privacy and none of these comes with google. Also the patch isn’t “complete” as it relys only on cellular data. This cannot be part of an os especially if other phones are working correctly and right now XA2 works fine without the patch.
I get it that for some people it can be hard to apply this patch but our os is not for some people. It is for people willing to go extra mile to make something different. It’s not your regular os like android, the point is different here. So if you want to have gps working with google, go with it, yourself.
No, it cannot be and never will be. This again conflicts deeply with jolla sense of security. Aps from open repos can be damanging to the os and a security thread. Apps that are recommended and checked are in jolla store. This is a place for developers that, yet again, willing to go extra mile to maintain their app to be fully compliant with jolla
The OS is neither secure nor reasonably hardened for privacy* and Jolla don’t even bother to market it. Any corporate sales will be customised like AuroraOS.
The binaries are for us weird end-users and as such should be targeted at us. Ideally, the setup would give you a choice and I think that’s a good goal.
The description for Storeman can be “Enable apps not approved by Jolla”.
Anyway, this is off-topic and I’m ending my input here.
I disagree.
If indeed Sailfish is just for people willing to go the extra mile then Jolla is doomed as a viable business.
Is Sailfish an OS where people can go the extra mile, most certainly, but Sailfish needs to aspire to be a viable choice of OS for the average user. In the meantime the way I see it, Sailfish users are willing helpers along the road of development towards an OS that can be used by the general public along side the likes of Android and iOS.
Sorry, I misunderstood.
Ok, I agree with that, there should be a choice properly flaged like you said
Not quite sure, Adroid support can keep it alive especially with paid licence
It would be nice but there is a big step forward that jolla may no be able to jump over. If you want the Avreage user OS you need to have native support for any social media and good performance with a lots of ram as avreage users (Like 90%) doesnt care about how os works, they wanna scroll facebook
So Yes Sailfish needs to be targeted at us, wierd end-users, I don’t really see how our os hits the market, people won’t switch from android unless our sailfish will become another android which will never happen Im afraid
But I’ll be glad to see that
And ya’all know what? Recently I’ve been phaseing out from sailfish, but until this was done I got back and still use it as daily. Why? Cause living with android is too easy
There is no long term future catering for so few people.
Sailfish doesn’t need to become another Android to succeed. It can be successful as Linux OS in its own right as an OS that doesn’t track what the user is up to.
just for the info, my xa2 with vanha rauma can find the gps fix in a matter of seconds, it even got a lock inside the house
no mozilla location services downloaded, just the usual gps mode (the one without the a-gps)
oh and pure maps works like a charm…
You are very lucky.
Is your XA2 new or in exceptionally good condition?
Does this happen all the time, also after a long time without gps use?
my xa2 is 3 years old, bought a licence when my old jolla asked me to have mercy for him after 4 long years, but i flashed my device for the first time with sailfish last week, so we can say my device is more than 3 years old, but in exceptionally good conditions
now it’s almost a week i flashed sailfish on my device (with the sony 16b image (not the 17b one) and i’ve used (just for testing purposes) pure maps 4 times; All times it didn’t have any problems at all and the gps lock was done in really a matter of seconds, i also got a gps lock inside the house (althought near a window)
as for my settings, no mozilla services downloaded from store, internet is disabled (at the time of doing my tests), no a-gps or high accuracy enabled, just the classic and usual gps enabled, and for the moment it works really well
First, thanks for suplpatcher! Since it gave me good results on my 10iii, i finally started to use it again, but i can’t get AGPS to work again.
I just tried to get A-GPS working on my 10iii since my ipv4 adress problems are now solved with CLAT.
I set up gps.conf as usually
SUPL_VER=0x20000
SUPL_HOST=supl.google.com
SUPL_PORT=7276
switched to a nearby NTP server and ran suplpatcher
suplpatch --aosp 11 --disable --supl=2
and i think AGPS is not working. I did some testing and time for a fix is between 20-60seconds.
Then i started go-tcp-proxy on my phone
go-tcp-proxy_1.0.2_linux_arm64 -l localhost:7276 -r supl.google.com:7276 -h -vv
to check if there is a connection and traffic to googles supl server. Changed supl server in gps.conf to 127.0.0.1:7276 and there’s no connection and no traffic.
Did i set up everything correctly?
Hello miau,
when testing and analyzing the SUPL support for our beloved Sony devices I run sometimes, too into issues that the SoC modem did not connect to the non-TLS SUPL service.
In most cases two things worked for me:
- restarting the device (this will clear modem-internal cache) or
- killing the Android gpsd daemon as
devel-su
root user
[defaultuser@Xperia10II-DualSIM ~]$ ps -ef | grep gps
2904 gps {gnss@2.0-servic} /vendor/bin/hw/android.hardware.gnss@2.0-service-qti
The SUPL version string and possibly other settings from gps.conf
file are parsed by the Sony gnss
process. However its unclear to me what other settings are parsed and would require reverse engineering of the binary vendor file.
Your idea to use the go-proxy
tool as a local service for sniffing the communication will sadly not work on the device. The SoC modem runs some kind of parallel operating system in a restricted part of the CPU, i.e. non-secure userland state and secure modem OS state. Both zones can be linked by applets so Linux kernel driver from the non-secure state can call applet functions in secure state that utilizes the modem hardware or modem OS functions. Now when the modems gnss service tries to connect to 127.0.0.1:7276 that socket is not present in secure state but only in none secure state where you launched the proxy. You can compare this to some virtual machine where qemu as hypervisor is running the virtual machine and does its own networking stuff.
So finally here is my working gps.conf
for Xperia Mark II:
[defaultuser@Xperia10II-DualSIM ~]$ cat /system/vendor/etc/gps.conf
# XTRA_SERVER_QUERY (1=on, 0=off)
# If XTRA_SERVER_QUERY is on, the XTRA_SERVERs listed
# below will be ignored, and instead the servers will
# be queried from the modem.
XTRA_SERVER_QUERY=0
# XTRA_SERVERs below are used only if XTRA_SERVER_QUERY
# is off.
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
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
# NTP Server
# NTP_SERVER=time.gpsonextra.net
# Asia
# NTP_SERVER=asia.pool.ntp.org
# Europe
NTP_SERVER=europe.pool.ntp.org
# North America
# NTP_SERVER=north-america.pool.ntp.org
#NTP_SERVER = time.google.com
# If NTP_SERVER is commented NTP_SERVER=time.izatcloud.net is used
# 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 = 1
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# 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 #####
################################
# 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
# FOR SUPL SUPPORT, set the following
SUPL_HOST=supl.google.com
SUPL_PORT=7276
SUPL_VER=0x20000
################################
# 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 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
# SUPL_MODE
# SUPL_ES
# C2K_HOST
# C2K_PORT
# LPP_PROFILE
# A_GLONASS_POS_PROTOCOL_SELECT
# USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL
# GPS_LOCK
# 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
#####################################
#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
I tested enabling XTRA servers today with my XA2 (h4113).
I got GNSS fix faster that usual about 60s or less.
Here is my gps.conf
# XTRA_SERVER_QUERY (1=on, 0=off)
# If XTRA_SERVER_QUERY is on, the XTRA_SERVERs listed
# below will be ignored, and instead the servers will
# be queried from the modem.
XTRA_SERVER_QUERY=1
# XTRA_SERVERs below are used only if XTRA_SERVER_QUERY
# is off.
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
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
# NTP Server
# NTP_SERVER=time.gpsonextra.net
# Asia
# NTP_SERVER=asia.pool.ntp.org
# Europe
# NTP_SERVER=europe.pool.ntp.org
# North America
# NTP_SERVER=north-america.pool.ntp.org
# NTP_SERVER = time.google.com
NTP_SERVER=europe.pool.ntp.org
# If NTP_SERVER is commented NTP_SERVER=time.izatcloud.net is used
# 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
# 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 #####
################################
# 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
# FOR SUPL SUPPORT, set the following
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
################################
# 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 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
# SUPL_MODE
# SUPL_ES
# C2K_HOST
# C2K_PORT
# LPP_PROFILE
# A_GLONASS_POS_PROTOCOL_SELECT
# USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL
# GPS_LOCK
# 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
#####################################
#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
Thank you for clarification. Does A-GPS need the cell location to work? So, if i install MLS offline packages, like the ones from the Jolla store, and i don’t get the rough 9000m fix, will A-GPS still work?
Hi @miau ,
sorry for the delay… well, I think it should be independent of MLS location data(*). That data makes a lot of sense if you’re not going to allow A-GPS support or as a fallback. That is, a rough position will be detected by using the cell tower IDs and injected into the gnss modem subsystem to support position calculation (e.g. the modem can figure out which satellites will be visible at your approx. position and listens for the specific data pattern. This speeds up the first time fix.). On the other hand it’s always helpful to estimate your approx. position to support the modem in case of A-GPS failure so I would highly recommend to install the MLS database.
(*) Your modem knows your current cell ID and queries SUPL service with that information to gather ephemeris data that will be injected into gnss. This together with XTRA almanac data speeds up the FTF as your GPS RX must not download the ephemeris and almanac data from the sky. Without online services this would take a long time if started from the green field. In case of XA2 with faulty hardware and eventually broken downloads from the satellites you possibly end up in a retry-loop and getting no fix at all.