Last active
November 6, 2017 09:12
-
-
Save qoopooh/927f9f6d821c3943a417d8e6b19a76ea to your computer and use it in GitHub Desktop.
Mac captures Android screen via adb
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 | |
# | |
# This is macos script that capturescreen of android devices | |
# and save the png file on current directory | |
# | |
# You can add argument to set file name | |
# ex. adb-screen pic # output is pic.png | |
# | |
if [ $# -eq 0 ]; then | |
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png | |
else | |
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > $1.png | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment