在Windows上,adb连接到错误的端口5037而不是5555 [英] On Windows, adb connects to wrong port 5037 instead of 5555

查看:905
本文介绍了在Windows上,adb连接到错误的端口5037而不是5555的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过WiFi调试Android应用。我正在使用 WiFi ADB应用准备Android设备以通过Wifi进行连接。

Debugging an Android App over WiFi. I am using WiFi ADB App to prepare the Android Device for the connection over Wifi. All seems well on that end.

下一步,我需要按以下方式连接adb:

Next, I need to connect adb as follows:

adb connect 192.168.2.8:5555

有时这可以正常工作。但是更常见的是,我收到以下消息:

Sometimes this works properly. But more often, I get the following message:

C:\> adb connect 192.168.2.8:5555
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 192.168.2.8:5555

即使一切似乎都井井有条,但我了解到当我看到此消息时,AndroidStudio(版本1.1.0)将无法找到我的AndroidDevice。

Even though everything seems in order, I have learned that when I see this message, AndroidStudio (version 1.1.0) will not be able to find my AndroidDevice.

我不是第一个遇到此问题的人,本文提出了解决方案。这对我不起作用(或几乎永远不起作用)。但是,确实会发生有趣的事情。

I am not the first to run into this, this article suggests a solution. This does not (or nearly never) work for me. However, interesting things do happen.


  • 打开Windows TaskManager时,我看到的是一个 adb.exe(32位)后台进程。我通过结束任务按钮将其杀死。

  • When opening up Windows TaskManager, I can see one adb.exe (32 bit) background process. I kill it via End task button.

接下来,我执行 Windows cmd shell中的adb connect 192.168.2.8:5555 命令。我简要地看到两个 adb.exe(32位)后台进程出现在TaskManager中。一秒钟后,一个进程消失了。

Next, I execute the adb connect 192.168.2.8:5555 command in Windows cmd shell. I briefly see two adb.exe (32 bit) background processes appear in TaskManager. After a second, one process disappears.

在cmd shell中,我得到了关于在端口5037上启动的相同信息,这意味着-AndroidStudio可以再次找不到我的设备。

In the cmd shell, I get the same stuff about starting on port 5037, which means that -again- AndroidStudio can not find my device.

在我看来,好像启动了两个adb.exe进程,一个锁端口5555,这两个过程都没有给我找到可联系的联系;

It looks to me like two adb.exe processes are started up, that one locks port 5555, and that neither process give me a findable connection; not even after one of the processes has been (auto)terminated.

我该如何连接adb,使其实际上在端口5555上启动,而AndroidStudio可以找到我的设备?

更新:

1。)我误解了消息:

1.) I misunderstood the message:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *

这意味着该守护程序尚未在开发计算机上运行 。 (我知道这是目标计算机。)如果在未运行AndroidStudio的情况下发出 adb connect *。*。*。* ,将会收到此消息。在开发计算机上,它在端口5037上处于星状。

This means that the daemon is not yet running on the development machine. (I understood this to be the target machine.) You will get this message if you issue adb connect *.*.*.* without AndroidStudio running (yet). On the development machine, it stars on port 5037.

然后,您会收到以下消息:

Then, you get the message:

* daemon started successfully *
connected to 192.168.2.8:5555

这意味着它已连接到目标计算机上的端口5555 (=您的Android设备)。

It means that it is connected to port 5555 on the target machine (= your Android device).


  1. 原来,上述问题是由硬件(WiFi适配器)故障引起的。所以我在吠错树。寻找软件解决方案。


推荐答案

在Windows上,在控制台中,解决方案似乎是(?)

On Windows, in the console, the solutions appears to be (?)

adb kill-server
SET ANDROID_ADB_SERVER_PORT=5555
adb connect 192.168.2.8:5555

AndroidStudio在多余的 adb tcpip 5555 语句。

AndroidStudio finds the device after the extra adb tcpip 5555 statement.

更新:

以上内容似乎没有解决方案,至少不是在100%的情况下。仍然没有找到可行且可复制的东西...

The above does not appear to be the solution, at least not in 100% of the cases. Still haven't found something that works and is reproducible...

这篇关于在Windows上,adb连接到错误的端口5037而不是5555的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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