Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] VirtualBox Win Guest access iPhone
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1553
Location: Adelaide/Australia

PostPosted: Sun Jan 08, 2012 1:16 pm    Post subject: [Solved] VirtualBox Win Guest access iPhone Reply with quote

I have VirtualBox running windows guest.
I have configured virtualbox USB to automatically grab the iPhone for the win guest.
Problem is, I see this in my system log
Code:
Jan  8 23:28:11 localhost kernel: [23255.570275] hub 2-4.3.4:1.0: state 7 ports 4 chg 0000 evt 0008
Jan  8 23:28:11 localhost kernel: [23255.570484] hub 2-4.3.4:1.0: port 3, status 0101, change 0001, 12 Mb/s
Jan  8 23:28:11 localhost kernel: [23255.674119] hub 2-4.3.4:1.0: debounce: port 3: total 100ms stable 100ms status 0x101
Jan  8 23:28:11 localhost kernel: [23255.685118] hub 2-4.3.4:1.0: port 3 not reset yet, waiting 10ms
Jan  8 23:28:11 localhost kernel: [23255.747127] usb 2-4.3.4.3: new high speed USB device number 12 using ehci_hcd
Jan  8 23:28:11 localhost kernel: [23255.758108] hub 2-4.3.4:1.0: port 3 not reset yet, waiting 10ms
Jan  8 23:28:11 localhost kernel: [23255.833864] usb 2-4.3.4.3: skipped 3 descriptors after interface
Jan  8 23:28:11 localhost kernel: [23255.833867] usb 2-4.3.4.3: skipped 2 descriptors after interface
Jan  8 23:28:11 localhost kernel: [23255.833869] usb 2-4.3.4.3: skipped 1 descriptor after endpoint
Jan  8 23:28:11 localhost kernel: [23255.833871] usb 2-4.3.4.3: skipped 1 descriptor after interface
Jan  8 23:28:11 localhost kernel: [23255.835476] usb 2-4.3.4.3: default language 0x0409
Jan  8 23:28:11 localhost kernel: [23255.836487] usb 2-4.3.4.3: udev 12, busnum 2, minor = 139
Jan  8 23:28:11 localhost kernel: [23255.836490] usb 2-4.3.4.3: New USB device found, idVendor=05ac, idProduct=12a0
Jan  8 23:28:11 localhost kernel: [23255.836493] usb 2-4.3.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan  8 23:28:11 localhost kernel: [23255.836495] usb 2-4.3.4.3: Product: iPhone
Jan  8 23:28:11 localhost kernel: [23255.836497] usb 2-4.3.4.3: Manufacturer: Apple Inc.
Jan  8 23:28:11 localhost kernel: [23255.836499] usb 2-4.3.4.3: SerialNumber: exxxxxxxxxxxxxxxxxxxxxxxxxxxx
Jan  8 23:28:11 localhost kernel: [23255.836621] usb 2-4.3.4.3: usb_probe_device
Jan  8 23:28:11 localhost kernel: [23255.836625] usb 2-4.3.4.3: configuration #1 chosen from 4 choices
Jan  8 23:28:11 localhost kernel: [23255.837488] usb 2-4.3.4.3: adding 2-4.3.4.3:1.0 (config #1, interface 0)
Jan  8 23:28:11 localhost kernel: [23255.837548] drivers/usb/core/inode.c: creating file '012'
Jan  8 23:28:12 localhost kernel: [23256.626301] usb 2-4.3.4.3: unregistering interface 2-4.3.4.3:1.0
Jan  8 23:28:12 localhost kernel: [23256.626368] usb 2-4.3.4.3: usb_disable_device nuking non-ep0 URBs
Jan  8 23:28:12 localhost kernel: [23256.628358] usb 2-4.3.4.3: adding 2-4.3.4.3:4.0 (config #4, interface 0)
Jan  8 23:28:12 localhost kernel: [23256.628434] usb 2-4.3.4.3: adding 2-4.3.4.3:4.1 (config #4, interface 1)
Jan  8 23:28:12 localhost kernel: [23256.628478] usb 2-4.3.4.3: adding 2-4.3.4.3:4.2 (config #4, interface 2)
Jan  8 23:28:12 localhost kernel: [23256.845798] usb 2-4.3.4.3: BOGUS urb flags, 1 --> 0
Jan  8 23:28:12 localhost kernel: [23256.845801] usb 2-4.3.4.3: usbfs: usb_submit_urb returned -22
Jan  8 23:28:12 localhost kernel: [23256.845806] usb 2-4.3.4.3: BOGUS urb flags, 1 --> 0
Jan  8 23:28:12 localhost kernel: [23256.845808] usb 2-4.3.4.3: usbfs: usb_submit_urb returned -22
Jan  8 23:28:12 localhost kernel: [23256.845811] usb 2-4.3.4.3: BOGUS urb flags, 1 --> 0
Jan  8 23:28:12 localhost kernel: [23256.845812] usb 2-4.3.4.3: usbfs: usb_submit_urb returned -22
Jan  8 23:28:13 localhost kernel: [23257.704457] usb 2-4.3.4.3: BOGUS urb flags, 1 --> 0

and windows fails to install the driver.
VirtualBox thinks the USB device is attached to the VM but things just don't seem to work.
It's not until I unplug the iPhone does the windows VM think the drivers should be installed, at which time they promptly fail, because it's unplugged.
I have tried plugging in to a USB Hub and a MoBo based USB port.

Any suggestions?
_________________
...Lyall


Last edited by lyallp on Mon Apr 09, 2012 9:44 am; edited 1 time in total
Back to top
View user's profile Send private message
Tatsh
Apprentice
Apprentice


Joined: 22 Jul 2007
Posts: 187

PostPosted: Mon Jan 09, 2012 4:36 pm    Post subject: Reply with quote

I had this working before (virtualbox-bin though back then; and there are a number of permissions to do afaik). The guest was Windows XP. I was too afraid to update my iPhone to a new version this way but I did at least sync properly. Also adding in that my iPhone 4 is jailbroken (at the time was 4.1; now is 5.0.1).

Try using VirtualBox as root and see if the problem goes away. If it does, then it's permissions. Do not continue using VirtualBox as root.

Suggestions:
Do you have a Mac? If so, use it (this is what I do, too much pain to do otherwise).

Do you have a Windows box? If so, use it.

Is your iPhone old enough to support libgpod? Then use that (with an app like Clementine or Amarok2). There's a tool in Cydia (Checkpwn) now that will modify certain files on supported devices that don't work out of the box (iPhone 4 is not one of them). However, this requires that you sync with an iTunes library after installation to make sure it works. You have to revert the change if it doesn't as iTunes will no longer recognise your iPhone if you don't.

Do you need to back up apps for possible reinstallation later? `emerge libimobiledevice` and use ideviceinstaller (if you are on iOS 4.x; it has not yet worked for me on iOS 5.0.1 and it seems to have no recent development). Install new apps via the App Store only.

http://www.libimobiledevice.org/ We're almost able to do everything. The main thing I want is music syncing so I can stop using iTunes.

EDIT: Also, never plug in an iDevice to a USB hub. They almost never work properly. Always plug in directly (I plug mine in directly to the motherboard (port in the back) when I use it in Linux).
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1553
Location: Adelaide/Australia

PostPosted: Mon Jan 09, 2012 10:27 pm    Post subject: Reply with quote

Wierdly enough. My laptop at work, is also Gentoo amd64 and I run my work Windows 7 x64 environment in a VirtualBox VM hosted on Gentoo.
I can plug the iPhone 4s into a USB hub on that machine, I even did a successful IOS Upgrade and also a restore using the VM.
My problem is at home.
I am on leave at this time so I can't quote the kernel version number but it is older than my home machine.
At home, the Guest OS in VB is Win7 x64, I tried an older Win XP, both currently fail, I suspect to due to the error in the GNU/Linux Host.
The reason I want this to work is I rarely boot to windows, and whilst windows is MUCH faster in scanning my audiobook collection (gotta love podiobooks) I can't use it whilst I am using GNU/Linux.
So, there must be something wrong with my home computer, because I know it works :)
_________________
...Lyall
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1305
Location: sweden

PostPosted: Tue Jan 10, 2012 5:50 pm    Post subject: Reply with quote

lyallp

you can do e everything with your iphone on the virtualbox. but not jailbreak it.my advice to you is:
backup your .VirtualBox copy your xx.vdi and use it on the new .VirtualBox.

lyallp wrote:

I have configured virtualbox USB to automatically grab the iPhone for the win guest.

what did you do? when i did it i just started virtualbox,settings,usb,marked enable usb cont....,enable usb 2.0,and added usb device filter
with Apple Inc. iPhone [0001],Apple Inc. Apple Mobile Device (Recovery Mode),Apple Inc. Apple Mobile Device (Recovery Mode),Apple Inc. Apple Mobile Device (Recovery Mode)and Apple Inc. Apple Mobile Device (DFU Mode).

some jailbreaks can work.

regards hedmo
Back to top
View user's profile Send private message
lrbb
n00b
n00b


Joined: 13 Jan 2012
Posts: 3

PostPosted: Sat Jan 14, 2012 12:05 am    Post subject: Reply with quote

Same problem here. I did this http://en.gentoo-wiki.com/wiki/VirtualBox#USB_Devices_Grayed_Out, which did not seem to help. There was random behavior with the driver installation in my Win XP guest, though Windows now reports that the device is working (via device manager) and the drivers are seemingly installed. Still, dmesg gets flooded with the -22 errors.
Code:
[ 1824.603675] usb 1-1: BOGUS urb flags, 1 --> 0
[ 1824.603685] usb 1-1: usbfs: usb_submit_urb returned -22
[ 1824.603696] usb 1-1: BOGUS urb flags, 1 --> 0
[ 1824.603701] usb 1-1: usbfs: usb_submit_urb returned -22


I tried an older iPod shuffle, same problem. Not sure where to start.

Code:
app-emulation/virtualbox-4.1.4  USE="additions alsa extensions opengl pam qt4 sdk -doc -headless -java -pulseaudio -python -vboxwebsrv -vnc"
Back to top
View user's profile Send private message
Tatsh
Apprentice
Apprentice


Joined: 22 Jul 2007
Posts: 187

PostPosted: Sat Jan 14, 2012 1:10 am    Post subject: Reply with quote

lrbb wrote:
Same problem here. I did this http://en.gentoo-wiki.com/wiki/VirtualBox#USB_Devices_Grayed_Out, which did not seem to help. There was random behavior with the driver installation in my Win XP guest, though Windows now reports that the device is working (via device manager) and the drivers are seemingly installed. Still, dmesg gets flooded with the -22 errors.
Code:
[ 1824.603675] usb 1-1: BOGUS urb flags, 1 --> 0
[ 1824.603685] usb 1-1: usbfs: usb_submit_urb returned -22
[ 1824.603696] usb 1-1: BOGUS urb flags, 1 --> 0
[ 1824.603701] usb 1-1: usbfs: usb_submit_urb returned -22


I tried an older iPod shuffle, same problem. Not sure where to start.

Code:
app-emulation/virtualbox-4.1.4  USE="additions alsa extensions opengl pam qt4 sdk -doc -headless -java -pulseaudio -python -vboxwebsrv -vnc"


Which iPod Shuffle is it? If it is old enough, libgpod supports it and you can use a native application like Clementine to sync music.

Code:
USE="ipod udev" emerge libgpod clementine
Back to top
View user's profile Send private message
lrbb
n00b
n00b


Joined: 13 Jan 2012
Posts: 3

PostPosted: Sat Jan 14, 2012 2:39 am    Post subject: Reply with quote

The Shuffle works fine with libgpod etc., I was just seeing if this was iPhone specific.

I tried installing virtualbox-bin rather than the locally compiled one, and now both my iDevices worked magically, the -22 errors gone. I have no special entries in fstab, and I'm not in the plugdev group.

Bug? I have a vague recollection of this same problem a year or two ago, though I don't recall the resolution.

EDIT:
https://bugs.gentoo.org/show_bug.cgi?id=377285
http://archives.gentoo.org/gentoo-user/msg_5d0c2b7a7f9911888b2ac4c9fca0977c.xml
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1553
Location: Adelaide/Australia

PostPosted: Sun Feb 19, 2012 10:10 am    Post subject: Reply with quote

Hmm... Still happens

Code:
$ eix --installed virtualbox
[I] app-emulation/virtualbox
     Available versions:  4.1.4 (~)4.1.6-r1 (~)4.1.8 (~)4.1.8-r1 **9999 {+additions alsa doc elibc_FreeBSD extensions headless java kernel_linux +opengl pam pulseaudio python +qt4 (+)sdk vboxwebsrv vnc}
     Installed versions:  4.1.8-r1(00:17:58 18/02/12)(additions alsa java opengl pam python qt4 sdk -doc -elibc_FreeBSD -extensions -headless -pulseaudio -vboxwebsrv -vnc)
     Homepage:            http://www.virtualbox.org/
     Description:         Softwarefamily of powerful x86 virtualization

[I] app-emulation/virtualbox-additions
     Available versions:  4.1.4!m (~)4.1.6!m (~)4.1.8!m
     Installed versions:  4.1.8!m(15:12:40 26/12/11)
     Homepage:            http://www.virtualbox.org/
     Description:         CD image containing guest additions for VirtualBox

[I] app-emulation/virtualbox-extpack-oracle
     Available versions:  4.1.4!m!s (~)4.1.6!m!s (~)4.1.8!m!s
     Installed versions:  4.1.8!m!s(16:51:36 28/12/11)
     Homepage:            http://www.virtualbox.org/
     Description:         PUEL extensions for VirtualBox

[I] app-emulation/virtualbox-modules
     Available versions:  (~)3.0.0_beta2[1] 4.1.4 (~)4.1.6 (~)4.1.8 {kernel_linux pax_kernel}
     Installed versions:  4.1.8(12:40:50 27/01/12)(kernel_linux -pax_kernel)
     Homepage:            http://www.virtualbox.org/
     Description:         Kernel Modules for Virtualbox

[1] "zugaina" /portage/local/layman/zugaina
$ uname -a
Linux lyalls-pc 3.2.1-gentoo-r2 #1 SMP Fri Jan 27 12:33:03 CST 2012 x86_64 Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz GenuineIntel GNU/Linux

Windows Guest is Win 7 x64 Ultimate, SP1.
_________________
...Lyall
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1553
Location: Adelaide/Australia

PostPosted: Mon Apr 09, 2012 9:36 am    Post subject: Reply with quote

Pity it's still happening kernel 3.2.12.
I was hoping I would not have to re-boot to windows to use iTunes on my phone.
I found this page which suggests there is a patch out there.
I am going to try re-compiling my kernel with the following line changed in /usr/src/linux/drivers/usb/core/urb.c
Code:

   /* fail if submitter gave bogus flags */
   if (urb->transfer_flags != orig_flags) {
      dev_err(&dev->dev, "BOGUS urb flags, %x --> %x\n",
         orig_flags, urb->transfer_flags);
/******   return -EINVAL; */
   }
at line 446.
_________________
...Lyall
Back to top
View user's profile Send private message
lyallp
Veteran
Veteran


Joined: 15 Jul 2004
Posts: 1553
Location: Adelaide/Australia

PostPosted: Mon Apr 09, 2012 9:44 am    Post subject: Reply with quote

SUCCESS!

Actually, I would also comment out the warning message, it is repeated with monotonous regularity.

But, I can now see my iPhone 4s in iTunes inside a VirtualBox Windows 7 VM.

Only problem now is that the VirtualBox VM hangs (non responsive, requiring killing) after syncing about 200-300 MB of podcasts.

So much for using iTunes in a VM, back to physically rebooting...
_________________
...Lyall
Back to top
View user's profile Send private message
anybody
n00b
n00b


Joined: 14 Sep 2003
Posts: 32

PostPosted: Tue May 22, 2012 12:13 am    Post subject: Reply with quote

I also had the same "usbfs: usb_submit_urb returned -22 / BOGUS urb flags, 1 --> 0" error messages from the kernel and the USB devices not appearing in the Windows Guest even though "VBoxManage list usbhost" claimed they had been "Current State: Captured".

(I'm using Virtualbox 4.1.14 from app-emulation/virtualbox-4.1.14 with USE="additions extensions headless java pam sdk vboxwebsrv -alsa -doc -opengl -pulseaudio -python -qt4 -vnc" on x64)

I tried
- disabling usbfs which is deprecated but still seems to be on by default in vanilla kernels (didn't change anything)
- upgrading the kernel from 3.3.6 to 3.4.0-rc7 (and then today to 3.4.0-final)

After upgrading the kernel to 3.4, the USB devices suddenly appeared in the Guest.

However, my kernel messages have now changed to:

Code:

[Tue May 22 02:07:16 2012] ------------[ cut here ]------------
[Tue May 22 02:07:16 2012] WARNING: at drivers/usb/core/urb.c:440 usb_submit_urb+0x2e6/0x3fa()
[Tue May 22 02:07:16 2012] Hardware name: MS-7638
[Tue May 22 02:07:16 2012] Device: usb
[Tue May 22 02:07:16 2012] BOGUS urb flags, 1 --> 0
[Tue May 22 02:07:16 2012] Modules linked in: vboxnetadp(O) vboxnetflt(O) vboxdrv(O)
[Tue May 22 02:07:16 2012] Pid: 2314, comm: VBoxHeadless Tainted: G        W  O 3.4.0 #1
[Tue May 22 02:07:16 2012] Call Trace:
[Tue May 22 02:07:16 2012]  [<ffffffff8106ef9f>] warn_slowpath_common+0x80/0x98
[Tue May 22 02:07:16 2012]  [<ffffffff8106f04b>] warn_slowpath_fmt+0x41/0x43
[Tue May 22 02:07:16 2012]  [<ffffffff8134e048>] usb_submit_urb+0x2e6/0x3fa
[Tue May 22 02:07:16 2012]  [<ffffffff81091a20>] ? should_resched+0x9/0x29
[Tue May 22 02:07:16 2012]  [<ffffffff81355d69>] proc_do_submiturb+0x71c/0x88d
[Tue May 22 02:07:16 2012]  [<ffffffff813567bf>] usbdev_do_ioctl+0x8e5/0xe03
[Tue May 22 02:07:16 2012]  [<ffffffff81356cf5>] usbdev_ioctl+0x9/0xd
[Tue May 22 02:07:16 2012]  [<ffffffff8112e0ba>] do_vfs_ioctl+0x458/0x499
[Tue May 22 02:07:16 2012]  [<ffffffff81091a0d>] ? need_resched+0x1e/0x28
[Tue May 22 02:07:16 2012]  [<ffffffff8144fd17>] ? __schedule+0x5fb/0x612
[Tue May 22 02:07:16 2012]  [<ffffffff81121a56>] ? fput+0x1d/0x1ce
[Tue May 22 02:07:16 2012]  [<ffffffff8112e13d>] sys_ioctl+0x42/0x65
[Tue May 22 02:07:16 2012]  [<ffffffff81451122>] system_call_fastpath+0x16/0x1b
[Tue May 22 02:07:16 2012] ---[ end trace 77afd28a2e4c52d7 ]---


While both the USB Stick and the USB License Dongle seem to work fine in the guest and a USB Mass Storage Device I had attached to the Linux Host also worked fine, I'm slightly concerned about those crashes in the usb driver though. Especially since they occur every second and do generate quite a lot of log activity :-)

A real fix for this that doesn't involve a driver-crash every second would be nice...
Back to top
View user's profile Send private message
highland
n00b
n00b


Joined: 05 Nov 2008
Posts: 71

PostPosted: Sat Dec 07, 2013 7:51 am    Post subject: Reply with quote

I have the same problem with virtualbox 4.3.4.
Wireless card is working but crashes every second - still not fixed :(
Back to top
View user's profile Send private message
anybody
n00b
n00b


Joined: 14 Sep 2003
Posts: 32

PostPosted: Sat Dec 07, 2013 11:00 am    Post subject: Reply with quote

Have you tried the virtualbox-bin packages instead of the self compiled version?
Those fixed this for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum