[英]“adb devices” returns empty “List of devices attached” on Ubuntu
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. 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我不断收到一个空列表。
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 004: ID 2a45 :2008 Meizu Corp. MX Phone (MTP)
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
总线 001 设备 002:ID 80ee:0021 VirtualBox USB 平板电脑
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
总线 001 设备 001:ID 1d6b:0001 Linux Foundation 1.1 根集线器
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" 使用“adb devices”的 Ubuntu 16.04 上的“附加设备列表”为空
I followed the below steps:我按照以下步骤操作:
devnull@greg_server:~$ cat ~/.android/adb_usb.ini
0x2a45
0x2a45
devnull@greg_server:~$ adb kill-server
devnull@greg_server:~$ adb start-server;
daemon not running;
守护进程没有运行; starting now at tcp:5037
从现在开始 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在这种情况下,我注意到 lsusb 无法识别我的手机,并且 adb devices 命令再次返回一个空列表,如下所示
devnull@greg_server:~$ lsusb
Bus 001 Device 002: ID 80ee:0021 VirtualBox USB Tablet
总线 001 设备 002:ID 80ee:0021 VirtualBox USB 平板电脑
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
总线 001 设备 001:ID 1d6b:0001 Linux Foundation 1.1 根集线器
devnull@greg_server:~$ adb devices
List of devices attached
附加设备列表
root@greg_server:/etc/udev/rules.d# pwd
/etc/udev/rules.d
/etc/udev/rules.d
root@greg_server:/etc/udev/rules.d# ls -lst
total 64
共 64
4 -rw-r--r-- 1 root root 71 Oct 24 07:18 51-android-usb.rules
4 -rw-r--r-- 1 根 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
60 -rw-r--r-- 1 根 58549 5 月 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"
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).我试图让 ADB 在旧版本的 ubuntu 上启动并运行,但我的问题更为根本(我也在 Virtualbox 中尝试这样做)。
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).但是 - 我注意到这个答案没有包含为其他人解决问题的东西 - USB 配置模式(开发人员选项应该在某处的开发设置下)。
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.在我使用的设备上,这是在“默认 USB 配置”下 - 其他人的建议似乎是选择 PTP 是通往 go 的方法。
Hope that might help out.希望这可能会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.