ADB server didn't ACK #20141106 tl;dr; set ANDROID_ADB_SERVER_PORT=5060 adb start-server emulator.exe -avd AVD2_for_Nexus_One_by_Google adb -P 50600 shell [log] adb.exe start-server * daemon not running. starting it now on port 5037 * ADB server didn't ACK * failed to start daemon * 网上搜索是5037端口被占用,给的解决办法是: netstat -ano | find "5037",找到占用5037的进程,然后taskkill掉 但是我这边不是这个问题,因为netstat没有找到5037的进程 然后试了一下,发现socket无法bind端口5037,那么问题就是无法绑定这个端口造成的,网上的还有办法是重启,但是我不想重启。 搜索说端口无法绑定一是低端口,二有可能没有释放,但是这边都不是。所以看看有没有办法修改默认端口,直接查看adb的help, 看到adb tcpip [port],以为这个是的,但是这个不是。 最终找到一个修改default port的帖子, http://stackoverflow.com/questions/3836571/changing-default-port-i-e-5037-on-which-adb-server-runs windows上面, set ANDROID_ADB_SERVER_PORT=5060 adb start-server 这样就可以在新的端口上面起起来。后面发现还有另外一种方法,使用-P 参数 adb -P 5070 start-server * daemon not running. starting it now on port 5070 * 然后我在新窗口起了个emulator,命令 emulator.exe -avd AVD2_for_Nexus_One_by_Google -port 5566 port这参数在这里没有多大用。 但是在前面的窗口中找不到这个emulator, 关掉emulator,后面再开了一个,device offline,这个试了几下,还是一直这样, emulator.exe -avd AVD2_for_Nexus_One_by_Google 最终,在上面那个set 默认端口的窗口中起emulator 最后可以访问到了。 在其他的窗口可以使用-P 指定端口来进行操作。