Even though Android apps typically require user's permission to access geolocation via GPS, Android versions older than 9 (Android Pie - API level 28) [1] allow apps to locate the user with a considerable degree of accuracy through the WiFi Access Point BSSID or the mobile cell tower ID, without needing to ask for permission. The user might therefore not be aware of being located [2].
This app demonstrates user geolocation via WiFi BSSID and cell tower ID. The GPS coordinates corresponding to the WiFi BSSID are retrieved thanks to Alexander Mylnikov's open source API (see credits).
Geolocation via WiFi BSSID | Geolocation via cell tower ID |
---|---|
Cell tower ID geolocation is only for demonstration purposes. I could not find an API for it, so it is based only on a small portion of the 7Gb open source CSV file hosted by Alexander Mylnikov: Mobile Towers Geolocation data.
It seems like not all smartphone brands give access to cell tower ID information. Samsung is one example: G-NetTrack Android OS Netmonitor
The exact address at selected GPS coordinates is retrieved thanks to TomTom API: Reverse Geocode API.
The app was tested on a Huawei phone with Android 4.4.
- WiFi BSSID and cell tower Geolocation and API: Public WiFi database by Alexander Mylnikov
- Map and map API: TomTom, TomTom Maps SDK for Android examples
- HTTP requests: Volley
- JSON parsing: Klaxon
- Reading from CSV: Kotlin-csv
- App icon: Smartphone signal vectors by Miguel Angel
[1] Android 9 - Behavior changes: all apps
[2] Zhou, X. et al. Identity, Location, Disease and More: Inferring Your Secrets from Android Public Resources , 2013