8

I have a developer tablet, and I also need some peripherals connected via USB to my tablet and debug cable at the same time. I tried to connect USB hub to my tablet using OTG cable, by got the problem - tablet can use peripherals, but PC doesn't show the device in adb devices.

Is it possible to connect debug cable and USB peripherals to my tablet at the same time?

0

2 Answers 2

12

No, this is not possible. In order for your device to be in debug mode/connect to the computer with the debug cable, it needs to be connected as a slave device. The OTG cable tells the tablet to go into host mode. So now your computer is telling your tablet to be a slave but through the enumeration with the OTG cable the tablet believes it needs to be the master, there's a quarrel and it appears the tablet wins and is the master and thus your computer does not acknowledge the tablet's existence.

If you need the debugging tools have you looked into ADB wireless debugging? (Sorry I can't find the link right now but I've used it in the past and know it is somewhere on the developer.android.com site)

I couldn't find the link so I figured out how to do it again:

  1. Open the command prompt and navigate to your sdk/platform-tools/ folder.
  2. Type adb tcpip 5555
  3. Type adb connect <your device IP address>:5555
  4. At this point you unplug your device and type adb logcat
  5. At times, such as unplugging/plugging into a USB device, the logcat will become disconnected, just redo steps 3 & 4.
0
0
  1. Make sure the phone and PC are on the same network (pingable), then get the IP address of the phone from WiFi settings.

  2. From Android Studio's terminal window, cd to where your platform-tools are located. Example: cd C:\Android\sdk\platform-tools

  3. By default, ADB will be in USB mode, so you can see your connected phone with adb devices

  4. So, restart ADB with cmd adb tcpip 5556

  5. Then connect with cmd adb connect 192.168.141.115:5556 where the IP is the IP of the phone

  6. adb devices should now show the ip:port device

    C:\Android\sdk\platform-tools>adb devices
    List of devices attached
    192.168.141.115:5556    device
    
  7. You can then connect the debugger to a running app that is using the USB connection

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .