I just decided it for me, so I thought I would share it, although the question is old. Just restarting adb will not work. Open a command prompt with administrator privileges and do the following:
netstat -o -n -a | findstr 5037
This will result in a list of results. This is what was in my case:
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 3408 TCP 127.0.0.1:5037 127.0.0.1:50018 ESTABLISHED 3408 TCP 127.0.0.1:5037 127.0.0.1:54507 ESTABLISHED 3408 TCP 127.0.0.1:5037 127.0.0.1:63330 ESTABLISHED 3408 TCP 127.0.0.1:5037 127.0.0.1:63332 ESTABLISHED 3408 TCP 127.0.0.1:50018 127.0.0.1:5037 ESTABLISHED 1664 TCP 127.0.0.1:54507 127.0.0.1:5037 ESTABLISHED 1664 TCP 127.0.0.1:63330 127.0.0.1:5037 ESTABLISHED 1664 TCP 127.0.0.1:63332 127.0.0.1:5037 ESTABLISHED 1664
In the rightmost column is the process identifier (PID). The process that listens for the required socket is 3408. Therefore, this process must DIE ! What happens if you do this:
taskkill /F /PID 3408
After that you can do
adb kill-server adb start-server
to restart the adb server, and it is most likely that your adb will start successfully.
UPDATE:
I made this little bat file to make it easier as it happens quite often. Make sure that
1. to place this bat at the same folder as adb.exe 2. run it as administrator.
It will immediately show you the PID that uses the socket. Enter the PID and press Enter and the problem goes away.
netstat -o -n -a | findstr 5037 | findstr LISTENING set /p pid=Enter pid to kill:%=% @echo %pid% taskkill /F /PID %pid% adb kill-server adb start-server pause
source share