Taking screenshots

From Android Wiki

(Difference between revisions)
Jump to: navigation, searcha
(Created page with "A non-rooted Android device has no built-in capability for taking screen captures. If you want to grab snapshots of an app, you have two options, both of which require installati...")
(note about connection failures)
Line 2: Line 2:
* Run the app under the emulator that comes with the SDK. Then you can use the normal screenshot facilities of your PC OS to capture images of the emulator window.
* Run the app under the emulator that comes with the SDK. Then you can use the normal screenshot facilities of your PC OS to capture images of the emulator window.
* Use the [http://developer.android.com/guide/developing/debugging/ddms.html DDMS] utility from the SDK.
* Use the [http://developer.android.com/guide/developing/debugging/ddms.html DDMS] utility from the SDK.
 +
 +
== DDMS Notes ==
 +
On some Linux systems, the DDMS window fails to show any devices. Instead, it outputs a continual sequence of “E/DeviceMonitor: Connection attempts: ''n''” messages with ever-increasing ''n''.
 +
 +
This is caused by a system setting which prevents IPv4 and IPv6 connections from being opened on the same network socket. To work around the problem, execute the following command in a root terminal window:
 +
    sysctl -w net.ipv6.bindv6only=0
 +
 +
Presumably this is a bug in DDMS.

Revision as of 03:44, 14 July 2011

A non-rooted Android device has no built-in capability for taking screen captures. If you want to grab snapshots of an app, you have two options, both of which require installation of the Android SDK:

  • Run the app under the emulator that comes with the SDK. Then you can use the normal screenshot facilities of your PC OS to capture images of the emulator window.
  • Use the DDMS utility from the SDK.

DDMS Notes

On some Linux systems, the DDMS window fails to show any devices. Instead, it outputs a continual sequence of “E/DeviceMonitor: Connection attempts: n” messages with ever-increasing n.

This is caused by a system setting which prevents IPv4 and IPv6 connections from being opened on the same network socket. To work around the problem, execute the following command in a root terminal window:

   sysctl -w net.ipv6.bindv6only=0

Presumably this is a bug in DDMS.

Personal tools