adb_input_pinch
Perform pinch-to-zoom gestures on Android devices via ADB. Use two-finger pinch to zoom out or spread to zoom in with customizable center, radius, and duration.
Instructions
Perform a multi-touch pinch (zoom out) or spread (zoom in) gesture. Two fingers move symmetrically toward or away from a center point. Uses parallel swipe injection by default (universal, no root); when root is available, can use raw sendevent for true multi-touch MT protocol injection. The 'auto' method selects the best available approach.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cx | Yes | Center X coordinate of the pinch gesture | |
| cy | Yes | Center Y coordinate of the pinch gesture | |
| startRadius | Yes | Starting distance (px) from center to each finger | |
| endRadius | Yes | Ending distance (px) from center to each finger. Smaller than startRadius = pinch/zoom-out, larger = spread/zoom-in | |
| durationMs | No | Gesture duration in ms (100-5000, default 500) | |
| angle | No | Angle in degrees for the pinch axis (0=horizontal, 90=vertical, default 90) | |
| steps | No | Interpolation steps for sendevent method (5-60, default 20). More steps = smoother gesture | |
| method | No | Injection method: 'auto' (sendevent if root, else swipe), 'swipe' (parallel swipes, universal), 'sendevent' (raw MT protocol, requires root) | auto |
| device | No | Device serial |