GmsCore icon indicating copy to clipboard operation
GmsCore copied to clipboard

Local cell tower database location backend

Open 33KK opened this issue 1 year ago • 13 comments

Is your feature request related to a problem? Please describe. Current solutions are not very useful in any new areas or when the current local backend remembers cell tower positions incorrectly.

Describe the solution you'd like Basically what this project does: https://gitlab.com/deveee/Local-GSM-Backend It just downloads cell tower databases from OpenCellID and Mozilla and merges them into a single database.

Describe alternatives you've considered There's no alternative available at the moment

Additional context In terms of licensing, Mozilla dataset is public domain, and OpenCellID is CC-BY-SA-4.0, though it requires an API key. Local GSM Backend also included lacells as a source, which is just a script that merges data from those two sources, plus radiocells.org (which seems to be dead now). Reuploading the database somewhere to avoid the API key requirement should be fine. Also lacells allows for downloading country specific datasets.

33KK avatar Sep 29 '23 18:09 33KK

microG has used Mozilla Location Service as the source, so it may be enough to add OpenCellID as another source.

CoelacanthusHex avatar Oct 02 '23 11:10 CoelacanthusHex

microG has used Mozilla Location Service as the source, so it may be enough to add OpenCellID as another source.

Pretty sure it uses the MLS online API. I mean locally downloading the database

33KK avatar Oct 03 '23 22:10 33KK

Basically https://github.com/microg/GmsCore/issues/1941

Iey4iej3 avatar Oct 04 '23 01:10 Iey4iej3

Basically #1941

No, this is does the collection locally instead of downloading a database. It's what the "Remember from GPS" checkbox already does.

33KK avatar Oct 04 '23 01:10 33KK

It's what the "Remember from GPS" checkbox already does.

No, LocalNLPBackend also supports importing database. It does not implement downloading database, but I use https://github.com/sobrus/FastLacellsGenerator to do this (which is more reliable, and this is suggested by the author of Local-GSM-Backend: https://github.com/n76/lacells-creator).

Iey4iej3 avatar Oct 04 '23 09:10 Iey4iej3

@Iey4iej3 you say LocalNLPBackend can be used the same way one used Local-GSM-Backend in the past – i.e. one can simply push the SQLite database to the device and it's being used automatically (and that can be done already now with the current release of microG)? Or does it need "manual steps" to import the database?

IzzySoft avatar Jan 29 '24 17:01 IzzySoft

@Iey4iej3 you say LocalNLPBackend can be used the same way one used Local-GSM-Backend in the past – i.e. one can simply push the SQLite database to the device and it's being used automatically (and that can be done already now with the current release of microG)? Or does it need "manual steps" to import the database?

  1. LocalNLPBackend has to import the database.
  2. I am not sure whether I am mistaken: it does not seem to be able to import SQL database, but plain text csv database.
  3. I do not make any implication on the current release of microG. I just mention that, the proposal of this functionality was included in https://github.com/microg/GmsCore/issues/1941

Iey4iej3 avatar Jan 29 '24 17:01 Iey4iej3

Thanks for clarification! So you referred to the (temporary) CSV generated by FastLacellsGenerator (which one can configure to keep instead of remove at the end of the process), and this still requires manual steps to import after pushing to the device.

In that case I'll have to be patient and stick with the older microG a bit longer (I push the database to multiple devices automatically and the manual steps on some of them would simply be forgotten to perform – and I don't want to go with an online MLS for several reasons (e.g. it's useless in areas without cell coverage, or on devices without data plan)).

IzzySoft avatar Jan 29 '24 18:01 IzzySoft

I am using the older microG as well, in order to use LocalNLPBackend (which is, as far as I understood, not completely integrated into the latest microG). I do not remember why I switched from Local-GSM-Backend to LocalNLPBackend. Maybe I wanted to the ability to collect local data in the same time (although I use Tower Collector to collect data and upload, it does not seem to improve the precision as well as local collections).

Iey4iej3 avatar Jan 29 '24 18:01 Iey4iej3

TowerCollector is one of my most used apps as well :smile: I've requested once that collections could be shared directly with apps like Local-GSM-Backend, but I don't remember where that got stuck. Probably the broadcast was created with TowerCollector, but nobody wanted to pick it up…

But we're starting to drift towards OT for this issue. Maybe the SQLite-DB created by FastLacellsGenerator could be used directly by microG. That would still mean to create it "elsewhere" of course, but if the current module of Local-GSM-Backend could be used stand-alone, even that could happen on-device – without the problems the "old structure" caused.

IzzySoft avatar Jan 29 '24 21:01 IzzySoft