Android Screenshot Application

After taking a quick peek through the Android source code, I figured out how to write an application that takes a screenshot of whatever is shown on the phone. However, you must have root to use this application.

Download it off the Market!

Usage:

Start up the application:
ss1

Choose the amount of time to wait before taking the screenshot:

ss2

Once the screenshot is taken, you will get a toast on the bottom of the screen letting you know:

ss3

Go back to the Screenshot application and view the screenshot and save it out:

ss4

44 comments:

Ranjith said...

I installed the application in emulator.
I got the message "Broken pipe".

Whats wrong?

johnmrichey said...

I get the same error. No screenshot is taken.

Koush said...

Unfortunately, you must have root to run this application.

johnmrichey said...

How does one run an application as root?

Anonymous said...

Hey great, an app that requires a giant security hole to run proper. Pass, 0 Stars.

Koush said...

Having root access does not mean you have a security hole.
You can protect your root access with the Superuser application.
http://www.koushikdutta.com/search/label/Superuser

Root let's you do all sorts of cool things, which are not possible without it-- like taking a screenshot, installing Debian, installing the latest build from source code, etc.

You're just sour you don't have root!

Jack said...

Great work!! Keep it up.

Anonymous said...

hey. thanks for the app. Getting error msg "screenshot.raw file not found!" what's the problem? I believe I have root access. But how would I find out for sure?

Anonymous said...

Hello and thanks for the app ;-) I have the same error msg "screenshot.raw file not found!"
Help !!

dangling_refrenz said...

Koush, Can you please give me the source code to do a quick screen capture ?

I need it in an app that can sample display atleast once a second.

Just transitioned from Linux to Android-Java & am not familiar with APIs.

Appreciate your help !

wimbet said...

I got your app to work but I don't know how to map a key from the home screen to do a capture.

Is there some place that has better documentation on how to do this?

mobinauten said...

Hi,

very usefull, but it doesn't workd for me, neither on the handset nor in the emulator.

App states "sreenshot.raw file not found".
I'm root on the device.

Thx for your help
Oliver

Brett said...

For those of you asking how to run as root......

Use your Google phone and GOOGLE IT.




BUT since I feel like being nice today...


http://forum.xda-developers.com/showthread.php?t=442480

Dan said...

initially it kept force closing with JF1.41Rc30

but now it works, so i'm not sure what the problem was

Nickie Bear said...

Well the CLOSED SOURCE Microsoft Products allow you to do pretty much anything.

Are you saying the well publicized OPEN SOURCE claims from Google is BS??

android said...

Well. Can you share the java part source code to us? Or can use build a x86 version APK?

Tank said...

I am not seeing how to save the screenshot after viewing it in the app. Help please :)

Keef said...

Thanks for this, installed and works a treat, thanks :) And the first picture? Bragging rights on the jf build :)

Anonymous said...

Is there anyway to get this application to save into /sdcard/dcim/screenshots and also have it add the appropriate thumbnails so that it they show up in the picture application? I'd rather not have to restart the phone.

Keef said...

I don't understand why you have to re-start your phone?

Anonymous said...

1) When you take a picture, it is stored in /sdcard. So it doesn't show up in the Pictures application.

2) Even if you move the picture to /sdcard/dcim, the thumbnails are not generated. So the Pictures application will not recognize the pictures.

Restarting your phone after taking a picture is one solution. Ejecting and injecting your sdcard is another solution. If you have your usb cable, then you have another option: type 'sdutil ums enable;sdutil ums disable' from the terminal app on your phone.

None of these solution is ideal. It would be great if we didn't have to move the pictures in the first place. So a configurable save location would be a good first step.

Keef said...

I see where you are coming from now, and agree with you 100% :)

I did not realise that between taking my screenshot and viewing it I had rebooted. Sorry it must have been a senior moment

Keef said...

I may be having a senior moment but you do realise that if after taking the screenshot you tap the application icon you see the photo you have taken, am I right in assuming that you want the picture to appear elsewhere?

Anonymous said...

hey great app. I'm not a dumbass who can't read that it requires root so it does what it should

Anonymous said...

"sreenshot.raw file not found" for me too. I jut got a brand new handset with the original firmware, enabling su with the telnet method. Am I missing something?

thatcher said...

i wonder what kind of phone that is htc doesn't manufacture that.

OrganizedFellow said...

GRRREAT APP!
@Koushik Dutta
This is a great buy for $2.99.

For a dollar or two more, I WOULD PERSONALLY like to see:
1. Send via SMS
2. Via in gallery (perhaps a script that runs in the background to copy/move image(s) from /sdcard to proper dir for gallery use).
3. More options?!?!?!

:)

GREAT APP, please email me if/when you add some more features: organizedfellow at geemaildotcom

Damien said...

how can i get the screenshot app if its not showing up in the Android Market ... im in the UK btw.
thanks

Keef said...

Damien, If you open your G1 and go to the market, hit search and type in screenshot you will be presented with the app for sale @ $2.99

I too am in the UK and just checked for you my friend :)

Kai 'wusel' Siering said...

Hmm, just some questions/thoughts ...

First, the G2 (HTC Magic, Vodafone edition) lacks a Camera key -- how am I supposed to use this app on the G2 (running Android 1.5)? (Solution would be to make the hot key configurable.)

Second, even when set to timed ("after 25 seconds"), on first try I got the info screen from Superuser and a message that the screenshot could not be taken (as I haven't answered the request to use "sh" as "root:root" yet); all subsequent tried yield ... nothing? No screenshot to be seen in either /sdcard nor .../screenshot?

Regards,
-kai

zelrik said...

I dont find that application in the app market. Where is it?

Random5 said...

$3 to take a few screenshots? Be realistic, I doubt many people are going to pay that for an application unless they're going to use it daily

Anonymous said...

I'd pay for it if i could take a screen shot by starting the app and pressing the camera shutter button when i want a screen shot. The timer method is just messy

OrganizedFellow said...

I agree with anonymous above.
Be great to NOT rely on the timer.
It's a neat function, but maybe a better method would be to offer BOTH timer, and hotkey.

Rudy said...

I'm new to the G1 world... and rooting but I can figure out rooting later on....

Just wondering..... Google lets developers post apps that require root access? That seems like they're encouraging it.... rooting even though they patch the exploit

Peter said...

So even with a rooted G1 this app absolutely doesn't work. The camera button doesn't take screen shots, hotkeying only results in errors. The timer doesn't do anything. I'm running CM 4.2.7.1

Anonymous said...

Same as above except running cm 4.2.8.1 Does not work at all. Are you going to fix this? I really could use this app.

VIneet said...

Hi Koush,

I have a question does your screenshot app work on Eclair device(Droid or Google Nexus) (i.e. any 2.0 or higher version), why am I asking reading framebuffer does not give us screen image?

Vineet

Anonymous said...

Why doesnt somebody make a app that doesnt require rooting our devices. I am sure its possible i have been told by tmobile if i root my device my warranty and insurance is voided. So to me its not worth the risk!!!!!!!

Anonymous said...

To answer your question, "anonymous", it is a security feature of the OS. If an app could take a capture, then an app can be made to do captures without your permission. Even though the system tries to give users an idea of what potentially harmful things an app could do before you install it, most people tend to ignore those warnings.

Besides, how many people really need to make screen captures? Usually it is just those that are more advanced and are willing to use the dev software that has the screenshot functionality built in or the ones willing to root their phones.

I'll bet it will eventually be built into the OS in a secure way that the masses can be protected from themselves.

Hope this helps...

manjunath said...

hi i want the source code of your screen shot app can you please provide for me..

fish said...

I would download the app from the market if only I knew it's name.

bez said...

Yeah, what is the apps name?

Rizzu said...

Glad it's not just me wondering "This sounds great, but what the fuck is the name of the app?"