adb shell提示error: could not install *smartsocket* listener
Posted wpyily
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了adb shell提示error: could not install *smartsocket* listener相关的知识,希望对你有一定的参考价值。
执行adb shell命令遇到错误提示:
C:\\Users\\tester>adb shell ps|grep demo
error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 通常每个套接字地址(协议/网络地址/端口)只
允许使用一次。 (10048)
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
could not read ok from ADB Server
* failed to start daemon *
error: cannot connect to daemon
看提示是端口被占用,检查步骤:
C:\\Users\\tester>netstat -aon|findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 5148
TCP 127.0.0.1:5037 127.0.0.1:54801 ESTABLISHED 5148
TCP 127.0.0.1:5037 127.0.0.1:54931 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:54975 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:54992 TIME_WAIT 0
TCP 127.0.0.1:51966 127.0.0.1:5037 TIME_WAIT 0
TCP 127.0.0.1:51967 127.0.0.1:5037 TIME_WAIT 0
TCP 127.0.0.1:51968 127.0.0.1:5037 TIME_WAIT 0
TCP 127.0.0.1:51969 127.0.0.1:5037 TIME_WAIT 0
找到了5037端口占用的PID “5148”,再执行命令:
C:\\Users\\tester>tasklist|findstr "5148"
360MobileLink.exe 5148 Console 1 24,424 K
找到罪魁祸首了,kill它就可以了。
注意可能需要重新授权,不然会提示:
C:\\Users\\tester>adb shell ps|grep demo
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
以上是关于adb shell提示error: could not install *smartsocket* listener的主要内容,如果未能解决你的问题,请参考以下文章
adb 无法连接 CreateProcess failure, error 2 * could not start server *
Could not run adb reverse: Command failed:
ionic真机调试Android报错 - could not read ok from ADB Server * failed to start daemon * error: cannot conn