Part of what is so intriguing about this iPhone location data dust-up is the question of why. Why is Apple storing this data on your phone? Are they trying to provide information to law enforcement? Do they have ideas for future apps that look at your location history? Do they want to provide it to advertisers?
Turns out, Apple told us nine months ago. Well, not us, but two of our esteemed Congressmen, Reps. Edward Markey (D-Mass.) and Joe Barton (R-Texas). In response to an inquiry about iPhone location data usage, they said (see pages 5 and 6):
To provide the high quality products and services that its customers demand, Apple must have access to comprehensive location-based information. For devices running the iPhone OS versions 1.1 .3 to 3.1, Apple relied on (and still relies on) databases maintained by Google and Skyhook Wireless (“Skyhook”) to provide location-based services. Beginning with the iPhone OS version 3.2 released in April 2010, Apple relies on its own databases to provide location-based services and for diagnostic purposes. These databases must be updated continuously to account for, among other things, the ever-changing physical landscape, more innovative uses of mobile technology, and the increasing number of Apple’s customers. Apple always has taken great care to protect the privacy of its customers.
Basically, when you can’t get a good GPS signal, your iPhone guesses based on WiFi and cell sites near you. Apple used to rely on other people’s databases of where WiFi and cell locations are, but now they do it in house. How do they do this?
To provide location-based services, Apple must be able to determine quickly and precisely where a device is located. To do this, Apple maintains a secure database containing information regarding known locations of cell towers and Wi-Fi access points. The information is stored in a database accessible only by Apple and does not reveal personal information about any customer.
Information about nearby cell towers and Wi-Fi access points is collected and sent to Apple with the GPS coordinates of the device, if available: (1) when a customer requests current location information and (2) automatically, in some cases, to update and maintain databases with known location information. In both cases, the device collects the following anonymous information:
- Cell Tower Information: Apple collects information about nearby cell towers, such as the location of the tower(s), Cell IDs, and data about the strength of the signal transmitted from the towers. A Cell ID refers to the unique number assigned by a cellular provider to a cell, a deﬁned geographic area covered by a cell tower in a mobile network. Cell IDs do not provide any personal information about mobile phone users located in the cell. Location, Cell ID, and signal strength information is available to anyone with certain commercially available software.
- Wi-Fi Access Point Information: Apple collects information about nearby Wi-Fi access points, such as the location of the access point(s), Media Access Control (MAC) addresses, and data about the strength and speed of the signal transmitted by the access point(s)…
The consolidated.db is the file is how they store that data locally on the phone1. The cell tower information is in the CellLocation table. The WiFi access point information is in the WiFiLocation table. There is also a table called CdmaCellLocation - for me it’s empty, but I’d be willing to bet that people with a CDMA (Verizon) iPhone will find if chock full of cell locations. As I’ve been saying all along, these tables are of the locations of the access points, and when you’re in those areas again, your phone can look at what kinds of signal strength is has with them to determine it’s own location. It does this because this takes much less battery than locking on to a GPS signal, and although the accuracy isn’t as good, for many applications it’s good enough.
I suspect the data in these tables is probably two way - you upload some anonymized data to Apple about cell and wifi locations that you have located, and Apple may send some back that other anonymous people have located. That would explain why we all get weird data from time to time for places we haven’t been - for some reason Apple pushed out cell locations to us because an App requested data about that location. Or maybe it knows about cell locations that have been moved and wanted everyone to have accurate information. I know this is just a hypothesis but it’s a much better explanation than I’ve heard from anyone else.
Now in this document, Apple says that when they send the approximate locations of the cell sites and WiFi access points, they also are sending the GPS coordinates (if available). However, there is no evidence that I can find that they are storing those coordinates on the phone. The coordinates are sent to Apple, which stores them in an anonymous database on their end. They aren’t in the consolidated.db anywhere - at least not that I can find. They’re definitely not in the CellLocation table that iPhoneTracker uses, because GPS coordinates tend to be very precise and nothing in that table has an accuracy of closer than 500 meters.
Why store a whole year’s worth of data? Because that’s the whole point! In order to find your location without using GPS, you want a huge database of where cell towers are and what their location is. Now Apple could probably do this in a way that better protects your privacy - they could munge the timestamps more effectively, or take all the data whenever you sync and replace it with more reliable cell location data from their servers that covers the areas that you frequently travel. Kind of like Genius syncing in iTunes; they look at where you’ve been, and give you reliable cell and wifi locations based on those locations. Smart, elegant, and secure. Why they do it this way is unclear, and surely they will provide an additional clarification now that more people are asking questions.
1. To clarify, this is my opinion. Apple has not said exactly what the purpose of the consolidated.db file is, and until they do, we won’t know for sure. I strongly suspect this is the purpose of the file, for reasons mentioned both in this post and other posts on my blog.