Dex is a file format that can be directly run on the Dalvik virtual machine in the Android system. Java source code is converted into Dex files after complex compilation by ADT, which is a step-by-step optimization process. The Dex File Script is a set of instruction sets proprietary to the Dalvik virtual machine. It is specially optimized for embedded systems. Compared with standard Java. class files, it is small in size and highly efficient in operation. Pure hands!
Tools and methods for decompiling classes. Dex
Two tools are required: baksmali. jar and smali. Jar. the Java environment must be configured on the computer.
Smali and baksmali refer to the assembler and anti-assembler of. Dex files used by Java virtual machines (Dalvik) in Android systems.
You can go here to download, you can also download this post attachment: http://code.google.com/p/smali/downloads/list
Method: assume that you have downloaded the baksmali. jar and smali. jar files are stored in the directory of drive F. Copy the code to notepad and save it as decompilation. bat [Note: the attachment of this post already contains the BAT file for compilation/decompilation. skip this step]
[Url = home. php? MoD = Space & uid = 31513] @ echo [/url] Off
F:
Java-jar baksmali. Jar classes. Dex
Copy code
Copy the following code and save it as compile. bat.
@ Echo off
F:
Cd f:
Java-jar smali. jar out
Copy code
Then you put the classes. Dex to be decompiled into the root directory of the F disk and click decompile. bat. The pop-up DOS window is displayed. After a few seconds, the window is automatically closed and an out file is generated under drive F. There are many. smali text files, and the non-standard resources we want to convert are hidden in them. After the translation is modified, click compile. bat. Wait a moment. The new compiled file out will be generated under the root directory of drive F. dex, you change it to classes. dex, package it into the APK, and sign it.
Tools and methods for decompiling classes. Dex