Ok... started to reply about filters and double checked my iPhone operation and it was only half working. This is going to end up being long.. sorry in advance.
This really applies to iPhone but I suspect it will be the same for many of the newer phones including yours. Using VB 3.0.6 and Ubuntu 9.04.
Plug in phone with VirtualBox closed. Does Ubuntu open up picture viewer or mount the device as mass storage? If so this fixes that issue so VM has direct control. On the downside you will no longer be able to get to those functions in Ubuntu (mass storage or pic viewer).
With phone still plugged in -
Open VirtualBox.
Select your VM
Click settings
Select USB
Click the green + button
Connected devices will show in pop up - select your phone
Phone filter is now in the list and selected
Select OK
If you were to launch your VM and connect your phone at this point, device manager will show the phone connected but inoperable or malfunctioned. Ubuntu will also show the device as mounted as a mass storage device. If you unmount the device on Ubuntu then click disable in windows device manager, followed by enable in device manager. Your device should start working in Windows VM.
You can see this happen in Ubuntu terminal with the commands "lsusb" and with "dmesg | tail" dmesg is the most telling. Shows Ubuntu picked up config 1 of 4 and vbox user assumed control of config 0.
Exact wording may not be correct but you should get the idea.
To prevent Ubuntu from taking any control of the device when it is plugged in you need to do the following.
go out to terminal in ubuntu and enter
you should see something like:
Code: Select all
Bus 001 Device 023: ID 05ac:1294 Apple, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c50e Logitech, Inc. MX-1000 Cordless Mouse Receiver
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
In my case my phone is obviously "Bus 001 Device 023: ID 05ac:1294 Apple, Inc."
Important part is Bus 001 Device 023
Now enter the following substituting the correct bus and device numbers into that command replacing my 001/023 with what you had.
Code: Select all
lsusb -D /proc/bus/usb/001/023 | head -n 20
This should give 20 lines of information on your device. The line you are looking for is iProduct. Should be the 13th line down.
Now using that information enter the following replacing iPhone with the value in the iProduct line.
That will return:
Code: Select all
usb_device.product = 'iPhone' (string)
info.product = 'iPhone' (string)
The second line is what we are looking for, specifically the information that is in quotes.
It is just coincidence that my iProduct line and info.product returned from hal-device are the same. Don't assume yours will be.
Now enter
Code: Select all
sudo gedit /etc/hal/fdi/policy/10-iphone.fdi
into that empty file paste in the following. The 4th line is where you need to substitute in the string value pointed out in the last command.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
<match key="info.product" string="iPhone">
<merge key="info.ignore" type="bool">true</merge>
</match>
</device>
</deviceinfo>
Save the file and you should be done. May want to restart X. Not sure if it necessary though.
Now when you plug in your phone to Ubuntu nothing will happen. If you check lsusb you will see it present but no event was triggered for it.
Now try it in VirtualBox. - Let me know.
To undo all changes.
Code: Select all
sudo rm /etc/hal/fdi/policy/10-iphone.fdi
- Jeff