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

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


当前回答

在游戏商店下载应用程序Wifi ADB。非常容易使用,工作就像一个魅力!:)

其他回答

安装插件Android WiFi ADB

从Android Studio直接下载安装Android WiFi ADB:

文件>设置->插件->浏览存储库-> Android WiFi ADB ->安装->第一次连接线缆->单击“连接”->现在拆除线缆并开始进行调试/运行。

请参考以下资料:

有办法查看Android屏幕远程没有根?- 9号帖子。

通过USB连接设备,并确保调试工作正常; Adb tcpip 5555。这使得设备开始监听端口5555上的连接; 使用adb shell netcfg或adb shell ifconfig(6.0及以上版本)查找设备IP地址; 您现在可以断开USB; adb connect <DEVICE_IP_ADDRESS>:5555。这将连接到我们在步骤2中在设备上设置的服务器; 现在您在网络上有了一个设备,可以像往常一样使用它进行调试。

要将服务器切换回USB模式,请运行adb USB,这将使您手机上的服务器恢复到USB模式。如果您有多个设备,您可以使用-s选项指定设备:adb -s <DEVICE_IP_ADDRESS>:5555 usb。

不需要根!

如果需要查询设备的IP地址,请先执行adb shell命令,再执行netcfg命令。你会在那里看到。 当使用OSX时,可以使用adb shell IP route命令查询IP地址。


警告:启用该选项是危险的,网络中的任何人都可以在调试中连接到您的设备,即使您是在数据网络中。只有连接到可信任的Wi-Fi时才可以这样做,完成后记得断开连接!


@Sergei建议修改第2行,评论道:“当另一个连接持续时(例如,模拟器连接或其他Wi-Fi设备),-d选项需要连接到USB设备”。

这些信息可能对未来的读者很有价值,但我还是回到了得到178个赞的原始版本。


在一些设备上,即使你没有USB线,你也可以做同样的事情:

在开发人员设置中启用网络ADB 它应该显示IP地址 adb connect <DEVICE_IP_ADDRESS>:5555 完成后禁用该设置


使用Android Studio有一个插件,允许您连接USB调试,而不需要从终端使用任何ADB命令。

确保你的电脑和安卓系统连接在同一个wifi上。 从你的手机启动adb服务器… 从playstore下载任何无线adb应用程序…这是我正在用的 无线ADB -空中调试 在您的计算机上启动CMD并运行: 代码(csharp): Adb连接192.168.1.100:5555 请确保将192.168.1.100替换为实际分配给设备的IP地址。

检查是否通过以下方式连接: 代码(csharp): 亚洲开发银行设备 4. 启动统一或重新启动,如果它已经运行并点击播放。

tadaa...........:eek:

更新:

从Android Studio Bumblebee(2021.1.1)稳定版开始,你可以通过扫描二维码对设备进行Wifi调试。

引用博客文章:

通过Wi-Fi的ADB: Bumblebee包括一个简化的连接流程 你的Android 11和更高版本的设备通过Wi-Fi进行部署 使用ADB调试。在你的 的“物理”选项卡中选择“使用Wi-Fi动作的对” 新建设备管理器打开配对向导。然后按照下面的步骤 提供用于与通过同一网络连接的设备配对。学习 更多。


老帖:

有了新的Android 11,你可以在WiFi上调试你的应用程序,而完全不需要使用USB线。

引用自Android Studio用户指南

Connect to a device over Wi-Fi (Android 11+) Android 11 and higher support deploying and debugging your app wirelessly from your workstation using Android Debug Bridge (adb). For example, you can deploy your debuggable app to multiple remote devices without physically connecting your device via USB. This eliminates the need to deal with common USB connection issues, such as driver installation. To use wireless debugging, you need to pair your device to your workstation using a pairing code. Your workstation and device must be connected to the same wireless network. To connect to your device, follow these steps: On your workstation, update to the latest version of the SDK Platform-Tools. On the device, enable developer options. Enable the Wireless debugging option. On the dialog that asks Allow wireless debugging on this network?, click Allow. Select Pair device with pairing code. Take note of the pairing code, IP address, and port number displayed on the device (see image). On your workstation, open a terminal and navigate to android_sdk/platform-tools. Run adb pair ipaddr:port. Use the IP address and port number from step 5. When prompted, enter the pairing code that you received in step 5. A message indicates that your device has been successfully paired. none Enter pairing code: 482924 Successfully paired to 192.168.1.130:37099 [guid=adb-235XY] (For Linux or Microsoft Windows only) Run adb connect ipaddr:port. Use the IP address and port under Wireless debugging.

1-为此,我认为你已经安装了最新版本的Android studio。如果没有,你可以从这里下载。

2 -可以在“环境变量”中设置平台工具路径(可选)。

3 -确保你的设备和电脑连接到同一个网络。

plug in the data cable from pc to device. Now, type adb tcpip 5555 remove data cable. Then type adb connect 192.168.43.95 here 5555 is the port number and 192.168.43.95 is the ip address of the mobile device you can get id address from the mobile settings . Then go to About device and go to status you can see the ip address of the device. You can connect multiple device from different ports which can give ease in development. Or you can go to this link for brief description with screenshots. http://blogssolutions.co.in/connect-your-android-phone-wirelessly-by-adb