Sunday, December 19, 2010

Mystery 5.8Gb of app data on my iPad

So I go to sync my iPad for my short trip to Denver. I wanted to put a movie on it so I could watch something on the plane . Imagine my surprise when my iPad had these stats:

201012191312

5.8Gb of App data! Wow. Where did that come from? I go into the apps tab and sort my apps by size:

201012191314

The biggest app I have installed is 190Mb (big to be clear, but not 5.8Gb of big. If I add up all my Apps, I get somewhere in the 500Mb range. Where is all this space going? So I do some googling around and get no where fast. Turns out Apple has changed the way they do backups from version to version. Some say it should be under /private/Library. Some say /private/var, etc... Anyway, I found my backups under /Users/rwhiffen/Library/Application Support/MobileSync/Backup. Under there are some cryptic directory names, likely MD5 hashes. The one I'm interested in is from today when I'm syncing my iPad: 6bf83d2961ea2206b4c08edb555b2b0d89c7f218. Inside there are 4083 more hashed file names. One in particular is quite large:

 


rwhiffen:6bf83d2961ea2206b4c08edb555b2b0d89c7f218 rwhiffen$ ls -lh 5180d2cec771957569b3dc0a8eed20b536fa9185



-rw-r--r-- 1 rwhiffen rwhiffen 4.2G Dec 14 00:22 5180d2cec771957569b3dc0a8eed20b536fa9185



rwhiffen:6bf83d2961ea2206b4c08edb555b2b0d89c7f218 rwhiffen$


 

So that's probably my problem App. Now I just need to figure out how to get 5180d2cec771957569b3dc0a8eed20b536fa9185 translated into something meaningful. There are a few files:

 


-rw-r--r-- 1 rwhiffen rwhiffen 93500 Dec 19 13:01 Info.plist



-rw-r--r-- 1 rwhiffen rwhiffen 660554 Dec 19 13:01 Manifest.mbdb



-rw-r--r-- 1 rwhiffen rwhiffen 126656 Dec 19 13:01 Manifest.mbdx



-rw-r--r-- 1 rwhiffen rwhiffen 7025 Dec 19 13:01 Manifest.plist



-rw-r--r-- 1 rwhiffen rwhiffen 189 Dec 19 13:01 Status.plist


 

That probably have the data, just need to figure out how to read them. Info.plist just has some interesting xml data about my iPad. Manifest.plist looked promising. It was in binary so I had to convert it to xml first: plutil -convert xml1 Manifest.plist (be sure you copy it to a temp location first and don't convert the original...). Manifest.plist looked like a bust too. Status.plist is just the status of the last backup. So no useful stuff there. Ugh.

 

So that means I need to try and slog through the mbdm and mbdx files. Yikes. Fortunately someone else has been there first: http://stackoverflow.com/questions/3085153/how-to-parse-the-manifest-mbdb-file-in-an-ios-4-0-itunes-backup The user Galloglass' solution worked best for me. I cut and pasted his Python code into a file lsback.py and chmod'ed it 755.

 


rwhiffen:6bf83d2961ea2206b4c08edb555b2b0d89c7f218 rwhiffen$ ./lsback.py | grep 5180d2cec771957569b3dc0a8eed20b536fa9185



-rw-r--r-- 000001f5 000001f5 4479500672 1291642994 1291642994 1291592204 (5180d2cec771957569b3dc0a8eed20b536fa9185)AppDomain-com.polishedplay.puppetpals::Documents/ipad/recordings/new/audio



rwhiffen:6bf83d2961ea2206b4c08edb555b2b0d89c7f218 rwhiffen$


 

So it would seem that there is a stray audio recording for PupetPals , one of my kids games. So I deleted it, re-synced the iPad, then added the App back.

201012191341

Now a more reasonable number. Still higher than I would have thought, but not 5.8Gb.