Name: x10ii-iii-agps-config-emea

Display name: A-GPS configuration for Europe (EMEA)

Author: robang74

Updated at: Aug. 8, 2023, 12:24 p.m.

Discussion

Donate

Sources

Description: This patch is specifically released for Sony Xperia 10 II & III and European users (EMEA).

ATTENTION: the Patch Manager is not the right tool for this kind of patch because the modem/GPS and ofono will read the config before it has been patched. Follow the manual installation procedure, instead.

== STEPS TO INSTALL ==

In the following these definitions are set:

patch_vers=0.2.2
patch_file="/tmp/unified_diff.patch"
patch_opts="-Efp1 -r /dev/null --no-backup-if-mismatch -d/"
patch_link="https://tinyurl.com/23rotyqs"

0. install this patch but do not apply it, just to receive updates notifications
1. download the patch: curl -L $patch_link | tar xz -C /tmp
2. install gpstoggle package: pkcon install -y gpstoggle (optional)
3. check the patch --dry-run $patch_opts -i $patch_file
4. manually install the patch: patch $patch_opts -i $patch_file
5. save the patch: mv -f $patch_file /etc/agps-config-${patch_vers}.patch
6. ofono restart: systemctl daemon-reload; nohup systemctl restart ofono >/dev/null 2>&1 &

After the installation (a reboot is suggested), the A-GPS will be able to work indoors also and with the 4G mobile connection, thanks to SUPL v2. Moreover, it adopts the HTTPS encrypted protocol to download the XTRA data for configuring the LTE/GPS modem in a secure way. It query the Qualcomm world wide network of SUPL hosts. Thus, the GPS subsystem at SFOS level will be completely independent from Google services.

WARNING: filesystem overlay tricks too old versions of filesystem utils like cp and tar but possibly also prevents that modem/GPS can be correctly configured. Check this bug report https://t.ly/omO0 for more information.

== UNINSTALL & RESCUE ==

How to deal with the installed patch in all others cases, please check

-> https://tinyurl.com/249c72w8

The instructions have been provided for another patch but are similar.

== XTRA AND SSL/TLS ===

The XTRA v3 comes with the full support for receiving all constellations: GPS+GLONASS+BeiDou+Galileo. For synchronizing the modem clock, it uses some European NTP servers. Moreover the modem/GPS injects the exact time/data into the system clock to keep it in sync and stable about drifting.

The CA certificates can be updated with the command line devel-su update-ca-trust executed by root. However, for supl.izatcloud.net are not necessary because the Qualcomm modem is supposed to have its own CA certificates for Qualcomm SUPL hosts services. The TLS is available on both ports and it is mandatory:

~$ openssl s_client -connect supl.izatcloud.net:7275 -state
SSL_connect:SSLv3/TLS write client hello

~$ openssl s_client -connect supl.izatcloud.net:7275 -no_tls1_3 -no_tls1_2 -no_tls1_1 -no_tls1 -state
SSL3 alert write:fatal:protocol version
SSL_connect:error in error

Repeat the tests with port 7276, also.

== PERFORMANCES ==

The cold start, immediately after a smartphone reboot, in standard conditions with a 4G data connection with no any VPN active nor other running services that can influence the network stack, it takes near 30s to reach 30m horizontal accuracy in an indoor fix, less than 15s for the cell area identification (9km range in my case). The first 15s are related to CAcerts injection and almanac update from 4G connection. With an active WiFi tethering connection and a free UDP VPN IPv4-only tunneling, it takes more: near 1m for fixing the point under 100m of h-accuracy, 2m for 15m h-accuracy using 6 satellites of 41 in view.

To halve the cold start time - since patch v.0.1.6 - these CAcerts are included in the patch:

- CyberTrust Root CA used by Google SUPL service (https://pki.goog/roots.pem)
- ISRGRootX1 used by Let's Encrypt service (https://letsencrypt.org/certs/isrgrootx1.pem)

In this way the size of the certificates fell down from 1026Kb (system) to 76Kb (patch).

== SCREENSHOTS ==

Both taken indoors, the first with GPSinfo (native app) and the other with GPStest (android app).

Rating: 2

Total activations: 130

x10ii-iii-agps-config-emea-gps.png
galileo-constellation-x10ii-1k.png

Files: