我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
我认为有一种方法可以通过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的消息
希望对你有所帮助,谢谢!
其他回答
adb实用程序能够通过TCP/IP连接到设备。但是,adbd通常不会监听TCP连接。
如果您想让它运行,您需要一个工程设备(换句话说,您需要root)。然后按照这篇文章中的指导去做:
如何通过TCP连接到ADB的Android ?
由于这只适用于eng设备,所以它不受官方支持。使用风险自负,包括bug等。
1-为此,我认为你已经安装了最新版本的Android studio。如果没有,你可以从这里下载。
2 -可以在“环境变量”中设置平台工具路径(可选)。
3 -确保你的设备和电脑连接到同一个网络。
plug in the data cable from pc to device. Now, type adb tcpip 5555 remove data cable. Then type adb connect 192.168.43.95 here 5555 is the port number and 192.168.43.95 is the ip address of the mobile device you can get id address from the mobile settings . Then go to About device and go to status you can see the ip address of the device. You can connect multiple device from different ports which can give ease in development. Or you can go to this link for brief description with screenshots. http://blogssolutions.co.in/connect-your-android-phone-wirelessly-by-adb
对于所有这些,有一个更好的方法(最简单的方法):
1) Android工作室出口插件,称为Android wifi ADB
2)进入文件->设置->插件->浏览存储库
3)寻找Android WiFi ADB,点击INSTALL,然后按提示重启
4)你会看到一个新的图标,这是你的新插件。
现在要做到这一点:
5)去你的手机的开发者选项并打开调试(必须)
6)也启用,允许调试TCP/网络
7)通过USB连接你的手机,并确保手机和你的电脑/笔记本电脑都连接到同一个网络(热点或wifi)
8)点击新的图标(即你的ANDROID Wifi ABD)
9)你的手机被检测到并通过wifi/热点连接,因此现在你可以断开usb。这是一个一次性的过程,因此你可能不需要保持手机连接usb。
这将使你的手机免于不定期的充电,同时,也是短长度usb线的补救措施。
first you shold connect your device with usb to pc after that run cmd and drag and drop adb.exe that is in sdk/platform-tools path and write below code :
....\Sdk\platform-tools\adb.exe devices
.....\Sdk\platform-tools\adb.exe tcpip 5555
.....\Sdk\platform-tools\adb.exe connect Ip address:5555
当你按照上面的答案https://stackoverflow.com/a/10236938/6117565,你可能会得到错误“没有路由到主机”。
要解决这个问题,在上述回答的第5步之前,首先启动模拟器,然后尝试连接设备。不知道发生了什么,但这个把戏奏效了。