diff --git a/README.md b/README.md index f1b24c5..64b931a 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,17 @@ The decompile-apk tool consists of some scripts and different tools, it can prov ![classyshark](screenshot/classyshark.png) +* bytecode-viewer + +![bytecode-viewer](screenshot/bytecode-viewer.png) + ## Tools * [Apktool](https://github.com/iBotPeaches/Apktool) : v2.4.1 * [dex2jar](https://github.com/pxb1988/dex2jar) : v2.1 * [jd-gui](https://github.com/java-decompiler/jd-gui) : v1.6.6 * [jadx](https://github.com/skylot/jadx) : v1.1.0 * [android-classyshark](https://github.com/google/android-classyshark) : v8.2 +* [bytecode-viewer](https://github.com/Konloch/bytecode-viewer) : v2.9.22 ## Platforms * Mac @@ -42,6 +47,9 @@ sh jadx-apk.sh *.apk # using classyshark to decompile apk sh classyshark-apk.sh *.apk +# using bytecode-viewer to decompile apk +sh bytecode-viewer.sh *.apk + ``` ## Summary @@ -67,6 +75,13 @@ sh classyshark-apk.sh *.apk * disadvantage * resource files partially missing +* bytecode-viewer + * advantage + * support apk, dex, jar, and so on + * better visual feedback + * disadvantage + * analyse file slower + ## Todo * more decompile tools * support decompile dex/aar/jar files diff --git a/bytecode-viewer.sh b/bytecode-viewer.sh new file mode 100755 index 0000000..f35a5ba --- /dev/null +++ b/bytecode-viewer.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# 校验参数合法性 +source util.sh +check $1 + +# 得到新的目录 +newfoldername=${foldername}"-bytecodeviewer" +rm -rf $foldername + +if [ ! -d "$newfoldername" ]; + then + mkdir $newfoldername +fi + +# 切换到创建的目录 +cd $newfoldername + +# 打印该目录的路径 +echo `pwd` + +# 通过ClassyShark查看apk文件 +echo "View the decompile file" + +# 执行ClassyShark命令 +#java -jar ../../tools/bytecode-viewer/Bytecode-Viewer.jar -i $absolutename -o . -t all +java -jar ../../tools/bytecode-viewer/Bytecode-Viewer.jar \ No newline at end of file diff --git a/decompile-apk.sh b/decompile-apk.sh index 7b1b14c..e4b7a17 100755 --- a/decompile-apk.sh +++ b/decompile-apk.sh @@ -10,11 +10,12 @@ function input() { echo "1: using apktool/dex2jar/jd-gui to decompile apk" echo "2: using ClassyShark to decompile apk" echo "3: using jadx to decompile apk" + echo "4: using bytecode-viewer to decompile apk" echo "q: exit" fi - #echo "Please input your choice(1, 2, 3):" - read -p "Please input your choice(1, 2, 3):" input + #echo "Please input your choice(1, 2, 3, 4):" + read -p "Please input your choice(1, 2, 3, 4):" input case $input in 1) @@ -29,6 +30,10 @@ function input() { ## 执行jadx-apk命令 sh jadx-apk.sh $arg ;; + 4) + ## 执行bytecode-viewer-apk命令 + sh bytecode-viewer.sh $arg + ;; q) ## 退出命令 exit diff --git a/screenshot/bytecode-viewer.png b/screenshot/bytecode-viewer.png new file mode 100644 index 0000000..9b51424 Binary files /dev/null and b/screenshot/bytecode-viewer.png differ diff --git a/tools/bytecode-viewer/Bytecode-Viewer.jar b/tools/bytecode-viewer/Bytecode-Viewer.jar new file mode 100644 index 0000000..d6fe85b Binary files /dev/null and b/tools/bytecode-viewer/Bytecode-Viewer.jar differ