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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ensure_tcp_device"
}
}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. |