Skip to content

Fix Android deploy with Remote Debug or Network FS over Wi-Fi

Created by: cooperra

Fixes #32814

When deploying to an Android device to remote-debug or with network fs, we check whether the device is connected over usb:

  • If it is, we proceed to deploy with the pre-existing behavior (check api_version and use adb reverse if supported).
  • If not, we assume the device is connected over the network and debug over Wi-Fi, avoiding adb reverse, which would fail.

To do this, I added the -l flag to adb devices which allows us to parse additional info including usb connection. While I was here, I went ahead and added the connection info to the user-facing description of each device.


There's still a bug that remains if the device is connected by both usb and network, but it's hard for the user to find accidentally, and we'd have to rethink the deployment process to fix it. Steps:

  1. Connect device by USB
  2. adb tcpip 5555
  3. adb connect x.x.x.x:5555 (device's ip)
  4. Verify adb devices shows two entries for the device (USB still plugged in)
  5. Attempt to deploy and debug with the connected device over USB. adb reverse over USB will fail simply because the other connection is present. The adb reverse call will even fail outside of Godot.

Merge request reports