<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Long-term Memory &#187; WindowsMobile</title>
	<atom:link href="http://blog.dest-unreach.be/tag/windowsmobile/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.dest-unreach.be</link>
	<description>A collection of note-to-self&#039;s</description>
	<lastBuildDate>Sun, 29 Jan 2012 16:05:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PIM Backup format reverse engineered</title>
		<link>http://blog.dest-unreach.be/2010/01/03/pim-backup-format-reverse-engineered</link>
		<comments>http://blog.dest-unreach.be/2010/01/03/pim-backup-format-reverse-engineered#comments</comments>
		<pubDate>Sun, 03 Jan 2010 17:41:05 +0000</pubDate>
		<dc:creator>Niobos</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PDA]]></category>
		<category><![CDATA[WindowsMobile]]></category>

		<guid isPermaLink="false">http://blog.dest-unreach.be/?p=1559</guid>
		<description><![CDATA[I still have a perfectly working Windows Mobile PDA-phone. I use a program called PIM Backup to make backups of the databases such as calls, SMSes (text messages), contacts, calendar, &#8230;. The program can generate either a binary backup, or a more readable backup. I use the latter one, so I could unpack the backup [...]]]></description>
			<content:encoded><![CDATA[<p>I still have a perfectly working Windows Mobile <span class="removed_link" title="http://www.htc.com/europe/product/p3600/overview.html">PDA-phone</span>. I use a program called <a href="http://www.dotfred.net/default.htm">PIM Backup</a> to make backups of the databases such as calls, SMSes (text messages), contacts, calendar, &#8230;. The program can generate either a binary backup, or a more readable backup. I use the latter one, so I could unpack the backup on my desktop computer and use it as an archive. The generated backup files have a .pib extension. The file itself is a ZIP-file containing the different parts of the backup (calls, contacts, &#8230;) as separate files.</p>
<h3><span id="more-1559"></span>The text messages (SMS)</h3>
<p>The text messages are in the file &#8220;msgs_<span style="color: #0000ff;">&lt;date&gt;</span>.csm&#8221;. This file is encoded in <a href="http://en.wikipedia.org/wiki/UTF-16">UTF-16</a> and is contains <a href="http://en.wikipedia.org/wiki/Comma-separated_values">Comma Seperated Values (CSV)</a>, well actually its semicolon separated, as the header describes (the following is a single line, but has been split into multiple lines for readability):</p>
<blockquote>
<pre>Msg Id;Sender Name;Sender Address;Sender AddressType;Prefix;Subject;Body;BodyType;Folder;Account;
Msg Class;Content Length;Msg Size;Msg Flags;Msg Status;Modify Time;Delivery Time;Recipient Nbr;
Recipients;Attachment Nbr;Attachments</pre>
</blockquote>
<p>I didn&#8217;t figure out what exactly every field means, but here are my findings:</p>
<ul>
<li>Folder &#8220;\%MDF1&#8243; is Inbox; &#8220;\%MDF3&#8243; is Sent</li>
<li>The Time fields are encoded &#8220;YYYY,MM,DD,hh,mm,ss&#8221;</li>
<li>Recipients contains a series of fields; the second and third seem to be name and number, I didn&#8217;t identify the others.</li>
</ul>
<p>I use <a href="/wp-content/uploads/2010/01/convert_sms.pl">this perl script</a> to convert from the messages inside the PIB file to a <a href="http://en.wikipedia.org/wiki/Maildir">Maildir</a>-like structure, writing an email-like file for every message in the backup:</p>
<blockquote><p>From: +32496______<br />
To:  &lt;&gt;<br />
Date: 01 Jan 2009 00:07:32<br />
Subject: SMS<br />
Content-Type: text/plain; charset=UTF8</p>
<p>___ message ___</p></blockquote>
<p>I usually just drop this folder into my IMAP-mailserver directory and browse my SMSes using Thunderbird.</p>
<h3>The call log</h3>
<p>The format is similar to the text messages: an UTF-16 CSV file but this time without an helpful header. I also wrote <a href="http://blog.dest-unreach.be/wp-content/uploads/2010/01/convert_calls.pl">a perl script</a> which converts this to a standard CSV-file with headers. There is some documentation inside the script on the fields I figured out.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dest-unreach.be/2010/01/03/pim-backup-format-reverse-engineered/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

