如何使用 adb 命令从终端连接到您的设备 [英] How to connect to your device from terminal using adb commands
问题描述
搜索时
通过 Wi-Fi 调试 Android 应用
debug Android applications over Wi-Fi
我发现了一个插件 - Android Studio 中提供了Android WiFi ADB".
I came across the plugin - 'Android WiFi ADB' available in Android studio.
当我尝试安装插件时,Android Studio 建议WiFi ADB终极'.
When I tried to install the plugin, Android Studio suggested 'WiFi ADB Ultimate'.
还是连接终端更好?如果是,如何?
Or is it better to connect with terminal? If Yes, how?
请帮忙.
推荐答案
我觉得使用 adb 命令 将您的设备与终端连接起来比这些插件更有帮助.
I felt connecting your device with terminal using adb commands is more helpful than these plugins.
步骤:
- 您需要通过 USB 数据线将设备连接到计算机.确保 USB 调试工作正常.您可以检查它在运行 adb devices 时是否显示
- You need to connect your device to your computer via USB cable. Make sure USB debugging is working. You can check if it shows up when running adb devices
- 运行adb tcpip 5555
断开您的设备(拔下 USB 数据线).
Disconnect your device (remove the USB cable).
进入设置 -> 关于手机 -> 状态以查看您手机的 IP 地址.
Go to the Settings -> About phone -> Status to view the IP address of your phone.
运行 adb connect <您设备的 IP 地址 > :5555
- 如果您再次运行 adb devices,您应该会看到您的设备.
现在您可以执行 adb 命令或使用您最喜欢的 IDE 进行 android 开发 - 无线!
Now you can execute adb commands or use your favorite IDE for android development - wireless!
学分/参考:https://futurestud.io/tutorials/how-to-debug-your-android-app-over-wifi-without-root
这篇关于如何使用 adb 命令从终端连接到您的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!