Webcam (onboard) not detected under Android x86

Discussions related to using VirtualBox on Linux hosts.
Post Reply
R30
Posts: 2
Joined: 13. May 2020, 00:31

Webcam (onboard) not detected under Android x86

Post by R30 »

Hello folks :) I've been trying to use my onboard webcam (Latitude E7470) under Android x86 (guest) (android-x86_64-9.0-r2) in my Debian PC (host).

I've done my research for some days but with no success (including USB basics and trubleshooting): it is not detected by the VM.

I get No Webcams Connected under the Devices menu, if I run the following command I get this output:

Code: Select all

$ VBoxManage controlvm "Android" webcam attach .1
VBoxManage: error: Attach emulated USB webcam (VERR_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_VM_ERROR (0x80bb0003), component ConsoleWrap, interface IConsole, callee nsISupports
VBoxManage: error: Context: "WebcamAttach(path.raw(), settings.raw())" at line 2150 of file VBoxManageControlVM.cpp
Thanks a lot for your time,
Cheers.

PS: (Enable USB Controller is ON and USB 2.0 is selected, I've also tried with USB 3.0)

Here's my info:

Code: Select all

$ id
uid=1000(tarkus) gid=1001(tarkus) groups=1001(tarkus),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),106(kvm),109(netdev),113(bluetooth),117(scanner),129(vboxusers),1000(lpadmin)

Code: Select all

$ VBoxManage -version
6.1.6r137129

Code: Select all

$ VBoxManage list extpacks
Extension Packs: 1
Pack no. 0:   Oracle VM VirtualBox Extension Pack
Version:      6.1.6
Revision:     137129
Edition:      
Description:  Oracle Cloud Infrastructure integration, USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe.
VRDE Module:  VBoxVRDP
Usable:       true 
Why unusable: 

Code: Select all

$ VBoxManage list usbhost
Host USB Devices:

UUID:               8781a4c4-1250-493b-a054-52bacea00b34
VendorId:           0x8087 (8087)
ProductId:          0x0a2b (0A2B)
Revision:           0.1 (0001)
Port:               7
USB version/speed:  2/Full
Manufacturer:       Intel Corp.
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8//device:/dev/vboxusb/001/011
Current State:      Busy

UUID:               4e26632a-5749-4609-8629-797a6684d437
VendorId:           0x1bcf (1BCF)
ProductId:          0x2b91 (2B91)
Revision:           87.39 (8739)
Port:               1
USB version/speed:  2/High
Manufacturer:       CNFEH63M332011111192
Product:            Integrated_Webcam_HD
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2//device:/dev/vboxusb/001/002
Current State:      Available

UUID:               cb4e62f0-40fc-4458-b04a-8aedaac68bfc
VendorId:           0x0a5c (0A5C)
ProductId:          0x5832 (5832)
Revision:           1.1 (0101)
Port:               6
USB version/speed:  1/Full
Manufacturer:       Broadcom Corp
Product:            5880
SerialNumber:       0123456789ABCD
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7//device:/dev/vboxusb/001/004
Current State:      Available

Code: Select all

$ VBoxManage list usbfilters
Global USB Device Filters:

<none>

Code: Select all

$ VBoxManage showvminfo "Android"
Name:                        Android
Groups:                      /
Guest OS:                    Linux 2.6 / 3.x / 4.x (64-bit)
UUID:                        75ec7f34-4f7a-4d3b-9553-fcffdfedc7ef
Config file:                 /home/tarkus/VirtualBox VMs/Android/Android.vbox
Snapshot folder:             /home/tarkus/VirtualBox VMs/Android/Snapshots
Log folder:                  /home/tarkus/VirtualBox VMs/Android/Logs
Hardware UUID:               75ec7f34-4f7a-4d3b-9553-fcffdfedc7ef
Memory size                  2048MB
Page Fusion:                 disabled
VRAM size:                   16MB
CPU exec cap:                100%
HPET:                        disabled
CPUProfile:                  host
Chipset:                     piix3
Firmware:                    BIOS
Number of CPUs:              2
PAE:                         disabled
Long Mode:                   enabled
Triple Fault Reset:          disabled
APIC:                        enabled
X2APIC:                      enabled
Nested VT-x/AMD-V:           disabled
CPUID Portability Level:     0
CPUID overrides:             None
Boot menu mode:              message and menu
Boot Device 1:               Floppy
Boot Device 2:               DVD
Boot Device 3:               HardDisk
Boot Device 4:               Not Assigned
ACPI:                        enabled
IOAPIC:                      enabled
BIOS APIC mode:              APIC
Time offset:                 0ms
RTC:                         local time
Hardware Virtualization:     enabled
Nested Paging:               enabled
Large Pages:                 disabled
VT-x VPID:                   enabled
VT-x Unrestricted Exec.:     enabled
Paravirt. Provider:          Default
Effective Paravirt. Prov.:   KVM
State:                       powered off (since 2020-05-12T22:28:05.840000000)
Graphics Controller:         VBoxVGA
Monitor count:               1
3D Acceleration:             disabled
2D Video Acceleration:       disabled
Teleporter Enabled:          disabled
Teleporter Port:             0
Teleporter Address:          
Teleporter Password:         
Tracing Enabled:             disabled
Allow Tracing to Access VM:  disabled
Tracing Configuration:       
Autostart Enabled:           disabled
Autostart Delay:             0
Default Frontend:            
VM process priority:         default
Storage Controller Name (0):            IDE
Storage Controller Type (0):            PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0):  2
Storage Controller Port Count (0):      2
Storage Controller Bootable (0):        on
Storage Controller Name (1):            SATA
Storage Controller Type (1):            IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1):  30
Storage Controller Port Count (1):      1
Storage Controller Bootable (1):        on
IDE (1, 0): /usr/share/virtualbox/VBoxGuestAdditions.iso (UUID: c3d7405c-7e4c-4d5a-bbe5-1ea6278314af)
SATA (0, 0): /home/tarkus/VirtualBox VMs/Android/Android.vdi (UUID: 95834ed6-e26b-4457-b24c-41e3fe0534d4)
NIC 1:                       MAC: 080027F0BED5, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny, Bandwidth group: none
NIC 1 Settings:  MTU: 0, Socket (send: 64, receive: 64), TCP Window (send:64, receive: 64)
NIC 2:                       disabled
NIC 3:                       disabled
NIC 4:                       disabled
NIC 5:                       disabled
NIC 6:                       disabled
NIC 7:                       disabled
NIC 8:                       disabled
Pointing Device:             USB Tablet
Keyboard Device:             PS/2 Keyboard
UART 1:                      disabled
UART 2:                      disabled
UART 3:                      disabled
UART 4:                      disabled
LPT 1:                       disabled
LPT 2:                       disabled
Audio:                       enabled (Driver: ALSA, Controller: AC97, Codec: AD1980)
Audio playback:              enabled
Audio capture:               enabled
Clipboard Mode:              Bidirectional
Drag and drop Mode:          HostToGuest
VRDE:                        disabled
OHCI USB:                    enabled
EHCI USB:                    enabled
xHCI USB:                    disabled

USB Device Filters:

Index:                       0
Active:                      yes
Name:                        CNFEH63M332011111192 Integrated_Webcam_HD [5727]
VendorId:                    1bcf
ProductId:                   2b91
Revision:                    
Manufacturer:                
Product:                     
Remote:                      
Serial Number:               

Index:                       1
Active:                      no
Name:                        Broadcom Corp 5880 [0101]
VendorId:                    0a5c
ProductId:                   5832
Revision:                    0101
Manufacturer:                Broadcom Corp
Product:                     5880
Remote:                      0
Serial Number:               0123456789ABCD

Index:                       2
Active:                      no
Name:                        Intel Corp.  [0001]
VendorId:                    8087
ProductId:                   0a2b
Revision:                    0001
Manufacturer:                
Product:                     
Remote:                      0
Serial Number:               

Bandwidth groups:  <none>

Shared folders:<none>

Capturing:                   active
Capture audio:               not active
Capture screens:             0
Capture file:                /home/tarkus/VirtualBox VMs/Android/Android.webm
Capture dimensions:          1024x768
Capture rate:                512kbps
Capture FPS:                 25kbps
Capture options:             vc_enabled=true,ac_enabled=false,ac_profile=med

Guest:

Configured memory balloon size: 0MB

Code: Select all

$ VBoxManage list usbhost
Host USB Devices:

UUID:               8781a4c4-1250-493b-a054-52bacea00b34
VendorId:           0x8087 (8087)
ProductId:          0x0a2b (0A2B)
Revision:           0.1 (0001)
Port:               7
USB version/speed:  2/Full
Manufacturer:       Intel Corp.
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8//device:/dev/vboxusb/001/011
Current State:      Busy

UUID:               4e26632a-5749-4609-8629-797a6684d437
VendorId:           0x1bcf (1BCF)
ProductId:          0x2b91 (2B91)
Revision:           87.39 (8739)
Port:               1
USB version/speed:  2/High
Manufacturer:       CNFEH63M332011111192
Product:            Integrated_Webcam_HD
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2//device:/dev/vboxusb/001/002
Current State:      Available

UUID:               cb4e62f0-40fc-4458-b04a-8aedaac68bfc
VendorId:           0x0a5c (0A5C)
ProductId:          0x5832 (5832)
Revision:           1.1 (0101)
Port:               6
USB version/speed:  1/Full
Manufacturer:       Broadcom Corp
Product:            5880
SerialNumber:       0123456789ABCD
Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7//device:/dev/vboxusb/001/004
Current State:      Available

Code: Select all

$ VBoxManage list webcams
Video Input Devices: 2
.1 "Integrated_Webcam_HD: Integrate"
/dev/video0
.2 "Integrated_Webcam_HD: Integrate"
/dev/video1

Code: Select all

$ uname -a
Linux tarkus-pc 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Webcam (onboard) not detected under Android x86

Post by scottgus1 »

I don't have a PC with an integrated webcam that can run Virtualbox to try this, so I have no idea how to troubleshoot this.

But the manual says:
Get a list of host webcams, or other video input devices:
$ VBoxManage list webcams
The output format is as follows:
alias "user friendly name"
host path or identifier
The command is:
VBoxManage controlvm <VM name> webcam attach [<host_path>|<alias> [<settings>]]
The output of "vboxmanage list webcams" you posted is:
R30 wrote:$ VBoxManage list webcams
Video Input Devices: 2
.1 "Integrated_Webcam_HD: Integrate"
/dev/video0
.2 "Integrated_Webcam_HD: Integrate"
/dev/video1
It appears that .1, .2 are the alias and /dev/video0 etc are the 'host path or identifier'.

Try the command with /dev/video# rather than the .#?

I see that you have tried basic USB passthrough, with the USB Basics and Troubleshooting tutorial and have set up three USB filters. Do the other two USB devices enter the guest?

I do see there's two webcams in 'list webcams' but only one webcam shows in 'list usbhosts'. I wonder if the other webcam does not connect via USB?
R30
Posts: 2
Joined: 13. May 2020, 00:31

Re: Webcam (onboard) not detected under Android x86

Post by R30 »

Hi! Thanks a lot for your reply :)
scottgus1 wrote:Try the command with /dev/video# rather than the .#?
I have tried both ways but the output is the same.
scottgus1 wrote:I see that you have tried basic USB passthrough, with the USB Basics and Troubleshooting tutorial and have set up three USB filters. Do the other two USB devices enter the guest?
Actually, I don't know what those other devices are (there are not devices plugged to the notebook).
scottgus1 wrote:I do see there's two webcams in 'list webcams' but only one webcam shows in 'list usbhosts'. I wonder if the other webcam does not connect via USB?
I don't currently have an external webcam with me (note that the notebook's webcam works properly in my host machine).

Any other input is welcomed!
Cheers.
Post Reply