huanix

chown -R huanix /

huanix header image 2

Making an iPhone and iTunes work in an XP Virtualbox machine through ubuntu

October 31st, 2008 · 9 Comments · Intrepid, Linux, ubuntu


virtualbox_iphone.sh
(click the link above to download)

This post is depreciated! Please check out the current version: http://www.huanix.com/2008/11/03/fixing-usb-on-virtualbox-to-allow-iphone-sync-with-an-ubuntu-host-running-windows-xp/

There’s an excellent thread on the virtualbox forum (http://www.virtualbox.org/ticket/491 ) about getting an iPhone to be recognized by iTunes in a Windows XP virtualbox on an Ubuntu host. Someone shared a fix that required the user to modify the kernel, and i know a lot of people are uncomfortable with that. I automated the process with a shell script.

I am a novice shell scripter, but i did test this and it did work. I will continue to improve it until it is fixed in a release of VirtualBox, supposedly 2.1.

I do not claim the fix – i think it was provided by “remainder” on the virtualbox forum; i only took an effective fix and put it in a shell script.

For the VERY new user:
1. Be careful. Back up your data. If something breaks you’re on your own.
2. Save the file to your computer.
3. Open a shell and run it as root, it will probably look something like:

$chmod +x virtualbox_iphone.sh
$sudo virtualbox_iphone.sh

The script may take a long time to download files from the internet and it will reboot your computer when it’s done.

It’s always smart to look at a shell script in a text editor before you run it. At a very basic level, look for a call to “rm”, that will delete files that you may not want deleted!

Tags: ····

9 Comments so far ↓

  • Big Ben

    Thanks!
    Your script worked for me on my new Intrepid installation.

  • huanix

    This script will detect your current kernel version and modify it. I have personally tested it with 2.6.24 & 2.6.27 on 32 & 64 bit, so that covers most Ubuntu installations.

  • gckoopi

    can this script use on PClinuxOS?

  • huanix

    Umm… i’ve only loaded PClinuxOS once; as I recall it’s RPM based, so the script will NOT work. It SHOULD work with Debian distros. (?)

    You could use the same instructions but install the dependencies using rpm rather than apt.

  • Ciso

    The script doesn’t work for me.
    Seems to be running fine, but in Windows XP my iPod Touch still doesn’t work.

  • huanix

    Can you give me more details? I am seeing two distinct problems- one is recognition at the USB level (i.e. your virtual machine can’t see it at all) and the other is at the iTunes level (iTunes rejects the device) can you tell me which one of these you’re seeing? I’m working on the script as we speak.

  • Tyler

    I can give you some details on what I see. I am running Intrepid on a Toshiba Satellite A135-S4447. VirtualBox is version 2.0.4, downloaded from the Sun site. I ran the script and everything worked fine (output copied below).

    Ubuntu does notice the device. When I plug it in, a camera icon appears on my desktop and I can view the pictures that are on my IPhone (2G, firmware 2.1, jailbroken). Here’s the lsusb output:

    Bus 005 Device 004: ID 05ac:1290 Apple, Inc.
    Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

    Finally, nothing happens. USB is enabled on my VM, but VirtualBox claims there are . That’s it. No fanfare. Just no IPhone in the VM.

    Here’s the output from the script, after the big tar command ends:

    linux-source-2.6.27/package-list
    linux-source-2.6.27/kernel-versions
    make: Entering directory `/usr/src/linux-headers-2.6.27-7-generic’
    CC [M] /home/tyler/Desktop/linux-source-2.6.27/drivers/usb/core/devio.o
    LD [M] /home/tyler/Desktop/linux-source-2.6.27/drivers/usb/core/usbcore.o
    Building modules, stage 2.
    MODPOST 1 modules
    LD [M] /home/tyler/Desktop/linux-source-2.6.27/drivers/usb/core/usbcore.ko
    make: Leaving directory `/usr/src/linux-headers-2.6.27-7-generic’
    update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic

    YOU MUST REBOOT!!!!
    YOU MUST REBOOT!!!!

    Any help would be appreciated! I would be so happy to avoid having to reinstall Windows somewhere just to use my iphone.
    thanks for your work so far on this issue.
    -T

  • Hansel

    Hi Mate, just wanted to say thanks very much. Worked perfectly for me on Intrepid Ibex, and WinXP SP2. Running on a HP Pavilion DV2000

    h

  • BearTM

    An update for others:
    (Found this Blog long after I’d successfully done the same thing myself – should have looked first! :-)

    Using the latest/greatest Sun VirtualBox, Windows XP SP3, and latest iTunes – everything worked ‘out of the box’, barring the fstab USB permissions detail for VirtualBox. No other changes were needed.

    Additionally, I’ve found that iTunes Coverflow can work within VirtualBox! It works fine – just updates slowly, but I can easily live with that.

    Install the WineD3D libraries from here:
    http://aybabtu.com/rmh/wined3d/

    Relevant ticket to follow:
    http://www.virtualbox.org/ticket/2940

    Working for me under Intrepid 8.10, VirtualBox 2.1.2, iTunes 8.0.2.20 including Compiz enabled, multiple desktops, etc.

    Also had excellent success with upgrading/restoring a number of iPod Touches and all the subsequent syncing palaver. Connecting/disconnecting the iPod through the USB control in VirtualBox is still required – but this works flawlessly – just take your time, and monitor your device manager/USB connections in both WindowsXP & Ubuntu.

    Cheers.

Leave a Comment