adb_screen
Control Android screen state: wake, sleep, toggle, lock, or unlock devices, including PIN-protected keyguard unlock with verification.
Instructions
Control screen state: wake, sleep, toggle, lock, or unlock. Lock and unlock verify actual keyguard state via dumpsys window. Unlock uses wm dismiss-keyguard (works for swipe keyguards); supply 'pin' to perform the full PIN entry sequence for PIN-protected devices: wakes screen, dismisses keyguard, swipes up to reveal keypad, types PIN, confirms with ENTER, and verifies the keyguard sleep token was released.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "adb_screen"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pin | No | PIN/password to enter when unlock encounters an active keyguard (digits only for PIN, alphanumeric for password). Only used with action='unlock'. | |
| action | Yes | Screen action — one of: wake (power on + dismiss keyguard if no PIN), sleep (power off), toggle (flip current state), lock (force keyguard), unlock (dismiss keyguard, with PIN if supplied) | |
| device | No | Device serial |