I could not get screepcap to work in the Android Things Developer Preview. The command results in a 0-dimensional file.
However, I recommend the following two options: either use a framebuffer or record video ( screenrecord seems to work) and subsequently convert it to an image with the appropriate tool. I will consider the first option, so the steps will be as follows:
Pull the framebuffer to the host machine . Note that you need to run adbd as root in order to pass the permission check:
adb root adb pull /dev/graphics/fb0 screenshot
Convert the source binary to an image with the tool you prefer. I am using ffmpeg . The command below may not work for you due to different screen resolution or pixel format. If so, make the right changes.
ffmpeg -f rawvideo -pix_fmt rgb565 -s 800x480 -i screenshot screenshot.png
source share