Ubuntu 18.04 配置 adb

Reference1:  https://www.jianshu.com/p/377c6fb6e590

Reference2:  https://blog.csdn.net/ppggxn/article/details/81709350

就Ubuntu18.04而言,大部分主流手机无须修改文件直接可以连接adb,少数设备需要修改几个文件。

1. Install adb on Ubuntu

sudo apt install android-tools-adb

 

2. lsusb to check the device

~$ lsusb
Bus 001 Device 002: ID 8087:8000 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 008: ID 8087:07dc Intel Corp.
Bus 002 Device 002: ID 17ef:6042 Lenovo
Bus 002 Device 012: ID 12d1:107d Huawei Technologies Co., Ltd.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

3. Create or Modify adb_usb.ini, write android device VendorID to file

~$ cat .android/adb_usb.ini
0x12d1

4 Create or Modify /etc/udev/rules.d/70-android.rules

~$ cat /etc/udev/rules.d/70-android.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}="107d", MODE="0666"



Another Example from Internet
cat /etc/udev/rules.d/70-android.rules SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="1782", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="5d03", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="5d24", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}="5d24", ATTR{idProduct}="1782", SYMLINK+="android_adb" SUBSYSTEM=="usb", ATTR{idVendor}=="4ee7", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}="4ee7", ATTR{idProduct}="18d1", SYMLINK+="android_adb" SUBSYSTEM=="usb", ATTR{idVendor}=="201c", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}="201c", ATTR{idProduct}="0e8d", SYMLINK+="android_adb" SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}="12d1", ATTR{idProduct}="1079", SYMLINK+="android_adb" SUBSYSTEM=="usb", ATTR{idVendor}="0bb4", ATTR{idProduct}="0c03", SYMLINK+="android_adb"
posted @ 2019-12-19 09:34  shinedream  阅读(1336)  评论(0编辑  收藏  举报