EC小编 发表于 2024-1-11 12:31:38

adb 5037端口被占用问题(adb server is out of date. killing...)

adb 5037端口被占用问题(adb server is out of date. killing...)
在执行adb devices时发现端口被占用
C:\Users\Administrator>adb devices
* daemon not running; starting now at tcp:50371.尝试重启adb服务
C:\Users\Administrator>adb kill-server

C:\Users\Administrator>adb devices
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached

2.如果无效,尝试查找占用5037的程序有哪些,执行netstat -aon|findstr "5037"
C:\Users\Administrator>netstat -aon|findstr "5037"
TCP    127.0.0.1:5037         0.0.0.0:0            LISTENING       960
TCP    127.0.0.1:5037         127.0.0.1:51392      TIME_WAIT       0
TCP    127.0.0.1:5037         127.0.0.1:51400      TIME_WAIT       0
TCP    127.0.0.1:5037         127.0.0.1:51401      TIME_WAIT       0
如例,查询960是哪个程序占用的,执行   tasklist|findstr "960",发现有四个程序,只终止adb.exe没用,这四个必须都杀死才可以C:\Users\Administrator>tasklist|findstr "960"
svchost.exe                   1368 Services                   0      1,960 K
svchost.exe                   2960 Services                   0      1,796 K
chrome.exe                  7960 Console                  1   28,664 K
adb.exe                        960 Console                  1   11,516 K
依次执行 taskkill /f /t /im XXX.exe
C:\Users\Administrator>taskkill /f /t /im adb.exe成功: 已终止 PID 960 (属于 PID 10020 子进程)的进程。
再重新连接,查看连接adb一般就好了
C:\Users\Administrator>adb devices
List of devices attached
127.0.0.1:62001 device







3 重启电脑,


页: [1]
查看完整版本: adb 5037端口被占用问题(adb server is out of date. killing...)