Android APK Anti-compilation details (drawings)

Source: Internet
Author: User

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 get Java source code

Download the anti-compilation toolkit above, open the dex2jar-0.0.9.9 folder 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 that can directly view the source code of the anti-compiled jar package

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

Specific steps:

First, the apk file suffix to zip and unzip, get the Classes.dex, it is Java file compilation and then through the DX tool packaging, copy the Classes.dex to Dex2jar.bat directory dex2jar-0.0.9.9 folder.

Under command line, navigate to the directory where the Dex2jar.bat is located, run

Dex2jar.bat Classes.dex

Generated

Classes_dex2jar.jar

Then, go to the Jdgui folder double-click jd-gui.exe, open the above generated jar package Classes_dex2jar.jar, you can see the source code, such as:

Helloandroid source code in the anti-compilation before and after the comparison is as follows:

The source code and pictures, XML configuration, language resources and other files of apk decompile Generator

This is especially useful if you have a Chinese software.

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

Apktool (Google Code)

Specific steps:

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

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

Under command line, navigate to the Apktool.bat folder and enter the following command:apktool.bat d-f abc123.apk abc123, such as:

, Apktool.bat command line explanation: Apktool.bat d-f [apk file] [output folder]

The following files are deserialized (Androidmanifest.xml, for example):

To repackage the finished file into an apk, it is easy to enter apktool.bat b abc123(you compiled the folder), the command is as follows:

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

Build

Dist

wherein, the package generated helloandroid.apk, in the above Dist folder, Ok

Three, graphical anti-compilation apk

Step one or two above describes the command-line anti-compilation 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, you can browse to open the apk you want to decompile

This article compiles the history version of the Toolkit:

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

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

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

Android APK Anti-compilation details (drawings)

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.