I've literally been trying to crack this for an hour. With previous versions of iOS, the db was a simple sqlite file and could be opened with any sqlite utility. I really need access to these messages and I'm at a loss on how to open the database.

Note: I've pulled the file off of the iTunes backup.

  • 1
    If you look at the header of the file here, it is clear it is some sort of mangled SQLite file. What's not clear is how it was mangled. The tool at http://insend.de/, which does decode the database, claims that the file is a binary plist. They're short description is near the bottom of the page.
    – deftonix
    Nov 15, 2011 at 0:44
  • This is a really good find. I am just waiting for someone to come out with a free tool to decode these new db files. I have began backing them up every month so I have all my messages which I now have to delete...
    – user14686
    Dec 7, 2011 at 21:48
  • Did you try the "file file.name" command in the terminal? That would try to guess the file type, and almost never been wrong with me so far. At least you would know where to start from.
    – ismail
    Feb 11, 2012 at 3:26

5 Answers 5


I've pulled my sms.db file of my iPhone 4S running iOS 5.0.1 (of off live system using scp) and was able to browse the DB as normal using the sqlite client included with OSX Lion. Possibly the current format is somehow incompatible with older versions of the client. The version of the client included with Lion is 3.7.7:

$ sqlite3 sms.db
SQLite version 3.7.7 2011-06-25 16:35:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .databases
seq  name             file                                                      
---  ---------------  ----------------------------------------------------------
0    main             /Users/tyr/sms.db                                         
sqlite> .tables
_SqliteDatabaseProperties  message                  
drafts                     msg_group                
group_member               msg_pieces               
madrid_attachment          settings                 
madrid_chat                templates                
sqlite> select * from settings ;

You're right - it does look like an SQLite file. The header looks similar to a SQLite 3 file I had a look at:

SQLite format 3^@^P^

I assume you've tried version 3 of SQLite?



It seems the SQLite 3 database format has something that some clients do not like.

In Windows, you can extract the data with SQLite3Explorer http://www.singular.gr/sqlite/


For windows user, In case someone still has problem reading ios 5, sms database, download an sqlite administrator app from here but.. replace its sqlite dll from sqlite org site


An alternative approach is to use 3rd party software - I've used DiskAid to access my SMS. DiskAid copies all messages to a flat text file, which may or may not serve your purposes!

Hoipe it helps someone - my answer addresses the stated need, rather than the headline question:

"I really need access to these messages and I'm at a loss on how to open the database."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .