Based on react native documentation ( https://facebook.github.io/react-native/docs/running-on-device ) I wanted to connect to ADB in my ubuntu vm (Ubuntu 18.04.2 LTS) but my problem is that i keep getting an empty list.
So what steps I have followed:
devnull@greg_server:~$ lsusb
Bus 001 Device 004: ID 2a45 :2008 Meizu Corp. MX Phone (MTP)
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2a45", MODE="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/51-android-usb.rules
devnull@greg_server:~$ adb devices
List of devices attached
In order to troubleshoot based on
“List of devices attached” is empty on Ubuntu 16.04 using "adb devices"
I followed the below steps:
devnull@greg_server:~$ cat ~/.android/adb_usb.ini
0x2a45
devnull@greg_server:~$ adb kill-server
devnull@greg_server:~$ adb start-server;
daemon not running; starting now at tcp:5037
daemon started successfully
devnull@greg_server:~$ adb devices
List of devices attached
In this case I noticed that lsusb doesn't identify my mobile and adb devices command returns again an empty list as shown below
devnull@greg_server:~$ lsusb
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
devnull@greg_server:~$ adb devices
List of devices attached
root@greg_server:/etc/udev/rules.d# pwd
/etc/udev/rules.d
root@greg_server:/etc/udev/rules.d# ls -lst
total 64
4 -rw-r--r-- 1 root root 71 Oct 24 07:18 51-android-usb.rules
60 -rw-r--r-- 1 root root 58549 May 8 06:28 70-snap.core.rules
root@greg_server:/etc/udev/rules.d# cat 51-android-usb.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="2a45", MODE="0666", GROUP="plugdev"
Any help on what might be the case?
I'm attempting to get ADB up and running on an older version of ubuntu, but my problems are more fundamental (I'm trying to do this in Virtualbox as well).
However - I noticed that this answer didn't contain something which has fixed the issue for others - the USB configuration mode (a developer option which should be under the dev settings somewhere).
On the device I'm using, this was under "Default USB Configuration" - advice from others appears to be that selecting PTP is the way to go.
Hope that might help out.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.