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

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


当前回答

如果您是windows用户,并且您的android sdk位于C:\Users\%username%\AppData\Local\ android \ sdk,那么您可以遵循此方法。如果你的andoid sdk不在那里,将该路径替换为下面的代码。

@echo off
"C:\Users\%username%\AppData\Local\Android\Sdk\platform-tools\adb.exe" disconnect
"C:\Users\%username%\AppData\Local\Android\Sdk\platform-tools\adb.exe" shell ip route > %temp%\addrs12321.txt
For /F "UseBackQ Delims==" %%A In ("%temp%\addrs12321.txt") Do Set "lastline=%%A"
FOR %%C IN (%lastline%) DO SET last=%%C
"C:\Users\%username%\AppData\Local\Android\Sdk\platform-tools\adb.exe" tcpip 5555
"C:\Users\%username%\AppData\Local\Android\Sdk\platform-tools\adb.exe" connect %last%:5555 > %temp%\adbresult.txt
set /p result=<%temp%\adbresult.txt
del /f %temp%\addrs12321.txt
echo MSGBOX "%result%" > %temp%\TEMPmessage.vbs
call %temp%\TEMPmessage.vbs
del %temp%\TEMPmessage.vbs /f /q
del %temp%\adbresult.txt /f /q

步骤1。

打开usb调试, 把你的手机连接到windows电脑上 在android菜单的usb选项菜单中选择文件传输(如果找到)

步骤2。

复制以上代码 保存为扩展名,如。bat,如filename.bat 双击您保存的文件。完成

请注意,您可以通过在设备运行该文件来随时连接 打开usb调试与PC连接。

其他回答

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

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

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

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

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

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

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

对于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.

注意:-安卓手机必须是根,不需要usb线。

在android手机上安装wifi adb

链接:https: / / play.google.com/store/apps/details ? id = com.ttxapps.wifiadb

对于Windows

我用的是这个技巧,非常简单。

1)下载adb:

链接:https://www.dropbox.com/s/mcxw0yy3jvydupd/adb-setup-1.4.3.exe?dl=0

2)运行exe:—当你看到蓝屏时按y enter。

3)现在打开你的wifi adb apk,只需授予root权限,必须记住你的android手机和系统通过wifi或热点在同一个网络上。

4)打开Wifi adb apk,你会得到一些ip地址,比如adb connect 192.168.2.134:5555 注意这个ip可能非常不同于不同的系统,现在把这个信息放到命令提示符中,然后按Enter键。

5)在任意位置打开cmd,输入adb connect 192.168.2.134:5555。

6)最终您成功连接到adb。它会显示像这样的消息 连接到192.168.2.140:5555

对于Mac Os

这是最简单的方法,将提供自动更新。

1)安装自制程序

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2)安装亚行

brew cask install android-platform-tools

3)开始使用adb

adb devices

4)打开Wifi adb apk,你会得到一些ip地址,比如,adb connect 192.168.2.134:5555注意这个ip可能很从系统到系统,现在把这个信息输入到你的终端并按Enter。

5)在mac os中任意打开终端,输入adb connect 192.168.2.134:5555。

6)最终您成功连接到adb。它将显示类似于已连接到192.168.2.140:5555的消息

希望对你有所帮助,谢谢!