以前在windows下使用itools访问手机,但是在ubuntu下就不行了,不过ubuntu下也有相应的工具.
在手机上打开usb调试模式,接上usb.
lsusb
显示
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 008: ID 18d1:d002 Google Inc.
Bus 003 Device 003: ID 17ef:6019 Lenovo
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 008: ID 18d1:d002 Google Inc. 就是要找的手机设备
在/etc/udev/rules.d/51-android.rules.加入
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1",ATTR{idProduct}=="d002",MODE="0666" GROUP="plugdev"
保存后运行
sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo service udev restart
安装android tools
sudo apt-get install android-tools-adb android-tools-fastboot
# adb version
Android Debug Bridge version 1.0.31
# wget -O - | tar -zxvf - adb
# sudo cp adb /usr/bin/adb
# sudo chmod +x /usr/bin/adb
# adb version
Android Debug Bridge version 1.0.32
输入adb devices
出现
unauthorized
在手机上点一下信任连接.
出现
no permissions
运行
sudo adb kill-server
sudo adb start-server
输入adb devices
出现
List of devices attached
4df101ae0a6b8f69 device
ls -l /dev/bus/usb/003/008
crw-rw-r-- 1 root root 189, 263 Feb 15 14:34 /dev/bus/usb/003/008
阅读(2088) | 评论(0) | 转发(0) |