简体   繁体   English

当手机的 USB 端口已经使用时,是否可以在 Android 上进行 USB 调试?

[英]Is it possible to do USB-debugging on Android when Phone's USB port is already used?

Problem: I'd like to run an app on my Phone from my laptop, via USB, using Android Studio, while my phone is physically connected to another USB device (a remote controller for a drone).问题:我想通过 USB 使用 Android Studio 在我的手机上运行应用程序,而我的手机物理连接到另一个 USB 设备(无人机的遥控器)。

In this case, I have:在这种情况下,我有:

  • My Laptop (MacBook running Android Studio Bumblebee)我的笔记本电脑(运行 Android Studio Bumblebee 的 MacBook)
  • My Phone (Samsung Galaxy with Android 11)我的手机(搭载 Android 11 的三星 Galaxy)
  • A controller for a DJI drone (which plugs directly into the Phone) DJI 无人机的控制器(直接插入手机)

Problem is the phone obviously only has 1 USB port, so can't connect to both the laptop and the controller.问题是手机显然只有 1 个 USB 端口,因此无法同时连接到笔记本电脑和控制器。

Question: Is it possible (with a USB hub or maybe connecting both phone and controller to computer?) to do usb debugging on phone from laptop while phone communicates via USB to controller?问题:是否可以(使用 USB 集线器或将手机和控制器都连接到计算机?)在手机通过 USB 与控制器通信时从笔记本电脑对手机进行 USB 调试?

Note: I have successfully connected laptop-to-phone with WIFI-debugging before, but the connection can be a bit slow and laggy so it would be nice if it was possible with USB.注意:我之前已经通过 WIFI 调试成功地将笔记本电脑连接到手机,但是连接可能有点慢和滞后,所以如果可以使用 USB 就更好了。 Additionally I am not able to do this while my phone is working as the internet hotspot for the laptop (so I need to bring in yet another hotspot device).此外,当我的手机用作笔记本电脑的互联网热点时,我无法执行此操作(因此我需要引入另一个热点设备)。

Only option you have is to use the dji bridge app on a second phone.您唯一的选择是在第二部手机上使用 dji bridge 应用程序。 It also uses the wifi, so I doubt it will work better than wifi-adb.它也使用 wifi,所以我怀疑它会比 wifi-adb 更好。

Since you have an Android 11 phone, you can use "Pair device using Wifi".由于您有一部 Android 11 手机,您可以使用“使用 Wifi 配对设备”。 In this way you can run the app into your phone from your pc.通过这种方式,您可以将应用程序从您的 PC 运行到您的手机中。

在此处输入图像描述

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

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