smali icon indicating copy to clipboard operation
smali copied to clipboard

Regenerate odex from smali file?

Open peacherwu opened this issue 7 years ago • 1 comments

I get it the baksmali can convert odex to smali, yet is it possible to recover the exact original "odex" file backward? I did a "baksmali.jar x" and then a "smali.jar a", but the final .dex file is very different from the initial .odex file.

peacherwu avatar Aug 24 '17 06:08 peacherwu

you probably asked baksmali to deodex the odex file, which is why it is very different. baksmali/smali might work on an odex file without deodex if you give smali the exact api level/art version and you don't pass in the deodex command line option. (JF knows this for certain. i never use the smali tools.)

but why do you want that? do you realize that odexed smali would include for example offsets into vtables not included in the file where you would hope to find the names of virtual methods at their call site? i doubt you would be able to make sense of anything in an odex disassembly.

Lanchon avatar Sep 04 '17 01:09 Lanchon