Today was the day I finally broke free from the shackles of Windows Mobile 6.5 on my HTC HD2 (brilliant device, merely decent OS), loading a ROM for Android 2.3 (Gingerbread). I’ll go into details another time, but the only major obstacle for me was transferring SMSes. After much Googling, it was still not obvious how to do it, but I can now confirm it is possible. Here’s how I did it (short version):
- Back up messages using PIM Backup (freeware)
- Convert backup file format from CSV to XML (?)
- Restore XML using SMS Backup & Restore (freeware)
It’s the middle step, the conversion, that is unintuitive. Surely there should be a PIM Backup app for Android? Or an app that imports PIM Backup files? As far as I can tell, there’s not, but this post by the SMS Backup & Restore creator Ritesh Sahu set me on the right track. He created a WinMo app called SMS Exporter, but there were mixed reports of success, so I followed his advice and read through this post by Mario instead.
Mario had written a Perl script to convert the PIM Backup format (semicolon-separated values) to a format compatible with SMS Backup & Restore (XML) such that the converted file could be ‘restored’ on the new Android OS.
Unfortunately I (and other users) couldn’t get his script to work properly, and I don’t know Perl, and he wasn’t replying in the comments, but looking at the code I figured it couldn’t be too hard to recreate in Python. Neither format is terribly complicated after all; each is effectively just a row of attributes for each message.
You can check out and download my Windows Mobile to Android SMS Converter tool from this site. To use it, you just need to have Python 2.x installed (you may have already – type “python” without quotes in your command prompt or terminal), and to perform the conversion, set the working directory to that of the Python script and use the command python pim2smsbr.py backup_file [output_file], where:
- backup_file refers to the name of your PIM Backup file, something like PIMBackup_20110701.pib (if you created it on the date of this post), and
- [output_file] is an optional argument that allows you to specify a filename for the output (or you can omit it, and it will output alongside the input file).
The final step is simply copying the output file onto your Android device, opening SMS Backup & Restore, choosing Restore, and selecting the output file (and choosing not to check for duplicates). And then you’re done, congratulations! It should import all the messages rather quickly and they are automatically associated with existing contacts and built into conversation threads.
So that’s it! It’s a ugly, hacky three-step process, but it’s very possible. Enjoy your superior operating system with your data intact :). Let me know of any trouble you have in the comments and I’ll get back to you ASAP.