Skip to content

ADB Commands Cheatsheet

Control GPS JoyStick directly from a computer terminal using Android Debug Bridge (ADB). All commands use the Intent-based API.

All examples below use the Android 8.0+ syntax. Replace start-foreground-service with startservice for older devices.

CommandDescriptionExample
TeleportMove to coordinatesadb shell am start-foreground-service -a theappninjas.gpsjoystick.TELEPORT --ef lat 37.8095 --ef lng -122.4101
Teleport + altitudeMove to coordinates with altitudeadb shell am start-foreground-service -a theappninjas.gpsjoystick.TELEPORT --ef lat 37.8095 --ef lng -122.4101 --ef alt 10.2
Start routeStart a saved routeadb shell am start-foreground-service -a theappninjas.gpsjoystick.ROUTE --es name "My Route"
StopStop all mockingadb shell am start-foreground-service -a theappninjas.gpsjoystick.STOP
CommandDescriptionExample
Walk waypointsWalk through coordinatesadb shell am start-foreground-service -a theappninjas.gpsjoystick.WALK --es waypoints "37.80,-122.41;37.81,-122.40"
Walk + teleportTeleport to start then walkadb shell am start-foreground-service -a theappninjas.gpsjoystick.WALK --es waypoints "37.80,-122.41;37.81,-122.40" --ez teleport true
Walk + speedWalk at specified speedadb shell am start-foreground-service -a theappninjas.gpsjoystick.WALK --es waypoints "37.80,-122.41;37.81,-122.40" --ef speed 15.0
Pause routePause active routeadb shell am start-foreground-service -a theappninjas.gpsjoystick.ROUTE_PAUSE
Resume routeResume paused routeadb shell am start-foreground-service -a theappninjas.gpsjoystick.ROUTE_RESUME
Next waypointSkip to next waypointadb shell am start-foreground-service -a theappninjas.gpsjoystick.ROUTE_NEXT
Previous waypointGo back one waypointadb shell am start-foreground-service -a theappninjas.gpsjoystick.ROUTE_PREV
Set speedChange movement speedadb shell am start-foreground-service -a theappninjas.gpsjoystick.SPEED --ef speed 25.0
Hide joystickHide overlayadb shell am start-foreground-service -a theappninjas.gpsjoystick.HIDE
Show joystickShow overlayadb shell am start-foreground-service -a theappninjas.gpsjoystick.SHOW
Teleport to favoriteGo to saved favoriteadb shell am start-foreground-service -a theappninjas.gpsjoystick.FAVORITES --es name "Home"
Start recordingBegin route recordingadb shell am start-foreground-service -a theappninjas.gpsjoystick.RECORD_START
Add waypointAdd point to recordingadb shell am start-foreground-service -a theappninjas.gpsjoystick.RECORD_ADD
Save recordingStop and save routeadb shell am start-foreground-service -a theappninjas.gpsjoystick.RECORD_STOP --es name "Saved Route"
Cancel recordingStop without savingadb shell am start-foreground-service -a theappninjas.gpsjoystick.RECORD_STOP
Generate routeCreate random routeadb shell am start-foreground-service -a theappninjas.gpsjoystick.GENERATE --ef offset 100.0
Generate circleCreate circular routeadb shell am start-foreground-service -a theappninjas.gpsjoystick.GENERATE --ei mode 1 --ei marker_count 20 --ef offset 100.0
Query statusGet current stateadb shell am start-foreground-service -a theappninjas.gpsjoystick.STATUS
FlagTypeExample
--effloat--ef lat 37.8095
--esString--es name "My Route"
--eiint--ei mode 1
--ezboolean--ez teleport true
Terminal window
# Teleport to starting location
adb shell am start-foreground-service \
-a theappninjas.gpsjoystick.TELEPORT \
--ef lat 37.7749 --ef lng -122.4194
# Wait, then walk a test route
sleep 5
adb shell am start-foreground-service \
-a theappninjas.gpsjoystick.WALK \
--es waypoints "37.7749,-122.4194;37.7849,-122.4094;37.7949,-122.3994" \
--ef speed 10.0
# Query status to monitor progress
sleep 30
adb shell am start-foreground-service \
-a theappninjas.gpsjoystick.STATUS
#!/bin/bash
# Cycle through test locations
locations=(
"37.7749,-122.4194" # San Francisco
"40.7128,-74.0060" # New York
"51.5074,-0.1278" # London
"35.6762,139.6503" # Tokyo
)
for loc in "${locations[@]}"; do
IFS=',' read -r lat lng <<< "$loc"
adb shell am start-foreground-service \
-a theappninjas.gpsjoystick.TELEPORT \
--ef lat "$lat" --ef lng "$lng"
sleep 10
done

"Error: app is in background" - The GPS JoyStick service must be started from the app first before ADB commands will work. Open the app and enable the joystick, then use ADB for remote control.

"Unknown option: --ef" - You may be using an older version of ADB. Update Android Platform Tools to the latest version.