我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
当前回答
android无线调试(MAC)
步骤1:进入sdk文件夹(常用路径“/Users/macname/Library/Android/sdk/platform-tools”) 打开CMD,运行"adb devices" output -附加设备列表
如果在CMD类型中没有找到adb命令 。/亚洲开发银行——的帮助 OS X / macOS:典型的~/。Profile或~/.bash_profile 在这里添加以下一行,并将其替换为安装platform-tools的路径:
步骤2: $PATH ="/Users/macname/Library/Android/sdk/platform-tools"
步骤3: $ adb设备 所附设备清单 ZH99FF7FTY设备
步骤4: $ adb tcpip 5555 以TCP模式重新启动端口:5555
步骤5: $ adb connect 10.124.32.18:5555 已连接到10.124.32.18:5555
下次重复步骤4和5重新连接 或者如果设备重新启动但没有连接,请再次执行步骤 祝你好运
其他回答
以下是标准的步骤(大部分与之前的答案相同):-
Adb tcpip 5555。 Adb connect your_device_ip_address。 Adb设备(查看设备是否已连接)。
但在某些情况下,上述步骤会出现“无法连接到设备”之类的错误。确保你的电脑和设备连接到同一个WiFi网络。”你注意到这些设备已经在同一个网络上了。
在这种情况下,安装这个插件“Wifi ADB Ultimate”,并遵循以下步骤。
通过USB连接设备一次。 刷新列表,检查其是否连通。 进入“关于话机>状态> IP地址”,填写您的IP地址(例如>)。198.162.0.105)。 回到Android Studio,按下图所示填写这个IP,然后点击运行按钮。
现在,您可以开始了!
>## open command prompt with Run as Administrtor ##
adb connect ipdevice:5037
我写了一个shell脚本,它可以让你通过Wi-Fi调试Android设备。
代码如下:
#!/usr/bin/env bash
#Notice: if unable to connect to [ip]:5555,
#try adb kill-server then try again.
adb shell ip route > addrs.txt
#Case 1:Nexus 7
#192.168.88.0/23 dev wlan0 proto kernel scope link src 192.168.89.48
#Case 2: Smartsian T1,Huawei C8813
#default via 192.168.88.1 dev eth0 metric 30
#8.8.8.8 via 192.168.88.1 dev eth0 metric 30
#114.114.114.114 via 192.168.88.1 dev eth0 metric 30
#192.168.88.0/23 dev eth0 proto kernel scope link src 192.168.89.152 metric 30
#192.168.88.1 dev eth0 scope link metric 30
ip_addrs=$(awk {'if( NF >=9){print $9;}'} addrs.txt)
echo "the device ip address is $ip_addrs"
echo "connecting..."
rm addrs.txt
adb tcpip 5555
adb connect "$ip_addrs"
对于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.
这太简单了……
步骤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地址