如何让 Windows 10 上的 Ubuntu shell 识别连接的 android 设备?

Men*_*heh 7 usb android windows-10 windows-subsystem-for-linux

我正在尝试在 Windows 10 Ubuntu shell 中将 adb 连接到我的 Android 设备,但它似乎不起作用:

在 Ubuntu Bash Shell 中等待设备

adb 在 Windows 上确实可以正常工作,所以这不是手机或连接的问题。我是否必须执行诸如在 Ubuntu shell 中安装端口之类的操作?如何?(目标是传递logcatgrep,这在 Ubuntu 中显然会更好。)

小智 5

即使有当前的限制,也有一种棘手的方法可以使它工作。您需要从 cmd 启动 adb 服务器:

adb kill-server //if it is already running under bash shell
adb start-server
Run Code Online (Sandbox Code Playgroud)

然后你可以从 bash shell 调用 adb,它将使用现有的服务器,因此将能够列出连接的设备。

adb devices
Run Code Online (Sandbox Code Playgroud)

注意:由于环境从 Windows PATH 变量加载路径,您可能还需要使用 .exe 扩展名运行(或将 adb 别名为 adb.exe 以保持命令相同)。

adb.exe devices
Run Code Online (Sandbox Code Playgroud)


Rin*_*ind 4

Windows下的bash shell没有连接USB设备的功能。因此,除非有人添加该内容,否则亚行将无法正常工作。

这里是添加 USB 支持的建议