As someone who places very little value on mobile apps, I’m for the most part a very happy Windows Phone user. The phone rings, I answer it. Occasionally I’ll send a text message. These functions work perfectly.
The nub with Windows Phone, though, has historically been gaining access to the raw data on the phone. Microsoft do not make this easy, and it seems, without jeopardizing the data on the phone and using unofficial jailbreak scripts, it has been for the most part impossible.
Until recently it’s been utterly impossible to export contacts and SMS from a Windows Phone 8.1 device, however sometime recently Microsoft have shipped some magical privileged “Contacts+Message backup” application that generates a bunch of XML files on the phone’s SD card.
On examination the XML files appear to be complete, although numerous bits of massaging are necessary to actually make use of them:
- text/plain parts are encoded as UTF-16
- “LocalTimestamp” fields are specified as 10ths of a microsecond with an epoch of January 1, 1601
- They aren’t valid XML, and require lxml’s recover=True option.
A few hours’ hacking on these files yielded gmail-archive-sms-backup.py, which can read the XML files in, format them as MIME e-mails, and then upload them to GMail for permanent archival and search visibility.
Hopefully someone else finds this script useful. It’ll require some TLC to get working with your account, but hopefully not hours worth. Now I can factory restore my phone with impunity!