DVM
Anyone familiar with Android knows that android applications can be developed in Java. However, the Android operating system only uses the Java language. The virtual machine that actually runs Java code is not a JVM, but a DVM (Dalvik virtual machine ). DVM does not comply with JVM specifications, mainly in the following aspects:
- The JVM is stack based, and the DVM is register based.
- JVM executes Java bytecode, and DVM has its own bytecode.
- JVM requires that Java code be compiled into a. Class file, while DVM requires that the. Class file be merged into a. Dex file.
Analyze Dex files
Because of the differences between DVM and JVM, the format of. Dex files and. class files is also very different. In the previous article, I introduced classpy, which can be used to intuitively observe the. Class file. After some modifications, it can now open the. Dex file. Below are several screens:
-
Download and run classpy
You can clone the gradle project and compile it by yourself, or download the executable jar and double-click it. However, note thatJava 8Environment! In addition, it should be noted that the classpy will be slow to open a slightly larger file. I don't know if it is the reason for javafx :(
Use classpy to analyze the. Dex File