2009-07-11

Pain upgrading the iPhone to 3.0 under Virtualbox

Edit: I was informed by neh that all this was unnecessary, as you can get Vbox to auto-connects devices. Thanks Nathan!

Long story short: An upgrade to iphone version 3.0 under virtualbox and Debian as host system is possible, but it has to be done just right.

What you need to know before upgrading:

  • During the upgrade, the iPhone changes USB ID twice.

Yep thats about it. What you do is this.

  1. Jack in your iPhone to your linux box.
  2. Verify that it has been connected by running the command 'lsusb' in a terminal. You should see something like this:
    $ lsusb | grep -i apple
    Bus 001 Device 006: ID 05ac:1292 Apple, Inc. 
    $
    
  3. Now start virtualbox. In the settings for your Windows guestOS, under USB: check that your iPhone is visible and selected.
  4. Start the guestOS. Your iPhone should be autodetected and iTunes should start up.
  5. Tell iTunes to start the upgrade. (I have to admit I dont remember if iTunes prompted me to upgrade or if I somehow chose to. Click around till you get to upgrade.)
  6. Once it starts to upgrade, you'll notice that an icon at the bottom of the vbox window (dont run full screen!) looks kind of like a usb stick. Hover your mouse over it, and you should see a popup with a string like "Apple Iphone".
  7. Here's the tricky part. Once it is ready to upgrade, the iPhone drops into 'recovery mode', and it changes USB ID. When it changes USB ID it VirtualBox will
    1. Detect that the old usb device (Apple Inc. iPhone) has disappeared.
    2. not automatically present the new device which your linux machine has detected.
  8. Turn off your guestOS (even if you need to SIGKILL it).
  9. Start up Virtualbox again.
  10. In the Settings for USB, look for the new device. It should be called something like "iPhone recovery device" or something.
  11. Make sure that both your original iPhone device and the new device are visible in your list of USB devices. Only the recovery device need be checked.
  12. Start up your guestOS.
  13. Once started, check that the Recovery USB device is actually activated, by hovering over the USB icon at the bottom of the vbox window. If it doesn't show the name of the recovery device in bold, right click the icon and select it to activate it.
    For me, this happened a number of times. There seems to be a timer involved- if you dont re-activate the device in time, you'll have to start again from the previous bullet. You'll get an error message- I think it was error 1604. Like I said, just restart the guestOS, and you should be fine.
    Note: I had to restart my hostOS as well once, since I uncleanly killed the virtualbox process, leaving a tainted kernel module which refused to work properly.
  14. After a while, the process reverses itself- that is, the recovery device is not considered necessary anymore, and it disappears from the list of USB devices. Instead, you'll need to actively select the regular iPhone device. The normal timer rule applies.
  15. After a few more activating devices manually, you should be told by iTunes that the upgrade is complete. Now you'll need to re-activate the iphone device one last time for the final sync, to get all your precious data back into your system.

Thats about it!

5 comments:

  1. You shouldn't need to mess around like that. Set up a filter in Virtualbox that auto-connects devices with Apple as the manufacturer and you're done.

    ReplyDelete
  2. :) Aah. That would have been easier. Oh well, thanks for the update.

    ReplyDelete
  3. Ah.... I wish I had found this earlier. I set my iPhone to update and went to bed. I return this morning, iPhone is in recovery mode. So I did what neh said above and set the filter to connect any Apple device, but no matter what I do, the iPhone in recovery mode is grayed out and won't connect to the guest. My host is Ubuntu and I guess it's interfering?

    ReplyDelete
  4. "the iPhone in recovery mode is grayed out and won't connect to the guest..."

    You need to add your user to the vboxusers group. I'm told running vitualbox as root will affect the same result, but it's not really good practice.

    ReplyDelete
  5. Very useful post, thank you.

    ReplyDelete