Get or lock display rotation
mobile_orientationRead or set screen rotation for a logical Android display. Lock to 0-3, free to accelerometer, or get free/lock state and observed rotation.
Instructions
Read or set user rotation for one logical display. action lock uses rotation 0, 1, 2, or 3. action free lets the accelerometer decide. action get returns free or lock N, plus observedRotation from the live display when it is known.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | get | |
| serial | Yes | Exact ADB serial from mobile_devices_list; never inferred when multiple devices exist | |
| rotation | No | ||
| displayId | No | Android framework logical display ID, not a SurfaceFlinger physical ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | ||
| mode | Yes | ||
| rotation | No | ||
| displayId | Yes | ||
| observedRotation | No |