title: How to capture the screen as fast as possible through adb?
body: <p>Recently, I wrote a PC client which can display and control my android phone screen in real-time using <strong>adb</strong>. I use the monkey to control the device and it works fine. The problem is how to grab the phone screen and display it smoothly.</p>
  
  <p>The first solution I have come up with is to continually grab the <code>framebuffer</code> through <code>adb</code> (like DDMS's screen capture function). Now when I do it, the performance is quite unacceptable. The frame rate captured from <code>framebuffer</code> is as low as 5 per second (the frame size is 800 * 480). My program looks like its hiccuping when I slide on the phone.</p>
  
  <p>My program is written in java using <code>ddmslib</code> to grab <code>framebuffer</code>.</p>
  
  <p>add:<br>
  I found it much slow to encoding the raw <code>framebuffer</code> data into <code>.png</code> format, otherwise this will be a fast way to transmit a compress raw image.</p>
  
  <p>How can I improve the speed of capturing the screen to a smooth level?</p>