[Tips] : Poor's man screen capture using adb

Search This thread

bahathir

Senior Member
Feb 14, 2010
301
161
54
Most of the time I am using Android SDK's ddms for screencapturing. Based in this link, we can use adb to pull framebuffer image content, and convert it to png or any standard file format.


http://stackoverflow.com/questions/2807070/screenshot-of-the-nexus-one-from-adb

Code:
$ adb pull /dev/graphics/fb0
$ ffmpeg -vframes 1 -f rawvideo -pix_fmt rgb32 -s 544x960 -i fb0 fb0.png


I am not using dd to create correct raw file size, but, ffmpeg can sort them out, without any problem. :)

The key is the resolution for RAZR, which is 544x960.

Here I attached the screenshot which I made using this method.
Note: I changed the launcher to stock Android Launcher2, it brings the 'Nexus One' feels.

Thank you. :)
 

Attachments

  • screen_lock.jpg
    screen_lock.jpg
    18.8 KB · Views: 1,412
  • home.jpg
    home.jpg
    22.2 KB · Views: 1,230

bahathir

Senior Member
Feb 14, 2010
301
161
54
Yes, screen capture apps are easier. This adb method is an alternative to ddms.

Sent from my XT910 using XDA App
 

GFXi0N

Senior Member
Aug 14, 2010
1,161
297
Bilbao
I'm trying to do this from a mac.... i success to pull the capture but I cannot issue the command to convert it to png
Anyone can help?
 

triplex76

Senior Member
May 25, 2008
333
57
I'm trying to do this from a mac.... i success to pull the capture but I cannot issue the command to convert it to png
Anyone can help?

yes..I got one... smash everything that got an apple on his side....even more if it's a bitten apple.
that's how apple look like ultimately...it's slowely getting back to its origin ... just dust and smoke ... that's what they sell! today apple doesn't make anything a part from 2 SOC ...everything else comes from other companies and they just assemble ... display, ram, rom, comes from samsung,lg,sharp and even something from toshiba...
mac are just pc with OSx inside...last RISC cpu from IBM are gone and so is gone mac time!

http://www.applevis.com/forum/ios-ios-app-discussion/ios-6-bug-list
 

Attachments

  • 3659917-mele-marce.jpg
    3659917-mele-marce.jpg
    87.7 KB · Views: 218
Last edited:

GFXi0N

Senior Member
Aug 14, 2010
1,161
297
Bilbao
yes..I got one... smash everything that got an apple on his side....even more if it's a bitten apple.
that's how apple look like ultimately...it's slowely getting back to its origin ... just dust and smoke ... that's what they sell! today apple doesn't make anything a part from 2 SOC ...everything else comes from other companies and they just assemble ... display, ram, rom, comes from samsung,lg,sharp and even something from toshiba...
mac are just pc with OSx inside...last RISC cpu from IBM are gone and so is gone mac time!

http://www.applevis.com/forum/ios-ios-app-discussion/ios-6-bug-list

Sorry man, I hate apple myself: I needed this for something at my job....
Don't remind me i work on an overpriced piece of ****... it already stinks when I sit in front of it....
Makes me love my PC+Arch linux back at home even more....
 

Sneakyghost

Senior Member
Jul 24, 2008
8,314
13,594
InMyHead
I've been searching for a way to make a screenshot of the HTC One S recovery for 2 days and this guide got me nowhere at first because the One S resolution is 540x960 and i thought the OP recommended 544 is wrong.
Well, now after 2 days i realize it is right actually. So, the One S is identical to the Droid RAZR. Pretty cool. Thanks for this handy thread!
Maybe worth explicitly stating on the OP, that the resolution in Framebuffer is not equal the actual display resolution haha...

I can pull shots from TWRP Recovery now with these lines:

Code:
adb pull /dev/graphics/fb0
ffmpeg -vframes 1 -f rawvideo -pix_fmt rgb565 -s 544x960 -i fb0 fb0.png

Thanks again guys...
 

Koshatul

Member
Oct 7, 2009
11
1
I use this in my .bashrc on OSX.

Code:
## Take a screenshot of the currently attached android's screen
alias adb_screengrab='adb shell screencap -p | perl -pe "s/\r\n/\n/g" > screen-$(date +"%Y%m%d-%H%M%S").png'

I know this works on my handsets, but I haven't tried it booted into in any recovery images.
 

Top Liked Posts