pombreda / smali

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

Can't baksmali Froyo odexes #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ baksmali core.odex 

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: bad magic value: 64 65 79 0a 30 33 36 00
    at org.jf.dexlib.DexFile.<init>(DexFile.java:382)
    at org.jf.baksmali.main.main(main.java:249)
$ baksmali -v
baksmali 1.2.2 (http://smali.googlecode.com)
Copyright (C) 2010 Ben Gruver (JesusFreke@JesusFreke.com)
BSD license (http://www.opensource.org/licenses/bsd-license.php)

I've tried several odexes from Nexus's Froyo - exactly the same error for 
every file. I'm attaching core.odex .

Original issue reported on code.google.com by Brut.alll on 22 May 2010 at 9:47

Attachments:

GoogleCodeExporter commented 9 years ago
I can confirm this as well. Every file gives the same error

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: bad magic value: 64 65 79 0a 30 33 36 00
        at org.jf.dexlib.DexFile.<init>(DexFile.java:382)
        at org.jf.baksmali.main.main(main.java:249)

Original comment by JrEE...@gmail.com on 23 May 2010 at 12:09

GoogleCodeExporter commented 9 years ago
same here *'d

Original comment by defconoii on 23 May 2010 at 12:13

GoogleCodeExporter commented 9 years ago
I can also confirm this exact same error for the Froyo odexes.

Original comment by PeterAlf...@gmail.com on 23 May 2010 at 3:23

GoogleCodeExporter commented 9 years ago
Its possible to hex edit the .odex files in 2.2 and change 64 65 79 0a 30 33 36 
00 to 
64 65 79 0a 30 33 35 00
Which will continue to deodex but get different errors
Example: 1 of 10 errors (core.odex on 2.2) Same file as above

Error occured while disassembling class java.nio.ReadOnlyCharArrayBuffer - skipp
ing class
java.lang.RuntimeException: regCount does not match the number of arguments of t
he method
        at org.jf.dexlib.Code.Format.Instruction35c.checkItem(Instruction35c.jav
a:149)
        at org.jf.dexlib.Code.Format.Instruction35c.<init>(Instruction35c.java:7
5)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeExecuteInline(Metho
dAnalyzer.java:3364)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodA
nalyzer.java:1034)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.jav
a:202)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefini
tion.java:290)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.ja
va:130)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition
.java:322)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDef
inition.java:307)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java
:136)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:187)
        at org.jf.baksmali.main.main(main.java:277)
Error while disassembling method Ljava/nio/channels/Channels$ByteChannelWriter;-
><init>(Ljava/io/OutputStream;Ljava/nio/charset/CharsetEncoder;I)V. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: Invalid register type (Conflict
ed) for register v1.
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.checkRegister(MethodAnalyz
er.java:3654)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.getAndCheckSourceRegister(
MethodAnalyzer.java:3638)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeIputIgetQuick(Metho
dAnalyzer.java:3426)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodA
nalyzer.java:1049)
        at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.jav
a:202)
        at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefini
tion.java:290)
        at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.ja
va:130)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition
.java:322)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeDirectMethods(ClassDefi
nition.java:291)
        at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java
:135)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:187)
        at org.jf.baksmali.main.main(main.java:277)
opcode: iput-object-quick
CodeAddress: 18
Method: Ljava/nio/channels/Channels$ByteChannelWriter;-><init>(Ljava/io/OutputSt
ream;Ljava/nio/charset/CharsetEncoder;I)V

Original comment by xeudo...@gmail.com on 23 May 2010 at 3:47

GoogleCodeExporter commented 9 years ago
I won't be able to take a look at this for several days at least. Depending on 
what
was changed in froyo, I may have to wait until the froyo source is released.

Original comment by JesusFr...@gmail.com on 23 May 2010 at 1:00

GoogleCodeExporter commented 9 years ago
The changes to support froyo have been pushed to the svn repo. I'm not ready to 
do a new release yet, but in the interim, you can grab the latest svn sources 
and make your own build :)

If you do try them, please respond to this issue and let me know if the changes 
worked for you or not.

Original comment by JesusFr...@gmail.com on 9 Jun 2010 at 1:48

GoogleCodeExporter commented 9 years ago
Working for me, thanks JF.

Original comment by steve.ko...@gmail.com on 9 Jun 2010 at 4:52