HOW TO: using Yandex as Mozilla location service replacement

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.

Please be aware that I posted the wrong link when I wrote the OT, I changed it after 5 minutes. The wrong link went to the prediction api key, not the location. The api key for location does NOT start with pdct…
From my point of view, installing anything mls (moz.loc.service) afterwards should not be done as yandex replaces this but letzs the device think it is mozillas location service.
For future SFOS releases there would be other options, one of all those cell-tower and wifi geolocating websites.

There is no predictability, really. Changing to device only, this time gave me a fix after 30 seconds. At other times I can’t get a fix this way at all. Changing the entries in location.conf made no difference for me. The developers still urgently need to do something for the XA2 in this regard.

Update from my side: I tried again without changing anything and all of a sudden it works for me.
I have no idea how yandex identified my device after I changed the api key and the network connection, but obviously they could.
Now is 12h after last night when I tried it for the first time, with the wrong api key. Obviously my device was blocked until now. Whatever.
For the future i would love to see a local implementation like on microg, with self generated local databases…

@apozaf
I guess I got the wrong link from here:

After the service worked for me I’m suddenly back to the “blocked for 12h due to wrong key” issue. I haven’t changed my config and the yandex site says the key was still valid.
I’m giving up. Yandex is crap, probably worse than google.

1 Like

you can killa the process (killall geoclue-yandex )and then restart debugging.
For me, the yandex service occasionally works until I run in the blocked for 12h error again. Maybe the geoclue-yandex plugin ia a bit buggy and causes the api key failure.
However, even when working most of the discovered cells in the neighbourhood are ignored (ignoring neighbouring cell with no cell id), thus the service ia very inaccurate. Seems like the yandex service (or the plugin) is just not made for the German (or European) market.
Is there still anyone else experimenting with the the yandex service here? This thread has become quite monolithic :slight_smile:

Maybe, if you are heavily using the Yandex service, Yandex will block the requests.
However, Mozilla Location Service provider can still be used if you add the offline data as I explained here:

I haven’t test the Yandex plugin and see if the data Yandex provides is more granular than the data Mozilla provides. However, looks like Mozilla has poor data for some of the areas (e.g. Russia, Africa, South America): https://location.services.mozilla.com/map#0.7/0/0

I hope this helps.

4 Likes

Thank you very much! That instantly worked! Great!!

1 Like

What can I use for website to get the key? You say you used your dynamic DNS address - is that different than ip? Where is it?

update - I got a key using ip. Seems to be working now, but not too accurate so far, (first fix put me in the White House), using battery-saving mode… Will keep testing…

So still the same for me. Perpetually fixed at the white house in Washington D.C. (I’m actually hundreds of miles from there.).
Here’s logs:

This is with gps unchecked. Fix is good with gps checked, but I don’t think I need Moz/Yandex for that…

Edit - I watched the logs more, and it’s the “…12-hr old key” issue…

I had the key issue as well, even though it was working in between. And Ibalso found the yandex data way to unreliable and inappropriate compared to the Mozilla data. Yandex might work well in e.g. Russia (where Mozilla data is not very good) though.
For the US you should be happy with the Mozilla data stored locally as described above. I’m using this service in Germany and it’s really working well!

3 Likes

I think it only matters if you implement their maps in a website.
The service is so lala relyable in italy and austria but only when using puremaps and not with android software. I hope SFOS 4 may come with good news…

2 Likes

Yandex provider doesn’t work for me since I’ve updated SailfishOS to 4.1.0.23. Does anyone have the same issue?