Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4140121
  • 博文数量: 447
  • 博客积分: 1241
  • 博客等级: 中尉
  • 技术积分: 5786
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-27 06:48
个人简介

读好书,交益友

文章分类

全部博文(447)

文章存档

2023年(6)

2022年(29)

2021年(49)

2020年(16)

2019年(15)

2018年(23)

2017年(67)

2016年(42)

2015年(51)

2014年(57)

2013年(52)

2012年(35)

2011年(5)

分类: Android平台

2016-02-15 15:02:16

以前在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






阅读(2028) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~