On LineageOS (or any Android device), you can use ADB (Android Debug Bridge) to simulate a "zoom out" gesture, which is typically a pinch-out motion with two fingers. Here’s how you can do it:
You can use the input swipe command to simulate a two-finger pinch-out gesture. This is the most common way to zoom out programmatically.
bashadb shell input swipe <x1> <y1> <x2> <y2> <duration_ms> # First finger adb shell input swipe <x3> <y3> <x4> <y4> <duration_ms> # Second finger
<x1> <y1> and <x2> <y2> with the starting and ending coordinates of the first finger.<x3> <y3> and <x4> <y4> with the starting and ending coordinates of the second finger.To zoom out in the center of the screen (assuming a 1080x2340 resolution):
bashadb shell input swipe 360 780 200 600 500 # First finger moves left adb shell input swipe 720 780 960 600 500 # Second finger moves right
input touchscreen (Android 11+)If your device runs Android 11 or later, you can use the input touchscreen command for multi-touch gestures:
bashadb shell input touchscreen swipe <x1> <y1> <x2> <y2> <duration_ms> <pressure> <finger_id>
finger_id values (e.g., 0 and 1).bashadb shell input touchscreen swipe 360 780 200 600 500 100 0 adb shell input touchscreen swipe 720 780 960 600 500 100 1
monkey for Random Inputs (Not Recommended)You can use the monkey tool to send random pinch gestures, but this is less precise:
bashadb shell monkey --throttle 500 --pct-pinchzoom 100 1
adb shell wm size to check.