|
Project Information
Featured
Downloads
|
OverviewWhenever iTunes syncs with an iPhone, it creates a backup of the files on the device. This backup is stored in: ~/Library/Application Support/MobileSync/Backup It can be interesting to look at these backups, but a bit of work is necessary to get access to them. I've whipped up a quick and dirty application to display the most common cases, iPhone Backup Slurper. mdbackup FilesThe files themselves are named with what appears to be a hex representation of a UUID with the extension "mdbackup". One of these files corresponds to a single filesytem entry on the iPhone. The file is just a standard plist, with binary encoding. You can convert this to a text file using plutil -convert <src path> -o <dest path> The plist contains the following keys:
The file can be any arbitrary kind of file, but in practice, there are only a few different types of files that developers seem to actually be saving in the filesystem. The app reads in the plist, displays the metadata keys described above, and does some heuristics on the data to try to guess how to display it. The most common cases I found by browsing my own backup directory were:
iPhone Backup Slurper will print any of these out to a descriptive file when it encounters them. If the backup contains an image, it will display the image. For a zip file, it will display the filenames embedded in the zip. It will dump the contents of an SQLite database.
There are two pathological cases I found while playing with this that I couldn't figure out how to handle. First, there are some files that appear to be SQLite 3 databases – the file begins with the string "SQLite format 3". But the version of SQLite 3 included with Leopard 10.5.5 gawks when trying to read them. Second are the audio files bundled with Tap Tap Revolution. The Quicktime APIs don't recognize them as valid m4a files. Maybe they're actually something different. Manifest FilesThe backup directory also contains a plist named "Manifest.plist". This is a manifest of all of the mdbackup files in the same directory. iPhone Backup Slurper can also display the contents of this file by choosing Open Manifest from the File menu. The manifest contains the following key/value pairs:
ConclusionI hope iPhone Backup Slurper is useful to people or just fun for exploration! If nothing else, it's a good example of using a bunch of different APIs to parse different filetypes. Finally, I'm indebted to OmniGroup for their useful OSLDatabaseController sqlite wrapper class. |