BuySellAds.com

Until Dec 3rd, 44% off all Manning books, including Barcodes with iOS! Promo code: mobicftw
Our DNA is written in Objective-C
Jump

Oh No! All App Sales Data Gone!

When I updated my iPhone 3G to OS 3.0 to be used on – shall we say – the network of my choosing I found that the signal strength reported is much less. Most of the times it is even “No Service”. On various forums you can read that this might be due to restoring the iPhone from backup. So I did a full factory reset hoping to fix the problem, which it did not.

But when I wanted to get back to my normal life I found that the wipe also had removed important data like all my daily sales reports since October which I have been faithfully collecting with my trusty MyAppSales app. With the built-in import/export web server it is easy to copy the sqlite database over to your Mac. But then it dawned on me that I had done so the last time 13 days ago.

So if I would put this in db in, I would have a gap of 6 days. I needed to find a way to get back to just the single apps.db contained in the iPhone backups that iTunes routinely creates every time you synch.

If you only have iTunes at your disposal then you are limited to fully restore all user data including data for apps that you no longer have installed. My tests have shown that iTunes does not check which apps you really install again but instead copies all user data over.

In my case I needed a much more fine grained approach. Luckily the iPhone backups usually are not encrypted. This new backup encryption feature of iTunes 8.1 is not on by default and this permits some nifty applications to extract data from the backup files.

There are two tools that you find if you go search for “iphone backup extract”. One that is based on .NET and will run on Windows with the framework installed and on Linux and OSX if you install Mono. This is called Backup Extractor by Reincubate: Labs. I had been recommending this tool to a couple of clients previously who have successfully recovered a current apps.db, but complained that it would take them upwards of half an hour to extract all files.

I am not the patient type so I continued digging for a more fitting solution. I found an old Google Code project with a python script which directed me to a well hidden (i.e. not visible in Google) page with my final solution.

The tool that I settled on is also called iPhone/iPod Backup Extractor but the name of the site made me smile: supercrazyawesome.com. But the name fits, because incidentally I find it super and awesome to be able to extract user data for single apps with ease.

Backup Extractor

That’s all there is to the user interface. You click on “Read Backups”, choose the one that fits your device and the correct time and then you choose the app. I chose MyAppSales, and extracted my data into a new directory.

After reinstalled MyAppSales from XCode via “Build&Go”, I fired up the internal web server on the settings dialog.

Import Server

I connected to the mentioned IP address with Safari, uploaded the previously recovered apps.db and restarted the app. Then finally the one new report from yesterday that I really was after got downloaded and I was happy.

That’s why I can wholeheartedly recommend this tool to anyone who ever gets to be in a similar situation. Just in case I send the author a couple of dollars to show my appreciation.


Categories: Tools

%d bloggers like this: