[Android 调试] 解决linux系统不识别设备、手机问题方法

 

最近在开发过程中linux不识别开发板设备、手机,看了下dev guide,现在把方法提供给大家。
1 If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of deviceyou want to use for development. In the rules file, each device manufactureris identified by a unique vendor ID, as specified by theATTR{idVendor} property. For a list of vendor IDs, see  USB Vendor IDs, below. To set up device detection onUbuntu Linux:        Log in as root and create this file:            /etc/udev/rules.d/51-android.rules.            Use this format to add each vendor to the file:
              SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

首先你打开 sudo gvim /etc/udev/rules.d/51-android.rules
           其中添加  SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666",我把group给删掉了,这个无所谓,反正电脑都是自己用。其中 ATTR{idVendor}=="0bb4"这个值是多少呢?
官网提供了这几种:
USB Vendor IDsThis table provides a reference to the vendor IDs needed in order to add USBdevice support on Linux. The USB Vendor ID is the value given to theATTR{idVendor} property in the rules file, as described above.
 
Company USB Vendor ID
Acer 0502
ASUS 0B05
Dell 413C
Foxconn 0489
Garmin-Asus 091E
Google 18D1
HTC 0BB4
Huawei 12D1
K-Touch 24E3
KT Tech 2116
Kyocera 0482
Lenevo 17EF
LG 1004
Motorola 22B8
NEC 0409
Nook 2080
Nvidia 0955
OTGV 2257
Pantech 10A9
Pegatron 1D4D
Philips 0471
PMC-Sierra 04DA
Qualcomm 05C6
SK Telesys 1F53
Samsung 04E8
Sharp 04DD
Sony Ericsson 0FCE
Toshiba 0930
ZTE 19D2

我怎么指导我的终端对应的是那个id呢?我买的也是moto的,但是写了moto的id还是不行,于是我用
命令:lsusb
会出现:
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 192f:0416 Avago Technologies, Pte.
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0489:c001 Foxconn / Hon Hai
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

其中
Bus 001 Device 002: ID 0489:c001 Foxconn / Hon Hai
这个就是我的设备,对应上边的表,我找到id为0489,填到刚才打开的sudo gvim /etc/udev/rules.d/51-android.rules,这个文件中,
接下再执行命令:chmod a+r /etc/udev/rules.d/51-android.rule

ok,重启电脑即可。

   来自:eoeAndroid

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值