network · setOffline · shapeNetwork · resetNetwork
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Read or set the device's network conditions: offline, latency and bandwidth. These call app_network.
network
network(): Promise<Data>
The network: airplane, online, latency_ms, download_kbps, upload_kbps. Android only.
setOffline
setOffline(offline?: boolean): Promise<Data>
Airplane mode on (or off), waiting for the network to follow. Android.
shapeNetwork
shapeNetwork(options?: { latencyMs?: number; downloadKbps?: number; uploadKbps?: number }): Promise<Data>
Latency and download/upload limits in kbit/s, replacing any set before; zero is none. Emulator only.
resetNetwork
resetNetwork(): Promise<Data>
Removes the shaping and turns airplane mode off.
Examples
Go offline
await device.setOffline(true)
The same call from the command line, mobium network --offline, printed on an Android 15 emulator:
offline (airplane mode)
| Before | After |
|---|---|
![]() | ![]() |
mobium network --offline on an Android 15 emulator
A slow connection, on an emulator
await device.shapeNetwork({ latencyMs: 300, downloadKbps: 500 })
The same call from the command line, mobium network --latency 300 --download 500, printed on an Android 15 emulator:
online; 300ms added to each round trip, download 500 kbit/s

