How to view iPhone application data


Here's a quick tutorial on using the SQLite Firefox plugin to view (some of) the data in your iPhone (or iPod touch) applications. Many applications use the standard SQLite library to store their data on the phone, and then back that up on the computer. All you need to read this data is the browser plugin, a bit of patience, and a bit of luck! There are applications that will automate this, but if you're curious about how this works, the following steps are easy enough to follow.

Requirements

SQLite Manager plugin

The only additional software you'll need is the SQLite Manager plugin, available from http://code.google.com/p/sqlite-manager/ It runs in Firefox, and other Mozilla based browsers or even standalone as a XUL application.

Apple iTunes backup of your iPhone or iPod touch

Of course you'll need some data files to look at, so you'll need to sync your device with your computer.

Steps

  1. Find your iTunes application backup directory:
    • Windows XP: C:\Documents and Settings\(user-id)\Application Data\Apple Computer\MobileSync\Backup
    • Windows Vista: C:\Users\(user-id)\AppData\Roaming\Apple Computer\MobileSync\Backup
    • Mac: ~/Library/Application Support/MobileSync/Backup

    There are one or more directories there - if you have more than one device your best bet is to look at the timestamps on the files to determine which directory is for which device.

  2. I highly recommend that you make a backup copy of the application data - we should be able to do this read-only, but why risk it. Copy the above directory into a new, temporary directory.
  3. Install the SQLite Manager plugin, following the instructions on the website above and then start it up in Firefox under the menu Tools -> SQLite Manager. A new browser window will open:
  4. To open the data for one of the applications, click the Open folder icon, or select the menu item Database -> Connect Database and change directories to the temporary directory you created above.
  5. The plugin only lists the *.sqlite files, but if you change that to 'All files' you see all the files in your temporary directory. Pick one of the *.mddata files (not a *.mdinfo file) and see what happens!
  6. Unfortunately many applications use an encrypted for of a SQLite database and you won't be able to view them - if you get an NS_ERROR_FILE_CORRUPTED Exception with a message of 'Component returned failure code: 0x8052000b' then you're out of luck (if you know way to read these files add a comment, please!)
  7. Once you find a data file that can be read, you'll see the database objects on the left side, with more details under the various tabs:
  8. The application data is likely in one or more of the 'Tables' so expand that part of the tree and click on the 'Browse & Search' tab to see the data itself:
  9. From here you can run SQL queries and get yourself into all sorts of trouble changing data...

Future improvements

Obviously this is just a quick start to get a sense of what you can do... In the future it would be good to:

  • Determine which subdirectory applies to which device
  • Determine which mddata file applies to which application
  • Determine which data files can be read, and which ones can't

Add a comment to let us know how you've used this, or if you have suggestions for improvements, links to other tutorials, etc...