简体   繁体   English

无法通过WiFi连接后,adb无法找到设备

[英]adb can't find device after failing to connect through WiFi

Essentially, my problem is that I tried connecting my device to adb over Wifi, got to adb connect xxx.xx.xx.xxx but then adb claims that it was unable to connect to xxx.xx.xx.xxx:5555 . 基本上,我的问题是我尝试通过Wifi将我的设备连接到adb,然后adb adb connect xxx.xx.xx.xxx ,然后adb声称它unable to connect to xxx.xx.xx.xxx:5555

Ok, but now I'm having trouble getting it back to listening over USB. 好的,但现在我无法通过USB收听它。 adb usb tells me that there isn't a device attached and adb devices gives me an empty list. adb usb告诉我没有连接设备, adb devices给我一个空列表。

I've tried killing the adb server and then restarting it, toggling the device's debugging mode and toggling the device's USB storage transfer but nothing seems to be working. 我已经尝试杀死adb服务器,然后重新启动它,切换设备的调试模式并切换设备的USB存储传输,但似乎没有任何工作。 This question seems very similar to my problem but I have no idea what the guy is doing in the solution. 这个问题似乎与我的问题非常相似,但我不知道这个人在解决方案中做了什么。

I'm guessing the problem is that adb is still trying to listen through Wifi but since I can't connect to it over Wifi it can never go back to listening to it over USB. 这个问题是adb仍在尝试通过Wifi收听,但由于我无法通过Wifi连接到它,因此它永远无法通过USB收听它。 Idk... IDK ...

For wifi, you may be able to get it to work if you first use the browser on the device to visit a webpage or something and so effectively wake up the wifi radio and its connection to the access point. 对于wifi,如果您首先使用设备上的浏览器访问网页或其他内容,您可以使其工作,从而有效地唤醒wifi无线电及其与接入点的连接。 You may need to keep doing this every once in a while. 您可能需要每隔一段时间继续这样做。

(Maybe you should listen to internet radio while you work?) (也许你在工作的时候应该听网络电台?)

Of course your access point will have to permit peer-to-peer traffic on the local subnet. 当然,您的接入点必须允许本地子网上的对等流量。 In many cases that may be the norm, but I believe an access point can be configured not to support that, and some may default to such settings. 在许多情况下,这可能是常态,但我相信可以配置一个接入点不支持它,有些可能默认为这样的设置。 There can also be issues between wired and wireless subnets sourced from the same box. 来自同一个盒子的有线和无线子网之间也可能存在问题。

Finally, restarting the device might get it back into USB mode. 最后,重新启动设备可能会使其重新进入USB模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM