简体   繁体   English

从 Android Studio 发送 ADB 命令

[英]Sending ADB command from Android Studio

I'm trying to save a screenshot using an ADB command with Android Studio, so even if my phone is not connected to my computer, it can still use ADB commands... I can't find any solution on the inte.net... Is it possible?我正在尝试使用 Android Studio 使用 ADB 命令保存屏幕截图,因此即使我的手机未连接到我的计算机,它仍然可以使用 ADB 命令...我在 inte.net 上找不到任何解决方案。 .. 是否可以? How can I do it?我该怎么做?

You can use WIFI ADB, For that you need to have the Phone and Your Computer on the same.network.您可以使用 WIFI ADB,为此您需要将手机和您的计算机放在同一个网络上。

To connect using WIFI ADB.使用 WIFI ADB 进行连接。

  1. Connect your Phone to Computer using USB使用 USB 将手机连接到计算机
  2. Open CMD/Terminal/Android Studio>Terminal打开CMD/终端/Android Studio>终端
  3. Type adb tcpip 5555 (make sure you only have your device connected and emulators closed) hit enter.输入 adb tcpip 5555(确保您只连接了您的设备并关闭了模拟器)按回车键。
  4. Then type adb <phone-ip>:5555 and hit enter然后输入adb <phone-ip>:5555并回车

Find Phone IP address 查找电话 IP 地址

WIFI ADB App. WIFI ADB 应用程序。 Check ReadMe.检查自述文件。 Avoid Installing the IntelliJ Plugin避免安装 IntelliJ 插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM