Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.