stay_awake
Keep the Android display awake while charging to avoid blank screenshots during automated sessions. Enable with 'true' to hold screen on, 'false' to restore the normal timeout.
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. |