Skip to content

Commit 1511728

Browse files
Updated readme documentation, fixed the help message, and moved the output-directory configuration to an option instead of a parameter
1 parent d0b1698 commit 1511728

2 files changed

Lines changed: 25 additions & 11 deletions

File tree

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,31 @@ To accomplish the goal of a full decompile we use these tools:
99
- Dex2Jar : Version 0.0.9.15
1010
- android-apktool : Version 1.5.2
1111
- JD-Core-Java : Version 1.2
12+
- Artistic Style (astyle) : Version 2.04
1213

1314

1415
Supported Platforms
1516
-------------------
16-
The tools has been built on Mac, but should work on all UNIX environments!
17+
The tools has been built on Mac, but most of it should work on all UNIX environments!
18+
Code formatting is not guaranteed to work on all platforms.
1719

1820
Usage
1921
-----
2022
```
21-
decompileAPK.sh <APK-file> [output-dir]
22-
Parameters:
23-
APK-file The first parameter is required to be a valid APK file!
24-
Output Dir The output directory is optional. If not set the
23+
usage: decompileAPK.sh [options] <APK-file>
24+
25+
options:
26+
-o,--output <dir> The output directory is optional. If not set the
2527
default will be used which is 'output' in the
2628
root of this tool directory.
29+
-f,--format Will format all Java files to be easier readable.
30+
However, use with CAUTION! This option might change
31+
line numbers!
32+
-p,--project Will generate a Gradle-based Android project for you
33+
-h,--help Prints this help message
34+
35+
parameters:
36+
APK-file A valid APK file is required as input
2737
```
2838

2939
Contributions
@@ -36,5 +46,6 @@ This tool has been released under the Apache License 2.0.
3646
- Dex2Jar is licensed under the Apache License 2.0.
3747
- android-apktool is licensed under the Apache License 2.0
3848
- JD-Core-Java is licensed under the MIT License
49+
- Artistic Style is licensed under the GNU Lesser General Public License Version 3
3950

4051
This project may be freely used for personal needs in a commercial or non-commercial environments.

decompileAPK.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,33 @@ function help
77
echo "decompileAPK -- Decompiles an APK to have both the APK source and resources (XML
88
, 9-patches,...) decompiled."
99
echo ""
10-
echo "usage: decompileAPK.sh [options] <APK-file> [output-dir]"
10+
echo "usage: decompileAPK.sh [options] <APK-file>"
1111
echo ""
1212
echo "options:"
13+
echo " -o,--output <dir> The output directory is optional. If not set the
14+
default will be used which is 'output' in the
15+
root of this tool directory."
1316
echo " -f,--format Will format all Java files to be easier readable.
1417
However, use with CAUTION! This option might change
1518
line numbers!"
1619
echo " -p,--project Will generate a Gradle-based Android project for you"
1720
echo " -h,--help Prints this help message"
1821
echo ""
1922
echo "parameters:"
20-
echo " APK-file The first parameter is required to be a valid APK file!"
21-
echo " Output Dir The output directory is optional. If not set the
22-
default will be used which is 'output' in the
23-
root of this tool directory."
23+
echo " APK-file A valid APK file is required as input"
2424
}
2525

2626
#Init values
2727
generateProject=false
2828
formatJava=false
29+
outputDir=
2930

3031
# Check all of the possible options
3132
while [[ "$1" == -* ]]; do
3233
case $1 in
34+
-o | --output ) shift
35+
outputDir=$1
36+
;;
3337
-p | --project ) generateProject=true
3438
;;
3539
-f | --format ) formatJava=true
@@ -43,7 +47,6 @@ done
4347

4448
# Read parameters
4549
apkfile=$1
46-
outputDir=$2
4750

4851
# Check a the minimum set of parameters is present. If not show help...
4952
if [ -z $apkfile ]

0 commit comments

Comments
 (0)