Saturday, September 6, 2008

iPod/iPhone Application update breakage

I think I should prefix this post with one quick proviso... I have pwned my iPod, this may have caused the things I am about to talk about.

I noticed that after I updated my device to 2.0.1 (and restored the backup) a few things stopped working... These were, that I could no longer view my mail (it kept beeping every 15 minutes to tell me there was something new), and I could no longer update (AppStore) applications (either via iTunes, or directly on the device).

Since I had ssh access to the device, I was able to dive into the file-system structure to see if there was anything that seemed a little weird... After fiddling around for a little while, I discovered that some of the mail sub directories (~/Library/Mail/) were owned by the user root. This seemed odd since Apple had made all user applications run as the mobile user (as of about 1.0.2). I decided to chown these directories back to the mobile user. This Seemed to fix the mail bugs.

After a few more weeks, I decided to try to fix the bugs with application updates. After some more exploring, I discovered that the problem had the same root cause as the mail bug (directories were owned by the wrong user). This time the directory in question was ~/Media/ApplicationArchives/. It seems that this location is used by Apple in the process of updating apps... In particular, it contains a zip file of the application to be installed.

No comments:

Post a Comment