adb server is out of date. killing
1. 错误信息:
C:\Users\lizy>adb devices
adb devicesadb server is out of date. killing...
ADB server didn't ACK* failed to start daemon *error: unknown host service
2. 原因:
adb的端口(5037)被占用了。至于这个5037端口,可以参考本博客另外 一篇文章:
http://blog.csdn.net/liranke/article/details/4999210
在这个文章里,详细说明了adb的原理及其源码分析。
3. 解决方法:
在cmd窗口:
C:\Users\jiangjiahao>adb nodaemon server
cannot bind 'tcp:5037'
C:\Users\jiangjiahao>netstat -ano | findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 6744
TCP 127.0.0.1:5037 127.0.0.1:51419 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:51420 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:51435 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:51441 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:51442 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:51443 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:51445 ESTABLISHED 6744
TCP 127.0.0.1:5037 127.0.0.1:51446 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:51447 ESTABLISHED 6744
TCP 127.0.0.1:51420 127.0.0.1:5037 TIME_WAIT 0
TCP 127.0.0.1:51445 127.0.0.1:5037 ESTABLISHED 6940
TCP 127.0.0.1:51447 127.0.0.1:5037 ESTABLISHED 9884
......
C:\Users\lizy>tasklist | findstr "8516"
sjk_daemon
8516 Console 1 3,071 K
哦,原来是sjk_daemon进程占了adb的端口。
C:\Users\lizy>tasklist
Image Name PID Session Name Session# Mem Usage
========================= ======== ================ =========== ============
System Idle Process 0 Services 0 24 K
System 4 Services 0 1,128 K
sjk_daemon 963 Console 1 3,071 K
tasklist.exe 1260 Console 1 5,856 K
将这个进程kill掉:
C:\Users\lizy>taskkill /f /pid 963
如果这个命令提示无权限,那么,可以去windows的“任务管理器”中“进程”那个窗口,找到这个进程,将它杀掉。
再运行adb devices,就没有问题了。
C:\Users\lizy>adb devices
4df7f482396a301d device
网友评论