我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
当前回答
从搜索和一些答案,我使用这个方法,它工作得很好 你必须知道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 connect <device_ip_address>:5555
断开USB后。
Windows:
步骤1。使用下面的命令创建一个批处理文件,并将该文件称为w.bat。
步骤2。将下面的内容复制到w.b bat中,并保存在Windows系统%path%中的任意文件夹中
echo ***Get phone in Wi-Fi mode***
echo ***Get phone in Wi-Fi mode***
adb devices
echo ***Remove cable from the phone now***
adb tcpip 9000
adb connect 192.168.1.1:9000
adb connect 192.168.1.2:9000
adb connect 192.168.1.3:9000
adb connect 192.168.1.4:9000
adb connect 192.168.1.5:9000
adb connect 192.168.1.6:9000
<--到这里-->
步骤3。用数据线连接你的手机和电脑
步骤4。确保手机处于Wi-Fi模式
第5步。当批处理文件要求您移除电缆时
步骤6。在Windows提示符上输入w.bat (start -> run -> Type CMD,按Enter)(黑屏是Windows DOS提示符),如果你在其中一个路径文件夹中复制了它,那么你可以从任何地方运行,否则从你创建这个文件的文件夹运行。
批处理文件的输出如下所示:
C:\Windows\System32>w
C:\Windows\System32>echo ***Get phone in Wi-Fi mode***
***Get phone in Wi-Fi mode***
C:\Windows\System32>echo ***Get phone in Wi-Fi mode***
***Get phone in Wi-Fi mode***
C:\Windows\System32>adb devices
List of devices attached
d4e9f06 device
C:\Windows\System32>echo ***Remove cable from the Phone now***
***Remove cable from the Phone now***
C:\Windows\System32>adb tcpip 9000
restarting in TCP mode port: 9000
C:\Windows\System32>adb connect 192.168.1.1:9000
unable to connect to 192.168.1.1:9000:9000
C:\Windows\System32>adb connect 192.168.1.2:9000
connected to 192.168.1.2:9000
C:\Windows\System32>adb connect 192.168.1.3:9000
unable to connect to 192.168.1.3:9000:9000
C:\Windows\System32>adb connect 192.168.1.4:9000
unable to connect to 192.168.1.4:9000:9000
C:\Windows\System32>adb connect 192.168.1.5:9000
unable to connect to 192.168.1.5:9000:9000
C:\Windows\System32>adb connect 192.168.1.6:9000
unable to connect to 192.168.1.6:9000:9000
注1:在输出中找到这个,(忽略所有->unable to connect<- errors)
connected to xxx.xxx.x.x:9000
如果你在结果中看到这个,只需从PC上移除电缆,进入Eclipse并运行在设备上安装应用程序;应该是这样。
注意2:断开或切换无线模式关闭:键入下面的命令。它应该说在USB模式下重新启动-在这个阶段PC和计算机不应该用电缆连接:
C:\Users\dell>adb usb
restarting in USB mode
注3:查找话机IP地址的步骤(取自Stack Overflow)
查找MY PHONE的IP地址:
a. Dial *#*#4636#*#* to open the Testing menu.
b. In the Wi-Fi information menu: click Wi-Fi Status
c. Wi-Fi status can be blank for the first time
d. Click Refresh Status
e. In the IPaddr: <<IP ADDRESS OF THE PHONE IS LISTED>>
注4:我的手机Wi-Fi连接IP地址范围一般为下面提到的IP地址,
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
192.168.1.6
注意5:如果你得到的IP地址序列不断被重新分配给你的手机,你可以在w.b bat文件中修改IP地址。
注意6:这是一种强制方法,它消除了寻找IP地址和连接到Eclipse / Wi-Fi的所有手工劳动。
所以简而言之,常规的活动应该是这样的:
Step 1. Connect PC and Wi-Fi via a cable
Step 2. Start CMD - to go to Windows DOS prompt
Step 3. Type "w"
Step 4. Find connected command in the output
Step 5. Success, remove cable and start using Eclipse
如果你使用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
使用ADB调试Android Wifi的步骤:
$> adb devices // check all usb debuggable devices connected.
$> adb -d shell // Access device shell.
shell> ifconfig // Check and copy wifi ip-address eg:192.168.1.90
shell> exit // Exit from android device shell.
$> adb tcpip 5000 // open TCP port 5000 (or any available)
$> adb connect 192.168.1.90:5000 // connect to device via wifi ip over specific TCP port.
$> adb devices // you will get debuggabled android device over wifi.
必备:通过USB连接您的android设备到计算机 启用开发人员模式。同时将你的android设备和电脑连接起来 到同一个wifi路由器(或使用tethering)。
这太简单了……
步骤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地址