iPhone Text Message SQLite SQL Query

In my experience, the iPhone text message search functionality is usually pretty awful. Especially if you're trying to find a text from a few years go. Luckily, if you backup your iPhone using iTunes, your text messages are exported/stored in a SQLite database, and it is fairly easy to query.

Here are the steps to SQL Query your Text Messages.

  1. Backup your iPhone using iTunes.

  2. Find the SQLite file that contains your text messages.
    - in ~/Library/Application Support/MobileSync/Backup/* with a filename of 3d0d7e5fb2ce288813306e4d4636395e047a3d28

  3. Ensure you have a SQLite Query tool (SQLiteBrowser is pretty good).

  4. Open your SQLite Text Message DB File using your favorite SQLite query tool.

  5. Execute this query to see all your messages.

Disclaimer, I had to guess at the table structure, therefore I can not confirm that the joins in this query are 100% correct. My quick spot checks seemed to check out, and I was able to query the message.text field to find old messages that the iPhone app was not able to.




Hope this helps,
Aaron



Post a Comment

Popular posts from this blog

How to Turn Off Microsoft Arc Touch Mouse Scroll Sound Vibration

Hacker News Dataset October 2016

VirtualBox Right-Click Windows Taskbar On Mac