PS C:\WINDOWS\system32> usbipd list Connected: BUSID VID:PID DEVICE STATE 1-5 1de1:f105 Display capture-UVC05 Not shared 1-9 045e:02d1 Xbox One 控制器 Not shared 1-10 18d1:4ee7 Android Composite ADB Interface Not shared 4-4 1a81:2039 USB 输入设备 Not shared
wsl2:~$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 18d1:4ee7 Google Inc. Nexus/Pixel Device (charging + debug) Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
4.1 adb测试
1 2 3 4 5 6
wsl2:~$ adb devices List of devices attached 96KAXXXXX device
wsl2:~$ adb shell bonito:/ $
五,问题:
需要sudo启动adb start-server
该问题是由于无udev服务导致,即使写rules文件也无效。
1 2 3 4 5 6 7 8 9
wsl2:~$ lsusb Bus 001 Device 003: ID 18d1:4ee7 Google Inc.
## 其中18d1为vendorid, 4ee7为productid wsl2:~$ sudo vim /etc/udev/rules.d/70-android.rules SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee7",MODE="0666"
wsl2:~$ sudo service udev reload udev does not support containers, not started