UPDATE: This is very old now. There is a much easier and cleaner way to backup/restore and import SMSs now. Full details are available at

I got my shiny new HTC Hero a month back and since then have been wondering how to get my 900 odd SMSs from my Nokia N95 to HTC Hero. I finally managed to do it via a bit tedious process after many trial and errors. I am posting the full method here to help anyone who wants to do it in future easily :).

Before we start please make sure that your  HTC phone is rooted. If you have a HTC Hero I used this guide.

Softwares needed on your PC for this to work:

  1. HTC Sync
  2. Nokia PC Suite
  3. ABC Amber Nokia Converter
  4. Notepad++
  5. MuF’s Nokia SMS convert utility
  6. Android SDK
  7. Android SMS Importer (Attachment in the first post)


Export Nokia SMSs to XML:

  1. Install all above mentioned softwares on your PC.
  2. Run Nokia PC Suite. Open the Messages application. Select Inbox from the left pane and then select (all)messages and right click and select Copy.
  3. Create a new folder on your PC called “Inbox” and paste the messages in there. It  should create a .vmg file for each message.
  4. Open the Inbox folder with ABC Amber Nokia Converter.
  5. Select all messages, File>Save as> TXT(ANSI). Name it for example “Inbox.txt”.
  6. Run MuF’s Nokia SMS convert utility, open the Inbox.txt file. You will get file Inbox.txt_export.txt.
  7. Download the attached Import.xml file here (Use Right Click->Save As).
  8. Open the import.xml with Notepad++.
  9. Open the Inbox.txt_export.txt, select all, copy.
  10. Paste the Inbox.txt_export.txt right after the “Inbox” xml tag. It should look like this:
    <folder name="Inbox"><message date="22/08/2009 22:47:55" sender="+4...
  11. Repeat the proces for “Sent Items”. Create another empty folder, copy&paste from Nokia Suite, load with ABC Amber, export as .txt, load with MuF’s utility.
  12. For the xml file generated you will need to replace sender word with recipient and vice versa. I did it by replace sender with a dummy text and then replacing recipient with sender and then dummy text with sender.
  13. Paste new file into xml after the “Sent Items” tag.
  14. [Update: After the updated MuF Converter this isn’t necessary. Double check anyways]
    Check the date format of messages in the xml file if it is dd-mm-yyyy. It needs to be converted to mm-dd-yyyy. There is an easy way to do it via Notepad++.  Do a search and replace using the following instructions:

    • Open the replace dialogue (ctrl+H)
    • Find what: date=”([0-9]*)/([0-9]*)/([0-9]*) ([0-9]*):([0-9]*):([0-9]*)”
    • Replace with: date=”\2/\1/\3 \4:\5:\6″
    • Search Mode: Regular expression
    • “Replace All”
  15. Save Import.xml

Copy the SMS database from your rooted HTC Android phone

  1. Connect the phone using the USB cable. Do not mount it as a USB device. Click on the message in notification area which says “HTC Sync” and make sure HTC Sync is running on your PC.
  2. Open Command Promt on your pc (Type “cmd” in Run) and change to the android SDK tools directory.
  3. Run the following commands.
    adb shell
    cd /data/data/com.android.providers.telephony/databases
    cat mmssms.db > /sdcard/mmssms.db
  4. Now mount your SD card for USB transfer and copy the mmssms.db file on your PC.

Import your SMSs into the Android SMS DB.

  1. Open Android SMS Importer.
  2. Make sure the Inbox and Outbox names read “Inbox” and “Sent Items”.
  3. Select Import.xml in Import file field and click on Read button.
  4. Please note that you may get errors quoting line numbers and column numbers.  This is due to invalid characters in xml like & and <.   I replaced all "&" in my files with "and". It did make all URLs in my texts useless but it preserved the rest of it.  For < unfortunately there is no easy way so you have to replace one by one as the program reports them.
  5. Once the program is able  to read them you will be able to see a list of your SMSs in the datagrid.
  6. Select the Android SMS Db file and click on write. If there are too many messages this will take a while.
  7. Once that is done if you want you can check the db file with a SQLite browser. However this is not required.

Copy the new file back to Android Phone.

  1. Copy the new database file back to your SD Card.
  2. Unmount your android phone for USB transfer.
  3. Connect it to HTC Sync like before and launch Command prompt and change to Tools directory for Android SDK
  4. Run the following commands.
    adb shell
    cd /data/data/com.android.providers.telephony/databases
    mv mmssms.db mmssms.db.old
    cat /sdcard/mmssms.db > ./mmssms.db
    chown radio.radio mmssms.db
    chmod 660 mmssms.db

That’s it. I imported over 900 SMSs using this. Please do this at your own risk and I am not responsible for any damage. Also feedback is appreciated :).

P.S: I will post a review/tips&tricks article for HTC Hero soon.





sibbor · September 8, 2009 at 6:57 am

Nice to see that you used my method with regexp in Notepad++ to replace with correct date 😉

MuF · September 10, 2009 at 5:04 pm

so mm-dd-yyyy? And the recipient problem? 🙂 please use this thread to make the sms converter better: http://forum.xda-developers.com/showthread.php?p=4385729 byeeee… MuF

Vinod Mishra · September 11, 2009 at 2:58 pm

@sibbor Yes. Thanks for that. I have included that thread in the credit that’s why.
@MuF Apologies for missing your thread in credits the first time 🙂 Included it now. I am testing your 0.2 release of convertor now. If it works. i will update the post.

Vinod Mishra · September 11, 2009 at 3:10 pm

Tested your new version. The sender/recipient problem is still there. Maybe because Android is different from WM and the format your converter outputs is not the same. I will try and write a new converter which does directly inserts the Amber export file in Android DB anyways. Thanks for all your help guys.

cYpHeR · October 25, 2009 at 1:06 pm

Thank you for the guide. I’m writing a transposition of it in italian for Linux Ubuntu users: http://wiki.ubuntu-it.org/InternetRete/Messaggistica/SmsNokiaAndroid
But I realized that when I import sms from my nokia to htc (magic), there is the original date but the time is wrong. Infact in all the sms there is the time when I transferred sms from nokia to htc!!! Is this normal? I verified that in my Import.xml file the format is like this: . So what’s the problem?

Vinod Mishra · October 26, 2009 at 11:00 am

Hi Cypher.. this might be due the fact that HTC Hero has the HTC Sense UI and might use a different time format to the original devices. If you could send me your sample Import.xml file and the the message db file. I could look into it and see whats the issue.

How to import SMSs from Nokia to HTC Android devices « The Android Life · September 3, 2009 at 2:42 pm

[…] original post here:  How to import SMSs from Nokia to HTC Android devices var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var […]

Nokia txt msg's to Desire ? - Android Forums · September 7, 2010 at 10:11 pm

[…] Might have been XDA thinking about it. Found this though – How to import SMSs from Nokia to HTC Android devices|Vinod Mishra […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.