-
Notifications
You must be signed in to change notification settings - Fork 14
/
screenRecord.sh
executable file
·41 lines (34 loc) · 1.08 KB
/
screenRecord.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Created by Sujay Davalgi
#
# Records the activities in the screen of the selected device and stores them in the device sd-card
#
# Usage: ./screenRecord.sh [<filename>]
# Command line Arguments (Optional):
# $1 - Input the file name
# If the filename is not provided, it will prompt to enter the filename
. ./library/mainFunctions.sh
. ./library/textFormatting.sh
. ./library/deviceOperations.sh
. ./library/logFunctions.sh
if [ $# -lt 1 ]; then
pbold "\n Enter the Video File name : "
read fileName
else
fileName="$1"
fi
getDeviceChoice
displaySelectedDevice $deviceSerial
if [ $( isAdbDevice $deviceSerial ) == "true" ]; then
#if [ "$( isDeviceBuildDevKey $deviceSerial )" == "true" ]; then
fileName=`echo $( getFormatedFileName $deviceSerial ${fileName} )`
echo -e -n " Your video will be saved in ${RecordFolder} as : ${fileName}.mp4\n\n"
#adb -s $deviceSerial wait-for-device root
#sleep 1s
recordDeviceVideo $deviceSerial ${RecordFolder} ${fileName}
#else
# echo -e -n " Device doesnot support root access\n"
#fi
else
echo -e -n " Device is not in adb mode\n"
fi