diff --git a/README.md b/README.md index 58cd506..05a59e3 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,10 @@ This is a small command line tool to fix your long lasting A-GPS issues with off Use it at our own risk. ``` -[root@Sailfish nemo]# ./suplpatch --help +[root@Xperia10II-DualSIM defaultuser]# ./suplpatch --help Usage of ./suplpatch: + -aosp int + AOSP base version (6, 7, 8, 9, 10 or 11) -disable disable SUPL TLS transport in modem -enable @@ -24,6 +26,8 @@ Usage of ./suplpatch: print modem information -remove remove Google and Let's Encrypt root certs from modem + -supl int + set SUPL default version in modem (1 or 2, note: 2 is mandatory for 4G) -upload upload Google and Let's Encrypt root certs to modem -version @@ -73,34 +77,36 @@ However after this all SUPL requests will be send unencrypted over the internet You can trigger TLS deactivation using the `--disable` flag. ``` -[root@Sailfish nemo]# ./suplpatch --disable +[root@Xperia10II-DualSIM defaultuser]# ./suplpatch --disable --aosp 10 ______ _____ __ ___ __ __ / __/ / / / _ \/ / / _ \___ _/ /_____/ / ___ ____ _\ \/ /_/ / ___/ /__ / ___/ _ `/ __/ __/ _ \/ -_) __/ /___/\____/_/ /____/ /_/ \_,_/\__/\__/_//_/\__/_/ -SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.1.6 (git: 6f1c86c, build: 20.01.2022 15:55) +SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.2.0 (git: d41f150, build: 02.07.2022 13:59) -2022/01/20 16:01:38 ------------------------------------------------------------------------------------------ -2022/01/20 16:01:38 SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.1.6 (git: 6f1c86c, build: 20.01.2022 15:55) -2022/01/20 16:01:38 Command line './suplpatch' launched with the following flags ... -2022/01/20 16:01:38 --disable=true -2022/01/20 16:01:38 --enable=false -2022/01/20 16:01:38 --info=false -2022/01/20 16:01:38 --remove=false -2022/01/20 16:01:38 --upload=false -2022/01/20 16:01:38 --version=false -2022/01/20 16:01:38 Executable launched as user 'root@Sailfish'. -2022/01/20 16:01:38 Secure SUPL mode successfully deactivated. -2022/01/20 16:01:38 Bye. +2022/07/02 14:02:06 ------------------------------------------------------------------------------------------ +2022/07/02 14:02:06 SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.2.0 (git: d41f150, build: 02.07.2022 13:59) +2022/07/02 14:02:06 Command line './suplpatch' launched with the following flags ... +2022/07/02 14:02:06 --aosp=10 +2022/07/02 14:02:06 --disable=true +2022/07/02 14:02:06 --enable=false +2022/07/02 14:02:06 --info=false +2022/07/02 14:02:06 --remove=false +2022/07/02 14:02:06 --supl=0 +2022/07/02 14:02:06 --upload=false +2022/07/02 14:02:06 --version=false +2022/07/02 14:02:06 Executable launched as user 'root@Xperia10II-DualSIM'. +2022/07/02 14:02:06 Secure SUPL mode successfully deactivated. +2022/07/02 14:02:06 Bye. ``` This setting can be reverted using the `--enable` flag to turn on SUPL TLS again. Note: For a working TLS protected SUPL request you need updated root certificates in your modem (see option 2). Now that you disabled SUPL TLS transport you must change your `gps.conf` file. -It can be located at `/etc/gps.conf` (Xperia X, ...) or `/system/vendor/etc/gps.conf` (Xperia 10 II). +It can be located at `/etc/gps.conf` (Xperia X, ...), `/system/vendor/etc/gps.conf` (Xperia 10 II) or `/vendor/etc/gps.conf` (Xperia 10 III). ``` # FOR SUPL SUPPORT, set the following @@ -122,35 +128,39 @@ into your `/etc/hosts` file to make things a tick faster. #### Option 2: Upload additional ROOT certificates #### Well, if only Google should know your SUPL request data you should use SUPL TLS transport which is the default modem setting without patching. -However to get this working you need a valid root certificate injected into modem via QMI but missing libhybris bindings and libgeoclue parser support for gps.conf file will not allow this at the moment so you have to upload the required certificates to modem manually. +However to get this working you need a valid root certificate injected into modem via QMI but missing libhybris bindings and libgeoclue parser support for `gps.conf` file will not allow this at the moment so you have to upload the required certificates to modem manually. This is triggered via the `--upload` flag. ``` -[root@Sailfish nemo]# ./suplpatch --upload +[root@Xperia10II-DualSIM defaultuser]# ./suplpatch --upload --aosp 10 ______ _____ __ ___ __ __ / __/ / / / _ \/ / / _ \___ _/ /_____/ / ___ ____ _\ \/ /_/ / ___/ /__ / ___/ _ `/ __/ __/ _ \/ -_) __/ /___/\____/_/ /____/ /_/ \_,_/\__/\__/_//_/\__/_/ -SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.1.6 (git: 6f1c86c, build: 20.01.2022 15:55) +SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.2.0 (git: d41f150, build: 02.07.2022 13:59) -2022/01/20 16:02:25 ------------------------------------------------------------------------------------------ -2022/01/20 16:02:25 SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.1.6 (git: 6f1c86c, build: 20.01.2022 15:55) -2022/01/20 16:02:25 Command line './suplpatch' launched with the following flags ... -2022/01/20 16:02:25 --disable=false -2022/01/20 16:02:25 --enable=false -2022/01/20 16:02:25 --info=false -2022/01/20 16:02:25 --remove=false -2022/01/20 16:02:25 --upload=true -2022/01/20 16:02:25 --version=false -2022/01/20 16:02:25 Executable launched as user 'root@Sailfish'. -2022/01/20 16:02:25 CyberTrust root certificate for Google SUPL uploaded to modem successfully. -2022/01/20 16:02:25 ISRGRootX1 root certificate for Let's Encrypt based SUPLs uploaded to modem successfully. -2022/01/20 16:02:25 Bye. +2022/07/02 14:03:44 ------------------------------------------------------------------------------------------ +2022/07/02 14:03:44 SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.2.0 (git: d41f150, build: 02.07.2022 13:59) +2022/07/02 14:03:44 Command line './suplpatch' launched with the following flags ... +2022/07/02 14:03:44 --aosp=10 +2022/07/02 14:03:44 --disable=false +2022/07/02 14:03:44 --enable=false +2022/07/02 14:03:44 --info=false +2022/07/02 14:03:44 --remove=false +2022/07/02 14:03:44 --supl=0 +2022/07/02 14:03:44 --upload=true +2022/07/02 14:03:44 --version=false +2022/07/02 14:03:44 Executable launched as user 'root@Xperia10II-DualSIM'. +2022/07/02 14:03:44 CyberTrust root certificate for Google SUPL uploaded to modem successfully. +2022/07/02 14:03:44 CyberTrust subscription 1 root certificate for Google SUPL uploaded to modem successfully. +2022/07/02 14:03:44 ISRGRootX1 root certificate for Let's Encrypt based SUPLs uploaded to modem successfully. +2022/07/02 14:03:44 ISRGRootX1 subscription 1 root certificate for Let's Encrypt based SUPLs uploaded to modem successfully. +2022/07/02 14:03:44 Bye. ``` -Two new root certificates will be uploaded to your modem (SuplRootCert will **not** be replaced or modified). +Four new root certificates will be uploaded to your modem (SuplRootCert will **not** be replaced or modified) supporting SIM1 and SIM2 subscriptions. You can revert this (remove the certificates from modem) using the `--remove` flag. @@ -161,7 +171,7 @@ The uploaded certificates are: This gives you the option to host your own TLS encrypted SUPL proxy using a Let's Encrypt signed certificate or otherwise use the Google SUPL TLS service directly. Now that you enabled SUPL TLS transport you must change your `gps.conf` file. -It can be located at `/etc/gps.conf` (Xperia X, ...) or `/system/vendor/etc/gps.conf` (Xperia 10 II). +It can be located at `/etc/gps.conf` (Xperia X, ...), `/system/vendor/etc/gps.conf` (Xperia 10 II) or `/vendor/etc/gps.conf` (Xperia 10 III). ``` # FOR SUPL SUPPORT, set the following @@ -180,10 +190,41 @@ Since SailfishOS might still try to connect to legacy MLS you should also add ``` into your `/etc/hosts` file to make things a tick faster. -#### It's not working for me #### -I've tested `suplpatch` with Xperia X and get an A-GPS fix in less than 10 seconds even if the device wasn't using GPS for many days and ephemeris data was expired. +#### A Word On 4G SUPL Support #### +If your device is connected to a 4G network (LTE) **SUPLv2** is mandatory to query the SUPL host and make things working. Sadly SailfishOS currently has no configuration options for this and hybris bindings to override the modems default setting when GNSS services are started. -Deactivation of SUPL TLS was verified by proxying requests from a public server to supl.google.com and examing the requests. No TLS hello package or other handshake overhead was send so TLS deactivation works as expected. +A solution for this is to change the modems default SUPL version from v1 to v2 using the `--supl` flag. + +``` +[root@Xperia10II-DualSIM defaultuser]# ./suplpatch --supl 2 --aosp 10 + + ______ _____ __ ___ __ __ + / __/ / / / _ \/ / / _ \___ _/ /_____/ / ___ ____ + _\ \/ /_/ / ___/ /__ / ___/ _ `/ __/ __/ _ \/ -_) __/ +/___/\____/_/ /____/ /_/ \_,_/\__/\__/_//_/\__/_/ + +SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.2.0 (git: d41f150, build: 02.07.2022 13:59) + +2022/07/02 14:07:31 ------------------------------------------------------------------------------------------ +2022/07/02 14:07:31 SailfishOS Xperia X devices A-GPS SUPL Patcher v0.0.2.0 (git: d41f150, build: 02.07.2022 13:59) +2022/07/02 14:07:31 Command line './suplpatch' launched with the following flags ... +2022/07/02 14:07:31 --aosp=10 +2022/07/02 14:07:31 --disable=false +2022/07/02 14:07:31 --enable=false +2022/07/02 14:07:31 --info=false +2022/07/02 14:07:31 --remove=false +2022/07/02 14:07:31 --supl=2 +2022/07/02 14:07:31 --upload=false +2022/07/02 14:07:31 --version=false +2022/07/02 14:07:31 Executable launched as user 'root@Xperia10II-DualSIM'. +2022/07/02 14:07:31 Modem default SUPL version changed from v1 to v2 successfully. +2022/07/02 14:07:31 Bye. +``` + +#### It's not working for me #### +I've tested `suplpatch` with Xperia X, X10 Mark 2 and X10 Mark 3 and get an A-GPS fix in less than 10 seconds even if the device wasn't using GPS for many days and ephemeris data was expired. + +Deactivation of SUPL TLS was verified by proxying requests from a public server to `supl.google.com` and examing the requests. No TLS hello package or other handshake overhead was send so TLS deactivation works as expected. #### Pro-Tip #### If you don't worry about your privacy you should simply disable SUPL TLS as TLS handshake uses more traffic than plain SUPL request/response itself. @@ -193,10 +234,23 @@ _Is this an official tool released by Jolla?_ - **NO** it's a community members attempt to help fixing your A-GPS problems _What does `ERR: Unable to open '/dev/diag' device (ioctl DIAG_IOCTL_SWITCH_LOGGING fails (12)).` mean?_ -- Your modem driver has some problems and you should reboot your device to fix it +- Please check your --aosp value as it must match the Sailfish OS AOSP base (this is NOT the Android base used in aliendalvik container!). E.g. Xperia 10 Mark 2 is AOSP 10, Xperia 10 Mark 3 is AOPS 11 where the intial Xperia X uses AOSP 6 as Android base. _How do I ... on my phone?_ - If you are not familar with Linux shell or editing tools please wait for an official A-GPS solution by Jolla _Can you add feature ... into the tool?_ - This is not a hacking tool for your device modem so don't expect to see VoLTE/VoWifi profile modifications or unlocking of locked radio bands ever + +_Is this working for Jolla or Jolla C phones?_ +- Sorry but it's sadly not working (modem security / diag driver issues) + +_Is it working for 4G networks?_ +- To get SUPL working with 4G networks please set the default modem SUPL version to v2 (--supl 2) + +#### Changelog #### + +v0.0.2.0 +- Added support for AOSP base 11 to get `suplpatcher` working with Xperia 10 Mark 3 +- Added a new flag to modify SUPL modem default version (needed for 4G SUPL support) +- CyberTrust and ISG root certificates created for second subscription (SIM2)