Prefer a wireless device transport
ensure_tcp_deviceReports Android device transports and recommends one, preferring TCP to keep the Flutter VM Service tunnel stable. Set promote:true to switch a USB device onto TCP via adb.
Instructions
Report Android device transports and recommend one, preferring wireless. A flutter run started on a USB transport loses its VM Service tunnel when the cable moves; one started on a TCP transport does not. Read-only by default. With promote:true it runs adb tcpip and adb connect to put a USB-attached device on a TCP transport — that restarts adbd on the device, needs the cable once, and is reversible with adb usb. Android-only: reports adbAvailable:false and changes nothing on iOS, desktop or web targets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Device-side TCP port. | |
| serial | No | Which USB device to promote. Defaults to the first promotable one. | |
| promote | No | Put a USB-only device onto a TCP transport. Changes device state. |