If you’re a privacy-conscious individual, you might already be running UnifiedNLP with its on-device cell tower and WiFi databases. Ever wonder what the collected data looks like? I did, so I wrote a quick app to translate the exportable JSON data into something a bit more comprehensible. If you too are curious, read on…

Visualized AP data in Google Earth

Assuming that you have UnifiedNLP installed, and have installed the Personal WiFi Backend, you’ll want to do something that turns on your phone’s GPS – this backend only gathers data when your GPS is already turned on. As your phone sees APs when it has a valid GPS fix, it will start logging them into a local database. This database can then be used to estimate your position based upon the stored AP locations, all without having to send your current position to anyone. Of course, actually getting UnifiedNLP set up is beyond the scope of this post – needless to say, you’ll need to be rooted, and if you have Google Apps installed, you would also need to install the Xposed Framework. Perhaps a future post will cover this territory…

You can see the current number of stored APs in the module’s settings (in the UnifiedNLP settings activity, click on to configure location backends, then click the gear next to “WiFi Location Service”), as “Number of known AP’s”. There’s also an option to export the AP list as a JSON file, which provides BSSIDs and all sampled locations for that AP (the backend’s estimate of the AP’s location becomes better as you travel past it repeatedly, which in turn allows better estimates of YOUR position. A corollary is that location estimates from this backend should be better around places you visit often while you have GPS turned on).

The exported JSON file is ideal for backing up your AP database, but not so much for peeking under the hood and seeing what AP data you’ve actually gathered. Newer versions of the backend have the ability to list all APs and show a particular AP on the map, but I really wanted to see all the APs at once…

To have a look at your AP data, you’ll need to either:

  1. Clone/download the code from here, and build using Gradle and a Java 8 JDK, or
  2. Download a pre-compiled JAR from here. Either way, you need at least Java 8 JRE installed.

Assuming that you have compiled or procured the JAR, you should be able to convert a wifi.json file into a KML file readable by Google Earth by running popping open a terminal (Windows users: command prompt) and typing java -jar build/libs/UnifiedNLP-personal-wifi-mapper.jar /path/to/wifi.json or so, substituting the path to wherever you actually copied your wifi.json to. This should build a directory called wifi.json.out containing KML tiles and an index KML file, and launch Google Earth (or your default KML editor) on index.kml.

You’ll start by seeing multicolored tiles in regions where you have AP data – the smaller the tile, the more dense the AP data for that area. To view APs, simply zoom in until the colored tile is replaced by placemarks (yellow thumbtacks).

Visualized AP data in Google Earth Visualized AP data in Google Earth Visualized AP data in Google Earth

A couple of interesting observations:

  1. Lots of your AP data will probably appear along roadways. The WiFi backend stores the locations that you were at where the signal from the access point was at its strongest. If you travel along a road in a straight line, that will be the point on the road closest to the AP, but still trapped on the road itself.
  2. If you’re trying to optimize AP location, try to travel past the AP from at least two sides (all the way around in a box or circle would be best, as WiFi signal strengths don’t always fall off uniformly with distance due to obstructions).
  3. I was surprised at a couple of the (relatively remote) areas I found WiFi access points, and at the density of APs I saw in more urbanized areas, especially near malls, offices, or apartment buildings… WiFi truly is everywhere!