I have come from this answer which suggests the usage of Ui Automator, which requires the tool UiAutomatorViewer
to be used.
The tool itself can be found at:
<android-sdk>/tools/bin
And when I try a screen shot, I get:
How do I deal with this error?
Okay so actually my PC didn't have the read permission for smartphones (office). After getting the permission the tool worked flawlessly.