smali – 反编译.apk时apkbeol错误

前端之家收集整理的这篇文章主要介绍了smali – 反编译.apk时apkbeol错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我通过apktool反编译.apk时出现此错误.虽然它并没有出现在所有apk文件中.
我也安装了这三个框架:
framework-res.apk
systemUI.apk
twframework-res.apk

我尝试了两个不同版本的framework-res.apk,但它没有帮助.
我该怎么办?

谢谢

I: Baksmaling...
Error occured while disassembling class Ldxoptimizer.con; - skipping class
java.io.IOException: The parameter is incorrect
        at java.io.WinNTFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:883)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:176)
        at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:49)
        at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:34)
        at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:74)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:89)
        at brut.apktool.Main.cmdDecode(Main.java:146)
        at brut.apktool.Main.main(Main.java:77)
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\ShayanK\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value,using undecoded value instead: ns=android,name=
hardwareAccelerated,value=0xffffffff
W: Could not decode attr value,value=0xffffffff
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value,name=
exitFadeDuration,value=0x00000190
W: Could not decode attr value,name=
alpha,value=0x3f333333
W: Could not decode attr value,name=
previewImage,value=0x7f020001
W: Could not decode attr value,value=0x00000000
W: Could not decode attr value,value=0x3f000000
W: Could not decode attr value,value=0x3e99999a
W: Could not decode attr value,value=0x7f020002
W: Could not decode attr value,name=
showAsAction,value=0x7f020001
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x01030119
        at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
        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(ResReferen
ceValue.java:62)
        at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResRefe
renceValue.java:46)
        at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResSca
larValue.java:44)
        at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(Re
sStyleValue.java:48)
        at brut.androlib.res.data.value.ResBagValue.serializeToResValuesXml(ResB
agValue.java:40)
        at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResour
ces.java:440)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243
)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
        at brut.apktool.Main.cmdDecode(Main.java:146)
        at brut.apktool.Main.main(Main.java:77)

解决方法

首先,请确保您已将apktool升级到最新版本,您可以按照指令 here进行安装.

然后,您需要升级框架文件.当我试图反编译一些apk文件时,它会显示这样的错误

Exception in thread “main” brut.androlib.err.UndefinedResObject:
resource spec: 0x01010462

它是由你的框架文件引起的,不支持最新的android版本,我通过以下方式解决了问题:

>删除原始framwork文件,我的位于

I: Loading resource table from file: /Users/csc/Library/apktool/framework/1.apk

>获取一个合适的框架apk

拿我的手机(nexus 5,android 5.1)为例,你可以在/ system / framework /中找到框架apk,它叫做framework-res.apk.使用adb pull将其复制到您的计算机上,将其重命名为1.apk,将其复制到您的框架文件目录中.
>再试一次,问题解决了.

here是详细的原点教程.

原文链接:https://www.f2er.com/android/308641.html

猜你在找的Android相关文章