iPhone notes extractor
Posted by marshall Thu, 08 Jan 2009 07:43:00 GMT
When I bought my iPhone 3G last summer, I decided to simply set it up as a brand-new device, rather than attempt to upgrade my original iPhone to the 2.0 firmware and then restore to the new one. I didn't really need the call logs, I had used Syphone to save my SMS logs as PDF files, and everything else was synchronized. Or so I thought.
I forgot about Notes. Notes don't sync.
When the iPhone was first introduced, it suddenly made sense why Apple was adding the Notes feature to Mail in Leopard: it needed to be able to sync with the iPhone. When the iPhone was released and Notes didn't sync up at all, I found it somewhat inconvenient, but knew that in just a few months Leopard would be released and all would be well. But then Leopard was released, and still there was no synchronization. It's now been over a year, with a brand-new iPhone OS 2.0 platform with multiple updates, a brand-new iTunes, and several updates to Leopard, but still, no synchronization of Notes. It really is puzzling.
At any rate, there I was with my new iPhone 3G, and I'd already handed down my previous iPhone, and I suddenly realized that my notes were all missing. At the time, I simply wrote them off as gone and moved on. But recently I wanted some information that I remembered storing in Notes on the iPhone, and realized that I still had the backup sitting around from the old device. I just needed to find a way to extract the Notes database and convert its contents into a readable format.
Now, there are existing tools floating around that can extract databases from iPhone backups, but my quick search didn't turn up anything that specifically located the Notes database and converted it to individual files like I wanted. Perhaps there is such a thing somewhere, but I was somewhat inclined to just write it myself anyway, simply for the fun of learning a little more about iPhone internals and solving my own problem. It turned out to be fairly easy to do using the stock Ruby installation in Leopard, which already includes the RubyCocoa and SQLite libraries needed to read the backup files.
So here it is, in case anyone else finds such a thing useful: iPhone Notes Extractor.
