zoukankan      html  css  js  c++  java
  • adb server is out of date. killing完美解决

    天,久未出现的著名的“adb server is out of date.  killing”又发生了,在此,将解决方法记下,以便日后查看。

    1. 错误信息:

    C:Userslizy>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:Userslizy>adb nodaemon server
    cannot bind 'tcp:5037'


    C:Userslizy>netstat -ano | findstr "5037"
      TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       8516
      TCP    127.0.0.1:5037         127.0.0.1:59163        TIME_WAIT       0
      TCP    127.0.0.1:5037         127.0.0.1:59164        TIME_WAIT       0
      TCP    127.0.0.1:5037         127.0.0.1:59167        TIME_WAIT       0
      ......
    C:Userslizy>tasklist | findstr "8516"
    sjk_daemon                        8516 Console                    1     3,071 K

    哦,原来是sjk_daemon进程占了adb的端口。

    C:Userslizy>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:Userslizy>taskkill /f /pid 963

    如果这个命令提示无权限,那么,可以去windows的“任务管理器”中“进程”那个窗口,找到这个进程,将它杀掉。


    再运行adb devices,就没有问题了。
    C:Userslizy>adb devices
    4df7f482396a301d        device

  • 相关阅读:
    如何激活myecilpse 10
    Myecilpse 10里安装配置maven
    spring mvc 模糊查询防注入
    javascript 取整,取余数
    spring3-mvc实例-信息转换
    CSS中怎么让DIV居中
    git
    浏览器窗口的大小
    如何限制文本框中的字数
    jquery如何设置控件位置
  • 原文地址:https://www.cnblogs.com/wangjizhen/p/10307527.html
Copyright © 2011-2022 走看看