forward_port
Map a host TCP port to a device TCP port so traffic sent locally reaches the Android device. Use to expose device services to your host machine.
Instructions
adb forward tcp:local tcp:remote — forward a HOST port to a DEVICE port
(host connects locally, traffic reaches the device).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"local_port": "<local_port>",
"remote_port": "<remote_port>"
},
"name": "forward_port"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | ||
| local_port | Yes | ||
| remote_port | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||