location · set_location · clear_location · follow_route · follow_gpx
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Read where the device believes it is, or place it somewhere. These call app_location.
location
def location() -> dict
Where the device believes it is.
Returns latitude, longitude, mock (this fix was injected),
mocking (a test provider is installed now) and known. The two
mock flags differ after :meth:clear_location, because Android keeps
the last known position after the provider supplying it is gone.
Android only. simctl location has no get, so on iOS this
raises rather than returning a position it never read.
set_location
def set_location(latitude: float, longitude: float) -> dict
Place the device at a coordinate.
On Android this goes through a test provider, is read back, and works on real hardware. On iOS it goes through simctl and cannot be confirmed — success means the request was accepted, not that an app will read it.
clear_location
def clear_location() -> dict
Remove the injected position.
Does not clear the device's last known location, which Android caches.
follow_route
def follow_route(waypoints, speed: float | None=None) -> dict
Move along two or more (latitude, longitude) pairs over time.
On iOS the simulator interpolates the route itself; on Android the daemon steps a test provider once a second, the platform having no route command. Either way this returns as the route starts.
follow_gpx
def follow_gpx(path: str, speed: float | None=None) -> dict
Follow a GPX file, read on the machine running the daemon.
Examples
Put the device in London
device.set_location(51.5074, -0.1278)
The same call from the command line, mobium location 51.5074 -0.1278, printed on an Android 15 emulator:
the device is at 51.507400,-0.127800, injected and read back

mobium location 51.5074 -0.1278 on an Android 15 emulator
Give it back its own position
device.clear_location()
The same call from the command line, mobium location --clear, printed on an Android 15 emulator:
the test provider is removed — the device will report its own position the next time something asks for one. Its last known location is still the injected one until then; Android keeps that cache and nothing here can clear it