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看到设备内的文件夹?


当前回答

如果你熟悉Linux,就用Linux代替Windows。在树莓派上,这样做

apt-get install android-tools-adb andoid-tools-fastboot

没有特殊的USB驱动程序需要,它只是工作。Android是基于Linux的,所以你更多的是在原生模式下工作。我在这里看到的许多问题都是Windows的问题。osx在这方面也可能比Windows有优势。Adb和fastboot都有man(手册)页面,可以从Linux中访问。

最初的问题:当手机处于fastboot模式时,我在adb中没有看到任何设备,adb和fastboot似乎是互斥的,你一次只能使用其中一个。USB调试必须打开。

其他回答

有时ADB与设备失去连接,需要重置。如果其他一切正常(如USB驱动安装,设备上启用了开发人员设置),但仍然无法看到您的设备,则需要重置ADB进程。

这可以在DDMS透视图(从Eclipse中)的Devices选项卡(最右边的三角形包含一个执行重置的菜单项)中使用。

否则,在命令行中,您可以使用以下2个命令重置它:

adb kill-server

then

adb start-server

使用另一根电缆。

刚刚发现我的一根常规充电线有Vcc、Gnd对,但没有Data+、Data-。

https://en.wikipedia.org/wiki/USB#Pinouts

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...

确认您拥有正确的平台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

问题:设备没有出现在vscode和ABD接口-没有发现驱动程序

解决方案:

Enable USB debugging in mobile. Connect your mobile and laptop using USB cable go to https://developer.android.com/studio/run/win-usb click on the "Click here to download the Google USB Driver ZIP file (ZIP)" go to device manager -> other devices -> right click on ADB device and click update driver software. Select "Browse my computer for Driver Software" Select "Let me pick from list of Device drivers on my computer" double click "show all devices" Click on "Have Disk" option. Select the driver path android-sdk-windows\extras\google\usb_driver .Select android_winusb.inf file select Android ADB interface -> click next Click Yes to install, close the window upon success. Now you will see the device appearing in VSCODE.