adb_reverse
Forwards a device TCP port to a host port, enabling an Android emulator or device to reach a local server. Critical for React Native/Expo dev clients to ensure code edits are picked up by Metro instead of using an embedded bundle.
Instructions
Forward a DEVICE TCP port to a HOST port (adb reverse) so the emulator/device can reach a server on this machine — the canonical use is tcp:8081 for Metro. CRITICAL for RN/Expo dev clients: if the app can't reach its dev server it may SILENTLY fall back to the embedded bundle and ignore every code edit you make — set this up before a dev-client session, and suspect it whenever edits seem to have no effect (app_state confirms whether the running process is on Metro or the embedded bundle). remove=true undoes the forward.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| remove | No | Remove the forward for device_port instead of creating it. | |
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| host_port | No | TCP port on the HOST to forward to. Defaults to device_port. | |
| device_port | Yes | TCP port on the DEVICE to forward, e.g. 8081 for Metro. |