Exporting iPhone SMS messages in Mac OS X

Discussion in 'Mac OS X' started by RHochstenbach, Jul 10, 2010.

  1. RHochstenbach

    RHochstenbach Administrator Staff Member

    Likes Received:
    26
    Trophy Points:
    48
    How to export the SMS messages from your iPhone on Mac OS X. First of all, create a new backup of your iPhone (right-click the icon in iTunes and choose 'Create Backup;.

    1. Get the UDID of the iPhone (click on the serial number on the iPhone Summary page in iTunes until it's displayed).
    2. Browse to ~/Library/MobileSync/UDID number (~/ =your home folder)
    3. Copy the file 3d0d7e5fb2ce288813306e4d4636395e047a3d28 to the desktop.
    4. In the terminal browse to your desktop.
    5. Now enter this command:
    Code:
    sqlite3 ~/Desktop/3d0d7e5fb2ce288813306e4d4636395e047a3d28
    6. Enter these commands:
    Code:
    [LIST]
    [*].header on
    [*].mode csv
    [*].output smsexport.csv
    [*]select datetime(date, 'unixepoch', 'localtime') as "date", case when flags=3 then 'sent' else 'received' end as "from", address as phone, text as "message" from message;
    [*].quit
    [/LIST]
    7. It's now exported into a csv file on your desktop (the current directory where sqlite3 was executed).
     
  2. SarahGuru

    SarahGuru Geek Trainee

    Likes Received:
    0
    Trophy Points:
    1
    When I call this line:
    [*]select datetime(date, 'unixepoch', 'localtime') as "date", case when flags=3 then 'sent' else 'received' end as "from", address as phone, text as "message" from message;

    I get an error message:

    Error: near "[ LIST]": syntax error

    What is going on and how can I fix it?
     

Share This Page