Ubuntu下解决adb devices 显示????乱码的问题

2012年 14月 12日 03:13

给我的C8812E刷机遇到问题了
问题状况

[email protected]:~/android-sdk-linux/platform-tools$ ./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
????????????    device

解决办法

设置USB权限

[email protected]:~/android-sdk-linux/platform-tools$ 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:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04f2:b028 Chicony Electronics Co., Ltd VGA UVC Webcam
Bus 005 Device 004: ID 1c4f:0003 SiGma Micro HID controller
Bus 005 Device 003: ID 1a2c:0021  
Bus 001 Device 004: ID 12d1:1035 Huawei Technologies Co., Ltd. U8120

我的手机是

Bus 001 Device 004: ID 12d1:1035 Huawei Technologies Co., Ltd. U8120

增加USB配置文件

$sudo vim /etc/udev/rules.d/70-android.rules

加入以下内容:

SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1035",MODE="0666"

运行命令,重启udev:

$sudo chmod a+rx /etc/udev/rules.d/70-android.rules

$sudo service udev restart


[email protected]:~/android-sdk-linux/platform-tools$ sudo ./adb kill-server
[email protected]:~/android-sdk-linux/platform-tools$ ./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
????????????    device

如果是HTC等大众机型问题到这里基本解决了

  1. 华为的是手机继续往下走
  2. 拨号输入##2846579##
  3. 选择菜单 projectMenu
  4. 接着选择后台设置
  5. 选择 USB 模式
  6. 选择 Google 模式
  7. 重启手机

现在就能正常显示了:

[email protected]:~/android-sdk-linux/platform-tools$ sudo ./adb kill-server
[email protected]:~/android-sdk-linux/platform-tools$ ./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
0C37DC4D9CA3    device

参考文献:http://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/