执行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
C:\Users\tester>tasklist|findstr "5148"
360MobileLink.exe 5148 Console 1 24,424 K
注意可能需要重新授权,不然会提示:
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.