Skip to content

Instantly share code, notes, and snippets.

@SimonMarquis
Created May 2, 2015 22:27
Show Gist options
  • Save SimonMarquis/5c3fecbaab930bbe0b68 to your computer and use it in GitHub Desktop.
Save SimonMarquis/5c3fecbaab930bbe0b68 to your computer and use it in GitHub Desktop.
file=$(date +%Y.%m.%d-%H.%M.%S).mp4 \
&& path="/sdcard/$file" \
&& time=${1-30} \
&& bitrate=${2-20000000} \
&& adb shell screenrecord --time-limit "$time" --bit-rate "$bitrate" "$path" \
&& echo "Success" \
&& echo "Uploading..." \
&& adb pull "$path" \
&& adb shell rm "$path" \
&& echo "Screencapture saved at $(pwd)/$file" \
|| echo "Screencapture failed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment