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


当前回答

如果你为Nexus启用了开发者选项和USB调试,win-usb应该可以工作。

你的驱动程序是否正确的一个标志是它在设备管理器中的名称中是否包含ADB。

对于我的Galaxy系列,我安装了一个驱动程序,但不是ADB驱动程序。

对于许多非nexus安卓系统,win-usb驱动程序将无法工作。相反,您需要安装一个OEM驱动程序:https://developer.android.com/studio/run/oem-usb.html

这最终让我得到了一个ADB兼容的驱动程序,在切换到PTP后,ADB终于能够找到我的设备。

其他回答

如果你为Nexus启用了开发者选项和USB调试,win-usb应该可以工作。

你的驱动程序是否正确的一个标志是它在设备管理器中的名称中是否包含ADB。

对于我的Galaxy系列,我安装了一个驱动程序,但不是ADB驱动程序。

对于许多非nexus安卓系统,win-usb驱动程序将无法工作。相反,您需要安装一个OEM驱动程序:https://developer.android.com/studio/run/oem-usb.html

这最终让我得到了一个ADB兼容的驱动程序,在切换到PTP后,ADB终于能够找到我的设备。

进入设备管理器,检查硬件id。 检查usb。Inf文件中列出了设备 如果不是,添加设备硬件id并从设备管理器中安装它。

我用的是装有安卓10系统的三星手机。它之前检测到,但在我的工厂数据重置Android 10手机后,在Windows 10上停止检测。虽然在Windows 11 PC上正常检测到。

当我深入挖掘一点,在android手机设置内的开发者选项中,有一个名为默认USB配置[设置->开发者选项->默认USB配置]的配置。当我选择那个选项时,出现了几个选项,默认情况下没有一个是被选中的。

我尝试选择一个接一个的选项,当我选择USB系留选项;然后android设备开始检测。

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

每次遇到这种情况,我都需要进入G6的开发人员选项,将USB配置设置为“midi”