Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

share|improve this question
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 '11 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 '11 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 '12 at 3:26
add comment

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 ;
1|version|2.0.0
2|notificationCode|*N#
3|useNotifications|0
4|isDefault|1
5|compatibilityMode|0
6|useKeybCorr|1
7|useKeybCapi|1
8|useConfirmSend|1
9|nameorder|0
10|useShowAlerts|1
11|useStatusIcon|1
12|landscape|0
13|appSerial|0
14|lastMenu|0
sqlite> 
share|improve this answer
add comment

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?

http://www.sqlite.org/version3.html

share|improve this answer
add comment

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/

share|improve this answer
add comment

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

share|improve this answer
add comment

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."

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.