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

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


当前回答

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

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

其他回答

我使用adb shell ip -f inet addr show wlan0来查找adb tcpip 5555之后的设备ip。

新版本已弃用adb netcfg。因此,当接口名称为wlan0(默认接口名称)时,这是查找设备ip的正确方法。

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

这太简单了……

步骤1:

connect mobile to laptop (PC)
find adb path in Eclipse or Go Tast manager (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>Esc</kbd>) -> process -> adb.exe -> right-click -> open file location -> copy the path of the open window (like D:\.....)

步骤2:

open cmd and change directory like C:, D:, E:, and G:
 1: C:\Users\UMT>D:
 2: D:\> cd (past path of adb) like (ANDROID eclipse\Eclipse Setup\adt-bundle-windows-x86_64-202\sdk\plat-form-tools) and press enter
 3: Then type `adb tcpip 5555`. Press <kbd>Enter</kbd> ... make sure your mobile connects to the PC

步骤3:

Open new cmd and same above, go to the adb directory and type
adb connect 192.168.x.x(device ip):5555
press enter now connect it.

设备IP地址:设置中—>关于话机—>状态—> IP地址

如果你想在设备上启用无线adb,而不需要连接USB线(root要求):

在设备上安装终端应用程序(如Android终端模拟器) 输入以下内容 苏 Setprop service.adb.tcp.port 5555 停止adbd 开始adbd

因为你已经打开了终端,你可以找到设备的IP地址:

ip addr show

然后在调试环境中运行命令:

adb connect ip.of.the.device

这将使该设备被列为您可能拥有的任何其他模拟器。请注意,在重置设备之前,TCP将保持打开状态。 如果你经常断网,你可能还想安装一个Wi-Fi Keep Alive应用程序。

如果你想要安全,记得在连接到公共网络时关闭TCP。您可以执行以下操作或简单地重新启动设备:

苏 Setprop service.adb.tcp.port -1 停止adbd 开始adbd

我在这里找到了答案:

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

然后从头再来。