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.



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值