Apktool反编译错误问题解决方法


在使用Apktool反编译时出现如下问题:


I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
        at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:491)
        at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)
        at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)
        at brut.androlib.Androlib.getResTable(Androlib.java:50)
        at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
        at brut.apktool.Main.cmdDecode(Main.java:146)
        at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
        at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
        at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
        at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:102)
        at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
        at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
        ... 8 more


问题原因是Apktool版本太低,使用新版本即可:


D:\Program Files\decompiler\apktool>apktool.bat d demo.apk -o demo
I: Using Apktool 2.0.3 on demo.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\hornsey\apktool\framework\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...

D:\Program Files\decompiler\apktool>


快速下载: Apktool 


你可能感兴趣的:(android,反编译,apktool)