Thursday, November 17, 2011

Taking Screenshots with Kindle Fire

Renumbered at 4:02pm; Updated 3:47pm, thanks to corrections made by Wangen. (The mistakes were mine, not Erica’s.) Thanks, Wangen!

I just got off the phone with Erica Sadun, geek girl extraordinaire, who had posted instructions yesterday on how to take screenshots on a Kindle Fire but who kindly walked me through the process today. I'll explain what she told me in case you too are interested.

Let me preface this with the fact that I've never used Android before today. If you, too, are new to Android, you should find everything you need in these instructions. If you already know Android, you'll probably be bored.

1First, connect your Kindle Fire to your Mac. (I don't think the process is very different on a Windows or Unix box, but to be honest, I really don't know.) 

2Next, download the Android SDK. You can find that here: http://dl.google.com/android/android-sdk_r15-macosx.zip. You don't have to install anything else besides this.

3Unzip the folder and place it wherever you would like it to be on your computer. I put mine in my Documents folder. You'll need to know the location later on in the process, so I would recommend not burying it too deeply into your folder hierarchy. The folder starts out with the name android-sdk-macosx but you can change it to something faster to type (like android). Don't change the names of the things inside that folder.

4Next, open Terminal. It should be in the Utilities folder inside the Applications folder.

5When you open a Terminal window it defaults to your home directory. You have to navigate to the android sdk folder you just downloaded. Since I put mine in my Documents directory and I changed its name to "android", I typed:

cd Documents/android

(The cd stands for change directory.) Terminal will confirm that you are now "in" that directory by changing the prompt at the beginning of the line.

6Next type this:

./android

The Android SDK Manager should appear.

Erica told me to choose the "Android SDK Platform-tools" box and deselect everything else. Then click "Install 1 package…" at the bottom right.

Android SDK Manager

Next, you'll get the "Choose Packages to Install" window. Make sure it's the Android SDK Platform Tools in the upper left corner, and then click Install.

Choose Packages to Install

Once the package is installed, the ADB will have to be restarted. Click Yes.

ADB Restart

7Next, go back to the same window in Terminal, and create a symbolic link (a sort of alias) by typing:

ln -s ../platform-tools/adb adb

8Now, still in Terminal, to see if the Fire is connected, type

./adb devices

The output that you want looks like this:

List of devices attached
6C78000600000001    device


If you do see that, skip on ahead.

If, instead, you just see

List of devices attached

all by its lonesome—which is what I saw—we have to do a few more steps.

9First, we'll stop and restart the adb server. First type:

./adb kill-server

10And then type

./adb start-server

You should see this:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *


11Now see again if your Kindle Fire device is listed, by typing

./adb devices

If it still doesn't show up, we'll edit the adb_usb.ini file.

12To do that, open a brand new Terminal window, leaving the old one open since we'll go back to it.

13As ever, Terminal starts you out in your home directory. Type:

cd .android

It turns out that this is the default location for android stuff on any Unix machine (like a Mac).

14Now type

touch adb_usb.ini

15That creates the adb_usb.ini file. Make sure you have a text editor that can save with Unix line endings like the free TextWrangler (or more powerful but not free BBEdit). Then type

open -a TextWrangler adb_usb.ini

16(Or type open -a BBEdit adb_usb.ini if you have that program.) Copy into it, the following four lines, being very careful to create a return after the last line:

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x1949



17Choose Save as and make sure that Unix (LF) is chosen in the Line breaks menu.

SaveUnixLF

18Then type

cat adb_usb.ini

in order to see your work. If you see it just as it appears above, you can continue to the next step. Unfortunately, mine appeared all jumbled on a single line (because I originally used TextEdit) and so Erica surmised that I had somehow entered the returns incorrectly and she emailed me the file. (You can download a zipped copy of that file here.

19Be sure to unzip it and place it on your Desktop before continuing as below.) I copied it to my Desktop and then from the second Terminal window, typed:

mv ~/Desktop/adb_usb.ini .

Which says "move the adb_usb.ini file from the Desktop to the current directory (represented by that final period).

Again I typed

cat adb_usb.ini

and this time, it looked like the four lines above. (Don't forget that final return after the 0x1949 line!)

OK, almost there.

Now, we go back to the first Terminal window, and for good measure, we'll stop and start the server once more. Type

./adb kill-server

And then type

./adb start-server

You should see this:

* daemon not running. starting it now on port 5037 *
* daemon started successfully *


Now see again if your Kindle Fire device is listed, by typing

./adb devices

You should really see 

List of devices attached
6C78000600000001    device


If you still don't see a device, make sure that your Kindle Fire is connected, and that the adb_usb.ini file has been correctly configured.

20The next step is to start up ddms. In the first Terminal window, type

./ddms

You should see something like

2011-11-17 13:16:02.750 java[4451:1707] [Java CocoaComponent compatibility mode]: Enabled
2011-11-17 13:16:02.751 java[4451:1707] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000


21The Dalvik Debut Monitor window will appear. You should see your Kindle Fire in the upper-left corner. Select any of the lines under your device as shown here:

Dalvik Debug Monitor

22Now to make a screenshot, press Command-S.

Device Screen Capture

The first I tried it, it came up black, because my Kindle had gone to sleep. Just wake up your Fire and then click the Refresh button. Click the Rotate button to get it to go the right way around, and then Save to create a PNG file. Here was my first screenshot (note that I added the drop shadow with Skitch):

KindleFireScreenshot


To take screenshots of the Kindle in action, you'll have to dismount the Kindle from your Mac by clicking the Disconnect button.

If you've left the Device Screen Capture window open, you can hit the Refresh button to see whatever you now see on your Kindle. For example, the first few sample books that you've downloaded:





And I think that's it.


Many, many thanks to Erica Sadun, without whose help I wouldn't have known even where to start. If anyone wants to add what's different on Windows and Unix machines, please add them to the comments.

52 comments:

  1. And I had been thinking about getting a Fire. Thanks for the cure...

    ReplyDelete
  2. As a former UNIX-head, I noticed two problems in this post. Hopefully this will be helpful . . .


    I think you left out a crucial command early on. You wrote

    Next type this:

    ln -s ../platform-tools/adb adb

    The Android SDK Manager should appear.

    which makes no sense, because the "ln -s" command only creates a symbolic link (a UNIX thing a lot like an alias) but does not launch anything. You probably needed to type a second command after this:

    ./adb


    Second, TextEdit will always mess up the line endings in the way that you saw, so it really isn’t a suitable way to do that step. One free alternative (for people who don’t want to learn emacs or vi) is the Mac application TextWrangler, which allows you to choose the type of line endings in your text file. Open the file like this:

    open -a TextWrangler adb_usb.ini

    Within TextWrangler, at the bottom, there is a popup menu for the line ending style. The choices are Classic Mac (CR), Unix (LF), and Windows (CRLF). Choose “Unix (LF)” before saving the file.


    Hope those helped,
    W

    ReplyDelete
  3. Good god. On my Android telephone (Samsung Galaxy S2) to take a screenshot, I press the home and power button at the same time. Click, and the screencap goes in a folder called "screenshots" created automatically in my gallery. Nothing to install, no rooting required. It is insane that Amazon makes you jump through so many hoops.

    ReplyDelete
  4. Also on the iPad, like the Galaxy, home and power at the same time does the job. It would probably be better to just get your camera phone out and take a picture of the device. Well done Amazon!

    ReplyDelete
  5. Liz, what a great help this is! Found one more tweak that might help Unix newbies like me. Following step #5 I had to cd again into the tools directory. Then I was able to launch the Android SKD Manager (by typing ./android). Don't know if this is because of my setup (I rarely use Terminal, but it worked). Thanks again for putting this together!

    ReplyDelete
  6. Nice job with this tutorial. A few hiccups with what's located in what directory, etc, and I use "vi" to edit the .ini file since I know Unix well, but it's good and I'm up and running. Muchas gracias!

    ReplyDelete
  7. Just get an iPad... this Fire is ridiculous.

    ReplyDelete
  8. Holy crap. Why would anyone bother? That's just insane.

    ReplyDelete
  9. Uhm, why not just aim the camera on your iPad at the Kindle Fire screen, and then take a picture?

    It'll also automatically get uploaded to iCloud so you can open on your computer with iPhoto, if you need to. You could just email it or whatever from your iPad.

    Of course, you could just use the camera on your iPhone instead the one on the iPad to take a picture of the screen on your Kindle Fire...

    In the old days, you had to wait until you developed the roll of film to get the screen shot of your desktop computer, because Print Screen on MS Windows didn't do anything but put it in a copy buffer, silently. And that would lead to a conversation like this:

    "How come it ain't printing?" "I dunno, maybe it's thinking about it." "Nevermind, get the camera, we'll do it the right way."

    ReplyDelete
  10. Worth noting that this isn't Amazon going out of their way to make it difficult, this is standard behavior on Android. If a particular device has a shortcut like hitting home and power, that is something which that vendor has implemented themselves. By default with Android, the steps above are how you get screenshots.

    ReplyDelete
  11. Wow. You could have saved the wasted time by just getting an iPad.

    ReplyDelete
  12. Since Android is open, why haven't they added the ability to just press two buttons to take a screenshot? Or are they lazy?

    ReplyDelete
  13. i had an android 2.1 device and i just gave up in trying take a screenshot. Not sure if that's the case for non-Samsung android phones. Ugh.

    ReplyDelete
  14. Thanks for the steps, I appreciate it.

    ReplyDelete
  15. This is an issue with older Android versions. As others pointed out, newer versions have copied the iPhone/iPad model of pressing two buttons simultaneously to take a screenshot.

    ReplyDelete
  16. There are no buttons on the Kindle. Duh.

    ReplyDelete
  17. Crayolas and paper. Faster, easier. Similar resolution

    ReplyDelete
  18. Since when did everyone get so damn lazy in doing stuff. God forbid you learn how your computer or device actually works or anything new haha.

    ReplyDelete
  19. Or you can just take a picture with your iPhone.

    ReplyDelete
  20. This is ridiculous - no-one needs to take screen shots

    The shopping trolley at Safeway can't and no-one ever complaints about that

    ReplyDelete
  21. Or complains either

    ReplyDelete
  22. Oh come on, this is not fair. Some people climb mountains, others wrestle gorilla's. Everybody needs a hobby!

    ReplyDelete
  23. I have to think John posted this ridiculously long explanation on purpose as a way of belittling the Kindle Fire. It's $200 and you can surf the web and play games on it. Nough said.

    The ipad is more than twice as expensive and twice the size so yeah...you can take a screenshot easier. Big whoop. Like I'll ever have the need to take a screenshot from my Kindle Fire.

    I challenge John to fit his ipad in his coat pocket. Not so easy eh? But I'm sure I could write a 2000 word explanation how to do it using some extra fabric, sewing needles and power equipment. Care to read it?

    ReplyDelete
  24. "On my Android telephone (Samsung Galaxy S2) to take a screenshot, I press the home and power button at the same time."

    Of course that's how you do it on the Samsung Galaxy S2... because that's how the iPhone does it (and has been doing it from the start.)

    --andre

    ReplyDelete
  25. "The ipad is more than twice as expensive and twice the size so yeah...you can take a screenshot easier. Big whoop."

    Also, the iPad has Cisco VPN built in as well as free remote desktop apps and command line apps which means I can connect to my iPad to my employer's network and admin servers from my iPad. This is the same device where I can play hardcore graphic-intensive games like Shadowgun and Rage and Infinity Blade, something most Android devices, including the Fire, can't handle. That extra couple hundred bucks in a no-brainer in my book but then again, I've always lived by the aphorism that you get what you pay for. If you want to buy cheap crap... fine, but don't belittle the choices of those of us who don't need to be cheapskates.

    ReplyDelete
  26. probably coz it's on mac... I will stay with my iOS I say
    http://tabletorials.com/2011/11/how-to-take-screenshots-on-the-kindle-fire/

    ReplyDelete
  27. For android devices running 2.2 or better, there's an app called Screen Capture Shortcut. Makes your phone screen cap on shake.
    It's just a matter of time before something like that comes out for Kindle Fire.

    ReplyDelete
  28. No point comparing the Kindle Fire to the iPad. They're different products and different price points. The Fire is cheap garbage, without the eInk benefits of a Kindle. Get a Kindle, or get an iPad, I just don't see the point of the Fire. You're better off with a 4.3" Galaxy SII or an iPod Touch. (both devices can also take screenshots with Home+Power as per 2007 iPhone) It's stupid that Android doesn't have an equivalent function by detail (e.g. home&back) and it took Samsung to copy iOS's behaviour exactly before normal Android users (read: non-geeks) can take screenshots, a basic function.

    But I appreciate this article, I'd find it very helpful if I had a Fire.

    ReplyDelete
  29. "The ipad is more than twice as expensive and twice the size so yeah...you can take a screenshot easier. Big whoop. Like I'll ever have the need to take a screenshot from my Kindle Fire. "

    What do price and size have to do with taking a screen shot? That technology was developed at about the same time the "Prnt Scrn" button was introduced. FYI, the iPhone 3GS is now free and offers the same functionality. Price does not excuse doing a bad job.

    ReplyDelete
  30. It's amazing how many iPhone owners I had to tell how to make a screenshot.

    Anyone who can't see the need for screen capture on a tablet has never used one to its full potential.

    ReplyDelete
  31. Please stop using the word "should". For example, Step 4's:

    Next, open Terminal. It should be in the Utilities folder inside the Applications folder.

    Would work better as:

    Next open Terminal, which is located in Applications > Utilities.

    or:

    Next open Terminal, which is located in /Applications/Utilities.

    The point I am trying to make is that Terminal IS in /Applications/Utilities. The word "should" never comes into play here.

    ReplyDelete
  32. Not saying it couldn't be simpler, but you do realize that after the first time you do all the setup (installing the Android SDK, etc.) you don't have to do it again? Any more screenshots you want, plug in and skip to step 20...

    ReplyDelete
  33. "The first I tried it, it came up black, because my Kindle had gone to sleep."

    And no wonder. I went to sleep just reading this.

    ReplyDelete
  34. The post above mentions most of this is a one time thing and that is true. But I can say from a tester standpoint, it is still a big PITA to have to plug your device into a computer every time you want to get a screenshot. It's a real hassle testing mobile apps when you have to have a computer with you for screenshots.

    ReplyDelete
  35. well, that's the way it suppose to be for geeks, right??
    I mean holding power and home is for average consumers.
    btw...I don't have kindle or ipad and never owned one.

    ReplyDelete
  36. Note that most of this post is setup to allow the debugger to run, and only needs to be done the first time.

    The important part is getting the debugger running so you can take the screenshot.

    But consider: If it's android, there's AN APP FOR THAT. Or will be.

    ReplyDelete
  37. I wanted to ring granny the other day but first I had to assemble the phone. It just took me a week and I was all set and ready to go. I dialled her number, but no one answered the phone. At least I know that next time I want to ring granny, I do not have to go through all these steps again. All I have to do is to dial the number. Easy, isn't it?
    Everyone who wants to have a phone, should learnt how to build it from scratch, I think. Otherwise you're just plain stupid and should stay away from advanced technology. The same goes for cars. If you don't know how to build one from scratch, you shouldn't be allowed to drive one. Just my humble opinion.

    ReplyDelete
  38. Hmmm!
    There is a device that can take a screenshot with the two button method, can fit in a jacket pocket without the need for needle and thread, is smooth and fast in operation, can do most of the things that the iPad does, has a resolution and screen quality is unmatched at its price point which just happens to be around the same $200 as the Kindle fire and didn't rip off someone else's hardware or ui

    Work it out yet?

    It's the iPod touch

    (this post brought to you by Siri and the iPhone 4 S)

    ReplyDelete
  39. Guys, the Kindle Fire is not meant for this. Stop bashing it. The Kindle Fire is meant for media consumption. There is only one physical button on the device and if they implemented a software screenshot button I would be quite upset. How often do you have to take screenshots on your mobile device anyways? Unless you're a tech writer making a tutorial of some sort, I can't imagine too often.

    The Kindle Fire does not do as much as the iPad, but for $200 it does not have to. What it does do, it does beautifully. I love mine, don't bash it.

    ReplyDelete
  40. I got this to work initially, but how to I relaunch it and make it work again on a Mac?

    ReplyDelete
  41. @Jason: Once you've got it set up, you should be able to connect the Fire and then start from step 20.

    ReplyDelete
  42. Hi Liz, that doesn't work for me. It's not finding the Kindle. Do you understand how to use this debugger? I am very new to this and I am totally confused. I got the screenshots to work once, but not again. Any chance you could talk me through it on the phone?

    ReplyDelete
  43. Wow... that's insane. I guess the question I have is why would you want to take screen shots of your Kindle Fire? Perhaps if I was writing a "how-to" guide on using the Fire, but that is the only reason I would go through all this. I'm more interested in how my ebooks look ON the Fire. I don't need to take pictures of it.

    ReplyDelete
  44. @Dan: It's pretty handy for troubleshooting. Sometimes it's really hard to describe exactly what's happening to someone over the phone. Or maybe you want to remember a passage from a book, or a receipt from something you bought, or take a snapshot from a website from a particular moment (your book in Wired! :)

    ReplyDelete
  45. iPad users are the lazy ones. Just shell out the $$$$ and let Cupertino make it happen. God forbid you have to DO something.

    ReplyDelete
  46. @null: »It's a real hassle testing mobile apps when you have to have a computer with you for screenshots.« Think you have identified the deeper reason for this user friendly 20-steps procedure. It guarantees fewer comparisons between the GUIs: a GUI cobbled together again by technicians and a GUI shaped by designers (see http://tinyurl.com/7obewmu).

    ReplyDelete
  47. Thanks! I was nervous, but it worked like a champ. Much appreciated.

    ReplyDelete
  48. worked like a charm. for whatever reason the fire wasn't showing up in DDM and fixing the adb_usb.ini file worked. thanks!

    ReplyDelete
  49. I'm able to take screenshots with the Kindle Fire. however when I plug in a Kindle Fire HD the device doesn't appear in the Dalvik Debug Monitor. Does anyone have a fix for this?

    ReplyDelete

More of my books