Tag Archives: “adb server is out of date. killing… ”

How to Solve “adb server is out of date. killing… ”

Sometimes ADB does not work and the following error is reported.
C:\Users\gaojs>adb devices
adb server is out of date. killing…
ADB server didn’t ACK
* failed to start daemon *
error: unknown host service

Port 5037 was found to be occupied with the following command.
C:\Users\gaojs>adb nodaemon server
cannot bind ‘tcp:5037’

You can find out what processes are occupying this port with the following command.
C:\Users\gaojs>netstat -ano | findstr “5037”
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 21152
TCP 127.0.0.1:5037 127.0.0.1:62629 ESTABLISHED 21152
TCP 127.0.0.1:5037 127.0.0.1:63942 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:63943 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:63944 TIME_WAIT 0
TCP 127.0.0.1:62629 127.0.0.1:5037 ESTABLISHED 2980

You can see exactly what the process of the above PID is with the following command.
C:\Users\gaojs>tasklist | findstr “2980”
QQ.exe 2980 Console 4 60,712 K
C:\Users\gaojs>tasklist | findstr “21152”
tadb.exe 21152 Console 4 2,136 K

Kill tadb.exe (PID:21152) with the following command.
C:\Users\gaojs>taskkill /f /pid 21152

Then, try again, and it works as follows.

C:\Users\gaojs>adb devices
* daemon not running. starting it now on port5037*
* daemon started successfully *
List of devices attached
4dfadcb86b00cf05 device