I found that calabash-android is using this jar file to take screenshots.
To take a screenshot:
- You need to install android sdk tools.
- Set ANDROID_HOME to the path of the installed sdk(or you can set it from the command line).
- Download screenshotTaker.jar.
- Turn on debug mode of your device and connect it to your machine through usb.
- Run the following command:
device-args will be forward to adb command, so you can specify the serial-no when you have multiple devices connected. For example: