AKever

导航

虚拟ubuntu系统 adb连接anroid手机

虚拟ubuntu系统 adb连接anroid手机

=============================================================

 

0. 开启超级权限

su
password:

 

1. 在终端运行 lsusb,找到对应设备的一行:

root@ubuntu:~# lsusb
Bus 001 Device 008: ID 2207:0010  ##我的android连接端设备号
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

 

2. 51-android.rules

root@ubuntu:/etc/udev/rules.d# vim 51-android.rules 
51-android.rules 内容:
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", ATTR{idProduct}=="0010", MODE="0666" , WNER=="user"

ps: 2207和0010对应连接段设备号,0666是权限,user是ubuntu的用户名

 

3. 创建 adb_usb.ini文件

root@ubuntu:~/.android# cd ~/.android/
root@ubuntu:~/.android# vim adb_usb.ini
adb_usb.ini 内容(写入设备号,16进制)
0x2207

 

4. 连接设备
sudo adb kill-server
sudo adb devices
sudo adb shell

 

 

 

 

posted on 2017-08-13 17:19  AKever  阅读(297)  评论(0)    收藏  举报