我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
我认为有一种方法可以通过Wi-Fi测试开发中的应用程序。这可能吗?
我希望能够解开我的手机,无线开发。
当前回答
只需下载谷歌ADB: https://developer.android.com/studio/releases/platform-tools 提取并利用它。 例如,配对:
./adb pair 192.168.8.90:42119 274678
然后连接:
./adb connect 192.168.8.90:38995
例如使用scopy这样的软件:
export ADB="/home/luca/Downloads/platform-tools/adb"
scrcpy
其他回答
我在这里找到了答案:
Connect Android device and adb host computer to a common Wi-Fi network accessible to both. We have found that not all access points are suitable; you may need to use an access point whose firewall is configured properly to support adb. Connect the device with USB cable to host. Make sure adb is running in USB mode on host. $ adb usb restarting in USB mode Connect to the device over USB. $ adb devices List of devices attached ######## device Restart host adb in tcpip mode. $ adb tcpip 5555 restarting in TCP mode port: 5555 Find out the IP address of the Android device: Settings -> About tablet -> Status -> IP address. Remember the IP address, of the form #.#.#.#. sometimes its not possible to find the IP-address of the android device, as in my case. so u can get it using adb as the following: $ adb shell netcfg and the should be in the last line of the result. Connect adb host to device: $ adb connect #.#.#.# connected to #.#.#.#:5555 Remove USB cable from device, and confirm you can still access device: $ adb devices List of devices attached #.#.#.#:5555 device
现在可以开始了!
如果adb连接丢失:
确保你的主机仍然连接到你的Android设备所在的Wi-Fi网络。 再次执行“adb connect”步骤重新连接。 或者如果这不起作用,重置你的adb主机: 亚行kill-server
然后从头再来。
我使用adb shell ip -f inet addr show wlan0来查找adb tcpip 5555之后的设备ip。
新版本已弃用adb netcfg。因此,当接口名称为wlan0(默认接口名称)时,这是查找设备ip的正确方法。
2021年8月编辑
谷歌用ArcticFox Beta 03 https://issuetracker.google.com/issues/190411383删除了它,但在Android Studio Bumblebee它仍然存在。看起来他们有很多问题,这就是为什么它只是金丝雀版本
最初的发布
这个Android WiFi ADB插件不能在4.1.1中工作(不再)
但有一个更简单的解决方案: 如果你有Android 11 (api30)设备,你应该使用Android Studio 2020.3.1 (Canary)来连接。非常简单
然后进入开发者设置,扫描二维码。就是这样。 你现在也可以在其他(旧的)Android Studio版本中使用连接设备
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
adb实用程序能够通过TCP/IP连接到设备。但是,adbd通常不会监听TCP连接。
如果您想让它运行,您需要一个工程设备(换句话说,您需要root)。然后按照这篇文章中的指导去做:
如何通过TCP连接到ADB的Android ?
由于这只适用于eng设备,所以它不受官方支持。使用风险自负,包括bug等。