Skip to content

Wi-Fi takeover on Android USB unplug #25

Description

@Antoinegtir

Why

We pre-pair Wi-Fi for Android USB devices, but unplugging mid-session still drops the flutter run. We want a true takeover: the adb tcpip endpoint should keep the session alive when USB goes away.

What

  • On session start, if adb tcpip 5555 succeeds, remember the wireless host:port for the serial.
  • On USB disconnect, transparently adb connect :5555 and re-attach the VM service.
  • Snackbar: "Pixel 7 → Wi-Fi".

Constraints

  • Skip for emulators (already excluded by emulator- prefix).
  • Do not run adb tcpip on devices we did not initiate (no global side effects).

Acceptance

  • Unplug USB during a run — session survives, hot reload works.
  • Re-plug — transport migrates back to USB.
  • No adb side effects on devices we did not touch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidAndroid device / emulator specifictrackingUmbrella issue tracking a larger featurewifi-takeoverUSB→Wi-Fi failover, pre-pair, mDNS

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions