pombreda / smali

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

unexpected top level exception #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
 mac os 10.4 java 5 //no java 6 for 10.4 :(//
 use baksmali on the classes.dex from phone.apk

instead of output i get;

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: The magic value is not the expected value
        at org.jf.dexlib.HeaderItem.readItem(HeaderItem.java:72)
        at org.jf.dexlib.Item.readFrom(Item.java:71)
        at org.jf.dexlib.DexFile.<init>(DexFile.java:273)
        at org.jf.baksmali.main.main(main.java:140)

using the latest version .95

i had used baksmali once before on the dex from mms.apk, i seem to feel
there was an issue then as well but it was overcome. unfortunately i can
not remember.

Original issue reported on code.google.com by gwydionw...@gmail.com on 1 Sep 2009 at 4:52

Attachments:

GoogleCodeExporter commented 9 years ago
sorry i forgot my syntax used;

java -jar baksmali-0.95.jar classes.dex

Original comment by gwydionw...@gmail.com on 1 Sep 2009 at 4:54

GoogleCodeExporter commented 9 years ago
Hmm. that doesn't look right. I'll take a look at it. thanks!

Original comment by JesusFre...@gmail.com on 2 Sep 2009 at 3:17

GoogleCodeExporter commented 9 years ago

Original comment by JesusFre...@gmail.com on 4 Sep 2009 at 1:55

GoogleCodeExporter commented 9 years ago
I can't reproduce this issue. I just tried the same thing on a mac-mini, with 
java 5,
and it worked fine. Are you sure you weren't trying to run baksmali on an odex 
file?
.95 doesn't support that, but .96 does

Original comment by JesusFre...@gmail.com on 11 Sep 2009 at 3:34

GoogleCodeExporter commented 9 years ago
that is strange, it happens to me each time. but, not with the same apk from a
previous rom. perhaps the apk i was trying is secretly odex? i didn't see 
anything,
the file name was just dex. thanks for trying to figure it out though :)

Original comment by gwydionw...@gmail.com on 11 Sep 2009 at 3:44

GoogleCodeExporter commented 9 years ago
Hmm. Is it from a donuty type new rom? They might have updated the dex 
signature to a
new version. Can you post a hex dump of the first 8 bytes of the file? (that's 
the
magic value it's talking about) 

Original comment by JesusFre...@gmail.com on 11 Sep 2009 at 4:51

GoogleCodeExporter commented 9 years ago
50 4B 03 04 14 00 08 00

Original comment by gwydionw...@gmail.com on 11 Sep 2009 at 1:32

GoogleCodeExporter commented 9 years ago
sorry, no it's not a new one. although i've been thinking about trying one out 
:-D
it's from soulifes rogers 2.9.2

Original comment by gwydionw...@gmail.com on 11 Sep 2009 at 1:33

GoogleCodeExporter commented 9 years ago
That's the header for the apk file itself. You have to extract out the 
classes.dex
file and run baksmali on that

Original comment by JesusFre...@gmail.com on 13 Sep 2009 at 7:17

GoogleCodeExporter commented 9 years ago
yes that is what i was doing, i just checked the header of the wrong file for 
you. i
will get the bytes from the dex later on and post them. but it is a dex file 
from the
browser.apk that is not working.

Original comment by gwydionw...@gmail.com on 13 Sep 2009 at 7:22

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Doh! I just realized that you attached the classes.dex file you were trying to 
use. I
hadn't noticed that before. sorry :)

I took a look at it, and based on the header value, it seems like a really old
classes.dex file, like from pre-release android. baksmali definitely won't work 
on an
old file like that.

Original comment by JesusFre...@gmail.com on 13 Sep 2009 at 10:32

GoogleCodeExporter commented 9 years ago

Original comment by JesusFre...@gmail.com on 13 Sep 2009 at 10:32

GoogleCodeExporter commented 9 years ago
ok, i've switched to a more competent operating system anyway. ubuntu, although 
i
still have ppc architecture so i can't use the sdk tools :(

Original comment by gwydionw...@gmail.com on 22 Sep 2009 at 3:05