Ubuntu, VMWare and accessing the iPhone

Posted by Will about 8 months ago

Turns out a bit of extra work is required in order to access my iPhone under VMWare when the host OS is Ubuntu.

The first problem I had was related to the usb audio trying to add my iPhone as a mic device. The simple fix is to add snd_usb_audio module to the blacklist although if your computer does have a usb audio device this will cause it to stop working. To add the snd_usb_audio to the blacklist under Ubuntu edit '/etc/modprobe.d/blacklist.conf' and add

blacklist snd_usb_audio

After that is done it's just a matter of doing an `rmmod snd_usb_audio` if it has already been loaded.

The next problem was keeping the hald/dbus from trying to load and mount the iPhone as a camera device. A couple of rules added to hald policies will fix this problem. In Ubuntu create the file '/etc/hal/fdi/policy/10-iphone.fdi' with the following content.

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.product" string="iPhone 3G">
       <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
</deviceinfo>

NOTE:The string value needs to be the exact same as found in `hal-device`, to find the exact string try running the following command while the iPhone is plugged into the computer:

$ hal-device | grep iPhone
 usb_device.product = 'iPhone 3G'  (string)
 info.product = 'iPhone 3G'  (string)

Comments

Gravatar Image

Gary Mann said...

Thanks for this invaluable assistance!

Just a couple of points:

  • hal-devices is in fact hal-device (no trailing “s”)
  • /etc/hald is in fact simply /etc/hal (no “d” on the end)

cheers,

Gary

Posted Friday, July 24, 2009

Gravatar Image

Will said...

Gary,

Thanks for pointing out those issues. I’ve fixed them in the post.

Posted Monday, July 27, 2009

Gravatar Image

icebike said...

when you run the command
hal-device | grep iPhone

The iPhone should be plugged in. Otherwise it will not show anything.

Also, for the record, could you please state whether you have been able to install a new version of iPhone software after the above settings?

Posted Sunday, September 27, 2009

Gravatar Image

WIll said...

icebike,

Yes I have successfully updated my phone to the latest firmware and also the new carrier update AT&T has release for MMS

Posted Monday, September 28, 2009

Gravatar Image

icebike said...

Will: Thanks for the reply.

Although I followed these directions to the letter the iPhone OS update failed and the iPhone went into recovery mode.

My phone showed a string of "iPhone", not "iPhone 3G" so this may vary by model.

It seems that I also have to blacklist usbhid and ehci_hcd as shown here:
http://freshfoo.com/blog/iphone_upgrade_with_vmware

Blacklisting usbhid kills off any usb mouse for the duration. Bummer.
I was able to use the touchpad, so no major problem there.

After following the above referenced page, AND this page I was able to upgrade the iPhone OS. I'm not not sure the 10-iphone.fdi did anything at all.
For some reason, on Jaunty, blacklisting snd_usb_audio and adding the 10-iphone.fdi file was not enough.

I had to blacklist those other modules to keep Jaunty from seeing (and grabbing) the phone.

I wonder if there was a hal/dbus restart necessary, or if Jaunty has something else going on.

Posted Wednesday, September 30, 2009

Gravatar Image

Will said...

icebike: you will need to add a quirks option to the usbhid module. The problem is that when the phone reboots to get the update (recovery mode also) it reports it's self with a different usb id that is not set to be ignored by usbhid. I have an earlier post about how to do this here: http://teknofire.net/articles/2009/01/08/using-linux-and-vmware-to-update-iphone-firmware/

Posted Friday, October 02, 2009

Post a comment


(required, but not displayed)

(optional)

|