Skip to content

Instantly share code, notes, and snippets.

@mrfabbri
Created October 5, 2014 10:26
Show Gist options
  • Save mrfabbri/9cd3e31c108cb10cc234 to your computer and use it in GitHub Desktop.
Save mrfabbri/9cd3e31c108cb10cc234 to your computer and use it in GitHub Desktop.
Starts and stops screen and audio (Mac) recording of an android attached device via adb
#!/bin/sh
function stop_record() {
echo
echo "stopping audio recording"
cat << EOF | osascript -l AppleScript
tell application "Quicktime Player"
stop last item of (documents whose name contains "Audio Recording")
end tell
EOF
echo "pulling screen recording"
adb pull ./sdcard/my-movie.mp4;
exit;
}
trap stop_record SIGINT;
echo "starting audio recording"
cat << EOF | osascript -l AppleScript
tell application "Quicktime Player"
launch
start new audio recording
end tell
EOF
echo "starting screen recording"
adb shell screenrecord --verbose ./sdcard/my-movie.mp4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment