-
-
Save mattak/9583334 to your computer and use it in GitHub Desktop.
Android Record Program.
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/sh | |
SCREENRECORD_ANDROID_PATH=/sdcard/tmp.mp4 | |
SCREENRECORD_LOCAL_PATH=tmp.mp4 | |
TIME=10 | |
SIZE=960x540 | |
if [ $# -ge 1 ]; then | |
SCREENRECORD_LOCAL_PATH=$1 | |
fi | |
if [ $# -ge 2 ]; then | |
TIME=$2 | |
fi | |
adb shell screenrecord \ | |
$SCREENRECORD_ANDROID_PATH \ | |
--time-limit $TIME \ | |
--size $SIZE | |
adb pull \ | |
$SCREENRECORD_ANDROID_PATH \ | |
$SCREENRECORD_LOCAL_PATH | |
adb shell rm \ | |
$SCREENRECORD_ANDROID_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment