Skip to content

Instantly share code, notes, and snippets.

@patrickhammond
patrickhammond / screenrecord.sh
Last active April 30, 2018 21:32
Script to simplify screen recording with Android 4.4 and later devices. This takes care of setting the screenrecord flags, pulling files from the device, cleaning up after the recording, and optionally automatically opening the recording for you. Assumes only one connected device. Works for OSX but probably easy to make work with Linux (I believ…
#!/bin/bash
bitrate_flag=""
rotate_flag=""
open_when_done=0
OPTIND=1
while getopts "hron:" opt; do
case "$opt" in
h)