大家会发现我们的 小米手机 即时开启了调试模式,usb连接到mac pro后Eclipse还是无法显示 设备!这给我们在mac下开发android的同学带来了很大的不便
解决办法:
1.把小米手机开启调试模式,然后连接在我们的mac pro上。
2.选择mac 的 关于本机->更多信息-> 系统报告->找到usb选项,右边会出现一系列和usb相关的设备我们找到小米设备并选中
(我的是显示在 usb高速总线下的 HM1 android phone)
3.选中后找到 供应商ID,我小米手机显示的供应商ID是:0x2717
4.打开mac终端 输入: echo 0x2717 >> ~/.android/adb_usb.ini
然后重启adb 在打开eclipse 你会发现 小米手机的设备显示了。这样的办法还可以解决mac上其他android设备不显示的问题
方法二:
mac下使用此操作。 然后根据此操作依据在windows上解决
1. 插上手机打开终端,输入:system_profiler SPUSBDataType,将输出结果记住。
2. 拔下手机,重复以上动作。
两者结果对比后会获得一个Vendor ID:
[plain] view plaincopy
USB Hi-Speed Bus: Host Controller Location: Built-in USB Host Controller Driver: AppleUSBEHCI PCI Device ID: 0x1c2d PCI Revision ID: 0x0005 PCI Vendor ID: 0x8086 Bus Number: 0x1a Hub: Product ID: 0x0024 Vendor ID: 0x8087 (Intel Corporation) Version: 0.00 Speed: Up to 480 Mb/sec Location ID: 0x1a100000 / 2 Current Available (mA): 500 Current Required (mA): 0 MX4: Product ID: 0x0c02 Vendor ID: 0x2a45 Version: ff.ff Serial Number: 75UBCKJ22AUV Speed: Up to 480 Mb/sec Manufacturer: Meizu Location ID: 0x1a110000 / 4 Current Available (mA): 500 Current Required (mA): 192 USB OPTICAL MOUSE: Product ID: 0x2510 Vendor ID: 0x093a (Pixart Imaging, Inc.) Version: 1.00 Speed: Up to 1.5 Mb/sec Manufacturer: PIXART Location ID: 0x1a120000 / 3 Current Available (mA): 500 Current Required (mA): 1003.在终端里输入echo "0x2a45" >> ~/.android/adb_usb.ini