FORUMS

Screenshot application

917 posts
Thanks Meter: 894
 
By Koush, Retired Recognized Developer on 25th November 2008, 10:45 PM
Post Reply Email Thread
Finished writing up the Screenshot application this evening. You must have root to use this application:

If you want to know how I did it, just read from /dev/graphics/fb0

Screenshot application:


Choose how long to wait before taking a screenshot:


Once the screenshot is taken, you will get a toast on the bottom of your screen.


You can view the screenshot and save it to your SD card (from the menu):


Download it off the Market!
26th November 2008, 01:12 AM |#2  
Senior Member
Flag Tampa
Thanks Meter: 32
 
More
Quote:
Originally Posted by Koush

Before we had root, it was impossible to write a screenshot application because when trying to use the ACCESS_SURFACE_FLINGER permission, you would get denied. However, now that we have it, it obviously works.

The application needs to be compiled in the Android build environment to access some of the internal classes. I started with a modified version of monkey at first (similar to how I made the screen autorotate work). I'm working on stripping out the junk now.

You rock....Keep it up!
26th November 2008, 01:39 AM |#3  
JesusFreke's Avatar
Inactive Recognized Developer
Flag Dallas
Thanks Meter: 52
 
More
You know you can take screenshots with ddms (included in the sdk), right? I think it works even on a stock phone (although I'm not positive).

Granted, you have to have the phone plugged into your computer to take a screenshot with ddms, where your app would be able to take one anytime. So your approach would still be useful
26th November 2008, 03:20 AM |#4  
OP Retired Recognized Developer
Thanks Meter: 894
 
More
Quote:
Originally Posted by JesusFreke

You know you can take screenshots with ddms (included in the sdk), right? I think it works even on a stock phone (although I'm not positive).

Granted, you have to have the phone plugged into your computer to take a screenshot with ddms, where your app would be able to take one anytime. So your approach would still be useful

Yeah, thats actually how I figured out how to take screenshots: I dug through the DDMS code till I ended up at the SurfaceFlinger IPC Server.
But as you said, it is not ideal.
Attached Thumbnails
Click image for larger version

Name:	androidscreenshot.jpg
Views:	205
Size:	21.8 KB
ID:	132772  
26th November 2008, 03:26 AM |#5  
JesusFreke's Avatar
Inactive Recognized Developer
Flag Dallas
Thanks Meter: 52
 
More
Awww. I was expecting to see a preview inside a preview inside a preview.. etc.
26th November 2008, 04:14 AM |#6  
OP Retired Recognized Developer
Thanks Meter: 894
 
More
Quote:
Originally Posted by JesusFreke

Awww. I was expecting to see a preview inside a preview inside a preview.. etc.

Hahha, that's actually what I had screenshotted at first, but then then I realized it looked really confusing.
26th November 2008, 05:41 PM |#7  
hetaldp's Avatar
Senior Member
Flag Nashik
Thanks Meter: 24
 
More
Once Screenshot Application is ready it will be easy to make Application which can Record Screen activities in Video for Possibly making Video Tutorial of Softwares, OS etc.

Well done koush.
29th November 2008, 08:16 AM |#8  
OP Retired Recognized Developer
Thanks Meter: 894
 
More
Finished the application tonight. Enjoy guys! Check the first post for instructions/download.
29th November 2008, 08:33 AM |#9  
usmc2k's Avatar
Senior Member
I.E.
Thanks Meter: 6
 
More
i keep gettn a message that says "broken pipe" ??????? any idea??

*NEVER MIND FIGURED IT OUT MYSELF..... HAD TO TAKE OFF MY PASSWORD*

GREAT APP !!!!! : )
29th November 2008, 08:57 AM |#10  
OP Retired Recognized Developer
Thanks Meter: 894
 
More
Quote:
Originally Posted by usmc2k

i keep gettn a message that says "broken pipe" ??????? any idea??

*NEVER MIND FIGURED IT OUT MYSELF..... HAD TO TAKE OFF MY PASSWORD*

GREAT APP !!!!! : )

You should download Superuser off this forum. It will ask for permission whenever su is used, and also won't break applications that use su.
29th November 2008, 09:02 AM |#11  
usmc2k's Avatar
Senior Member
I.E.
Thanks Meter: 6
 
More
Quote:
Originally Posted by Koush

You should download Superuser off this forum. It will ask for permission whenever su is used, and also won't break applications that use su.

I have superuser..... but do i have to delete my supassword to use it or can i use both programs ? Couldnt figure out how to set tha password thats y i dont use it .....
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes