-1

Why is my android phone not listed by adb devices?

I followed instructions described at https://developer.android.com/studio/run/device but ADB still doesn't find my device. My user is already member of plugdev group. I also have tried to kill and restart the adb server.

I'm running Debian Stretch in a VirtualBox machine. Debian can see my device but adb can't.

eduardo@debian:~$ lsusb

Bus 001 Device 002: ID 1004:633e LG Electronics, Inc. GZ Android Phone [MTP mode]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub    
Bus 002 Device 002: ID 8oee:0021 VirtualBox USB Tablet    
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

eduardo@debian:~$ ls -l /etc/udev/rules.d/51-android.rules

-rw-r-r- 1 root root 4611 Sep 5 15:25 /etc/udev/rules.d/51-android.rules

eduardo@debian:~$ grep 1004 /etc/udev/rules.d/51-android.rules

SUBSYSTEM=="usb", ATTRfidVendor1=="1004", MODE="0666", GROUP="p1ugdev"

eduardo@debian:~$ adb devices

List of devices attached

eduardo@debian:~$
Eduardo
  • 5,645
  • 4
  • 49
  • 57

3 Answers3

1

The easy way to use adb in a virtualized environment regardless of the specific platforms is to run adb server on the host as a remote system and run adb clients inside the guest systems. See my answer to another question here .

While it is possible to run both the server and the clients completely inside of guest system, to do so reliably usually involves passing through the whole USB controller into the guest system.

Alex P.
  • 30,437
  • 17
  • 118
  • 169
0

I made a workaround that solved my problem. It is not perfect but it works.

  1. Disable bridging USB to VirtualBox machine

  2. Install platform-tools on host machine and run adb devices

  3. Authorize your computer on device screen

  4. In the virtual machine make a tcp tunnel that redirects local port 5037 to the host machine 5037 port:

    ssh -L 5037:10.0.2.2:5037 localhost -N -f

I'm not going to mark this as the correct answer because my Guest ADB still doesn't see my device

Community
  • 1
  • 1
Eduardo
  • 5,645
  • 4
  • 49
  • 57
0

It worked when I changed my device USB to charge only mode.

Reference: https://askubuntu.com/a/632668

Eduardo
  • 5,645
  • 4
  • 49
  • 57