-
Notifications
You must be signed in to change notification settings - Fork 14
/
pullApks.sh
executable file
·34 lines (29 loc) · 915 Bytes
/
pullApks.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
#!/bin/bash
# Created by Sujay Davalgi
#
# Searches and prompts to chose among all the matching apk
# And pulls the selected apk from device and stored in the local folder configured
#
# Usage: ./pullApks.sh [<apk name>]
# Command line Arguments (Optional):
# $1 - File name to be saved as
# If file name not specified, it will later prompt to provide the filename
# No need to give the extension for the screenshot and bugreport
. ./library/mainFunctions.sh
. ./library/textFormatting.sh
. ./library/deviceOperations.sh
. ./library/apkOperations.sh
if [ $# -lt 1 ]; then
pbold "\n Enter the APK name : "
read APKname
else
APKname="$1"
fi
getDeviceChoice
displaySelectedDevice $deviceSerial
if [ "$( isAdbDevice $deviceSerial )" == "true" ]; then
#TODO: check for rooted device before performing the pull action
apkOperations $deviceSerial ${APKname} "pull"
else
echo " Device is not in 'adb' mode"
fi