1、查看adb 的进程端口号是什么,输入命令 adb nodaemon server 显示端口号
2、查看端口号对应的进程pid ,输入命令 netstat -ano 查看对应的端口号的进程号
3、查看进程号对应的进程名称或结束进程 tasklist|findstr "进程号"或 taskkill /f /pid 进程号
或者彻底删除这个驱动程序 在任务管理中找到tadb 那个进程程序右击找到它所在的文件夹,直接删除即可!
另一种方法:
自己配置 adb server 端口,使用一个生僻的值。
很简单,只要在系统环境变量中定义 ANDROID_ADB_SERVER_PORT 的值即可。
最好选择一个5位数的端口号(10000 ~ 65535),不易重复。
win下只要在环境变量中增加一个ANDROID_ADB_SERVER_PORT ,值填你自己定义的端口。
linux下只要 export $ANDROID_ADB_SERVER_PORT = 自定义端口,即可。
这时打开一个命令行,输入adb devices,看看是不是在新的端口上启动了啊?
以下都是ADB连接问题,可以通过尝试如下步骤,由简单度排序
1. 插拔下USB连接线
2. 关闭USB模式再打开
3. 执行以下命令
- adb kill-server
- adb start-server
4. 效果与3相同
DDMS - Devices - Reset adb
5. 关闭所有PC套件,例如:
杀死 Wandoujia 相关的所有进程,ok
wandoujia_daemon.exe
wandoujia_helper.exe
8. 查看下USB先是否连接电脑与手机
9. 重启手机
10. 关闭占用5037端口软件
11. 更新adb (见问题14)
1. 查看占用端口5037的PID值
netstat -a -n -o |findstr "5037"
输出结果: TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 5096 TCP 127.0.0.1:5037 127.0.0.1:51577 ESTABLISHED 5096 TCP 127.0.0.1:51577 127.0.0.1:5037 ESTABLISHED 43242. 从上面得知PID = 5096占用了5037端口,现在通过PID查看进程名,看到底哪个进程占用此端口
tasklist /v | findstr 5096
输出结果:tadb.exe 5096 Console 1 4,932 K Unknown ...... 0:00:02 暂缺网上查询得知tadb.exe是腾讯管家启动的进程3. 杀死占用5037端口的进程 tadb.exetaskkill /f -pid 5096taskkill /im tadb.exe输出结果成功: 已终止 PID 为 5096 的进程。
问题1
- The connection to adb is down, and a severe error has occured.
- You must restart adb and Eclipse.
- Please ensure that adb is correctly located at 'adb.exe' and can be executed.
问题2
- ADB server didn't ACK
- * failed to start daemon *
问题3
- Adb failed to restart! Make sure the plugin is properly configured
问题4
- ** Adb connection Error:远程主机强迫关闭了一个现有的连接
问题5
- java.io.IOException: 您的主机中的软件中止了一个已建立的连接。
- at sun.nio.ch.SocketDispatcher.write0(Native Method)
- at sun.nio.ch.SocketDispatcher.write(Unknown Source)
- at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
- at sun.nio.ch.IOUtil.write(Unknown Source)
- at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
- at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
- at com.android.ddmlib.Client.sendAndConsume(Client.java:575)
- at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:348)
- at com.android.ddmlib.Client.requestAllocationStatus(Client.java:421)
- at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:854)
- at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:822)
- at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:781)
- at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:649)
- at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:42)
- at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:577)
通常是同时打开了两个eclipse,关闭一个即可
问题6
- Failed to install .apk on device '': Unable to open sync connection!
- java.io.IOException: Unable to open sync connection!
- Launch canceled!
- ADB rejected shell command (rm /data/local/.apk): closed
- Error during Sync: Unable to open sync connection!
- Error during Sync: Unable to open sync connection!
- Adb connection Error:远程主机强迫关闭了一个现有的连接。
- Connection attempts: 1
- Connection attempts: 2
- Connection attempts: 3
问题8
- Failed to install .apk on device : Too many open files
- com.android.ddmlib.SyncException: Too many open files
- Launch failed on device:
问题9
- Failed to install .apk on device '': closed
- com.android.ddmlib.InstallException: closed
- Launch failed on device:
问题10
- Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
- Please check logcat output for more details.
- Launch failed on device:
- Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE
- Please check logcat output for more details.
- Launch failed on device:
使用PC套件删除,然后安装不行,通过adb uninstall 再次删除,安装ok
问题12
- Android Launch!
- Connection with adb was interrupted.
- 0 attempts have been made to reconnect.
- You may want to manually restart adb from the Devices view.
- Unexpected error while launching logcat. Try reselecting the device.] closed
- om.android.ddmlib.AdbCommandRejectedException: closed
- at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:381)
- at com.android.ddmlib.Device.executeShellCommand(Device.java:462)
- at com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:109)
- at java.lang.Thread.run(Unknown Source)
问题14
- adb server is out of date. killing...
- * daemon started successfully *
- error: device offline
- D:\>adb version
- Android Debug Bridge version 1.0.29
- D:\>adb version
- Android Debug Bridge version 1.0.31