Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected top level exception #49

Closed
JesusFreke opened this issue Apr 1, 2015 · 14 comments
Closed

unexpected top level exception #49

JesusFreke opened this issue Apr 1, 2015 · 14 comments

Comments

@JesusFreke
Copy link
Owner

Original issue 6 created by JesusFreke on 2009-09-01T16:52:47.000Z:

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.

@JesusFreke
Copy link
Owner Author

Comment #1 originally posted by JesusFreke on 2009-09-01T16:54:32.000Z:

sorry i forgot my syntax used;

java -jar baksmali-0.95.jar classes.dex

@JesusFreke
Copy link
Owner Author

Comment #2 originally posted by JesusFreke on 2009-09-02T03:17:47.000Z:

Hmm. that doesn't look right. I'll take a look at it. thanks!

@JesusFreke
Copy link
Owner Author

Comment #3 originally posted by JesusFreke on 2009-09-04T01:55:09.000Z:

<empty>

@JesusFreke
Copy link
Owner Author

Comment #4 originally posted by JesusFreke on 2009-09-11T03:34:11.000Z:

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

@JesusFreke
Copy link
Owner Author

Comment #5 originally posted by JesusFreke on 2009-09-11T03:44:26.000Z:

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 :)

@JesusFreke
Copy link
Owner Author

Comment #6 originally posted by JesusFreke on 2009-09-11T04:51:01.000Z:

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)

@JesusFreke
Copy link
Owner Author

Comment #7 originally posted by JesusFreke on 2009-09-11T13:32:55.000Z:

50 4B 03 04 14 00 08 00

@JesusFreke
Copy link
Owner Author

Comment #8 originally posted by JesusFreke on 2009-09-11T13:33:34.000Z:

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

@JesusFreke
Copy link
Owner Author

Comment #9 originally posted by JesusFreke on 2009-09-13T19:17:56.000Z:

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

@JesusFreke
Copy link
Owner Author

Comment #10 originally posted by JesusFreke on 2009-09-13T19:22:40.000Z:

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.

@JesusFreke
Copy link
Owner Author

Comment #11 originally posted by JesusFreke on 2009-09-13T22:27:13.000Z:

Can you try this version of baksmali, and see if it works for you?

http://smali.googlecode.com/files/baksmali-0.97b.jar

@JesusFreke
Copy link
Owner Author

Comment #12 originally posted by JesusFreke on 2009-09-13T22:32:04.000Z:

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.

@JesusFreke
Copy link
Owner Author

Comment #13 originally posted by JesusFreke on 2009-09-13T22:32:31.000Z:

<empty>

@JesusFreke
Copy link
Owner Author

Comment #14 originally posted by JesusFreke on 2009-09-22T03:05:17.000Z:

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant