Skip to content

Runtime and devices

Runtime and device commands inspect the current Jugg status, device list, Activity stack, and app log window outside compilation and deployment. Agents commonly use them to decide whether to compile, deploy, wait for logs, or resolve a device problem first.

Supported tasks

User taskCurrent supportCommand
Inspect deployment state, the summary of uncompiled files, and the AndroidTest baselineSupportedjugg status
List connected devices and mark selected devicesSupportedjugg devices
Read the current Activity stackSupportedjugg activity-stack
Wait for a log marker, crash, or timeoutSupportedjugg wait-logs

Status query

text
jugg status
jugg status --refresh-changes true

By default, status does not refresh changed files. Pass --refresh-changes true when Jugg should reread git-tracked changed files.

Key fields:

FieldPurpose
hasDeviceDetermines whether an available device exists
needFallbackDetermines whether a full Gradle build is currently required
pendingModifiedFiles / filesShows the summary of uncompiled files
lastCompileTimeDetermines whether Jugg compilation already covered the current changes
hasBeenFullCompiledDetermines whether a complete Jugg baseline exists
enabledAndroidTestDetermines whether instrument is available
isCompilingDetermines whether a compile/deploy task is already running

Devices and Activity

text
jugg devices
jugg activity-stack

Use devices to confirm devices visible to the IDE and which ones are selected. Use activity-stack to confirm that the target app is on the expected page, usually before UI inspection or input.

Waiting for logs

text
jugg wait-logs --marker '\[JUGG_AR\] DONE'
jugg wait-logs --marker '\[JUGG_AR\] DONE' --tags MyAutoRun,AndroidRuntime --timeout-ms 30000

wait-logs starts reading target app logs from the time recorded by the latest deploy or restart and stops at:

stopReasonMeaningNext step
markerThe expected marker was foundRead the returned log window to determine the verification result
crashA crash was detectedTreat it as a failure and inspect the crash log
timeoutThe marker was not found before timeoutThe result is uncertain; combine UI evidence or complete logs