notishell / smali

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

It seems a bug. #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In file HeaderItem.java:
 private static final int BIG_ENDIAN = 0x78562312;

I think the BIG_ENDIAN should be 0x78564312. 
Another Problem:
My classes.dex file is big endian, and baksmali can decompile it.

Original issue reported on code.google.com by chenxion...@gmail.com on 7 Sep 2012 at 12:17

GoogleCodeExporter commented 9 years ago
Yes, that looks like a bug. Although it should be 0x78563412, not 0x78564312 :)

However, despite this, smali does not currently support big endian dex files

Original comment by jesusfreke@jesusfreke.com on 7 Sep 2012 at 4:50

GoogleCodeExporter commented 9 years ago
The attachment is one of my classes.dex files, the  endianTag is
0x78563412. However, the file seems little endian, I am confused. Also,
baksmali can decompile it correctly to smali code.

Original comment by chenxion...@gmail.com on 8 Sep 2012 at 4:56

GoogleCodeExporter commented 9 years ago
If you're looking at it in a hex editor, the bytes for a little endian tag will 
be:

78 56 34 12

Which, when read as a little endian integer, is 0x12345678

And obviously opposite, for a big endian file.

Original comment by jesusfreke@jesusfreke.com on 8 Sep 2012 at 5:05

GoogleCodeExporter commented 9 years ago
Thank you, I got it:)

Original comment by chenxion...@gmail.com on 8 Sep 2012 at 5:13

GoogleCodeExporter commented 9 years ago

Original comment by jesusfreke@jesusfreke.com on 16 Sep 2012 at 7:18