Having the ability to take a screenshot directly from your command prompt will save you a lot of time over the duration of a project. When I’m building an app I know I reguarly take screenshots to show features, bugs or just general UI weirdness to others and the time I lose taking it, transfering it to be emailed or shared on Teams is frustrating. A handy one liner can be used to speed this process up.

Taking a screenshot on your Android device

  1. Using the adb command prompt from Visual Studio (Or if you have ADB in your path)
adb exec-out screencap -p > screenshot.png

That’s it! Your screenshot is now saved to the location specified.