View/Export SMS from iPhone sms.db file

Here is how to recover SMS from iphone sms.db file, located at /private/var/mobile/Library/SMS/sms.db.

1. Rename sms.db to sms.sqlite

2. Open SMS database

Open Firefox and install the SQLite Manager add-on for Firefox, restart firefox. Goto Web Developer->SQLite Manager. On SQLite Manager window click the open icon and selected sms.sqlite.

3. Open the Execute SQL tab and execute the following querry

SELECT rowid, address, date, text FROM message ORDER BY date

And wollah, there are all your sms.

4. Hit the Actions button and choose Save Result(CSV) to file

there you have all your sms in a CSV.

3 Responses to “View/Export SMS from iPhone sms.db file”

  1. Thanks for this! The only thing that has worked.

  2. When I try this it gives me an error saying ‘file is encrypted or is not a data base’…my backups are not encrypted…I have an iphone 3g with all the updates. I originally tried opening the sms.db file with textedit, but realized the mistake and changed the file type to open by default with sqlite. Help!!

  3. Hey !

    Thx really nice ! It worked for me, but I have a question..

    Can you provide a sql querry with a inner join or smth to be able and see the conversations exactly how they are on iPhone ?

    I want to see the sent message to ‘x’ number (address) and the replys from the ‘x’ . You get it :)

    Thx in advance !

Leave a Reply