ADB 看不到 Android 设备,但可从 Windows XP 访问

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11582410/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 08:09:10  来源:igfitidea点击:

Android device not seen by ADB but accessible from Windows XP

androidwindows

提问by Zonata

I just bought a new Nexus 7 tablet and I am trying to put my first Java application on it. However, I am stuck at a very basic point: ADB does not see my device. When I check on my working station, Windows perfectly detects the tablet, I switched the USB port and every one make appear the device but ADB still cannot see it. I rebooted and it is still not working. Any idea about this?

我刚买了一台新的 Nexus 7 平板电脑,我正在尝试将我的第一个 Java 应用程序放在上面。但是,我陷入了一个非常基本的问题:ADB 看不到我的设备。当我检查我的工作站时,Windows完美地检测到平板电脑,我切换了USB端口,每个设备都出现了设备,但ADB仍然看不到它。我重新启动,它仍然无法正常工作。对此有什么想法吗?

Update

更新

There was actually two problems. First, I had not activated the USB debuggingmode. This was the reason why I could use the tablet from the working station (as a simple multimedia player) even though the correct USB driver was not installed.

实际上有两个问题。首先,我没有激活USB调试模式。这就是为什么我可以在工作站上使用平板电脑(作为一个简单的多媒体播放器)的原因,即使没有安装正确的 USB 驱动程序。

Second, the driver was not detected by Windows XP (even we I specified the correct repository to search for it). The problem was solved by following the procedure described by adamp

其次,Windows XP 没有检测到驱动程序(即使我们指定了正确的存储库来搜索它)。按照adap描述的过程解决了这个问题

回答by adamp

As Thomas K points out, you need to install the ADB driver for the device from the SDK manager. Also confirm that USB debugging is enabled on the device as mihail noted.

正如 Thomas K 指出的那样,您需要从 SDK 管理器为设备安装 ADB 驱动程序。还要确认设备上已启用 USB 调试,如 mihail 所述。

The basic ADB driver provided with the SDK is generic and can work with any Android device. Simply add the appropriate lines to the android_winusb.inffile under extras/google/usb_driverto make Windows recognize the device hardware IDs during driver installation. Add the lines under the x86 section for 32 bit Windows or amd64 section for 64 bit Windows.

SDK 提供的基本 ADB 驱动程序是通用的,可以与任何 Android 设备一起使用。只需将适当的行添加到下面的android_winusb.inf文件中,extras/google/usb_driver即可让 Windows 在驱动程序安装期间识别设备硬件 ID。在 32 位 Windows 的 x86 部分或 64 位 Windows 的 amd64 部分下添加行。

For the Nexus 7, the configuration you'll need is:

对于 Nexus 7,您需要的配置是:

;Nexus7
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_4E42
%CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_4E42&MI_01

The significant sections there are VID_XXXX and PID_YYYY on both lines. If you have another Android device you would like to add, start by duplicating the lines above in the correct section of the file. You'll need to replace the hardware IDs with the correct IDs for your device.

两行的重要部分是 VID_XXXX 和 PID_YYYY。如果您想添加其他 Android 设备,请先在文件的正确部分复制上面的行。您需要将硬件 ID 替换为您设备的正确 ID。

Open Device Manager, locate the Android device without an ADB driver installed, right click it, and choose Properties. Under the Details tab, select Hardware IDs from the dropdown list. You'll see a line that looks something like USB\VID_18D1&PID_4E42&MI_01. Copy the VID_XXXX section and PID_YYYY section into the two lines you added in the .inf file above. Save the file, then update the driver for the device and use the driver from the directory where the .inf you just saved is.

打开设备管理器,找到没有安装ADB驱动的Android设备,右键单击,选择属性。在详细信息选项卡下,从下拉列表中选择硬件 ID。你会看到一条看起来像USB\VID_18D1&PID_4E42&MI_01. 将 VID_XXXX 部分和 PID_YYYY 部分复制到您在上面的 .inf 文件中添加的两行中。保存文件,然后更新设备的驱动程序并使用刚刚保存的 .inf 所在目录中的驱动程序。

回答by Thkru

U need the appropriate ADB Driver (btw: ADB = "Android debug bridge")

你需要合适的 ADB 驱动程序(顺便说一句:ADB = "Android 调试桥")

See:
http://developer.android.com/sdk/win-usb.html
ADB dosn't recognize my Galaxy Nexus - Win7

请参阅:
http: //developer.android.com/sdk/win-usb.html
ADB 无法识别我的 Galaxy Nexus - Win7

Download:
http://www.samsung.com/us/support/owners/product/SCH-I515MSAVZW

下载:http:
//www.samsung.com/us/support/owners/product/SCH-I515MSAVZW

(Don't dorget to enable debugging on your device under Settings> Applications> Development> USB-debugging )

(不要忘记在 Settings> Applications> Development> USB-debugging 下在您的设备上启用调试)

Also nice to know:

也很高兴知道:

Note: If you're developing on Mac OS X or Linux, then you do not need to install a USB driver. To start developing with your device, also read Using Hardware Devices.

注意:如果您在 Mac OS X 或 Linux 上开发,则不需要安装 USB 驱动程序。要开始使用您的设备进行开发,另请阅读使用硬件设备。

If you already did all above, this may help you:
https://stackoverflow.com/a/11563780/1351347

如果您已经完成了上述所有操作,这可能会对您有所帮助:https:
//stackoverflow.com/a/11563780/1351347

回答by mihail

  1. do you mean ADB?

  2. Have you enabled USB Debugging on your device Settings->Applications->Development->USB debugging

  3. Have you installed correct usb driver for the adb interface? If not check Problem when connecting my device to PC?for more information

  1. 你是说亚行吗?

  2. 您是否在您的设备设置->应用程序->开发->USB调试上启用了USB调试

  3. 您是否为 adb 接口安装了正确的 USB 驱动程序?如果没有检查将我的设备连接到 PC 时的问题?想要查询更多的信息

回答by Abhinav Gujjar

What worked for me was adding the entry in adb_usb.ini for my device. Which turned out to be embedded in the hardware id

对我有用的是在 adb_usb.ini 中为我的设备添加条目。原来是嵌入了硬件id

So - My hardware id was USB\VID_1C9E&PID_9E18&MI_01

所以 - 我的硬件 ID 是 USB\VID_ 1C9E&PID_9E18&MI_01

and I added

我补充说

0x1c9e

0x1c9e

to the adb_usb.ini file under c:\users[user name].android

到 c:\users[用户名].android 下的 adb_usb.ini 文件

full file contents -

完整的文件内容 -

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.

0x1c9e

回答by Magic Hands Pellegrin

Still Having Problems?

仍然有问题?

After turning on USB debugging on my device and properly setting up the drivers for windows to recognize the device. I still wasn't able to get ADB to recognize my Insignia Flex 8 tablet. Here's what I had to do: Create (if it doesn't already exist) - c:\documents and settings\your-user-name.android\adb_usb.ini Add a line with the VID ID value in hexadecimal form: my id value (ascertained from ...device manager; right click android composite adb interface; properties; details) is: USB\VID_2207&PID_0011&MI_00\9&1670302B&0&0000

在我的设备上打开 USB 调试并正确设置 Windows 驱动程序以识别设备后。我仍然无法让 ADB 识别我的 Insignia Flex 8 平板电脑。这是我必须做的: 创建(如果它不存在) - c:\documents and settings\your-user-name.android\adb_usb.ini 添加一行包含十六进制形式的 VID ID 值:my id值(从...设备管理器确定;右键单击android复合adb界面;属性;详细信息)为:USB\VID_2207&PID_0011&MI_00\9&1670302B&0&0000

so the line i added to adb_usb.ini was: 0x2207

所以我添加到 adb_usb.ini 的行是:0x2207

save the file and restart eclipse (and/or DDMS; left inverted triangle; reset adb).

保存文件并重新启动 eclipse(和/或 DDMS;左倒三角形;重置 adb)。

after doing this, my NS-14T002 device as available for debugging my application.

执行此操作后,我的 NS-14T002 设备可用于调试我的应用程序。

Update-> strange, I didn't see the above (same solution) when I initially wrote this (not sure how this wasn't visible...)

更新->奇怪,我最初写这个时没有看到上面的(相同的解决方案)(不知道这怎么不可见......)