Search code examples
androiddebuggingreact-nativeusb-otg

Debugging React Native over adb tcpip


I'm trying to attach a USB device (using USB OTG) to my Android device while developing an app using React-Native. Classically to debug an Android app, one connects using USB debug mode over adb, but since my USB port is being used for my USB OTG device, that's not possible.

I tried to use the adb tcpip method (How can I connect to Android with ADB over TCP?) but that doesn't work because my device can't find the 'development server'. Has anyone had any luck debugging this way?


Solution

  • Make sure your phone and the PC used for development are connected in the same LAN. From the Rage Shake menu (shake the device while your app's screen is active) you should be able to navigate to Dev Settings > Debug server host & port for device which lets you enter the IP & port of the development server for loading from the packager.