forprevious / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Decompiling error - ArrayIndexOutOfBounds #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Problem Description :
Error while decompiling a SystemUI.apk file. Tried decompiling directly wt 
Apktool and also through baksmali but both giving similar error. It seems 
related to an arrayindexoutofbounds error. Description of problem listed below.

Smali/Baksmali command used :
1. apktool d -f SystemUI.apk
2. java -jar baksmali-1.2.8.jar -x classes.dex

Version of smali/baksmali :
v1.2.8

Please provide any additional information below: error messages, symptoms :
Error occured while disassmebling class 
Lcom.android.systemui.statusbar.preference.StatusBarPreference; - skipping class
java.lang.ArrayIndexOutOfBoundsException: 8
        at org.jf.dexlib.Debug.DebugInstructionIterator.DecodeInstructions(DebugInstructionIterator.java:199)
        at org.jf.baksmali.Adaptors.MethodDefinition.addDebugInfo(MethodDefinition.java:512)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:299)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:299)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:323)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:292)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:136)
        at.org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:201)
        at.org.jar.baksmali.main.main(main.java:282)

Original issue reported on code.google.com by maxyu...@gmail.com on 19 Sep 2011 at 3:13

GoogleCodeExporter commented 9 years ago
Thanks for the bug report! I'll take a look at it this evening.

What ROM is this from?

Original comment by jesusfreke@jesusfreke.com on 19 Sep 2011 at 5:08

GoogleCodeExporter commented 9 years ago

Original comment by jesusfreke@jesusfreke.com on 19 Sep 2011 at 5:08

GoogleCodeExporter commented 9 years ago
I'm not sure. I just got the files fm a friend who asked my help to tweak some 
of the smali scripts. But I have attached the apk for your testing purposes.

Original comment by maxyu...@gmail.com on 20 Sep 2011 at 3:22

Attachments:

GoogleCodeExporter commented 9 years ago
Is there any chance that your friend modified the method it's crashing on 
before giving it to you? I haven't looked at the apk yet, but my guess is that 
this is a problem with the apk itself.

Original comment by jesusfreke@jesusfreke.com on 20 Sep 2011 at 3:26

GoogleCodeExporter commented 9 years ago
I'm not sure. The file decompile almost all correctly except for those few 
smalis which gives those errors.

Original comment by maxyu...@gmail.com on 20 Sep 2011 at 3:38

GoogleCodeExporter commented 9 years ago
There is definitely some weirdness with that apk. The debug information for the 
methods that it is erroring on is invalid, and makes no sense. The best you can 
do in this case is to use the -b option to turn off debug info.

Original comment by jesusfreke@jesusfreke.com on 21 Sep 2011 at 3:15