晚上好,我知道这个主题在 StackOverFlow 上很常见,但我的问题有点不同,我在整个 WEB 上找不到任何解决方案!;)
所以这是我的问题:
“允许 Apktool 反编译应用程序的构建要求是什么(在 Eclypse 上)?”
我做了一些测试,但找不到任何规则......例如,我构建了一个空应用程序(我刚刚创建它并将其导出到 apk 文件中),构建选项是:
最低:API 14,Android 4.0
目标:API 14,Android 4.0
编译:API 14,Android 4.0
而且我无法反编译apk...无论如何,我无法反编译我的任何应用程序!我必须在构建选项中进行哪些更改?我在 Apktool 1.4.3 和 2.0.0 上进行了测试,而且 proguard 没有被激活。此链接表示构建高于 21.1.1 的版本可能有问题,但它已在 ApkTool 2.0.0 中修复... https://code.google.com/p/android-apktool/issues/detail?id =680
错误日志:
对于 ApkTool 1.4.3:
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
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 2.0.0 :
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tous droits r‚serv‚s.
C:\Users\user\Desktop\adt-bundle-windows-x86_64-201407020\AndroidMultitool_3.5.3\AndroidMultitool>cd C:\Users\user\Desktop\adt-bundle-windows-x86_64-201407020\AndroidMultitool_3.5.3\AndroidMultitool\Program_Files
C:\Users\user\Desktop\adt-bundle-windows-x86_64-201407020\AndroidMultitool_3.5.3\AndroidMultitool\Program_Files>apktool d C:\Users\user\Desktop\adt-bundle-windows-x86_64-201407020\AndroidMultitool_3.5.3\AndroidMultitool\Files\tes1.apk -o C:\Users\user\Desktop\adt-bundle-windows-x86_64-201407020\AndroidMultitool_3.5.3\AndroidMultitool\Decompiled_apk\tes1
I: Using Apktool 2.0.0-RC2 on tes1.apk
I: Loading resource table...
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\user\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
C:\Users\user\Desktop\adt-bundle-windows-x86_64-201407020\AndroidMultitool_3.5.3\AndroidMultitool\Program_Files>W: **Could not decode attr value**, using undecoded value instead: ns=android, name=showAsAction, value=0x00000000
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030119
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:60)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:47)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:45)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:49)
at brut.androlib.res.data.value.ResBagValue.serializeToResValuesXml(ResBagValue.java:41)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:564)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:327)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:123)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:170)
at brut.apktool.Main.main(Main.java:86)
感谢所有愿意帮助我的人:)我爱你们!