FORUMS
Remove All Ads from XDA

How to take a screenshot

22 posts
Thanks Meter: 16
 
By htpcforall, Junior Member on 28th June 2014, 06:49 AM
Post Reply Email Thread
I tried all kinds of screen capture apps but none of them worked on the FireTV for me. So after too much research, I found this nifty terminal command.

adb shell screencap -p /sdcard/screen.png

NOTE: replace /sdcard/ with desired save location if you want and screen.png with desired image name .png)

Perfect screen captures. Hope this saves someone else some time.
The Following 6 Users Say Thank You to htpcforall For This Useful Post: [ View ] Gift htpcforall Ad-Free
30th June 2014, 03:47 AM |#2  
fireTVnews.com's Avatar
Member
Thanks Meter: 51
 
More
The following command is what I use. It may need to be modified for windows, as I use it in OS X's terminal. The command takes a screenshot, names it with a timestamp, and saves it to the connected PC (not the Fire TV).
Code:
./adb shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > "~/Downloads/firetvscreenshot_$(date +%Y%m%d-%H%M%S).png"
I have the following in my Mac's .bash_profile file so that I can just enter "adbpic" and a screenshot file will appear in my downloads directory.
Code:
alias adbpic='~/adb shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > "/Users/YOURUSERNAME/Downloads/firetvscreenshot_$(date +%Y%m%d-%H%M%S).png"'
The Following 2 Users Say Thank You to fireTVnews.com For This Useful Post: [ View ] Gift fireTVnews.com Ad-Free
30th June 2014, 06:41 PM |#3  
Senior Member
Thanks Meter: 53
 
More
Quote:
Originally Posted by fireTVnews.com

The following command is what I use. It may need to be modified for windows, as I use it in OS X's terminal. The command takes a screenshot, names it with a timestamp, and saves it to the connected PC (not the Fire TV).

Code:
./adb shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > "~/Downloads/firetvscreenshot_$(date +%Y%m%d-%H%M%S).png"
I have the following in my Mac's .bash_profile file so that I can just enter "adbpic" and a screenshot file will appear in my downloads directory.
Code:
alias adbpic='~/adb shell screencap -p | perl -pe "s/\x0D\x0A/\x0A/g" > "/Users/YOURUSERNAME/Downloads/firetvscreenshot_$(date +%Y%m%d-%H%M%S).png"'

That's great!

You don't have to do an 'adb pull' to download the .png file and works with just '>'? Is that an adb feature or perl?

It's probably really easy to make a Windows batch file with the same purpose.
30th June 2014, 08:20 PM |#4  
fireTVnews.com's Avatar
Member
Thanks Meter: 51
 
More
Quote:
Originally Posted by Newcron

That's great!

You don't have to do an 'adb pull' to download the .png file and works with just '>'? Is that an adb feature or perl?

It's probably really easy to make a Windows batch file with the same purpose.

'>' is shell syntax to redirect the output of a command to a file. The little perl code is there to clean up some end-of-line character conversion caused by adb shell.
The Following User Says Thank You to fireTVnews.com For This Useful Post: [ View ] Gift fireTVnews.com Ad-Free
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