只要拔下 USB,通过 ADB 建立的 Tcpip 连接就会断开 [英] Tcpip connection established via ADB gets disconnected as soon as the USB is unplugged

查看:33
本文介绍了只要拔下 USB,通过 ADB 建立的 Tcpip 连接就会断开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这对我来说一直很好用,现在突然间我发现这种行为发生了变化,而 android 或我的 wondows 都没有变化(我也没有更新)

这就是我通过 tcpip 建立无线连接的方式

adb -d tcpip 5571亚行连接 192.168.68.110:5571

现在在这个 adb devices 之后,当 USB 插入输出时:

<块引用>

连接的设备列表

<块引用>

ZY223SVNKZ 设备

<块引用>

192.168.68.110:5571 设备

当我拔掉它用来输出的USB时:

<块引用>

连接的设备列表

<块引用>

192.168.68.110:5571 设备

但突然间,它在拔下插头后输出空白:

<块引用>

连接的设备列表

我已阅读正在听TCP 服务器应用程序的以太网电缆拔出事件但它没有回答我的问题.我已经通过 adb 建立了连接,因此也在寻找基于 adb 的解决方案.我也经历过

这些都没有回答我的问题.所以请不要盲目地关闭它引用任何这些.我需要一个基于 adb 的解决方案或一些可以解决它的 android 设置.

解决方案

对我来说,将 adb 版本从 39 升级到 41 修复了这个问题.我同意这可能不是一个完整的解决方案,但它对我有用.

其他人在类似线程中提到的其他解决方案

  1. 从 usab3.0 迁移到 usb2.0 为某人解决了,但对我没有解决.
  2. 将 USB 模式从文件传输更改为收费仅对某人解决,但对我没有解决.

如果升级 adb 版本对您不起作用,您也可以尝试这些.

This had been working fine for me all the while, now all of a sudden I find this change in behaviour with no change in android or my wondows(I haven't updated either)

This is how I establish wireless connection over tcpip

adb -d tcpip 5571
adb connect 192.168.68.110:5571

Now after this adb devices when usb is kep plugged outputs:

List of devices attached

ZY223SVNKZ device

192.168.68.110:5571 device

when I uplug the usb it used to output:

List of devices attached

192.168.68.110:5571 device

But all of a sudden it's now outputing blank after unplugging:

List of devices attached

I have read Listening for an Ethernet Cable Unplugging Event for a TCP Server Application But it doesnt answer my question. I have established connection via adb so looking for an adb based solution as well. I have also gone through

None of these answers my question. So please don't blindly close it refereing any of these. I need a adb based solution or some sorts of android settings which can solve it.

解决方案

For me upgrading adb version from 39 to 41 fixed the issue. I agree it may not be a fullproof solution, but it worked for me.

Other solution which others mentioned on similar threads were

  1. migrating from usab3.0 to usb2.0 solved for someone but it didnt solve for me .
  2. changing usb mode from file transfer to charge only solved for someone but it didnt solve for me.

You can try those too if upgrading adb version doesnt work for you.

这篇关于只要拔下 USB,通过 ADB 建立的 Tcpip 连接就会断开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆