Handy adb Oneliners for Android

Oneliner to speed up screenshot taking process.

adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screenshot.png

Combined with the adb shell start command that launches intents and activities the process of taking screenshots can be completely automated.

Unlock the screen:

adb shell input keyevent 82

Power buttona

adb shell input keyevent 26