Created
August 21, 2014 08:31
-
-
Save penk/299f748f36f5dcd3cec0 to your computer and use it in GitHub Desktop.
Take screenshot from Ubuntu Touch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
D=$(date +"%Y%m%d%H%M%S") | |
size=$(adb shell "fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p'") | |
adb shell mirscreencast -m /var/run/mir_socket -n 1 -f /tmp/${D}.rgba | |
adb pull /tmp/${D}.rgba | |
/opt/ImageMagick/bin/convert -depth 8 -size $size ${D}.rgba ~/Desktop/${D}.png | |
/bin/rm ${D}.rgba | |
#qlmanage -p ~/Desktop/${D}.png >& /dev/null & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment