HOW TO: using Yandex as Mozilla location service replacement

After reading this thread: Any replacement plan for Mozilla location service?
I HOPE THIS IS NO COINCIDENCE:
I followed Coderus` advice to try yandex. Works like a charm. Here is a step-by-step guide of what I did:

  • Log in or register at: https://yandex.ru/dev/locator/keys/get/?service=locator
    I entered my dynamic dns address - I hope it has nothing to do with the function of the API key as long as you do not integrate the yandex map into your website.
  • copy the api key
  • download a terminal text editor from openrepos like micro
  • in the terminal on the device go to /etc and type: devel-su micro yandex.key
  • paste the api key and press ctrl-s to save the yandex.key file
  • download and install https://openrepos.net/content/neochapay/geoclue-providers-yandex
  • go to settings - location and enable everything under individual settings ( location and offline mozilla location service option and celltower/wlan option)

I opened pure maps which assumed I am in Ghana all the time. With my mobile phone inside the house near a window it found my location within a few seconds.
Also on my second SFOS device I was successful, so that seems to work perfectly for me. I hope for everyone else, too. Thanks to Coderus for the tip. Please commend if it worked for you.

14 Likes

How secure is this? I found yandex to be very invasive. I would never sign in to google and am reluctant to do it for yandex.

Thanks for the info. However I can’t see that id does anything on my phone:

  • Installed geoclue-providers-yandex
  • Got a key and written it to /etc/yandex.key
  • Went to Settings - Location - Custom settings
    • GPS positioning
    • Offline position lock from Mozilla location services mobile phone tower information
    • Online position lock from Mozilla location services mobile phone tower and wireless network information
  • started GPS info
  • As usual it shows 0/21 Satellites in use / view, signal strength of some satellites seem to be alright.

ps shows these processes running:

 ps aux|grep geoclue
 nemo     13014  0.0  0.2  76004  7664 ?        Ssl  09:32   0:00 /usr/libexec/geoclue-mlsdb
 root     13150  0.3  0.3  81300 11908 ?        Ssl  09:32   0:03 /usr/libexec/geoclue-hybris
 nemo     13155  0.0  0.0   6924  1372 ?        S    09:32   0:00 /usr/bin/invoker --type=qt5 /usr/libexec/geoclue-mlsdb
 nemo     16383  0.0  0.0  20588  2084 ?        Sl    2020   0:32 /usr/libexec/geoclue-master
 root     25479  0.0  0.0   4216  1092 pts/1    S+   09:49   0:00 grep geoclue

dbus-monitor shows several calls to function SatelliteChanged, however no clue of yandex provider:

signal time=1609836674.948275 sender=:1.12030 -> destination=(null destination) serial=1158 path=/org/freedesktop/Geoclue/Providers/Hybris; interface=org.freedesktop.Geoclue.Satellite; member=SatelliteChanged

journalctl also doesn’t give me any hint that yandex provider is active. Do I need to restart the phone to get the service running?

1 Like

Hello
Doesn’t work for me neither. The instructions are not clear on which api key is required (depending on the link it is in English or in Russian!).
Following the debugging instructions of the developper:
[root@XA2PlusPhK nemo]# QT_LOGGING_RULES="*.debug=true" /usr/libexec/geoclue-yandex
[D] unknown:0 - positioning is enabled
[D] unknown:0 - device-local cell triangulation positioning is enabled
[D] unknown:0 - mls online service positioning is enabled
[D] unknown:0 - now checking MDM data source restrictions…
[D] unknown:0 - allowed to use online data to determine position
[D] unknown:0 - listening for cell data changes
[D] unknown:0 - allowed to use adjacent cell id data to determine position
[D] unknown:0 - allowed to use wlan data to determine position
[D] unknown:0 - positioning has been enabled
[D] unknown:0 - Yandex Location Services geoclue plugin active
[F] unknown:0 - Failed to register service org.freedesktop.Geoclue.Providers.Yandex - is another instance of the plugin already running?
Abandon

I think it’s a problem of api key validity.

2 Likes

It seems that you run the debug statement as root. If I run it as nemo I get this:

[nemo@xa2 ~]$ QT_LOGGING_RULES="*.debug=true" /usr/libexec/geoclue-yandex
[D] unknown:0 - positioning is enabled
[D] unknown:0 - device-local cell triangulation positioning is enabled
[D] unknown:0 - mls online service positioning is enabled
[D] unknown:0 - now checking MDM data source restrictions...
[D] unknown:0 - allowed to use online data to determine position
[D] unknown:0 - listening for cell data changes
[D] unknown:0 - allowed to use adjacent cell id data to determine position
[D] unknown:0 - allowed to use wlan data to determine position
[D] unknown:0 - positioning has been enabled
[D] unknown:0 - Yandex Location Services geoclue plugin active
[D] unknown:0 - have 14 neighbouring cells
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 6xxx, locationCode: 7xxx, mcc: 262, mnc: 2" with strength: 7
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 5xxx, locationCode: 7xxx, mcc: 262, mnc: 2" with strength: 8
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 19xxx, locationCode: 7xxx, mcc: 262, mnc: 2" with strength: 5
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 26xxx, locationCode: 7xxx, mcc: 262, mnc: 2" with strength: 5
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 60xxx, locationCode: 7xxx, mcc: 262, mnc: 2" with strength: 4
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 60xxx, locationCode: 7xxx, mcc: 262, mnc: 2" with strength: 4
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 5xxx, locationCode: 7xxx, mcc: 262, mnc: 2" with strength: 19
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 18xxx, locationCode: 17xxx, mcc: 262, mnc: 1" with strength: 14
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 56xxx, locationCode: 177xxx, mcc: 262, mnc: 1" with strength: 5
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 56xxx, locationCode: 17xxx, mcc: 262, mnc: 1" with strength: 4
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 18xxx, locationCode: 17xxx, mcc: 262, mnc: 1" with strength: 4
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 48xxx, locationCode: 17xxx, mcc: 262, mnc: 1" with strength: 9
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 18xxx, locationCode: 17xxx, mcc: 262, mnc: 1" with strength: 7
[D] unknown:0 - have neighbour cell: "type: GSM, cellId: 54xx, locationCode: 17xxx, mcc: 262, mnc: 1" with strength: 5
[D] unknown:0 - QConnmanEngine: ofono dbus service registered: "org.ofono"
[D] unknown:0 - QConnmanEngine: connman dbus service registered: "net.connman"
[D] unknown:0 - QConnmanEngine: setup connman configurations
[D] unknown:0 - QConnmanEngine: initialize
[D] unknown:0 - QConnmanEngine: setup connman configurations
[D] unknown:0 - MLS_FALLBACKS_LACF true MLS_FALLBACKS_IPF true
[D] unknown:0 - Less than 12 hour old key failure, refusing a new try
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 60xxx, locationCode: 7xxx, mcc: 262, mnc: 2"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 5xxx, locationCode: 7xxx, mcc: 262, mnc: 2"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 19xxx, locationCode: 7xxx, mcc: 262, mnc: 2"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 26xxx, locationCode: 7xxx, mcc: 262, mnc: 2"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 60xxx, locationCode: 7xxx, mcc: 262, mnc: 2"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 60xxx, locationCode: 7xxx, mcc: 262, mnc: 2"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 5xxx, locationCode: 7xxx, mcc: 262, mnc: 2"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 18xxx, locationCode: 17xxx, mcc: 262, mnc: 1"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 56xxx, locationCode: 17xxx, mcc: 262, mnc: 1"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 56xxx, locationCode: 17xxx, mcc: 262, mnc: 1"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 18xxx, locationCode: 17xxx, mcc: 262, mnc: 1"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 48xxx, locationCode: 17xxx, mcc: 262, mnc: 1"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 18xxx, locationCode: 17xxx, mcc: 262, mnc: 1"
[D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 54xxx, locationCode: 17xxx, mcc: 262, mnc: 1"
[D] unknown:0 - no cell id data to calculate position from
[D] unknown:0 - have been idle for too long, quitting

However the line [D] unknown:0 - Less than 12 hour old key failure, refusing a new try seems to indicate that there’s something wrong with the key.
What puzzles me that the original link to get a key says location and the one in this howto suggests prediction, I wonder if the key requested via the English page is valid for this API.

On the other hand I wonder what part of the key we need to copy to /etc/yandex.key. It has the format pdct.1.1.<timestamp>.c4527a4a5960xxx.42a27a3c814c8f820ffafcbc354e23ef9d23bxxx. I wouldn’t be surprised if we should remove the header part such as pdct.1.1. and / or the timestamp.

As the API seems to refuse new key verifications within 12 hours of a failure is’s a bit of a pain to test it via trial and error.

1 Like

I think I got it right. But, is it the missing accuracy (that yandex does not provided) that make Kuri keep “Waiting for GPS”?

I got these messages, too. This notwithstanding, the GPS now works perfectly in stark contrast to the previous situation. So I guess this error message is harmless. I note, however, that I don’t see messages like this: [D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: …
which are in your log.

I suppose these messages might provide the clue? (if you’ll pardon the bad pun)

you’re leaking your IP+cell towers to Yandex. Which is mostly ok for non-Russian.
But more worrying is you can leak yours (and the ones around you) wi-fi APs to Yandex.
Which probably is also ok for non-Russian.
If you’re Russian, I wouldn’t do it. Yandex is indeed very snoopy company, like google.

@jollajo

I think you need to install the package, geoclue-provider-mlsdb

I just drove around a bit with the car, switching the device off and on at different locations. really seems to work for me.
As for security: This is bad because Yandex sells data to G and FB.

My worries are more of the F(S)B kind.

Where do you get that? They don’t.

1 Like

If you’re not a PEP or live in exUSSR, I wouldn’t worry.

it was leaked 2018 within the cambridge analytica scandal. There were several articles on heise.de but I cannot find them at the moment.

In that CA case Yandex had access to FB data, not the other way around.

it is installed according to:

[root@xa2 nemo]# pkcon search geoclue-provider-mlsdb
Searching by details                                                                                                                                          
Starting                                                                                                                                                      
Refreshing software list                                                                                                                                      
Querying                                                                                                                                                      
Finished                                                                                                                                                     
Installed       geoclue-provider-mlsdb-0.1.4-1.9.1.jolla.armv7hl (installed)    Geoinformation Service from Mozilla Location Services Database Provider
Installed       geoclue-provider-mlsdb-agreements-0.1.4-1.9.1.jolla.armv7hl (installed) Mozilla Location Services privacy policy agreements
Available       geoclue-provider-mlsdb-data-au-0.1.4-1.9.1.jolla.armv7hl (jolla)        Cell id to location data (.au)
Available       geoclue-provider-mlsdb-data-fi-0.1.4-1.9.1.jolla.armv7hl (jolla)        Cell id to location data (.fi)
Available       geoclue-provider-mlsdb-data-in-0.1.4-1.9.1.jolla.armv7hl (jolla)        Cell id to location data (.in)
Available       geoclue-provider-mlsdb-debuginfo-0.1.4-1.9.1.jolla.armv7hl (jolla)      Debug information for package geoclue-provider-mlsdb
Available       geoclue-provider-mlsdb-debugsource-0.1.4-1.9.1.jolla.armv7hl (jolla)    Debug sources for package geoclue-provider-mlsdb
Available       geoclue-provider-mlsdb-tool-0.1.4-1.9.1.jolla.armv7hl (jolla)   Cell id to location database tool for geoclue-provider-mlsdb

Actually I reinstalled geoclue-provider-yandex after I pasted the logs above, so maybe geoclue-provider-mlsdb has been installed as a dependency. The messages [D] unknown:0 - no geoclue-mlsdb data files contain the location of composed cell id: "type: GSM, cellId: 5xxx, locationCode: 7xxx, mcc: 262, mnc: 2" are gone now.

However still no fix. Will try a restart of the phone.

It seems that I have been brought back to earth again. No fix for several minutes now, even outside on my balcony.

I might have missed it but the only thing I found is that mozilla had to restrict the api usage for commercial usage? In case SailfiahOS is considered as commercial usage, wouldn’t it be the easiest to allow users to supply their own, non-commercial api-key and keep the the mozilla-api as backend?

Maybe modifying

/etc/location/location.conf

is necessary?

Found some entries looking like they need to be changed:

…
mls\enabled=true
cell_id_positioning_enabled=true
…
mls\agreement_accepted=true
mls\online_enabled=true
…
agps_providers=“mls”
…
allowed_data_sources\bt_addr=true
allowed_data_sources\wlan_data=true
allowed_data_sources\cell_data=true
allowed_data_sources\gps=true
allowed_data_sources\glonass=true
allowed_data_sources\beidou=true
allowed_data_sources\galileo=true
allowed_data_sources\qzss=true
allowed_data_sources\sbas=true
yandex\enabled=false
yandex\agreement_accepted=false
yandex\online_enabled=false

Marked the suspected ones in bold.
To be changed to “yandex” or “mls,yandex”, true, true, true, I guess. Really only a guess…

I have changed the corresponding entries and yandex queries appear to work. However, positioning is not working as well due to the “no-geoclue-mlsdb data files contain the location of composed cell id” error. I’d consider yandex rather useless for Germany…
Edit: I’m also receiving the “less than 12 hour old key” message as well.
I’ve therefore obtained a new api key through the russian language site linked on openrepos (by trial and error and a fantasy domain:-)). It differs in form and length compared to the other key.
I’m still receiving this message, though.