Last active
February 5, 2020 03:45
-
-
Save rafaelje/971dd863347490ecb3e1b2ebfd8d4097 to your computer and use it in GitHub Desktop.
This script is for taking a screen shot of an Android device.
This file contains 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/bash | |
## This script is for taking a screen shot of an Android device. MACOS - Linux | |
## | |
## Note the script generates screenshot_yyyyMMddHHmmss.png and screenshot_yyyyMMddHHmmss_s.png | |
## under /sdcard on the device and copies it to the current working directory. | |
## IMPORTANT RUN this command chmod 755 take.sh | |
## | |
file=screenshot_$(date "+%Y%m%d%H%M%S").png | |
dir=/sdcard | |
remote=${dir}/${file} | |
adb shell screencap -p ${remote} | |
adb pull ${remote} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment