MQTT commands

Every command the cloud can send to a VelaOS agent. 45+ commands across device lifecycle, apps, policy, diagnostics, Pi hardware.

Commands are published to vela/{device_id}/commands with QoS 1. Every command has a command_id; the agent replies on vela/{device_id}/response with status: completed or failed.
Example command envelopejson
{
  "cmd": "reboot",
  "command_id": "6a7b8c9d-1234-5678-9abc-def012345678",
  "delay": 30,
  "ts": 1744545600
}
Example responsejson
{
  "command_id": "6a7b8c9d-1234-5678-9abc-def012345678",
  "status": "completed",
  "ts": 1744545630
}

Device lifecycle

CommandDescriptionSince
rebootReboot the device (optional delay)
{ "delay": 30 }
1.0
wipeFactory reset — erases all data1.0
factory_resetAlias for wipe1.0
lockLock the screen immediately1.0
selective_wipeClear managed app data + certificates, keep OS1.0
approvedCloud notifies device it was approved by admin1.0

App lifecycle

CommandDescriptionSince
app_installInstall APK via URL with SHA-256 verify
{ "package": "com.x.y", "url": "https://...", "hash": "abc..." }
1.0
app_removeUninstall an app1.0
start_appLaunch an app
{ "package_name": "com.x.y" }
1.0
force_stop_appKill a running app1.0
disable_appHide / disable app (DPM.setApplicationHidden)1.0
enable_appRe-enable a hidden app1.0
block_uninstallPrevent user from uninstalling
{ "package_name": "...", "blocked": true }
1.0
clear_app_dataClear cache + user data for an app1.0
set_permissionGrant/deny/default runtime permission
{ "package_name": "...", "permission": "android.permission.CAMERA", "state": "granted" }
1.0
app_configPush managed config bundle to an app1.0

Policy

CommandDescriptionSince
policy_updateApply new policy JSON (triggers compliance report)1.0
policy_pushAlias for policy_update1.0
config_syncRe-apply currently cached policy1.0

Certificates

CommandDescriptionSince
install_certInstall cert + private key into KeyStore
{ "cert_pem": "...", "key_pem": "...", "fingerprint": "..." }
1.0
get_installed_certsList installed CA certificates1.0
reset_passwordReset device password using reset token
{ "password": "...", "token": "hex..." }
1.0

System

CommandDescriptionSince
set_system_settingWrite to Settings.System/Secure/Global
{ "namespace": "system", "key": "...", "value": "..." }
1.0
set_timeSet system time and/or timezone1.0
set_wallpaperDownload wallpaper URL and set it1.0
show_messageDisplay toast or dialog on device1.0
send_intentBroadcast or launch activity/service
{ "type": "broadcast", "action": "..." }
1.0
download_fileDownload a file from cloud storage1.0

Remote control

CommandDescriptionSince
execute_shellRun shell command with timeout
{ "command": "...", "timeout_seconds": 30 }
1.0
file_opsdelete / mkdir / write / copy (path-restricted)1.0
input_tapSimulate touch at x,y1.0
input_textType text1.0
input_keyeventSend Android keyevent1.0

Diagnostics

CommandDescriptionSince
collect_logsCollect logcat + bundle to storage1.0
screenshotCapture and upload screenshot1.0
network_diagnosticsRun ping / traceroute / DNS lookup1.0
play_integrity_checkReturn device attestation info1.0
request_bugreportTrigger Android bugreport collection1.0

Updates

CommandDescriptionSince
ota_updateTrigger OS OTA download + install (ROM-dependent)3.0
agent_updateSelf-update the agent APK2.0

Pi hardware

CommandDescriptionSince
hdmi_cecDisplay power via CEC (standby/on/status)
{ "action": "standby" }
2.1
set_cpu_governorSet CPU scaling governor
{ "governor": "performance" }
2.1
gpio_writeWrite to GPIO pin
{ "pin": 17, "value": 1 }
2.1
gpio_readRead GPIO pin state2.1
set_adb_networkEnable/disable ADB over network2.1

Batch

CommandDescriptionSince
process_subcommandsRun up to 20 subcommands sequentially
{ "subcommands": [{ "cmd": "..." }, ...] }
2.1

Unknown commands

The agent replies status: unsupportedto any command it doesn't recognize. This lets you roll out new command types without breaking older agent versions — the cloud detects unsupportedand surfaces it in the device detail page as "agent needs upgrade".

Next steps

Was this helpful?
Updated 2026-04-14Edit on GitHub