我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
当前回答
adb实用程序能够通过TCP/IP连接到设备。但是,adbd通常不会监听TCP连接。
如果您想让它运行,您需要一个工程设备(换句话说,您需要root)。然后按照这篇文章中的指导去做:
如何通过TCP连接到ADB的Android ?
由于这只适用于eng设备,所以它不受官方支持。使用风险自负,包括bug等。
其他回答
从搜索和一些答案,我使用这个方法,它工作得很好 你必须知道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
现在你可以看到你的手机在安卓工作室
最好的方法是使用ADBConnect (Eclipse插件)和ADB Wireless (Android设备应用程序)。
这太简单了……
步骤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 shell ip -f inet addr show wlan0来查找adb tcpip 5555之后的设备ip。
新版本已弃用adb netcfg。因此,当接口名称为wlan0(默认接口名称)时,这是查找设备ip的正确方法。
要完成@usethe4ce的回答,如果您有多个设备或模拟器,adb tcpip 5555将给出错误:多个设备/模拟器。
在这种情况下,您需要给出所需设备的序列号:
亚洲开发银行设备 所附设备清单 33001229的设备 模拟器- 5554设备 Adb -s 33001229 tcpip 5555 在我的情况下,我可以从设备的wifi连接设置中找到它。 Adb connect xxx.xxx.xxx.xxx:5555