What location data is being tracked by your iPhone or iPad?
It has been common knowledge -- at least here at Reincubate HQ -- that iOS devices store a lot of personal data. I was surprised to wake today and find people blogging about the iPhone logging users' locations.
consolidated.db: tracking location data
On iOS, the
consolidated.db file stores your phone, GPS and Wi-Fi location data. Allowing users to know what is being stored on a device isn't such a bad idea, and is an important principle to us, and bringing this to light is no bad thing.
Apple store a bit more than just latitude-longitude coordinates and a time-stamp in the device and backup. Below is a quick summary of what each table in that contains:
CdmaCellLocation): timestamp (time and date), Latitude, Longitude, Horizontal accuracy, altitude (not set), vertical accuracy (not set), speed (not set)
CellLocationHarvest: phone operator (Orange, T-Mobile, O2, Vodafone), time-stamp (time and date), latitude, longitude, horizontal accuracy, altitude, vertical accuracy, speed, course (direction), confidence (accuracy percentage)
LocationHarvest: tripID, timestamp (time and date), latitude, longitude, horizontal accuracy, altitude, vertical accuracy, speed, course (direction), confidence (accuracy percentage)
WifiLocation: MAC address of Wi-Fi, time / date, latitude, longitude, horizontal accuracy, altitude, vertical accuracy, speed (not set), direction (not set), confidence (accuracy percentage)
There is some interesting stuff in this database, and not just the phone locations that are stored. The data stored isn't specifically related to the phone and signal. 3G and Wi-Fi locations are prevalent, and using GPS also logs location data. For example using 3G, BT OpenZone, or a similar Wi-Fi source on your travels will activate GPS usage on apps if switched, and will therefore store your location. Details about the Wi-Fi routers you connected to are also stored in the
The accuracy of this data is only as good as the triangulation from the phone masts and GPS sources. Looking at the data stored on my iPhone I'd say the triangulation of my iPhone's location on the move isn't very accurate, but still within a mile or so of my location. GPS locations seem to be within metres -- if not spot on -- so it can be a bit hit and miss unless you decipher the differences in data. Accuracy will always make a big difference depending on how remote the location. The more built-up an area is, the greater the concentration of masts is, and therefore these readings are more accurate.
Where is the
consolidated.db file that stores location data, and how can I view it's contents?
consolidated.db is simple using iPhone Backup Extractor:
consolidated.db database file is stored in
/Library/Caches/locationd, in the backup and onthe iPhone. Apple use hex-encoded
SHA1 hashes to store backup files after synchronising with iTunes, so the easiest way to access the file is using "Expert mode". This can be done like so:
- Open iPhone Backup Extractor
- Click the "Expert mode" button
- Navigate to the following folder
- Tick the box next to the
- Click the "Extract selected" button and choose a location to save the file
- The consolidation.db file will be save in this location in the following folder
If you wish to view the database file you'll need to use one of the following applications. Both applications are free, and by viewing the tables mentioned above you should be able to see location data with little technical knowledge.
Once you find any location reference points in the database, you can use Google Maps to plot the locations. Search using "Latitude, Longitude" and you'll find the locations entered.