Skip to content

Instantly share code, notes, and snippets.

@zzn2
Created November 24, 2014 02:01
Show Gist options
  • Save zzn2/172341d0d5dd81f597e2 to your computer and use it in GitHub Desktop.
Save zzn2/172341d0d5dd81f597e2 to your computer and use it in GitHub Desktop.
在命令行为 Android 设备的截屏,以 png 格式到当前目录。同时 Reveal in Finder 方便后续操作。
F=`date +"device-%Y-%m-%d-%H%M%S.png"`
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > $F
open -R $F
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment