USB连接到ubuntu主机设备名出现乱码

android5.1机器连接到ubuntu服务器上面,adb devices 出现乱码,如下:
lb@sam :~GMS$ adb devices

   List of devices attached
  ???????? no permissions

lb@sam :~/GMS$
解决方法如下:

1、参考:http://peirenlei.iteye.com/blog/1564686

lb@sam :~$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 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 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046b:ff10 American Megatrends, Inc.
Bus 002 Device 008: ID 2207:0011 
lb@sam :~$
lb@sam :~$
lb@sam:~$
lb@sam:~$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 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 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046b:ff10 American Megatrends, Inc.

2、找出机器对应的Devices
列表中,Bus 002 Device 008: ID 2207:0011,这一行为android机器的usb使用端口,记录一下,
id为2207据网上的资料说,现在使用Android系统的手机越来越多,每款手机都分配了idVendor,解决方法都一样

3、sudo vim /etc/udev/rules.d/70-persistent-cd.rules
加入以下内容
SUBSYSTEM==”usb”, ATTRS{idVendor}==”2207”, ATTRS{idProduct}==”0011”, MODE=”0666”
其中的idvendor idProduct指的是USB的ID可以使用lsusb查询得到。
Bus 002 Device 008: ID 2207:0011
ID 2207 就是idVendor 0011就是idProduct

$sudo chmod a+rx /etc/udev/rules.d/70-persistent-cd.rules
$sudo service udev restart

5、不需要重启计算机,重新启动adb server下就ok
(很重要)拔掉usb重新连上再执行:

adb kill-server
adb devices
adb root (这一步很重要 )
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值