1. 安裝adb,查看自己的安卓設備 sudo apt-get install android-tools-adb adb start-server lsusb 輸出信息: Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub ...
1. 安裝adb,查看自己的安卓設備
sudo apt-get install android-tools-adb adb start-server lsusb
輸出信息:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 8087:0a2b Intel Corp. Bus 001 Device 003: ID 18f8:0f99 android xxx Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
2. 創建設備文件(文件名隨便):
sudo vim /etc/udev/rules.d/90-android.rules
內容:
SUBSYSTEM=="usb",ATTRS{idVendor}=="18f8",ATTRS{idProduct}=="0f99",MODE="0666",GROUP="plugdev",SYMLINK+="android",SYMLINK+="android_adb"
需要替換: ATTRS{idVendor}=="xxxx" ,ATTRS{idProduct}=="xxxx"
3. 重啟 abd 服務
sudo udevadm control --reload-rules sudo service udev restart sudo udevadm trigger adb kill-server adb start-server
4. 確認設備連接成功
adb devices
List of devices attached
faf80ac7 device