我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?

我希望能够解开我的手机,无线开发。


当前回答

当你按照上面的答案https://stackoverflow.com/a/10236938/6117565,你可能会得到错误“没有路由到主机”。

要解决这个问题,在上述回答的第5步之前,首先启动模拟器,然后尝试连接设备。不知道发生了什么,但这个把戏奏效了。

其他回答

我在这里找到了答案:

Connect Android device and adb host computer to a common Wi-Fi network accessible to both. We have found that not all access points are suitable; you may need to use an access point whose firewall is configured properly to support adb. Connect the device with USB cable to host. Make sure adb is running in USB mode on host. $ adb usb restarting in USB mode Connect to the device over USB. $ adb devices List of devices attached ######## device Restart host adb in tcpip mode. $ adb tcpip 5555 restarting in TCP mode port: 5555 Find out the IP address of the Android device: Settings -> About tablet -> Status -> IP address. Remember the IP address, of the form #.#.#.#. sometimes its not possible to find the IP-address of the android device, as in my case. so u can get it using adb as the following: $ adb shell netcfg and the should be in the last line of the result. Connect adb host to device: $ adb connect #.#.#.# connected to #.#.#.#:5555 Remove USB cable from device, and confirm you can still access device: $ adb devices List of devices attached #.#.#.#:5555 device

现在可以开始了!

如果adb连接丢失:

确保你的主机仍然连接到你的Android设备所在的Wi-Fi网络。 再次执行“adb connect”步骤重新连接。 或者如果这不起作用,重置你的adb主机: 亚行kill-server

然后从头再来。

first you shold connect your device with usb to pc after that run cmd and drag and drop adb.exe that is in sdk/platform-tools path and write below code :

    ....\Sdk\platform-tools\adb.exe devices

    .....\Sdk\platform-tools\adb.exe tcpip 5555

    .....\Sdk\platform-tools\adb.exe connect Ip address:5555

只需下载谷歌ADB: https://developer.android.com/studio/releases/platform-tools 提取并利用它。 例如,配对:

./adb pair 192.168.8.90:42119 274678

然后连接:

./adb connect 192.168.8.90:38995

例如使用scopy这样的软件:

export ADB="/home/luca/Downloads/platform-tools/adb"
scrcpy

通过USB连接设备并确保调试工作正常。如果您已经安装了adb并在environment varialbe中设置了它的路径,则执行这些步骤

打开CMD,输入以下命令 Adb tcpip 5555 使用adb shell IP route查找IP地址 adb connect DEVICE_IP_ADDRESS:5555 断开USB并进行无线调试。

adb实用程序能够通过TCP/IP连接到设备。但是,adbd通常不会监听TCP连接。

如果您想让它运行,您需要一个工程设备(换句话说,您需要root)。然后按照这篇文章中的指导去做:

如何通过TCP连接到ADB的Android ?

由于这只适用于eng设备,所以它不受官方支持。使用风险自负,包括bug等。