Android: How to take screenshots from command line

I would like to tell you today how to capture screenshots with command line. It’s rather easy.

  1. Download Android platform source code if you still don’t have it (http://source.android.com/).
  2. Find screenshot tool under \development\tools\screenshot\src\com\android\screenshot\. You have to compile it first.
  3. To compile just copy ddmlib from \development\tools\ddms\libs\ddmlib\src\com\android\ddmlib to the same folder. So you’ll have ddmlib and screenshot in \development\tools\screenshot\src\com\android\.
  4. Then run javac com/android/screenshot/Screenshot.java from \development\tools\screenshot\src\
  5. Attach the phone
  6. Run something like java com/android/screenshot/Screenshot -d 1.jpg. (You should have adb in you system variables path).


ADB doesn’t see any Android devices under Ubuntu 9.04

If you have troubles with ADB, Android and Ubuntu 9.04 – the solution is here:


highscreen PP5420 ADB driver

Highscreen PP5420 works well with HTC Dream ADB driver.

But for some reasons you may need to install all other Unknown Highscreen devices first.
Just and to android_usb.inf a couple lines:

; PP5420
%USB\VID_18D1&PID_D00D&MI_00.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_D00D&MI_00
%USB\VID_18D1&PID_D00D&MI_01.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_D00D&MI_01
%USB\VID_18D1&PID_D00D&MI_02.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_D00D&MI_02
%USB\VID_18D1&PID_D00D&MI_03.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_D00D&MI_03
%USB\VID_18D1&PID_D00D&MI_04.DeviceDescRelease%=androidusb.Dev, USB\VID_18D1&PID_D00D&MI_04

; PP5420
USB\VID_18D1&PID_D00D&MI_00.DeviceDescRelease=”PP5420 0″
USB\VID_18D1&PID_D00D&MI_01.DeviceDescRelease=”PP5420 1″
USB\VID_18D1&PID_D00D&MI_02.DeviceDescRelease=”PP5420 2″
USB\VID_18D1&PID_D00D&MI_03.DeviceDescRelease=”PP5420 3″
USB\VID_18D1&PID_D00D&MI_04.DeviceDescRelease=”PP5420 4″


© 2020 Android Tales

Theme by Anders NorenUp ↑