The use of the Android Anti-compilation tool

Source: Internet
Author: User

Android apk file can be decompile, by anti-compilation we can see the general code, to help learn. Anti-compilation provides only a way of learning and prohibits the use of the technology for illegal activities.

is actually two commands:

1: Run (win+r)->cmd, navigate to the Apktool folder, and enter the following command:apktool.bat d-f cmcc.apk CMCC

2: Navigate to the directory where Dex2jar.bat is located, enter Dex2jar.bat classes.dex

Here is a detailed explanation:

The tools we use:

Apktool

Function: Resource file gets, can extract picture file and layout file for use view

Dex2jar

Role: Decompile the apk into Java source code (Classes.dex into a jar file)

Jd-gui

Role: View the apk in the Classes.dex converted into a jar file, namely the source file

Tool Pack Download: http://download.csdn.net/detail/shark0017/8075449

Start anti-compilation ~

First, through the APK anti-compilation to get the program's source code, pictures, XML configuration, language resources and other files

1.1 Put the anti-compilation apk into the Apktool folder

1.2 Run (win+r)->cmd, navigate to the Apktool folder and enter the following command:apktool.bat d-f cmcc.apk CMCC

Explanation: Where CMCC is to decompile the apk name, the last CMCC is the name of the folder generated after the anti-compilation, the size of the space to write to the line

After the carriage return we will find that has been executed, now look at the folder more CMCC this file

Now we can find the resource files we need in the CMCC folder, XML files and pictures and so on.

Second, get Java code

2.1 The APK suffix to be deserialized will be changed to. rar or. zip, and extracted to get the amount of Classes.dex file (it is the Java file compiled and then packaged with the DX tool)

2.2 Put the acquired classes.dex into the previously extracted tool dex2jar-0.0.9.15 folder

2.3 Locate the Dex2jar.bat directory at the command line, enter Dex2jar.bat Classes.dex.

Now we can find a Classes_dex2jar.jar file in the Dex2jar directory.

2.4 Now open the jar file by Jd-gui.exe in the Jd-gui-0.3.5.windows folder, File->open file to find Classes_dex2jar.jar

Done!

By the way: if you want to repackage the anti-compiled files into an apk, you can: Enter apktool.bat b CMCC(you compiled the folder).

After that, you can find 2 more folders under the previous test file:

Build

Dist (contains the packaged apk file)

Tool Pack Download:http://download.csdn.net/detail/shark0017/8075449

Reference from: http://blog.csdn.net/vipzjyno1/article/details/21039349

The use of the Android Anti-compilation tool

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.