-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathscreenCapture.sh
More file actions
executable file
·34 lines (29 loc) · 939 Bytes
/
screenCapture.sh
File metadata and controls
executable file
·34 lines (29 loc) · 939 Bytes
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
#!/bin/bash
# Created by Sujay Davalgi
#
# Captures the screenshot of the selected device and saves the file in bugs folder
#
# Usage: ./screenCapture.sh [<file name>]
# Command line Arguments (Optional):
# $1 - Input the device serial
# If the serial number is not provided, it will display the list of attached devices to pick from
. ./library/mainFunctions.sh
. ./library/deviceOperations.sh
. ./library/logFunctions.sh
. ./library/deviceFileOperations.sh
getDeviceChoice
displaySelectedDevice $deviceSerial
if [ "$( isAdbDevice $deviceSerial )" == "true" ]; then
if [ $# -lt 1 ]; then
echo -e -n "${txtBld} Enter the Screenshot File name : ${txtRst}"
read fileName
echo
else
fileName="$1"
fi
fileName="`echo $( getFormatedFileName $deviceSerial ${fileName} )`"
echo -e -n " Your file will be saved in folder : ${myLogs}\n"
getScreenshot $deviceSerial ${fileName}
else
echo -e -n " Device is not in adb moden\n"
fi