stay_awake
Prevent the Android device display from sleeping during automated sessions, solving black screenshots caused by the screen turning off between steps.
Instructions
Keep the display from dozing during a driving session (svc power stayon true) — the fix when screenshots keep coming back black with screen_off:true because the device sleeps between steps (common on emulators with a short timeout). enabled=true holds the screen on while charging (emulators always are); enabled=false restores the normal timeout. describe_ui works regardless, but any screenshot/coordinate flow needs the screen on.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| enabled | Yes | true = keep the screen on while charging (svc power stayon true); false = restore the normal display timeout. |