markcox / smali

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

baksmali exeption #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
unknown opcode encountered and than exeption

What is the exact smali/baksmali command that you ran?
java -Xmx1024m -jar baksmali_1.4.0.jar -a 15 classes.dex

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

What is the airspeed velocity of an unladen swallow?
~10 m/s

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

unknown opcode encountered - ff08. Treating as nop.

UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.Util.ExceptionWithContext: regCount does not match the number of 
arguments of the method
        at org.jf.dexlib.Util.ExceptionWithContext.withContext(ExceptionWithContext.java:54)
        at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(InstructionIterator.java:91)
        at org.jf.dexlib.CodeItem.readItem(CodeItem.java:154)
        at org.jf.dexlib.Item.readFrom(Item.java:77)
        at org.jf.dexlib.OffsettedSection.readItems(OffsettedSection.java:48)
        at org.jf.dexlib.Section.readFrom(Section.java:143)
        at org.jf.dexlib.DexFile.<init>(DexFile.java:431)
        at org.jf.baksmali.main.main(main.java:269)
Caused by: java.lang.RuntimeException: regCount does not match the number of 
arguments of the method
        at org.jf.dexlib.Code.Format.Instruction35c.checkItem(Instruction35c.java:160)
        at org.jf.dexlib.Code.Format.Instruction35c.<init>(Instruction35c.java:93)
        at org.jf.dexlib.Code.Format.Instruction35c$Factory.makeInstruction(Instruction35c.java:167)
        at org.jf.dexlib.Code.InstructionIterator.IterateInstructions(InstructionIterator.java:82)
        ... 6 more
Error occured at code address 4
code_item @0x3fc10

Original issue reported on code.google.com by mr.sta...@gmail.com on 12 Nov 2012 at 12:12

GoogleCodeExporter commented 9 years ago
version 1.4.4, really? The latest released version is 1.4.0, and 1.4.1 is what 
is currently in source :)

Can you provide a sample dex file that causes this crash? I don't have enough 
info to reproduce or fix.

Original comment by jesusfreke@jesusfreke.com on 12 Nov 2012 at 5:54

GoogleCodeExporter commented 9 years ago
My mistake, used version 1.4.0! :)
Here file extracted from app\ContactsProvider.apk
Firmaware - LeWa OS for Lenovo A750 (CPU: MTK6575)
Firmware link (ZIP for CWM): 
http://static.lewatek.com/yun/Lenovo_A750/LeWa_Lenovo_A750_ROM_12.11.09_23c91.zi
p

Original comment by mr.sta...@gmail.com on 13 Nov 2012 at 10:50

Attachments:

GoogleCodeExporter commented 9 years ago
This dex file uses the "extended" opcodes that were briefly present in dalvik, 
but never fully implemented/supported. I removed support for these opcodes in 
baksmali in 1.4.0, because they were never "supported". I'm a bit surprised 
there's anything out there that is actually using them.

In any case, try baksmali 1.3.6, it should work fine.

Original comment by jesusfreke@jesusfreke.com on 14 Nov 2012 at 7:51

GoogleCodeExporter commented 9 years ago
Is there any chance to get them back? Some apps embed latest baksmali and don't 
work correctly. :(

Original comment by mr.sta...@gmail.com on 14 Nov 2012 at 9:59

GoogleCodeExporter commented 9 years ago
I'm thinking I might add them back, but gate them with a debug (i.e. capital) 
flag.

Original comment by jesusfreke@jesusfreke.com on 14 Nov 2012 at 11:06

GoogleCodeExporter commented 9 years ago
Support for these was added back, in 1.4.1. You have to use the -J option for 
smali and baksmali when working with dex files that uses these jumbo opcodes.

Original comment by jesusfreke@jesusfreke.com on 19 Nov 2012 at 9:23