Android adb 设备返回错误:协议错误(无状态)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21049253/
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
adb devices return error: protocol fault (no status)
提问by jordansilva
My ADB stopped working recently. All commands results in error: protocol fault (no status).
我的亚行最近停止工作。所有命令都会导致错误:协议错误(无状态)。
Follow trace.
跟踪跟踪。
adb devices
亚行设备
system/core/adb/adb.c::main():Handling commandline()
system/core/adb/adb_client.c::adb_query():adb_query: host:devices
system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:version
system/core/adb/sysdeps_win32.c::socket_loopback_client():socket_loopback_client
: could not connect to tcp:5037
system/core/adb/adb_client.c::adb_connect():adb_connect: service host:devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:devices
system/core/adb/sysdeps_win32.c::socket_loopback_client():socket_loopback_client
: port 5037 type tcp => fd 101
system/core/adb/transport.c::writex():writex: fd=101 len=4: 30303063 000c
system/core/adb/transport.c::writex():writex: fd=101 len=12: 686f73743a646576696
36573 host:devices
system/core/adb/transport.c::readx():readx: fd=101 wanted=4
system/core/adb/sysdeps_win32.c::_socket_set_errno():_socket_set_errno: unhandle
d value 10054
system/core/adb/transport.c::readx():readx: fd=101 error 22: Invalid argument
system/core/adb/sysdeps_win32.c::adb_close():adb_close: 101(lo-client:5037)
system/core/adb/adb_client.c::adb_connect():adb_connect: return fd -1
error: protocol fault (no status)
采纳答案by Murphy
I had the same issue and found the problem: Android Studio.
我遇到了同样的问题并发现了问题:Android Studio。
Open the Android Studio menu Tools
-> Android
and uncheck Enable ADB integration
.
打开 Android Studio 菜单Tools
->Android
并取消选中Enable ADB integration
。
adb devices
should work (you might need adb kill-server
first).
adb devices
应该工作(您可能adb kill-server
首先需要)。
Then you can re-enable ADB integration in Studio.
然后您可以在 Studio 中重新启用 ADB 集成。
回答by Gapped
I recently got the same error, after installing a driver for the Moto X. I previously had the ADB and Fastboot quick install. I installed the driver, saw that the Moto X still wasn't registered, so uninstalled the driver again. Ten I got this error message. I opened Task Manager, killed the ADB.exe and then in Bash hit the adb device
command. All was good again.
在为 Moto X 安装驱动程序后,我最近遇到了同样的错误。我之前安装了 ADB 和 Fastboot 快速安装。我装了驱动,发现Moto X还没注册,又卸载了驱动。十我收到此错误消息。我打开了任务管理器,杀死了 ADB.exe,然后在 Bash 中点击了adb device
命令。一切又好了。
回答by jAC
This typically means, that your ADBservice or your driver is outdated.
Since the drivers aren't updated most of the time, make sure you've installed the latest version of your Android SDK Platform-tools via the SDK Manager:
这通常意味着您的ADB服务或您的驱动程序已过时。
由于驱动程序大部分时间都不会更新,请确保您已通过 SDK 管理器安装了最新版本的 Android SDK 平台工具: