title: How do you programmatically take a screenshot on Android ICS and above?
body: <p>I'm trying to write an application that performs screen capture on Android 4.0+. I'm aware that you most likely will have to have a rooted phone which is fine.</p>
  
  <p>I've tried grabbing the data from /dev/graphics/fb0. It works, but it only gets the startup screen. (HTC One X) I'm therefore guessing since ICS is rendering fully through acceleration, it after boot does not render to the framebuffer.</p>
  
  <p>While there is limited information around this issue on the web, there have been some suggestions out there. One is to use Android-Screenshot-Library. It does not work (it takes the frame buffer content from /dev/fb0). Other suggestions are for only capturing your own app's screen. I want to capture the screen what the user is doing (this is for research and has no malicious intents.)</p>
  
  <p>So far I'm stuck so any ideas or suggestions are welcome.</p>