Skip to main content

app_network

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Read or set the device's network conditions: offline, latency and bandwidth. With no arguments, reports what is in place, read from the device. offline switches airplane mode and waits for the device to lose, or regain, its network — on an emulator and on a real Android phone. latency_ms, download_kbps and upload_kbps shape the device's traffic on an emulator (they need root, which a phone does not give); together they replace any shaping set before, and an omitted one is no limit. reset removes the shaping and turns airplane mode off. Whatever is set is read back, and the end of the session puts the network back as it found it. iOS refuses: nothing outside it controls its network.

Changes the device, the app or the session: readOnlyHint is false.

Arguments​

NameTypeRequiredWhat it is
devicestringDevice serial to target, e.g. "emulator-5554". Omit when only one device is running.
download_kbpsintegerDownload limit in kilobits a second; 0 or omitted is none. Emulator only.
driverstring: uiautomator2, uiautomator, wdaDriver to use: "uiautomator2" (default for Android; fast, installs a server APK on first use), "uiautomator" (Android, installs nothing, slower, cannot type), or "wda" (WebDriverAgent: iOS simulators and iPhones).
latency_msintegerMilliseconds added to every round trip, 0 to 10000. Emulator only.
offlinebooleantrue for airplane mode, false to come back online.
resetbooleanRemove the shaping and turn airplane mode off. Takes nothing else.
upload_kbpsintegerUpload limit in kilobits a second; 0 or omitted is none. Emulator only.

Examples​

Each is the arguments of a tools/call request; the first is shown whole.

Go offline​

{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "app_network",
"arguments": {
"offline": true
}
}
}

On an Android 15 emulator the answer's text was:

offline (airplane mode)
BeforeAfter
Before: mobium network --offline on an Android 15 emulatorAfter: mobium network --offline on an Android 15 emulator

mobium network --offline on an Android 15 emulator

A slow connection, on an emulator​

{
"latency_ms": 300,
"download_kbps": 500
}

On an Android 15 emulator the answer's text was:

online; 300ms added to each round trip, download 500 kbit/s