Tools and methods for decompiling classes. Dex

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.