今天调试adb命令时遇到一些问题
1. 没有找到AdbWinApi.dll
2. adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error: unknown host service
3. cannot bind 'tcp:5037'
在控制台下,进入目录E:\android-sdk-windows\tools, 输入adb shell, 弹出对话框显示错误
将AdbWinApi.dll文件从文件夹platform-tools拷贝到文件夹tools中
再执行adb shell, 继续出现问题
E:\android-sdk-windows\tools>adb shell
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error: unknown host service
再将AdbWinUsbApi.dll也一起拷贝过来,还会出现相同问题
E:\android-sdk-windows\tools>adb shell
adb server is out of date. killing...
ADB server didn't ACK
* failed to start daemon *
error: unknown host service
查看5037端口是不是被可用
E:\android-sdk-windows\tools>adb nodaemon server
cannot bind 'tcp:5037'
发现无法绑定到5037端口,由此判断5037端口被其他应用程序占用
查看5037端口被哪个进程占领
E:\android-sdk-windows\tools>netstat -ano | findstr "5037"
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 6140
原来5037端口被6140进程占领
查看所有进程
E:\android-sdk-windows\tools>tasklist
图像名 PID 会话名 会话# 内存使用
========================= ====== ================ ======== ============
System Idle Process 0 Console 0 28 K
System 4 Console 0 304 K
smss.exe 868 Console 0 428 K
csrss.exe 932 Console 0 13,204 K
winlogon.exe 964 Console 0 4,036 K
services.exe 1008 Console 0 4,808 K
lsass.exe 1020 Console 0 1,424 K
ibmpmsvc.exe 1176 Console 0 1,612 K
ati2evxx.exe 1208 Console 0 3,536 K
svchost.exe 1224 Console 0 5,396 K
svchost.exe 1308 Console 0 4,664 K
svchost.exe 1348 Console 0 20,936 K
S24EvMon.exe 1480 Console 0 19,064 K
svchost.exe 1548 Console 0 3,972 K
ati2evxx.exe 1636 Console 0 4,808 K
svchost.exe 1664 Console 0 4,180 K
ZhuDongFangYu.exe 1700 Console 0 10,592 K
spoolsv.exe 2024 Console 0 5,236 K
TPHKSVC.exe 200 Console 0 3,404 K
explorer.exe 560 Console 0 17,928 K
EvtEng.exe 584 Console 0 14,368 K
service.exe 664 Console 0 17,584 K
RegSrvc.exe 836 Console 0 3,256 K
svchost.exe 912 Console 0 8,036 K
AssistantServices.exe 1124 Console 0 3,624 K
WdfMgr.exe 1248 Console 0 1,956 K
VisualSVNServer.exe 1372 Console 0 8,564 K
WDKeyMonitorCCB.exe 1460 Console 0 7,372 K
PWMDBSVC.exe 1408 Console 0 3,756 K
VisualSVNServer.exe 1872 Console 0 10,552 K
alg.exe 2404 Console 0 3,784 K
TPOSDSVC.exe 2784 Console 0 5,316 K
tpfnf6r.exe 2796 Console 0 6,660 K
SynTPEnh.exe 2804 Console 0 11,688 K
rundll32.exe 2828 Console 0 38,364 K
UIExec.exe 2852 Console 0 7,144 K
WDCertM_CCB.exe 2860 Console 0 9,200 K
MOM.exe 2868 Console 0 3,628 K
360tray.exe 2876 Console 0 11,856 K
Finder.exe 2900 Console 0 31,628 K
ctfmon.exe 2952 Console 0 7,972 K
QQPMDaemon.exe 2964 Console 0 9,540 K
QQPhoneManager.exe 2972 Console 0 7,828 K
360sd.exe 3012 Console 0 1,044 K
TPONSCR.exe 3044 Console 0 6,548 K
TpScrex.exe 3124 Console 0 6,960 K
DLG.exe 3188 Console 0 7,620 K
SynTPLpr.exe 3368 Console 0 7,104 K
Tencentdl.exe 3432 Console 0 14,296 K
CCC.exe 3788 Console 0 5,888 K
360rp.exe 3480 Console 0 18,372 K
SoftManagerLite.exe 3072 Console 0 11,624 K
conime.exe 6112 Console 0 8,888 K
tadb.exe 6140 Console 0 3,668 K
eclipse.exe 5356 Console 0 190,296 K
taskmgr.exe 3440 Console 0 2,888 K
UIMain.exe 4380 Console 0 46,496 K
CMUpdater.exe 4024 Console 0 11,632 K
360se.exe 2452 Console 0 97,068 K
360se.exe 5708 Console 0 90,644 K
360se.exe 2592 Console 0 78,912 K
cmd.exe 5648 Console 0 1,048 K
360se.exe 2996 Console 0 42,000 K
WindowsLiveWriter.exe 4284 Console 0 68,564 K
360se.exe 2228 Console 0 55,108 K
360se.exe 412 Console 0 86,376 K
tasklist.exe 2732 Console 0 5,776 K
wmiprvse.exe 5796 Console 0 5,892 K
将tabd.exe进程结束掉
E:\android-sdk-windows\tools>adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
shell@android:/ $