安装adb工具
sudo apt-get install adb
安装后adb在
$ whereis adb adb: /usr/bin/adb /usr/bin/X11/adb /usr/share/man/man1/adb.1.gz
然后插入展讯手机
$ adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached???????????? no permissions
解决此问题需要:
1. lsusb
$ lsusb Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 1532:000d Razer USA, Ltd Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub 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 010: ID 1782:5d24 Spreadtrum Communications Inc.
找到展讯手机对应的usb id为vendor=1782, product=5d24
2. sudo vim /etc/udev/rules.d/70-android.rules
创建新文件,输入内容:
SUBSYSTEM=="usb",ATTRS{idVendor}=="1782",ATTRS{idProduct}=="5d24",MODE="0666"
保存退出
3. sudo chmod a+x /etc/udev/rules.d/70-android.rules
4. sudo service udev restart
5. sudo adb kill-server
6. 重新连接usb线到手机
$ adb devices * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached SP9832A311064291080 device
