亚行没有找到我的设备/电话(MacOS X的) [英] adb not finding my device / phone (MacOS X)

查看:212
本文介绍了亚行没有找到我的设备/电话(MacOS X的)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

做Android开发的是Mac,并在此的很新的的电话我都不会显示在设备列表中的亚洲开发银行。很多其他手机和设备的工作对我罚款,所以我知道我的设置是不错的。

Doing Android development on a Mac and this very new phone I have doesn't show up in the devices list in adb. Lots of other phones and devices work fine for me so I know my setup is good.

我有调试启用(设置 - >应用程序 - >开发 - > USB调试)在手机上,但它只是不显示出来,当我运行 ADB设备

I have debugging enabled (Settings --> Applications --> Development --> USB debugging) on the phone, but it just doesn't show up when I run adb devices

推荐答案

产生额外的更新:不要低估一个良好的USB连接线的值。有时候,只是换线会有所帮助。

Additonal Update : Do not underestimate the value of a good USB cable. Sometimes just swapping cables will help.

更新作为新版本的亚行,〜/ .android / adb_usb.ini 已被删除。

Update for newer versions of adb, ~/.android/adb_usb.ini has to be removed.

摘要: 添加供应商ID为〜/ .android / adb_usb.ini 并重新启动亚行

Executive summary: Add the Vendor ID to ~/.android/adb_usb.ini and restart adb

的详细介绍: 大部分时间没有什么会需要做以获得在Mac识别电话/设备。严重的是,99%的时间它只是工作。

Full Details: Most of the time nothing will need to be done to get the Mac to recognize the phone/device. Seriously, 99% of the time "it just works."

话虽这么说,最快捷的方式来重置亚洲开发银行是按顺序执行下面的命令重新启动:

That being said, the quickest way to reset adb is to restart it with the following commands in sequence:

  adb kill-server
  adb devices

但飘飞的 ADB设备命令只是无法找到您的设备。也许,如果你使用一些实验性或原型或超出最普通的设备,也许它只是未知的,并不会显示出来。

But every now and then the adb devices command just fails to find your device. Maybe if you're working with some experimental or prototype or out-of-the-ordinary device, maybe it's just unknown and won't show up.

您可以帮助亚行告诉它你的设备的供应商ID,本质上为它提供一个提示找到你的设备。这可以通过将十六进制供应商ID文件中完成〜/ .android / adb_usb.ini

You can help adb to find your device by telling it about your device's "Vendor ID," essentially providing it with a hint. This can be done by putting the hex Vendor ID in the file ~/.android/adb_usb.ini

不过,首先你要找到供应商ID值。幸运的是在Mac上,这是pretty的方便。启动的系统信息应用程序。它位于 /应用程序/实用/ 文件夹中,也可以通过Apple菜单在屏幕的左上角找到它,选择关于本机 ,然后单击详细信息...按钮。截屏在这里:

But first you have to find the Vendor ID value. Fortunately on Mac this is pretty easy. Launch the System Information application. It is located in the /Applications/Utilities/ folder, or you can get to it via the Apple Menu in the top left corner of the screen, select "About this Mac", then click the "More Info..." button. Screen grab here:

展开硬件栏中,选择USB,然后寻找目标设备。在上面的例子中,我的设备被命名为SomeDevice(我这样做,在Photoshop中隐藏真实设备制造商)。另一个例子是三星平板电脑,显示为SAMSUNG_Android(顺便说一句,我没有做什么特别的东西,使三星平板的工作。)无论如何,单击您的设备和全部细节将在下面的窗格中显示。这是它列出了供应商ID。在从截图我的例子值为 0x9d17 - 在下一个命令中使用该值

Expand the "Hardware" tree, select "USB", then look for your target device. In the above example, my device is named "SomeDevice" (I did that in photoshop to hide the real device manufacturer). Another example would be a Samsung tablet which shows up as "SAMSUNG_Android" (btw, I didn't have to do anything special to make the Samsung tablet work.) Anyway, click your device and the full details will display in the pane below. This is where it lists the Vendor ID. In my example from the screenshot the value is 0x9d17 -- use this value in the next command

echo 0x9d17 >> ~/.android/adb_usb.ini

这没关系,如果你不已经有 adb_usb.ini 在此之前文件,其中大部分只是不需要寻找设备的时间,所以它不是寻常该文件不是present。上面的命令将创建或追加到它的底部,如果它已经存在。现在运行的方式列出以上重新启动亚行的命令,你应该是好去。

It's okay if you didn't already have that adb_usb.ini file before this, most of the time it's just not needed for finding your device so it's not unusual for that file to not be present. The above command will create it or append to the bottom of it if it already exists. Now run the commands listed way above to restart adb and you should be good to go.

adb kill-server ; adb devices

* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
123ABC456DEF001 device

这篇关于亚行没有找到我的设备/电话(MacOS X的)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆