forked from alexzaitsev/apk-dependency-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·21 lines (19 loc) · 825 Bytes
/
run.sh
File metadata and controls
executable file
·21 lines (19 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
if [ $# -lt 3 ]; then
echo "This script requires the next parameters:";
echo "- absolute path to apk file";
echo "- filter (can be a package name or 'nofilter' string)";
echo "- true or false (where true means that you want to see inner classes on your graph)";
echo "Examples:";
echo "./run.sh full/path/to/the/apk/app-release.apk com.example.test true";
echo "./run.sh full/path/to/the/apk/app-release.apk nofilter false";
exit 1;
fi
fileName="$1"
xbase=${fileName##*/}
xpref=${xbase%.*}
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
outPath=${dir}"/output/"${xpref}
jsonPath=${dir}"/gui/analyzed.js"
eval "java -jar ${dir}'/lib/apktool_2.2.0.jar' d ${fileName} -o ${outPath} -f"
eval "java -jar ${dir}'/build/jar/apk-dependency-graph.jar' -i ${outPath} -o ${jsonPath} -f $2 -d $3"