http://code.google.com/p/android-screenshot-library/
Android Screenshot Library (ASL) provides means for taking snapshots of phone's screen without the need for signing your application or having privileged (root) access to the Android system. It is intended primarly for taking screenshots used for testing, debugging and diagnostics.
ASL utilizes background native service which performs screen capturing on demand from an application that uses the library. This service has to be started using Android Debug Bridge (ADB), which is an utility program bundled with Android SDK. The service provides screenshot-taking functionality for any application that uses ASL for as long as the phone isn't rebooted, regardless of whether or not it is connected to the PC.
Android Screenshot Library consists of the following files:
Refer to DeveloperGuide for details about embedding ASL in your own application and using the programming interface it exposes.
Refer to UserGuide for details about using the screenshot capturing features of ASL in applications.