Is it possible to connect mobile with USB camera and Macbook/Windows at a same time to debug the Android Application?

156 views Asked by At

I want to create an Android application where I can process the Images from a USB Camera and run ML detections on them. I have Pixel 2XL, Logitech C920, and Macbook Pro, which I want to connect at the same time, so I can debug the application whenever it crashes/does not run. Right now, I am using ALogic type C dock, but it is not detecting the Mobile device for USB Debugging. Is there any way where we can debug the app?

1

There are 1 answers

2
snachmsm On BEST ANSWER

well, I'm doing exactly the same and I'm using ADB over Wi-Fi for keeping my one and only USB-C available for wired UVC devices

short howto:

  1. attach your device with USB-C cable, make sure it's one and only device (no emulators also)
  2. optionally: check with adb devices is it visible
  3. run adb tcpip 5555
  4. disconnect device and check it's IP in some WiFi settings
  5. run adb connect <DEVICE_IP_ADDRESS>:5555
  6. optionally: ensure with adb devices is it visible

now you can see your device in Android Studio as long as laptop/PC and Android device are connected to the same Wi-Fi

good luck!