我认为有一种方法可以通过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

然后从头再来。

其他回答

我为Windows写了一个简单的脚本:

步骤1。用以下命令创建一个批处理文件,调用wifi_dedug.bat文件并复制以下内容:

    adb tcpip 5555
    pause
    adb shell "ip addr show wlan0  | grep 'inet ' | cut -d' ' -f6|cut -d/ -f1" > tmpFile 
    pause
    set /p ip= < tmpFile 
    @echo %ip%
    del tmpFile
    @echo %ip%
    adb connect %ip%
    pause

步骤2。将您的设备连接到pc。

步骤3。启动批处理文件(按要求输入键)

步骤4。断开设备连接,通过wifi进行部署/调试。

最好的方法是使用ADBConnect (Eclipse插件)和ADB Wireless (Android设备应用程序)。

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

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

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

最好和超级简单的方法是:-

制作批处理文件:-

亚洲开发银行设备 Adb tcpip 5555 adb connect 192.168.9.120:5555(您的电话ip xxx.xxx.x. com)。xxx: 5555)

将此文件放入android sdk platform-tool文件夹。 例子:C:\Users\当地的user_name \ AppData \ \ Android \ Sdk \平台工具 右键单击文件>发送到>桌面(创建快捷方式) 就是这样……

现在你只需要通过USB连接你的手机,然后打开桌面快捷方式,断开你的手机…

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

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线的补救措施。