Installing microG on Sailfish OS

If doing GPS tests you need to reboot the phone after each fix to get comparable results.

3 Likes

Yes, in particular this one.

A Word On 4G SUPL Support

It is mandatory to use SUPLv2 on 4G connected devices. To change the SUPL version setting I found out that patching the modems SUPL register is not needed because Sony vendor blob is initializing the setting for you based on gps.conf entry.

For SUPLv2 support please add the following setting into the gps.conf file:

SUPL_VER=0x20000

In fact, using the fiber connection available on my parents home, I got the GPS fixed indoor at the 4th floor of six. While using my 4G connection with UDP+VPN, I cannot manage to fix my GPS at 6th floor of six. Moreover, also the time skew is a disaster - with time.is - I got something between 1.1s and 0.4s. This because the auto-update time service works under a stressed connection which is shared with my laptop as well by the WiFi tethering.

This also explain why Android system apps are able to influence the GPSinfo results. Because they introduce more suitable parameters and keep the time skew much lesser impactful. In fact with Android Support activated the time skew rarely reach 0.1s with my 4G connection used as above described.

Considering that autoupdate time service could be the source of time jittering and /vendor/etc/gps.conf is misconfigured for my 4G connection. I am testing the “device only” GPS option (factory setting) and I have disabled the autoupdate time/date.

The result seems promising expecially because as soon I visit the time.is website I got the 4/38 fix but soon I loose it again unless I reload that page. Yes, keep the system hardware clock stable is a master key for indoor GPS while in outdoor the signal streght is enough to support this variances.

Well, as far as I seen - microG is a jailed component that can be disabled and even when it runs cannot influence others subsystem unless it allows Android applications with system priviledges like Google app to interact with the network and stabilise the system clock.

The system clock stabilisation, is enough to do the magic to fix the GPS quickly also indoor. Under this point of view the green area is - even - much bigger!

In fact, a malicius Android application that would messup the system clock would be able to create a GPS service DOS. Please, keep in consideration that I verified the clock skew with the default native browser and also with DuckDuckGo for Android to check if the two source of time were different.

Again, this test has been done in a blackbox mode with appaling rude instruments. Thus a more specific and detailed investigation could arrive to another conclusion. However, about GPS there are 676 post in a single thread (and there are few many thread) - thus, it is time to fix such issue.


GENERAL SOLUTION PROPOSAL

@vige: I think that it is time to give a end to GPS stops working which is a thread with 676 posts about 3 years long. The following UI change will make a lot people happy expecially using the proper values as default.

Parameter to set are the following in /etc/gps.conf or /vendor/etc/gps.conf:

NTP_SERVER (selection dropmenu)

SUPL_HOST:PORT

in order to support 4G mobile connection the version 2 is mandatory:

  • SUPL_VER=0x20000

plus optional but suggested these other parameters:

  • XTRA_SERVER_QUERY=1
  • INTERMEDIATE_POS=1
  • ACCURACY_THRES=5000

Which can set by a menu or simply by three check boxes [0/1].

Did you notice this is an actual linux and not yet another android ROM pretending to be an OS? Just enable developer mode and set up a password then you can ‘root’ your phone with ‘devel-su’ and password in the provided terminal. What exactly gave you the idea that visiting a website like time.is will cause the system to change its clock? Looks like you’re chasing a crazy placebo effect (sorry don’t want to feed but wtf)

1 Like

Have you rebooted the phone between the two tests?

Because if I got a root shell under my fingers, I solve the problem but few people are able to digest a thread of 676 posts like GPS stops wroking started on July 2020 and with the last post 9 day ago Jun 2023.

Three years for a patch of 3 lines changed and not more than 6 changed!

[> trolling mode on <]
You all are the worst customer service I have ever had to deal with in my life and you all should pay a very expensive monthly fee to write on this forum! :rofl:
[> trolling mode off <]

THE PATCH

NTP_SERVER=europe.pool.ntp.org # just to replace google
SUPL_HOST=supl.grapheneos.org  # just to replace google
SUPL_PORT=7275
SUPL_VER=0x20000  # v2 mandatory for the 4G connections

XTRA_SERVER_QUERY=1 # why not?
INTERMEDIATE_POS=1  # why not?
ACCURACY_THRES=5000 # uncertanty needs a limit

@miao: yes, solved. See my post before this.

I don’t see anything new here :grinning:

The GPS stopped working thread is initally about the XA2, which cannot connect to a SUPL server without suplpatch, because it has no certificate for the secure connection. So your settings were already tested and do not work on the XA2.

And many people claimed that they don’t wan’t to use A-GPS, because this does not fix the initial problem.

Also SUPL only works with mobile data not when connected to a wifi network.

All other settings you posted are already known.

A simple summary, that’s the novelty. :slight_smile:

The patch exists so the XA2 users should be happy.

This part is not clear for me

I can understand that they wish to use ‘device only’ mode because privacy concerns but I did not get that the GPS was previously working indoor without A-GPS. Is it a specific problem of XA2 or a general problem? Considering that I have a X10II, it might be a general problem.

Without changes was working well with a WiFi connection over fiber probably because such a connection was able to sync the system clock precisely enough and obviously this require the autoupdate of time/date set.

With these changes is working with a mobile 4G connection + UDP VPN, also. So, from my PoV is a great advantage because now I can have indoor GPS quickly working with my mobile connection. Which was my goal.

Quite a late reply, but maybe could still be relevant. In my experience, that “something” is giving the module the permission to allow it to access location at all times.

2 Likes

I can´t find to tick…" grant it signature spoofing using the " enable system package replacement " permission
For the PlayStore advaced tips…
Can anyone give me a clue… Thanks

Is that the one in Settings - System - Android AppSupport, which you check to allow the replacing of system packages with their unofficial versions?

2 Likes

I thin its the same… but with different name…
Thanks

Can’t grant Signature Spoofing Permissions… It says only loading under every title in the Permission manage - Control app access to your data. Any ideas what to do? Using Jolla C2.

That sounds a lot like you are using the Android settings. Spoofing is controlled in the regular SFOS settings.

How? In the wiki it says " Grant Signature Spoofing Permissions

  • You need to go to the Android settings .
    1. Go to Settings app
    2. section section Info , tool Android™ App Support
    3. Push the Android version field five times

Like it says here: Installing microG on Sailfish OS
(link to specific section in the first post)

Where are you reading?

1 Like

Yep, already did that. But can’t grant the “Spoof package signature” permission in the Android settings…

Even though I enable signature spoofing in the Android app settings, MicroG Can’t grant signature spoofing permissions on the Jolla C2.


1 Like

So I’m not the only one…

1 Like

I’m in the same boat. Checked multiple times that I followed the instructions carefully.