Skip to content

Commit e523a45

Browse files
committed
Script to search and kill the app process
1 parent 21b3a22 commit e523a45

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

killApk.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Created by Sujay Davalgi
4+
#
5+
# Stops the app
6+
#
7+
# Usage: ./killApk.sh [<search app string>]
8+
# Command line Arguments (Optional):
9+
# $1 - Input the apk search string
10+
# If the string is not provided, it will prompt the enter the apk string to search
11+
12+
. ./library/mainFunctions.sh
13+
. ./library/textFormatting.sh
14+
. ./library/deviceOperations.sh
15+
. ./library/deviceFileOperations.sh
16+
. ./library/apkOperations.sh
17+
18+
if [ $# -lt 1 ]; then
19+
pbold "\n Enter the apk string to search : "
20+
read APKname
21+
else
22+
APKname="$1"
23+
fi
24+
25+
getDeviceChoice
26+
displaySelectedDevice $deviceSerial
27+
28+
if [ "$( isAdbDevice $deviceSerial )" == "true" ]; then
29+
apkOperations $deviceSerial ${APKname} "kill"
30+
else
31+
echo -e " Device is not in 'adb' mode"
32+
fi

0 commit comments

Comments
 (0)