2024-10-03 08:00:04

ADB未发现设备

我正在尝试在我全新的Nexus 10上安装一个Android应用程序。我有一个。apk文件。我下载了Android SDK,安装了“Android SDK Tools”,“Android SDK Platform-tools”和谷歌USB Driver。我已经在我的Nexus 10上检查了“未知来源”的设置。

当我从命令终端运行“adb devices”时,它不会列出任何设备。我试图遵循这个建议,因为它与我之前在Stack Overflow上找到的建议完全相同。在执行这些步骤之后,“adb devices”仍然返回一个空列表,更糟糕的是,当我将Nexus 10连接到我的PC时,Windows不会显示设备内的任何文件夹。

我已经取消了该链接中的步骤,以及迄今为止我所做的所有其他操作,还从设备管理器中卸载了我的Nexus 10并重新安装了它,但我仍然没有在设备中看到任何文件夹。

为了让我的设备显示在ADB设备中,我是否遗漏了什么?

我怎么做才能让Windows看到设备内的文件夹?


当前回答

确认您拥有正确的平台SDK工具

对于Windows 10,由于Visual Studio 2017 EMDK为Xamarin提供的版本不够,不得不从Android手动下载最新的平台SDK工具。除了adb.exe设备,其他设备都正常工作。

https://developer.android.com/studio/releases/platform-tools

手动下载平台工具后,无论USB配置(充电、MTP等),设备都显示出来。

在此阶段安装模拟器设备还有助于查看问题是出在adb还是物理设备上。

List of devices attached
12345D1234      device
emulator-5554   device

其他回答

Edit: I recommend you DO NOT run ADB under VirtualBox if you are using a Windows Host. Somehow I got VirtualBox to lock the device drivers on the host, eventually making it so that the ADB wouldn't work on the client nor the host for any device I plugged in. To fix, I removed VirtualBox extensions on the host and ran http://www.nirsoft.net/utils/usb_devices_view.html to delete the incorrect drivers. I could not get the correct drivers to load while VirtualBox extensions were installed, and this problem was a complete bastard to diagnose and fix.

编辑2:以下也可能是过时的,现在谷歌已经发布了一个集成的ADB扩展Chrome。

真是一场安装噩梦……下面是让我的Nexus 10在VirtualBox下运行的XP虚拟机上被识别的步骤:

If you get asked to install Nexus 10 drivers, make sure to untick "don't ask again" (you WANT to be asked again!). Plug in the Nexus 10 USB connection Turn on debugging in the Nexus 10 settings Developer menu (tap "About Tablet" 7 times to get that menu). In your virtual machine settings (host), add the samsung Nexus 10 device to the USB Device Filters (important - selecting it from the devices menu didn't seem to work). In guest install java jre (if you don't have java installed). In Control Panel, change Java settings so that java doesn't run in the browser (to help prevent security issues). In guest get the adk zip file and put it somewhere permanent. I needed to delete the .android config directory from the user directory because I moved the directory. Run the SDK Manager.exe - if it doesn't work, try running sdk\tools\android.bat which seems to give better error reporting. From SDK Manager install the Google USB driver package. Unplug the Nexus 10 and plug it in again, and install the Google USB driver package. Restart the guest. running c:>[...]\sdk\platformtools> adb devices finally shows me the device...

安装ADB驱动程序的简单方法

我总是使用ADB驱动安装程序为任何移动安装ADB驱动程序。你只需要点击安装按钮。都准备好了!

如果你的设备没有在这里列出,那么你可以启用你的开发人员设置,检查你的USB线。

您必须从SDK管理器下载驱动程序(额外→谷歌USB驱动程序)

然后你必须在Windows中安装USB驱动程序(对我来说在Windows 8.1中是有效的):

(从http://developer.android.com/tools/extras/oem-usb.html#InstallingDriver:复制粘贴)

Connect your Android-powered device to your computer's USB port. Right-click on "Computer" from your desktop or Windows Explorer, and select "Manage". Select "Devices" in the left pane. Locate and expand "Other device" in the right pane. Right-click the device name (such as Nexus S) and select "Update Driver Software." This will launch the "Hardware Update Wizard". Select "Browse my computer for driver software" and click "Next." Click "Browse" and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.) Click "Next" to install the driver.

这种情况似乎出现在一些ADB驱动程序中。我在一些谷歌设备上遇到过同样的问题,安装Universal ADB windows驱动程序每次都为我解决了这个问题。

这是清单上的新成员。

检查您的防病毒软件没有阻止/屏蔽平台-工具目录中的adb.exe。如果你在SDK“platform-tools”目录中找不到adb.exe,那么它很可能已经有了。

当地C:\Users\ \ AppData \ \ Android Sdk \ \平台工具\ adb.exe

我用的是AVG,它认为它是一个IDP,所以它有一个vault dit。一般的病毒。 您可以将它作为一个异常添加,以允许它运行,并从保险库恢复它。

我的症状是,android-studio“工具”->连接助手会识别列表中的usb设备,但adp重启按钮仍然是灰色的。因为它找不到exe,但它没有抱怨,只是挂了。

只有当我手动尝试通过命令行弹出adp进程时,我才看到adp.exe丢失了。

希望这能为其他人节省很多时间。