Linux

Take screenshots of your Android phone from Windows or Linux

Getting screenshots of an Android phone is not the easiest process. Jack Wallen describes the steps Windows users or Linux users should follow to take screenshots of an Android phone.

Let's say your client requires employees to have an Exchange account on their Android mobile devices. You decide to create user documentation with screenshots that help show how to add an Exchange account on Android. The bad news is taking screenshots of an Android mobile device is not a simple process. Instead of just loading an app on your phone and then taking the screenshots, you have to install the developer kit on your PC and snag the screenshots using that tool.

This tutorial shows how to take screenshots of an Android phone from the Windows and the Linux platform. I go into more detail on the Linux side because it's more challenging.

Enable USB debugging

Before you can take screenshots from your Android phone, you have to enable USB debugging. To do this, tap your device's Menu button and then tap Settings. From there, tap Applications | Development and make sure USB Debugging is checked.

Install the SDK

You need to install the Android SDK, which you can find on the Android Developer site. Choose the download for your platform and save it on your drive. After the SDK is downloaded, you need to extract the tool that will create a new directory ./android-sdk_XXX (XXX is the platform and/or the release number). Once the SDK is unpacked, you need to prepare your system for its use.

Install JDK

In order to use the Android SDK, you must install the Java Development Kit (JDK). If you're using Ubuntu Linux, you open the Ubuntu Software Center, do a search for openjdk, and install the most recent version. If you're using Windows, you download and install the JDK from the Oracle website.

Special instructions for Linux users

If you're using Linux, the tool you must run to take screenshots is the ddms tool (Dalvik Debug Monitor). If you try to run the command ~/Downloads/android-sdk-XXX/tools/ddms (assuming you unpacked the SDK in ~/Downloads), you'll notice three issues that need to be fixed. 1. You're going to need sudo access, so the command must be run using sudo. How to fix: use sudo when running the command. 2. The ddms tool doesn't seem to be aware of everything it needs to run (especially adb). How to fix: You have to instruct the SDK to run a full update. To do this, open a terminal window, change to the directory where the SDK was unpacked, change into the android-sdk-XXX/tools directory (where XXX is the platform and/or release number), and issue the command ./android update sdk. This will take some time because it has a lot of downloading to do. 3. Your phone cannot be recognized. How to fix: The Linux system has no way of knowing how to recognize the make and model of the phone, so issue this command gksudo gedit /etc/udev/rules.d/90-android.rules, which will open up the Gedit text editor. You should add this line SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666". Save that file and then restart your system. (Although someone might tell you that you can just restart the udev service with the command gksudo service udev restart, I have yet to see the command work with this particular process.) Once the system has rebooted, log back in, open a terminal window, and issue the command to start the ddms. You should see your phone listed (Figure A). If you do, you're ready to start snapping screenshots. Figure A

Note: You can have more than one device here if you need. For that, you will have to create multiple udev rules if the devices are different.

Here is a list of popular vendor IDs. The vendor ID will differ for each model.

Acer 0502
Dell 413c
Foxconn 0489
Garmin-Asus 091E
HTC 0bb4
Huawei 12d1
Kyocera 0482
LG 1004
Motorola 22b8
Nvidia 0955
Pantech 10A9
Samsung 04e8
Sharp 04dd
Sony Ericsson 0fce
ZTE 19D2

Notes for Windows users

From the Windows side of things, you should only need to navigate to the directory you have unpacked the SDK into, change into the Tools directory, and then double click the ddms icon.

How to take the screenshots

Windows users and Linux users, follow these steps to take a screenshot:

1. Select the device from which you want to take a screenshot.

2. Click Device | Screen Capture.

3. When the new window opens (Figure B), click the Save button.

4. Navigate to where you want the image saved and give the image a name.

Figure B

If you change the screen on your Android device to save a new screenshot, click the Refresh button, and the new screen will appear.

Summary

Once you're able to get screenshots of an Android phone, you'll see that the ability to grab these images can go a long way to helping users learn how to use their tools.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

8 comments
Gis Bun
Gis Bun

People got nothing better to do than take a picture of their phone?

kaushalpandya
kaushalpandya

How is this if the configure steps snaps can be taken on another digital camera / mobile .those can be used as screen shots.

Dan Holke
Dan Holke

I thought the Shoot Me app worked on nearly all Android devices? I use it frequently (not rooted either) with no problems. Super easy - open the app, navigate to the screen you want to capture, shake to snap a screen pic. Market link: http://t.co/ztQvYp1

LedLincoln
LedLincoln

...according to the app's description

dcolbert
dcolbert

I've got it on my rooted Coby, and you know, when I've used the SDK to capture screen shots, even once you get everything set up it is kind of a pain to do screen captures this way. Using ShootMe, it is completely pain-free to capture a screen shot on an Android device. But I was under the impression that you needed Root. I'm downloading it on my Droid 2 right now to verify. This is one of those things where iOS devices are ahead of the Android curve. Not everyone knows, but on an iPad, you push the home button and then the power button and it will take a screen capture. This should be cooked into Android OS, too. It is almost as stupid as not having "cut-and-paste" to omit the feature from the OS. Just verified, ShootMe fails without Root access.

dcolbert
dcolbert

I'm sure we have some other HTC Evo users around here who can download and confirm this. If it works for everyone with an HTC Evo, we've found something cool out about the Evo. If it doesn't, we've found something cool out about *your* particular HTC Evo, that might be of concern to you. ;) Seriously, I wouldn't be surprised to find that the first thing Android malware does is try to root your phone without your knowledge. As simple as rooting Android is, that seems like it would probably be a pretty trivial thing to do. Do you run Android AV software?

Editor's Picks