How do you get adb devices to work from within a virtualbox virtual machine?
(note- I installed VS 2015 redistributable https://www.microsoft.com/en-us/download/details.aspx?id=53587 for adb devices
to not give an error about a missing DLL, on my win7 VM , otherwise it would at least on win7. I installed adb from https://developer.android.com/studio/releases/platform-tools )
As you can see, outside the VM, it lists the smartphone connected to my physical computer.
But within the VM, it can't see it
ADDED
I see that with VirtualBox you have to do a bunch of things to get USB recognised. Like check what version of virtualbox it is (in my case 6.0.4), going here https://www.virtualbox.org/wiki/Download_Old_Builds_6_0 downloading the "extension pack" for my virtualbox version, installing it so it shows in virtualbox's file..preferences..extensions. Doing device..insert guest additions cd image, installing that. Shutting down the VM. Going to I've now done that. Clicking the VM, going to machine..settings.. usb Then clicking the little square where the USB devices pop up. I selected my USB device(s) that I want my VM to see. I started up the machine.
The USB sockets I am using are USB3, they are marked with SS next to the USb symbol.. In VirtualBox machine..settings..usb, where it says USB2, USB3.. I tried USB3 but they didn't show. Then I tried USB2 and that worked. (i.e. shutting down the VM, so USB settings are not greyed out, picking USB2, then starting the VM).
The VM is now seeing the smartphone. And a USB stick I plugged in. (So, seen by VM, not by physical computer).
But adb devices within the VM, is still not listing the device.
I tested it on another phone(Moto G7 Power) , same thing. Got the VM to view it, but adb devices doesn't list it.
In the image below, both windows there, the computer window showing the smartphone, and the cmd window with adb devices not seeing the smartphone, are windows of the VM. And same thing happens with a different make/model smartphone too.