.dex and .apk file: What are they and how do they execute ?
Actually, an APK file is a ZIP file, where you can found the Magic Number
PK in the file header. It contains not only
classes.dex but also other meta files such as
AndroidManifest.xml which contains the basic configuration of this file.
A .dex file is just... uh, I regard it as a "real" executable, like an .exe file in Windows or an ELF in Linux, which contains the machine code(for Dalvik VM).
What is the difference between .dex and .apk file?
.dex file Compiled Android application code file.
Android programs are compiled into .dex (Dalvik Executable) files, which are in turn zipped into a single .apk file on the device. .dex files can be created by automatically by Android translating compiled applications written in the Java programming language.
Reference: Answer by Vineet Shukla