我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
当前回答
对于Ubuntu / Linux:
Make sure your device is working for debugging: http://developer.android.com/tools/help/adb.html#Enabling Go to your sdk folder and find the folder platform-tools Use ./adb devices to list the connected devices. Make sure it is only one device connected and no emulator running. Find your device IP address, you can find it in your device: http://developer.android.com/tools/help/adb.html#wireless, or got adb shell like this: ./adb shell then netcfg. You will see a list of IP addresses. Find wlan0, in my case 192.168.100.3/2. ./adb tcpip 5555 Finally enter ./adb connect <Your device IP Address>:5555 in your terminal. You can now deploy the application to your device over Wi-Fi.
其他回答
adb实用程序能够通过TCP/IP连接到设备。但是,adbd通常不会监听TCP连接。
如果您想让它运行,您需要一个工程设备(换句话说,您需要root)。然后按照这篇文章中的指导去做:
如何通过TCP连接到ADB的Android ?
由于这只适用于eng设备,所以它不受官方支持。使用风险自负,包括bug等。
我通读了每一个答案,发现没有使用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(确保端口是你上面看到的端口,因为它可能与你刚刚输入的端口不同)
整个过程可以自动使用任务器,我不会张贴在这里,因为我发现它快速和容易手动完成,但任务器的创造者有一个指南在这里的某个地方。
以下是标准的步骤(大部分与之前的答案相同):-
Adb tcpip 5555。 Adb connect your_device_ip_address。 Adb设备(查看设备是否已连接)。
但在某些情况下,上述步骤会出现“无法连接到设备”之类的错误。确保你的电脑和设备连接到同一个WiFi网络。”你注意到这些设备已经在同一个网络上了。
在这种情况下,安装这个插件“Wifi ADB Ultimate”,并遵循以下步骤。
通过USB连接设备一次。 刷新列表,检查其是否连通。 进入“关于话机>状态> IP地址”,填写您的IP地址(例如>)。198.162.0.105)。 回到Android Studio,按下图所示填写这个IP,然后点击运行按钮。
现在,您可以开始了!
从搜索和一些答案,我使用这个方法,它工作得很好 你必须知道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
现在你可以看到你的手机在安卓工作室
最好和超级简单的方法是:-
制作批处理文件:-
亚洲开发银行设备 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连接你的手机,然后打开桌面快捷方式,断开你的手机…