Tag Archives: sms.db

Recovering iOS sms backups.

Sms backups can be in 2 forms –

Category 1

If you have manually extracted out the sms.db file via SSH or some iOS file explorer software

Category 2

If you didn’t manually extract out the sms.db file, you can look for it in the C:\Users\UserName\AppData\Roaming\Apple Computer\MobileSync\Backup . There should usually be 1 folder in there representing your backup. If there are more than 1, that means that you have synced >=1 iDevices with different device names. Simply check the date to choose the appropriate backup folder you want.

After that, locate 3d0d7e5fb2ce288813306e4d4636395e047a3d28 file inside the backup folder. Use Windows Search for this =D

Steps if your situation falls under category 1 :

1. Rename your sms.db file to sms.sqlite. If the file format (db/sqlite) isn’t visible, click on Organise tab at the top left corner and select Folder and search options > View. Check the option for  ” show hidden files,drives and folders ”

2. Open Firefox and install the SQLite Manager add-on for Firefox, restart Firefox. Click on Firefox button > Web Developer->SQLite Manager. On SQLite Manager window click the ‘open’ icon and select sms.sqlite.

3. Click on the Execute SQL tab and paste the following query into the ‘Enter SQL’ empty space :

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

4. Click Run SQL button and yeah, you get your smses back. Organisation may not be as neat though.

Steps if your situation falls under category 2:

Step 1 to 2 is the same as category 1.

3. Click on the Execute SQL tab and paste the following query into the ‘Enter SQL’ empty space :

SELECT m.rowid as RowID, DATETIME(date + 978307200, ‘unixepoch’, ‘localtime’) as Date, h.id as “Phone Number”, m.service as Service, CASE is_from_me WHEN 0 THEN “Received” WHEN 1 THEN “Sent” ELSE “Unknown” END as Type, CASE WHEN date_read > 0 THEN DATETIME(date_read + 978307200, ‘unixepoch’, ‘utc’) WHEN date_delivered > 0 THEN DATETIME(date_delivered + 978307200, ‘unixepoch’, ‘utc’) ELSE NULL END as “Date Read/Sent”, text as Text FROM message m, handle h WHERE h.rowid = m.handle_id ORDER BY m.rowid ASC;

4. Click Run SQL button and yeah, you get your smses back. Organisation is superb for this method. The SQL commands are simply fantastic 🙂 Kudos to the author.

With great thanks to Google, and the following two resources :
yogeshd.blog.com

linuxsleuthing.blogspot.com

Advertisements
Tagged , , , , , ,
Advertisements