Android apk anti-compilation get Java source code and resource file

Source: Internet
Author: User

In this solemn declaration, the purpose is not to crack people's software, is completely a learning attitude, but it seems that through this way can also go to the Chinese some foreign software.

One. Anti-compilation apk get Java source code

The first to download two tools: Dex2jar and Jd-gui, the former is to convert the apk classes.dex into a jar file, and Jd-gui is an anti-compilation tool, you can directly view the source code of the jar package.

The following are:

Dex2jar:http://laichao.googlecode.com/files/dex2jar-0.0.7-snapshot.zip

Jd-gui:http://laichao.googlecode.com/files/jdgui.zip

Specific steps:

First, the apk file, the suffix to zip, unzip, get the Classes.dex, it is the Java file compiled and then packaged with the DX tool;

Unzip the downloaded Dex2jar and copy the Classes.dex to the directory where Dex2jar.bat is located. Under command line, navigate to the directory where the Dex2jar.bat is located, run

Dex2jar.bat Classes.dex

Generate Classes.dex.dex2jar.jar

Run Jd-gui and open the jar package generated above to see the source code.

Two. Anti-compilation apk generator source code and pictures, XML configuration, language resources and other files

This would be especially useful if it was just a Chinese software. The first is the download tool, this time using the Apktool,:

HTTP://CODE.GOOGLE.COM/P/ANDROID-APKTOOL/,APKTOOL-1.0.0.TAR.BZ2 and Apktool-install-windows-2.1_r01-1.zip have two packs to go down.

Specific steps:

To extract the downloaded two packages to the same folder, there should be three files: Aapt.exe,apktool.bat,apktool.jar;

Under command line, navigate to the Apktool.bat folder and enter the following command:

Apktool d c:\***.apk c:\*** folder

Command-line explanation: Apktool d [apk file to decompile] [output folder], special Note: The file you want to decompile must be placed in the root directory of the C drive;

Re-packaging the anti-compiled files into an apk, very simple, enter Apktool B c:\*** folder (you compiled the folder) can be.

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.