1.检查手机是否开启USB调试、USB安装(或者允许安装未知来源的应用)

2.在LINUX电脑上设置手机权限

(原文)https://blog.csdn.net/leokelly001/article/details/43485691

1.使用lsusb 查看usb设备,如下红色部分对应的就是android设备

Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0461:4e04 Primax Electronics, Ltd 
Bus 003 Device 011: ID 2717:9039  
Bus 003 Device 003: ID 17ef:6019 Lenovo 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

若不知道哪个是你的设备,可以拔掉后lsusb,然后对比即可.

2.创建/更改adb_usb.ini文件,写入/添加id

在home下寻找.android目录,在此目录下新建/更改 文件adb_usb.ini

echo 0x2717> ~/.android/adb_usb.ini

3.添加权限

sudo vim /etc/udev/rules.d/70-android.rules

加入以下内容,注意“ATTRS”部分对应的就是lsusb得到的id

SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"2717\", ATTRS{idProduct}==\"9039\",MODE=\"0666\"

4.重启USB服务

$sudo chmod a+rx /etc/udev/rules.d/70-android.rules
$sudo service udev restart

5.重启adb服务,adb devices有设备说明adb安装成功

adb kill-server
sudo adb start-server
adb devices

List of devices attached

5cb00b6 device

收藏 打印