Android APK Anti-compilation specific explanation (drawings)

Source: Internet
Author: User

This period of time learning Android application development, in the thought that since it is developed with Java should be very good anti-compilation to get the source bar, Google a bit, is really easy, the following is my practice process.

In this solemn declaration, the purpose is not to crack people's software, is completely a learning attitude, just as if through such a way can also go to the Chinese some foreign software.


This article Android anti-compilation tutorial, test environment:

Win7 Ultimate x64

Ubuntu 12.04 x86_x64

Anti-compilation toolkit Download (2012-10-10 update)


One, APK anti-compilation to get Java source code

Download the anti-compilation toolkit above, open the dex2jar-0.0.9.9 directory under the Apk2java directory, including the APK decompile to Java source Tools, as well as the Source view tool.

APK Anti-compilation tool Dex2jar, is to convert the Classes.dex in the apk into a jar file

Source View tool Jdgui, is an anti-compilation tool, can directly view the anti-compiled jar package source code


Dex2jar and Jdgui The latest version of the download, see Google Code:

Dex2jar (Google Code)

Jdgui (Google code), the latest version please see the official


Detailed steps:

First, the apk file suffix to zip and unzip, get the Classes.dex, it is the Java file compiled and then packaged by the DX tool, the Classes.dex copy to the Dex2jar.bat directory dex2jar-0.0.9.9 directory.

Navigate to the directory where the Dex2jar.bat is located at the command line and execute

Dex2jar.bat Classes.dex

Generated

Classes_dex2jar.jar


Then, enter the Jdgui directory double-click jd-gui.exe, open the jar package generated above Classes_dex2jar.jar, you can see the source code, for example:



Helloandroid source code in the anti-compilation before and after the comparison such as the following:



Second, the APK anti-compilation program source code and pictures, XML configuration, language resources and other files

The assumption is that the Chinese software, which will be particularly useful

The first is to download the above anti-compilation toolkit, the latest apktool, please go to google code download

Apktool (Google Code)


Detailed steps:

Download the anti-compilation toolkit above, open the apktool1.4.1 directory under the Apk2java directory, containing three files:aapt.exe,apktool.bat, Apktool.jar

Note: The Apktool_bk.jar inside is the old version number of the backup, preferably with the latest Apktool.jar


Under command line, navigate to the Apktool.bat directory and enter the following command:apktool.bat d-f abc123.apk abc123, for example:

, Apktool.bat command line explanation: Apktool.bat d-f [apk file] [Output DIRECTORY]


decompile files such as the following (Androidmanifest.xml for example):



The anti-compilation files are packaged again as APK, very easy, input Apktool.bat b abc123(you compile the directory) can, commands such as the following:

After packaging the apk file under directory C:\HelloAndroid, two directories were generated:

Build

Dist

Among them, the helloandroid.apk generated by the package, in the above Dist directory, Ok



Three, graphical anti-compilation apk

Step one or two above describes the command-line decompile APK, which now provides a graphical anti-compilation tool:androidfby

First, download the Anti-compilation toolkit above, open the androidfby directory, double-click the Android Anti-compilation tool. exe to browse to the APK that you want to decompile.





In this article, the Anti-compilation toolkit organizes the historical version number:

Android Anti-compilation Toolkit (upgrade) (2012-10-10)

Android Anti-compilation tool (2012-08-21)

Android Anti-compilation tool (2011-08-28)



This blog anti-compilation method, only for reference study use, prohibited for illegal and commercial and other uses, thank you!


Related Article

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.