Android 设备未显示在 adb 列表中

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21170392/
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 04:04:39  来源:igfitidea点击:

Android device does not show up in adb list

androidadb

提问by Peter

I have a HP Slate 21 that is connected to my Windows box using a USB cable. USB debugging is enabled on the device. After adding the proper %SingleAdbInterface%and %CompositeAdbInterface%entries to the android_winusb.inffile, I now see "Android ADB Interface" in my Device Manager. However, running adb devicesat the command-line does not show the device.

我有一台 HP Slate 21,它使用 USB 电缆连接到我的 Windows 机箱。在设备上启用 USB 调试。在文件中添加正确的%SingleAdbInterface%%CompositeAdbInterface%条目后android_winusb.inf,我现在在我的设备管理器中看到“Android ADB 接口”。但是,adb devices在命令行中运行不会显示设备。

I have another HP slate 7 that shows up just fine under adb devices.

我有另一个 HP slate 7,它在adb devices.

The only difference I see from Device Manager is that the one that works is named "Android Composite ADB Interface" and the other one is named "Android ADB Interface."

我从设备管理器中看到的唯一区别是,一个有效的名为“Android Composite ADB Interface”,另一个名为“Android ADB Interface”。

There is yet another subtle difference. In the winusb.inf file, for Slate 7 I have two %CompositeAdbInterface%entries defined but for Slate 21, there is just one %CompositeAdbInterface%entry defined.

还有另一个微妙的区别。在 winusb.inf 文件中,对于 Slate 7,我%CompositeAdbInterface%定义了两个条目,但对于 Slate 21,只%CompositeAdbInterface%定义了一个条目。

What could be wrong with my setup?

我的设置可能有什么问题?

采纳答案by Peter

Looks like the installed driver was in bad state. Here is what I did to make it work:

看起来安装的驱动程序状态不佳。这是我为使其工作所做的工作:

  1. Delete the device from Device Manager.
  2. Rescan for hardware changes.
  3. List item "Slate 21" will show up with "Unknown driver" status.
  4. Click on "Update Driver" and select /extras/google/usb_driver
  1. 从设备管理器中删除设备。
  2. 重新扫描硬件更改。
  3. 列表项“Slate 21”将显示为“未知驱动程序”状态。
  4. 单击“更新驱动程序”并选择 /extras/google/usb_driver

Device Manager will find the driver and warn you about installing it. Select "Yes." This time the device got installed properly.

设备管理器将找到驱动程序并警告您安装它。选择“是”。这次设备安装正确。

Note that I didn't have to modify winusb.inf file or update any other driver.

请注意,我不必修改 winusb.inf 文件或更新任何其他驱动程序。

Hope this helps.

希望这可以帮助。

回答by JohnnyFun

Make sure your device is not connected as a media device.

确保您的设备未作为媒体设备连接。

回答by Tester

I had a similar issue and solved with the following steps after connecting the device via USB:

通过 USB 连接设备后,我遇到了类似的问题并通过以下步骤解决了:

  1. turn on developer options on the android device.
  2. enable check box for stay awake.
  3. enable check box for USB debugging.
  4. open cmd
  5. got to platform tools adt tools here https://developer.android.com/studio.
  6. adb kill-server
  7. adb start-server
  8. adb devices
  1. 在安卓设备上打开开发者选项。
  2. 启用复选框以保持清醒。
  3. 启用 USB 调试复选框。
  4. 打开cmd
  5. 到这里https://developer.android.com/studio 的平台工具 adt 工具。
  6. adb 杀死服务器
  7. adb 启动服务器
  8. 亚行设备

Now we can see attached devices.

现在我们可以看到连接的设备。

回答by Jesse

For me the solution was to use a different USB port on my laptop

对我来说,解决方案是在我的笔记本电脑上使用不同的 USB 端口

回答by Marco Lackovic

In Android 8 Oreo:

Android 8 奥利奥中

  1. go into Settings / Developer Options / Select USB Configuration;
  2. Select PTP (Picture Transfer Protocol).
  1. 进入设置/开发者选项/选择USB配置;
  2. 选择PTP(图片传输协议)

回答by Mike Swanson

While many of these solutions have worked for me in the past, they all failed me today on a Mac with a Samsung S7. After trying a few cables, someone suggested that the ADB connection requires an official Samsung cable to work. Indeed, when I used the Samsung cable, ADB worked just fine. I hope this helps someone else!

虽然这些解决方案中的许多过去对我有用,但今天它们在配备三星 S7 的 Mac 上都让我失望。在尝试了几条电缆后,有人建议 ADB 连接需要三星官方电缆才能工作。事实上,当我使用三星电缆时,ADB 工作得很好。我希望这对其他人有帮助!

回答by Trong Lam Phan

Disable and re-enable "use debug mode" on your telephone

在您的电话上禁用并重新启用“使用调试模式”

回答by Anita

In Galaxy s6 - I resolved it by: Settings -> About device -> Software info -> Build number - tap it 7 times to enable Developer options. Go back to Settings -> Developer options -> turn on USB debugging.

在 Galaxy s6 中 - 我通过以下方式解决:设置 -> 关于设备 -> 软件信息 -> 版本号 - 点击 7 次以启用开发人员选项。返回设置 -> 开发人员选项 -> 打开 USB 调试。

Go back to your terminal adb devicesand you should see the connected device. Hope that helps.

返回您的终端adb devices,您应该会看到连接的设备。希望有帮助。

回答by Manisha

I also had same problem, i tried to use all the possible solution posted on this thread, but i found out i had same problem as JohnnyFunexplained, but as per HenrikBsolution i could not find any settings option in my Samsung Galaxy S6 phone ( Android 6.0.1)

我也遇到了同样的问题,我尝试使用该线程上发布的所有可能的解决方案,但我发现我遇到了与JohnnyFun解释的相同的问题,但是根据HenrikB解决方案,我在我的三星 Galaxy S6 手机中找不到任何设置选项(安卓 6.0.1)

Settings -> Storage -> menu -> USB computer connection

设置 -> 存储 -> 菜单 -> USB 计算机连接

I finally figure - when connecting my phone throught charger in pull down menu i see options like -

我终于想通了 - 在下拉菜单中通过充电器连接我的手机时,我看到以下选项 -

enter image description here

在此处输入图片说明

Then click on "Connected for chargin " >>> you will see options like >>

然后单击“已连接充电” >>> 您将看到诸如 >> 之类的选项

enter image description here

在此处输入图片说明

Over there you can change option to "Transferring media type files"

在那里,您可以将选项更改为“传输媒体类型文件”

回答by Snorkeler

Turning on tethering actually allowed me to install and debug on a LG device and it was the only way it would work

打开网络共享实际上允许我在 LG 设备上安装和调试,这是它工作的唯一方式