title: Android Things: take a screenshot
body: <p>How do you take a screenshot via ADB for Android Things? I have tried:</p>
  
  <pre><code>adb shell screencap -p /sdcard/screen.png
  adb pull /sdcard/screen.png
  adb shell rm /sdcard/screen.png
  </code></pre>
  
  <p>and</p>
  
  <pre><code>adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' &gt; screen.png
  </code></pre>