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

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


当前回答

对于所有这些,有一个更好的方法(最简单的方法):

1) Android工作室出口插件,称为Android wifi ADB

2)进入文件->设置->插件->浏览存储库

3)寻找Android WiFi ADB,点击INSTALL,然后按提示重启

4)你会看到一个新的图标,这是你的新插件。

现在要做到这一点:

5)去你的手机的开发者选项并打开调试(必须)

6)也启用,允许调试TCP/网络

7)通过USB连接你的手机,并确保手机和你的电脑/笔记本电脑都连接到同一个网络(热点或wifi)

8)点击新的图标(即你的ANDROID Wifi ABD)

9)你的手机被检测到并通过wifi/热点连接,因此现在你可以断开usb。这是一个一次性的过程,因此你可能不需要保持手机连接usb。

这将使你的手机免于不定期的充电,同时,也是短长度usb线的补救措施。

其他回答

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重新连接 或者如果设备重新启动但没有连接,请再次执行步骤 祝你好运

我在这里找到了答案:

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

然后从头再来。

从搜索和一些答案,我使用这个方法,它工作得很好 你必须知道tcpip并不总是5555,你必须按照这个找到它 首先需要下载平台工具

https://developer.android.com/studio/releases/platform-tools.html

解压平台-工具文件夹到C盘,在那里运行Powershell(右键单击>> Powershell >>打开这里)

#用usb线连接手机

PS C:\platform-tools> adb kill-server
PS C:\platform-tools> adb shell ip route > addrs.txt

#给出你的tcpip

* daemon not running; starting now at tcp:5037 
* daemon started successfully
PS C:\platform-tools> adb tcpip 5037
restarting in TCP mode port: 5037

#断开电话 #adb connect <phone_ip>:5037

PS C:\platform-tools> adb connect 192.168.43.1:5037
connected to 192.168.43.1:5037

现在你可以看到你的手机在安卓工作室

如果你使用Android 11多次点击构建版本激活开发人员选项,然后进入设置>高级>开发人员选项。滚动到调试并打开“无线调试”复选框。点击“无线调试”打开调试菜单。选择“配对设备与配对码”,您将看到与配对码配对的地址。在你的桌面终端上写这个命令来与你的Android设备配对。

adb pair 192.168.XXX.XXX:XXXX   <--------- the address showing on screen under paring code

使用配对代码进行连接。 但是等等,我们还没有连接到adb。 在您成功配对您的设备一次之后。您可以在打开无线调试选项的任何时候连接adb。从现在开始,在每次使用adb之前连接它,您不再需要配对地址,而是使用当您进入无线调试菜单时显示的给定地址。

adb connect 192.168.XXX.XXX:XXXX    <--- this address shows inside wireless debug menu

我通读了每一个答案,发现没有使用android和根的方法。(使用android 11)

1)。使用termux,我安装了android-tools包,这很容易遵循termux的wiki。

2)打开设置->无线调试:并切换无线调试

3.)单击“配对设备与配对码”。

4)。使用设置应用程序和termux启用分屏。在termux中(设置应用程序仍然打开)输入命令adb pair ip:port(这里的端口就是你在上面的分屏中看到的端口)

5.)它会问你一个代码,再次使用你看到的分屏设置应用程序。

6.)在termux中输入命令adb connect ip:port(确保端口是你上面看到的端口,因为它可能与你刚刚输入的端口不同)

整个过程可以自动使用任务器,我不会张贴在这里,因为我发现它快速和容易手动完成,但任务器的创造者有一个指南在这里的某个地方。