Reputation: 900
From what I know, android emulator cannot listen to USB or any other devices of Hosting machine, and thus I have a question: Is there any way to emulate USB connections (or any other device connection like headphones or microphone) on an Emulator? Maybe through adb or emulator command tools? Or maybe there is a way to have the emulator see devices connected to the host (PC, Windows OS)?
My application has an option menu where all connected audio devices are listed, and the user can choose from this list. However, for Android TV I'm using an emulator and I can't connect new devices to test it out.
Upvotes: 2
Views: 12066
Reputation: 333
Do you use emulator on Ubuntu? If yes, try:
Bus 002 Device 002: ID 0424:5744 Standard Microsystems Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 023: ID 046d:c534 Logitech, Inc. Unifying Receiver
sudo ./emulator @Pixel_XL_API_Q -kernel /home/robot/Android/goldfish/arch/x86/boot/bzImage -qemu -usb -device usb-host,hostbus=1,hostaddr=23
That works for me
https://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest
will give you some infos.
Upvotes: 6