vaginessa / smali

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

Field index out of bounds #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
Software appears to have intentional errors to attempt to prevent analysis, two 
classes throw Type index out of bounds errors

What is the exact smali/baksmali command that you ran?
baksmali filename.apk

What version of smali/baksmali are you using? What rom are you working
from?

2.0b4, also attempted latest 1.X release which failed as well. Roms suck.

What is the airspeed velocity of an unladen horse?

horses dont fly

Please provide any additional information below: error messages, symptoms,
etc.

Error occured while disassembling class LbJ; - skipping class
org.jf.util.ExceptionWithContext: Field index out of bounds: 4210
    at org.jf.dexlib2.dexbacked.DexBackedDexFile.getFieldIdItemOffset(DexBackedDexFile.java:180)
    at org.jf.dexlib2.dexbacked.reference.DexBackedFieldReference.<init>(DexBackedFieldReference.java:46)
    at org.jf.dexlib2.dexbacked.reference.DexBackedReference.makeReference(DexBackedReference.java:51)
    at org.jf.dexlib2.dexbacked.instruction.DexBackedInstruction21c.getReference(DexBackedInstruction21c.java:54)
    at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.writeReference(InstructionMethodItem.java:339)
    at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.writeTo(InstructionMethodItem.java:113)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:180)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:269)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:104)
    at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:174)
    at org.jf.baksmali.baksmali.access$000(baksmali.java:46)
    at org.jf.baksmali.baksmali$2.call(baksmali.java:100)
    at org.jf.baksmali.baksmali$2.call(baksmali.java:98)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)

Error occured while disassembling class Lcom.lewa.launcher.Workspace; - 
skipping class
org.jf.util.ExceptionWithContext: Type index out of bounds: 8302
    at org.jf.dexlib2.dexbacked.DexBackedDexFile.getTypeIdItemOffset(DexBackedDexFile.java:173)
    at org.jf.dexlib2.dexbacked.DexBackedDexFile.getType(DexBackedDexFile.java:229)
    at org.jf.dexlib2.dexbacked.reference.DexBackedTypeReference.getType(DexBackedTypeReference.java:50)
    at org.jf.baksmali.Adaptors.ReferenceFormatter.writeReference(ReferenceFormatter.java:53)
    at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.writeReference(InstructionMethodItem.java:339)
    at org.jf.baksmali.Adaptors.Format.InstructionMethodItem.writeTo(InstructionMethodItem.java:113)
    at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:180)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefinition.java:269)
    at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:104)
    at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:174)
    at org.jf.baksmali.baksmali.access$000(baksmali.java:46)
    at org.jf.baksmali.baksmali$2.call(baksmali.java:100)
    at org.jf.baksmali.baksmali$2.call(baksmali.java:98)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)

Original issue reported on code.google.com by jc...@cunninglogic.com on 13 Jun 2013 at 2:47

Attachments:

GoogleCodeExporter commented 9 years ago
This looks like it is working properly to me. This apk contains an invalid 
class, which baksmali skips. This is the same behavior used by the dalvik 
verifier - meaning the class that was skipped wouldn't be available during 
execution anyway.

Original comment by jesusfreke@jesusfreke.com on 14 Jun 2013 at 1:54