morristech
7/2/2019 - 3:58 AM

Bash script to take screen-record on android and export to for Mac Desktop

Bash script to take screen-record on android and export to for Mac Desktop

#! /bin/bash  
adb shell screenrecord  --time-limit 12 /sdcard/demo.mp4

dir=~/Desktop/  
curr=`date "+%Y-%m-%d %H:%M:%S"`  
name=${dir}"screenrecord"${curr}".mp4"  
echo "${name}"  
adb pull /sdcard/demo.mp4 "$name"
adb shell rm /sdcard/demo.mp4