Tuesday, 7 June 2011

Upgrading your iPhone with iTunes on VirtualBox

The annoying thing about having an iPhone is that it can only be upgraded with iTunes - at least until we get iOS 5. What's the annoying thing about iTunes? It is not available for Linux users. So we have to resort to the roundabout method of installing iTunes on a Winduhs install running in a virtual machine. I use VirtualBox. Everything works fine (backup up and syncing) as long as you don't upgrade the iOS. Once you try to do that, you will notice that somewhere along the way, the process stops and your iPhone is a shell of its former self, capable of displaying only an image begging you to connect the phone to iTunes via the cable. As it turns out, the problem is that during the upgrade, the iPhone changes its USB identification multiple times and VirtualBox is not able to keep up with this because it doesn't have the necessary permissions. Here's what you can do to restore your phone to factory settings first and then restore it from a backed up version:

1. First, shut down VirtualBox.
2. With the iPhone connected, go to the settings for your Winduhs machine in VirtualBox and create a new USB filter from the iPhone (in recovery mode). Delete all the information except for the Vendor ID and save the new settings. Now, close the VirtualBox itself.
3. The trick is to run VirtualBox as root. This takes care of any permission problems. In order to do so, you need to have the same .VirtualBox file available to root. Simply make a symbolic link:

$ sudo ln -s /home/yourUsername/.VirtualBox/ ~root

Note: make sure to remove any previous .VirtualBox directory there may have been.
4. Now, you are ready to run VirtualBox as root:

$ sudo VirtualBox

5. Your iPhone should automatically be detected by iTunes. You will first have to restore it to factory settings. Once that is done, you may restore it to a backed up version.

7 comments:

  1. I can only say ... I wish I came across the article sooner :S
    Worked like charm...

    Thanks ever so much :)

    ReplyDelete
  2. oh wait...you only posted this a few mins ago :)

    ReplyDelete
  3. Great! Thanks. This was very helpful.

    ReplyDelete
  4. Awesome! It worked for me, and I only had to add the USB profile containing only the vendor (and the name), I didn't have to modify anything with permissions.

    ReplyDelete
  5. If you have missing information in your iTunes then that makes it harder for you to find the song you are looking or know what the song is that you are listening to to even consider buying more from that band.
    iTunes gift cards for free

    ReplyDelete
  6. One of the things I really hate is not having album cover artwork on my music. It's already bad enough that we're not physically holding the music anymore so I at least want to see what I'm listening to and it's not a grey music note that I'm listening to which is what your imported music will look like on your iTunes and iPhone and iPod.
    Delaware water gap trail map

    ReplyDelete