FROM:http://blog.csdn.net/whorus1/article/details/50427533
尝试使用apktool对apk进行反编译,遇到如下问题:
经检查后发现是由于apktool版本太老了导致,jdk1.7以后都需要使用1.5.2以上版本才行。
- Apktool 2.x (Versions after
1.5.2
)- Is Java 1.7 installed?
- Does executing java -version on command line / command prompt return 1.7?
- If not, please install Java 7 and make it the default.
下载地址:http://ibotpeaches.github.io/Apktool/
(此网址有最新的apktool下载链接
apk tool v2.2.2 的下载地址:https://connortumbleson.com/2017/01/23/apktool-v2-2-2-released/
)
更新后反编译成功:
使用方法:
$ apktool d test.apk
I: Using Apktool 2.0.2 on test.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: 1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
$ apktool b test
I: Using Apktool 2.0.2 on test
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
I: Copying unknown files/dir...
$