ports
Reverse or forward TCP ports between the host and Android over adb, forward browser DevTools, then list or remove mappings to reach services from either side.
Instructions
Connects ports between the host and Android over adb. reverse makes a host server reachable from Android (reverse tcp:8000 tcp:8000, then open http://127.0.0.1:8000 in Android). forward makes an Android socket reachable from the host. devtools forwards a Chromium-based browser's DevTools to a host port and lists its pages. remove undoes one, list shows all.
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": {
"action": "<action>"
},
"name": "ports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | Host side, such as tcp:8000. | |
| port | No | For devtools: the host port. | |
| action | Yes | ||
| android | No | Android side, such as tcp:8000 or localabstract:chrome_devtools_remote. | |
| direction | No | For remove. |