I upgraded an Apple iPhone 3GS today to iOS4. It took about 3 hours with a bit of time spent messing with USB.
The platform was Ubuntu 10.04 (Lucid Lynx) with VirtualBox 3.2.4 running Windows 7.
It actually might be a stretch to call the process an upgrade.
The first thing that happened after iTunes did a sync and started the process was the phone restarted and went into "recovery mode". This is when a logo of iTunes and a USB cable appear.
Advertising iTunes, even when you are down? This made me nostalgic for the sad mac.
Which is more helpful? You be the judge.
So, it turns out that an iPhone in recovery mode must reconnect to the same iTunes that started the "upgrade". That is because a new OS is not just an upgrade — the phone is wiped (although I have not yet done forensics to look for residue) and then restarted before the new OS is installed.
The problem with VirtualBox on Ubuntu at this critical point is that an iPhone in recovery mode may not appear to a guest. It appeared in the list of USB devices but was greyed out and Ubuntu was not able to mount it either.
Privileges necessary to mount a "recovery mode phone" are higher than a normally operating phone. This could be related to the /dev/bus/usb directories. The character special file (e.g. /dev/bus/usb/008/001) has 664 (crw-rw-r–) permissions and is owned by root:vboxusers. The fact that it works fine before the phone goes to recovery mode must have to do with how usbmuxd and libgpod operate.
To avoid this snafu you must verify correct permissions are set for VirtualBox. In a terminal edit /etc/group so your username is in vboxusers:
Here's the graphical version to do the same thing:
Click on System –> Administration –> Users and Groups
Then click on the Manage Groups button
Scroll down to the vboxusers group. Select it and then click the Properties button.
Click the box next to the username to add to the group.
It also is recommended to add a USB filter in the settings for the guest OS. Set the Vendor ID to 05ac
With those settings in place the iPhone will be detected and iTunes will push the new iOS4 to it. Once it restarts it will ask you if you would like to recover your data.
My experience so far is that calls still drop often and battery life is poor. The upside is that email can be threaded and supposedly it is encrypted for real this time. More on that later.