pombreda / smali

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

Error running under Windows (cr/lf issue) #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
Getting error when running under Windows.

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

What is the exact smali/baksmali command that you ran?
java -jar baksmali-1.2.2.jar -x file.odex

What version are you using?
1.2.2

Please provide any additional information below: error messages, symptoms,
etc.
Looks like under Windows it's generating crlf (0d 0a) instead of just lf (0a).

Original issue reported on code.google.com by son....@gmail.com on 20 Apr 2010 at 1:16

GoogleCodeExporter commented 9 years ago
I wasn't able to reproduce this on a windows xp machine. Can you open up the 
odex
file in a hex editor and check the first 8 bytes. They should be

64 65 79 0A 30 33 35 00 for an odex file
or
64 65 78 0A 30 33 35 00 for a dex file

Original comment by JesusFr...@gmail.com on 20 Apr 2010 at 1:50

GoogleCodeExporter commented 9 years ago
hmmm... i get 64 65 79 0d 0a 30 33 35

maybe my file extraction has written created the crlf line ending.

Original comment by son....@gmail.com on 20 Apr 2010 at 2:06

GoogleCodeExporter commented 9 years ago
I suspected that was what the problem was :)

Thanks!

Original comment by JesusFr...@gmail.com on 20 Apr 2010 at 2:14