Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How it is possible that .apk do not contain classes.dex but works?

I've downloaded .apk and trying to unpack it with d2j-dex2jar but get

com.googlecode.dex2jar.DexException: java.io.IOException: can't find classes.dex in the zip

If try look inside using usual file archiver, there is actually no classes.dex

How it is possible ? App is fully functional by the way.

like image 541
diimdeep Avatar asked Nov 10 '13 08:11

diimdeep


1 Answers

If dex-preoptimization is enabled (it's enabled by default in user builds), an .odex file (Email.odex for instance, just next to Email.apk) will be generated from the classes.dex and the original classes.dex is stripped from the apk.

Edit: Another way to get the .dex is to use APKTool to extract the .dex you can use this from commandline. here is a link:

https://code.google.com/p/android-apktool/downloads/list

like image 82
Hounge Avatar answered Oct 16 '22 23:10

Hounge