Everyone probably noticed the
hype of the last days around the "shadowing" of iPhone users. The guys with O'Reilly, who published information about the notorious file consolidated.db,
themselves are surprised at how big the story caused on television and in other media.
But the continuation of this story is even more interesting. It is possible that the developers of iOS 4 implemented this function on the example of Android, but due to the
curvature of incomprehensible reasons, it was implemented not quite correctly.
A certain developer Magnus Eriksson (Magnus Eriksson), having heard about the scandal with iPhones, decided to delve into the cache of his Android smartphone. And after some research, I found the
cache.cell
and
cache.wifi
, very similar to the above-mentioned
consolidated.db
. The files are located in the
/data/data/com.google.android.location/files
folder.
Here is an example of the data that is stored there (also unprotected): These are the coordinates (longitude and latitude), as well as the time and date.
')
$ ./parse.py cache.cell
db version: 1
total: 41
key accuracy conf. latitude longitude time
240: 5: 15: 983885 1186 75 57.704031 11.910801 04/11/11 20:03:14 +0200
240: 5: 15: 983882 883 75 57.706322 11.911692 04/13/11 01:41:29 +0200
240: 5: 75: 4915956 678 75 57.700175 11.976824 04/13/11 11:52:16 +0200
240: 5: 75: 4915953 678 75 57.700064 11.976629 04/13/11 11:53:09 +0200
240: 7: 61954: 58929 1406 75 57.710205 11.921849 04/15/11 19:46:31 +0200
240: 7: 15: 58929 -1 0 0.000000 0.0000 04/15/11 19:46:32 +0200
240: 5: 75: 4915832 831 75 57.690024 11.998419 04/15/11 16:13:53 +0200
Erickson wrote a
program that looks for and shows data with coordinates from these files. You can install and see on your phone.
However, there is an important difference in how this feature works on Android devices.
// Maximum time (in millis) that a record is valid for, before it needs
// to be refreshed from the server.
private static final long MAX_CELL_REFRESH_RECORD_AGE = 12 * 60 * 60 * 1000; // 12 hours
private static final long MAX_WIFI_REFRESH_RECORD_AGE = 48 * 60 * 60 * 1000; // 48 hours
// Cache sizes
private static final int MAX_CELL_RECORDS = 50;
private static final int MAX_WIFI_RECORDS = 200;
Here, the maximum amount of stored data is limited to 50 entries for cells and 200 entries for WiFi points, respectively. There is also a time limit: 12 hours for cells and 48 hours for WiFi, while the iPhone has a full archive for
months (since installing iOS 4).
As in the case of the iPhone, if the subscriber has got into the cell coverage area, where he already was before, then the
old information is replaced by the new one . By the way, for this reason the “spy” from the iPhone is not as scary as it seemed at first. In most cases, these data are generally not suitable for compiling the user's travel history, except that you can only see individual trips along unique routes.
According to Eriksson, this feature works in Android in the same way as in the iPhone: the coordinates are calculated in the same way, by the coordinates of the nearest cells, and, possibly, are periodically sent to Apple / Google. The difference is that Google neatly approached data protection, and Apple developers apparently made an offensive bug, not bothering with the conditions for data destruction, and now they are paying for it with a brand's
karma . Obviously, the bug will be fixed by the next patch for iOS.