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

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


当前回答

我在这里找到了答案:

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

然后从头再来。

其他回答

android无线调试(MAC)

步骤1:进入sdk文件夹(常用路径“/Users/macname/Library/Android/sdk/platform-tools”) 打开CMD,运行"adb devices" output -附加设备列表

如果在CMD类型中没有找到adb命令 。/亚洲开发银行——的帮助 OS X / macOS:典型的~/。Profile或~/.bash_profile 在这里添加以下一行,并将其替换为安装platform-tools的路径:

步骤2: $PATH ="/Users/macname/Library/Android/sdk/platform-tools"

步骤3: $ adb设备 所附设备清单 ZH99FF7FTY设备

步骤4: $ adb tcpip 5555 以TCP模式重新启动端口:5555

步骤5: $ adb connect 10.124.32.18:5555 已连接到10.124.32.18:5555

下次重复步骤4和5重新连接 或者如果设备重新启动但没有连接,请再次执行步骤 祝你好运

以下是标准的步骤(大部分与之前的答案相同):-

Adb tcpip 5555。 Adb connect your_device_ip_address。 Adb设备(查看设备是否已连接)。

但在某些情况下,上述步骤会出现“无法连接到设备”之类的错误。确保你的电脑和设备连接到同一个WiFi网络。”你注意到这些设备已经在同一个网络上了。

在这种情况下,安装这个插件“Wifi ADB Ultimate”,并遵循以下步骤。

通过USB连接设备一次。 刷新列表,检查其是否连通。 进入“关于话机>状态> IP地址”,填写您的IP地址(例如>)。198.162.0.105)。 回到Android Studio,按下图所示填写这个IP,然后点击运行按钮。



现在,您可以开始了!

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

对于安卓11手机和安卓工作室大黄蜂版本,有新的更新。你只需要从安卓手机上扫描二维码就可以了 繁荣!它是相连的。

节省复制粘贴过程的时间。 有用的官方文件在这里

2021年8月编辑

谷歌用ArcticFox Beta 03 https://issuetracker.google.com/issues/190411383删除了它,但在Android Studio Bumblebee它仍然存在。看起来他们有很多问题,这就是为什么它只是金丝雀版本

最初的发布

这个Android WiFi ADB插件不能在4.1.1中工作(不再)

但有一个更简单的解决方案: 如果你有Android 11 (api30)设备,你应该使用Android Studio 2020.3.1 (Canary)来连接。非常简单

然后进入开发者设置,扫描二维码。就是这样。 你现在也可以在其他(旧的)Android Studio版本中使用连接设备