2014-06-06 114 views
6

我在通過apktool反編譯.apk時出現此錯誤。雖然它不會出現所有的apk文件。 我也有安裝這三個框架:apktool在反編譯時出錯.apk

framework-res.apk 
SystemUI.apk 
twframework-res.apk 

我嘗試了兩種不同版本的框架,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, using undecoded value instead: ns=android, name= 
hardwareAccelerated, value=0xffffffff 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
hardwareAccelerated, value=0xffffffff 
I: Regular manifest package... 
I: Decoding file-resources... 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
exitFadeDuration, value=0x00000190 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x3f333333 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
previewImage, value=0x7f020001 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x00000000 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x3f000000 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x3f000000 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x3e99999a 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
previewImage, value=0x7f020002 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x3f000000 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x3f000000 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
showAsAction, value=0x00000000 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
alpha, value=0x00000000 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
previewImage, value=0x7f020002 
W: Could not decode attr value, using undecoded value instead: ns=android, name= 
previewImage, 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) 

回答

7

首先,請確保您已升級apktool到最新版本,你可以按照指令here安裝它。

然後你需要升級你的框架文件。當我試圖反編譯一些apk文件,它會顯示像線程這

異常錯誤「主」 brut.androlib.err.UndefinedResObject: 資源規格:0x01010462

這是造成你的框架文件不支持最新的Android版本,我所解決的問題:

  1. 刪除起源framwork文件,該礦位於

I:從文件加載資源表:/Users/csc/Library/apktool/framework/1.apk

  • 得到適當的框架的apk

    以我的手機(nexus 5,android 5.1)爲例,您可以在/ system/framework /中找到框架apk,並將其命名爲framework-res.apk。使用adb pull將它複製到您的計算機上,將其重命名爲1.apk,將其複製到您的框架文件目錄中。

  • 再試一次,問題解決了。

    here是詳細的原點教程。