I have some questions regarding dex files
- What is a
dexfile in Android? - How does dex work for Android?
- How are they used in debugging an Android app?
- Are they similar to java class files?
I need specific information please help on this and any real examples are welcome!
About the .dex File:
One of the most remarkable features of the
Dalvik Virtual Machine(the workhorse under the Android system) is that it does not use Java bytecode. Instead, a homegrown format called DEX was introduced and not even the bytecode instructions are the same as Java bytecode instructions.Compiled Android application code file
Android programs are compiled into
.dex(Dalvik Executable) files, which are in turn zipped into a single.apkfile on the device..dexfiles can be created by automatically translating compiled applications written in the Java programming language.Dex file format:
Android has documentation on the
Dalvik Executable Format(.dex files). You can find out more over at the official docs: Dex File Format.dexfiles are similar to java class files, but they were run under the Dalvik Virtual Machine (DVM) on older Android versions, and compiled at install time on the device to native code with ART on newer Android versions.You can
decompile.dex using thedexdumptool which is provided in android-sdk.There are also some Reverse Engineering Techniques to make a
jar fileorjava class filefrom a.dexfile.