Sunday, May 22, 2016

4.0 ice cream sandwich - How to extract SMS from an HTC One ICS SMS backup file?


I have an HTC One V and I backed up my SMS using the phone's messaging application (which is a part of the ICS stock ROM) to the SD card. The resulting backup is a file called SD_20121221_448193_0 and stored in the SD card in /sms_backup


After that, I updated to an unofficial Cyanogenmod 10 and I don't see any options in the messaging app that comes with CM10 to backup or restore SMS.


How do I restore my backed up messages? Alternatively, how do I extract them from that backup file or convert them into another format? (I tried opening the file using a text editor and it seems like a binary file, I also tried opening it using SQLite Browser but it says that it isn't a SQLite database. So, to be honest, I don't know the format of the file and it would be great if someone can at least tell me what format is this file supposed to be...)



Answer



As we checked out on chat, the file was not (as originally expected) some compressed XML in any known format -- so there seems to be no easy way to read the contents of that file. Which leaves you with a few options:




  1. re-flash the stock image to your device, import the backup, then use a good backup app like SMS Backup & Restore to back up your SMS. After that, flash back your current ROM, and import with the same app.
    This should always work (and did in the OP's case), but means a bit of effort as one has to flash the device at least two more times (to stock, and back to current). Before doing this, consider making a backup if you already put some customization/configuration work into your current ROM.

  2. Similar: Use an Android Emulator (the one from the SDK, or Jar of Beans), load the same Android version you had on your device before, import the backup, and use one of the mentioned apps to export it from the Emulator, as well as to import it on your device.
    Note: this might only work for "Plain Vanilla Android", as the emulator will most likely not support device-specific (or manufactur-specific) stuff. Unless there's an emulator around supporting device-specific images, of course. In the OP's case it did not work, as the app in question was bound to HTC's Sense stuff.


Unfortunately we've been unable to determine the file format used. For completeness, one other thing we tried:


If a complete Nandroid backup is available, the SMS database can be found in /data/data/com.android.providers.telephony/databases/mmssms.db and explored using any SQLite frontend (recommendation for a graphical one: SQLiteman). Unfortunately, in this case the database was empty due to the wipe occuring when unlocking the device.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...