Posts

Showing posts from July, 2021

ADB Cheat Sheet

Take screenshot of the only emulator/device, and copy the screenshot to clipboard(so we can paste it directly somewhere) adb exec-out screencap -p > screen.png && osascript -e 'set the clipboard to POSIX file "'$(pwd)'/screen.png"' If you want to add it as an alias, in ~/.zprofile file(or whichever file it is for you), add these lines: function ss() { adb exec-out screencap -p > screen.png && osascript -e "set the clipboard to POSIX file \"$(pwd)/screen.png\"" } Lists all settings adb shell settings list global enables "show taps" on the UI adb shell settings put system show_touches 1 To set animation duration to 10x adb shell settings put global animator_duration_scale 10 adb shell settings put global window_animation_scale 10 adb shell settings put global transition_animation_scale 10 set the battery state as unplugged adb shell dumpsys battery unplug To set the battery percentage adb shell dumpsys batter