ADB Shell Commands Cheat Sheet

Direct Unix and Android framework shell commands running on device via adb shell.

Hardware & System Info

Command Purpose
getprop ro.build.version.release Get Android OS version number
getprop ro.product.model Get phone model name
dumpsys meminfo <package> Inspect memory allocations (PSS/RSS)
dumpsys cpuinfo Inspect CPU utilization by process
wm size Get physical screen resolution
wm density Get physical display DPI

Input Automation & Keyevents

Command Purpose
input tap 500 1000 Tap touchscreen at X=500 Y=1000
input swipe 500 1200 500 200 300 Swipe scroll gesture up
input text "Hello" Type text into active input field
input keyevent 3 Press HOME button (Keycode 3)
input keyevent 4 Press BACK button (Keycode 4)
input keyevent 26 Press POWER button (Keycode 26)