title: Screenshot of the Nexus One from adb?
body: <p>My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB.</p>
  
  <p>So far, I can get the framebuffer which I believe is a <code>32bit xRGB888</code> raw image by pulling it like this:</p>
  
  <pre><code>adb pull /dev/graphics/fb0 fb0
  </code></pre>
  
  <p>From there though, I'm having a hard time getting it converted to a png. I'm trying with ffmpeg like this:</p>
  
  <pre><code>ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb8888 -s 480x800 -i fb0 -f image2 -vcodec png image.png
  </code></pre>
  
  <p>That creates a lovely purple image that has parts that vaguely resemble the screen, but it's by no means a clean screenshot. </p>