Ubuntu 12.04 adb 找不到设备


Ubuntu 12.04 adb 找不到设备

解决方法:

1、lsusb找到设备ID

手机未连接电脑时,输入命令 lsusb,

得到:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 002: ID 062a:4101 Creative Labs 
Bus 002 Device 003: ID 064e:e330 Suyin Corp. 
Bus 002 Device 005: ID 04ca:3006 Lite-On Technology Corp. 


手机连接电脑后,输入命令 lsusb,

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 002: ID 062a:4101 Creative Labs 
Bus 002 Device 003: ID 064e:e330 Suyin Corp. 
Bus 002 Device 005: ID 04ca:3006 Lite-On Technology Corp. 
Bus 002 Device 007: ID 18d1:9025 Google Inc. 


则新增的 Bus 002 Device 007: ID 18d1:9025 Google Inc. 即为我的手机


2、注册到udev的rules文件:

[html]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. vim  /etc/udev/rules.d/51-android.rules  
  2. 添加这个ID:1ebf,如下:  
  3. SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0666"  
  4. 保存文件并运行:  
  5. sudo chmod a+rx /etc/udev/rules.d/51-android.rules  
  6. sudo /etc/init.d/udev restart  
  7. 运行结果如下:  
  8. Rather than invoking init scripts through /etc/init.d, use the service(8)  
  9. utility, e.g. service udev restart  
  10. Since the script you are attempting to invoke has been converted to an  
  11. Upstart job, you may also use the stop(8) and then start(8) utilities,  
  12. e.g. stop udev ; start udev. The restart(8) utility is also available.  
  13. udev stop/waiting  
  14. udev start/running, process 14636  

如果想添加的更详细,也可以这样:SUBSYSTEM=="usb", ATTRS{idVendor}=="1ebf", ATTRS{idProduct}=="7028",MODE="0666"

其中的ATTRS{idVendor}=="1ebf",要写自己手机的,比如我的为18d1。


3、启动adb的服务

    这个网上的经验是在adb工具的目录下执行,我是按照做的,成功。
[html]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. cd ~/program/Android/sdk/platform-tools  
  2. sudo ./adb  kill-server
  3. sudo ./adb  start-server
  4. sudo ./adb  devices 
即可看到自己的手机设备


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值