notishell/smali

baksmali problem

Closed this issue · 8 comments

I'm trying to decompile the framework-res on the huawei Vitria but baksmali 
keeps reporting its not an odex'd apk

Exception in thread "main" org.jf.util.ExceptionWithContext: 
c:\apk\framework-res.odex is not an apk, dex file or odex file.
        at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:111)
        at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:54)
        at org.jf.baksmali.main.main(main.java:247)
this is 2.0

Original issue reported on code.google.com by lonniem...@gmail.com on 29 Oct 2013 at 12:26

What are the first 8 bytes of the file?

Since you are on windows, I suspect the \n character in the 8-byte magic value 
might have been translated to a \r\n at some point.

Original comment by jesusfreke@jesusfreke.com on 29 Oct 2013 at 10:31

  • Changed state: Pending
64 65 79 0A 30 33 36 00

Original comment by lonniem...@gmail.com on 29 Oct 2013 at 11:20

Weird. That is the correct magic value. I'm not sure why this might be 
happening.

Original comment by jesusfreke@jesusfreke.com on 29 Oct 2013 at 11:32

  • Changed state: Accepted
Can you post the offending odex file?

Original comment by jesusfreke@jesusfreke.com on 29 Oct 2013 at 11:38

  • Changed state: Pending
[deleted comment]
ok the framework-res-hwext right after the framework res(this one also does not 
deodex is very odd) the entire file has the odex

FF FF FF FF FF FF FF FF 28 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF

is this the problem, is this even fixable?

Original comment by lonniem...@gmail.com on 30 Oct 2013 at 12:21

Attachments:

did you see the file?

Original comment by lonniem...@gmail.com on 30 Oct 2013 at 12:35

I just realized, framework-res.apk and friends don't typically have a 
classes.dex file (and thus no corresponding odex file). I don't know about the 
other one you were asking about, but that framework-res.hwext.odex is 
completely bogus. I would think you can just delete those 2 odex files. 

Original comment by bgruv@google.com on 1 Nov 2013 at 9:19

  • Changed state: Done