This command is used to take the screenshot of device that is connected
adb shell ls -s
adb shell screencshot /path/to/save/screenshot
adb shell screenshot /mnt/sdcard/Download/test.png
It is command to take the screenshot of the connected device's screen. It then saves the screenshot in the specified file destination.
If file location is not given, the results will be printed to stdout.