GrapheneOS currently relies on A-GPS for location services. This is basically optimized GPS, relying fully on Sattelites for location positioning.
A view into the future
Imagine, you have an app where you can have a local database which you can update and use offline.
Then, without using GPS or even turning off airplane mode, you can know where you are and navigate!
This will be near anonymity, and to reach this I am asking you to share your data! Weird huh?
GPS downsides
Using GPS as location service has many downsides
- it only works outdoors, behind normal glass or thin walls like in a bus. Not at all in many trains, underground or in buildings
- it consumes a ton of battery, making things like all-day anti-theft tracking impossible
- it is not very accurate, due to the big distance between the sattelites and us
- it relies entirely on objects in our orbit, which could be shielded off or sabotaged
You can say, using GPS while you have so many more static objects near you that send data all the time, is pretty overcomplex.
NLP
The alternative is NLP, network location positioning.
This is widely used. Apples Airtags and also all competitors rely on it, as well as modern smartphones.
Instead of sattelites, these use cell towers, wifis, bluetooth beacons or devices nearby (with mutual consent) to get the position.
Especially Wifi and Bluetooth save a ton of battery, while the user can be pretty much anonymous.
The database
You need a database to ask "where are these 3 wifi networks?" that then gives you the GPS coordinates.
These can be OpencellID, which holds cell tower data. MozillaLocationServices had Wifi, bluetooth and cell towers, and shut down. As alternative, beaconDB was created and is compatible with apps.
You could also possible use Googles, Apples, Garmins and whoelses databases for these infos.
Origin of this data
Where does this data come from? You need infos about wifis, cell towers and bluetooth beacons, together with a GPS position.
Google and Apple likely get their data simply by having bluetooth, cell data, wifi and location turned on by default on billions of devices.
Imagine that scale...
So we need to replace this, with consent, as an unprivileged user app, and with way less people.
There are 2 apps for this:
TowerCollector
This one supported OpenCellID and MozillaLocationServices, but doesnt yet support BeaconDB (which is compatible with how MLS got the data).
You can use it to record cell towers only and upload them once, currently only to OpenCellID.
Neostumbler
This one is more advanced, records Wifis, Bluetooth Beacons and Cell towers.
By turning off wifi and bluetooth you could restrict it to cell data too.
You need to manually change the endpoint to https://api.beacondb.net
and it works!
To make both apps work (best):
- turn off airplane mode
- turn on location
- turn off energy saver
- allow the app untestricted battery time
- allow the app unrestricted background data
- optional: turn on wifi and bluetooth
- optional: in developer options turn off "throttle wifi scans" to get more wifis
Use this data
UnifiedNLP is the only current implementation to use it. But it is only available through microG and thus not on GrapheneOS. Without going into why it may be insecure.
GrapheneOS devs are working on an unprivileged user app that can do the same. It is announced that it will use a local BeaconDB database.
So... to be able to benefit once it is out, and to enable all other users in your area to do the same...
Collect data now!