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...)

  • 1
    You could determine the file type by looking at the files header. If you're running a Linux machine, there's a helper available: simply call file SD_20121221_448193_0 and it should tell you the file type. It will most likely be some compressed XML. So on Windows, you could try opening it with WinZip -- with some luck it is simply a .gz (GZip) compressed XML.
    – Izzy
    Dec 29, 2012 at 21:00
  • Executing "file SD_20121221_448193_0" in Linux outputted: "SD_20121221_448193_0: data". And no luck opening it as an archive, neither using file roller on Ubuntu nor using 7zip on Windows...
    – Lawand
    Dec 29, 2012 at 21:07
  • So if you open it with some editor/viewer (easiest: head -n 1 SD_20121221_448193_0), is there any readable content within the first few characters?
    – Izzy
    Dec 29, 2012 at 21:11
  • I executed that and got this weird output: ����t
    – Lawand
    Dec 29, 2012 at 21:43
  • "Weird output" was to be expected, as the file is binary. That's why I asked for the "readable part". To give an example: .jpg files have a "JFIFF" in the first line. If your SMS are not too sensitive stuff, you could put them somewhere for download, then come to chat and we check further?
    – Izzy
    Dec 29, 2012 at 21:48

1 Answer 1


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.

  • Unfortunately, the second option doesn't do it because the emulator supports running plain Android images (without add-ons like HTC sense UI) so I wasn't able to run the messaging application which was shipped with the phone on the emulator :(
    – Lawand
    Dec 30, 2012 at 16:37
  • I was afraid of something like that. So you succeeded with the first option?
    – Izzy
    Dec 30, 2012 at 18:18
  • Yeah, re-flashed and was able to export the SMS...
    – Lawand
    Dec 30, 2012 at 23:02
  • @Lawand Tnx for the feedback! Updated my answer accordingly.
    – Izzy
    Dec 30, 2012 at 23:25
  • @Izzy .. I have same problem, where I exported sms from old HTC and dont have that phone now. And cant open the exported sms on my new Samsung phone. Can you suggest anything?
    – Garry
    Dec 15, 2015 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .