How to take a screenshot

Search This thread

htpcforall

Member
Jun 18, 2014
22
13
san diego
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.
 

fireTVnews.com

Senior Member
Jun 6, 2014
70
44
www.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"'
 
  • Like
Reactions: Newcron and roligov

Newcron

Senior Member
Sep 13, 2010
248
53
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.
 

fireTVnews.com

Senior Member
Jun 6, 2014
70
44
www.fireTVnews.com
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.
 
  • Like
Reactions: Newcron

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    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.
    2
    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"'
    1
    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.