July 19th, 2012


Taking out TXT(or sms in the rest of the world) from iPhone iOS6

I currently got an galaxy nexus and need to store my sms from iPhone somewhere just in case. 

I dig a bit and find this http://apple.stackexchange.com/questions/6900/how-can-i-export-sms-text-messa... and this http://www.iphone-sms.com/

However its not really works with iOS 6 beta3 just go nothing. So I decide to have a look inside SMS db

You can find file here :

 ~/Library/Application Support/MobileSync/Backup/blblblsdfsd2 blala34/3d0d7e5fb2ce288813306e4d4636395e047a3d28

This just a sqlite DB which is pretty cool(why all this program want a money?!) anyway

I did this

sqlite3 3d0d7e5fb2ce288813306e4d4636395e047a3d28 .dump > sms.db.txt

and look at output file - pretty simple format 

All you old sms you can get using query:

select datetime("date", 'unixepoch'),"address","text" from "message_legacy"

but some of newer not, apple change a format, so we add a bit of sql and got contact details. have a look:

select "handle"."id", "message"."text" from "message" left join "handle" ON "handle".ROWID="message".handle_id 

I can not export a date(well to too interested really) if you know how to convert date like that 326189033 to something more convenient let me know, please.

Posted via email from Eugeny