In android the native programming language for programming is Java. In our computer Java run into of Java Virtual Machine. The problem is that android devices doesn’t have resources as PCs. Therefore the android team design alternative virtual machine to run android application Java codes on it. So the Dalvik VM was born.

Untitled

<aside> 💡 classes.dex limitation: Each classes.dex can contain 65535 method. If application has more methods the we face of multi-dexing.

</aside>

Untitled

Untitled

classes.dex file type

The file type classes.dex file is:

Untitled

When investigate with hex editor on this file you find out it’s not compressed file and contains Java codes signature.

File type of classes.dex files.

File type of classes.dex files.

Java classes used in classes.dex file. It’s represent that  this file isn’t compressed.

Java classes used in classes.dex file. It’s represent that this file isn’t compressed.

You see raw strings in classes.dex file.

You see raw strings in classes.dex file.

To decompiling dex file we can use android studio build tool names dexdump . This tool locate on Android/Sdk/build-tools/[SDK Version].

Untitled

The code you see here is called Smali code which is an intermediate language between Java and Dalvik VM.

What is Odex(Optimized Dex)

It’s optimized version of dex classes. You can convert Odex to dex easily.