APK app's anti-compilation and source code generation

Source: Internet
Author: User

For the anti-compilation has been held indifferent to have or not attitude, after yesterday afternoon's attempt, also has a point of experience and experience:

Let's take a look at the compilation process and our anti-compilation process Overview:




The following is the root directory structure of the Decompile tool:


Three folders are also actually the embodiment of the following three steps:

(I do not know people found that, I changed the three directory name, Apktool is the tool to process the APK, Dex2jar is the tool to process the Dex file as a jar package Jar2gui is the tool that we convert the class in the jar into the GUI interface of the source code for your reference.


SETP 1: in Apktool:
Open the DOS box (Cmd enters and then enters the directory, this should all be including women things) Execute Apktool D-S xxx.apk

Here will be in this directory to generate a folder with the name of the APK name, there are Classes.dex+res folder +androidmanifest.xml These three things, presumably we have understood the connotation, yes, this is our project root directory, And Dex is the Android executable that is packaged with the jar.

/*

* The Apktool in the command is actually the Apktool.bat batch file in the execution directory, and the xxx.apk of the second side is the name of the APK package that we need to decompile. Of course, people who use DOS commands all the time until the file name or path can be replaced with their absolute path, so if we put the package that we need to decompile into the current root directory, you can simply try its name to execute the command

*/


SETP 2: in Dex2jar

Copy the classes.dex generated in 1 (that is, the executable file under Android, generated by a cluster of. class file Jar packages) into the Dex2jar
Execute Dex2jar classes.dex---> Generate jar package, that is Classses_dex2jar.jar


SETP 3: Run under Jar2gui Jd-gui select the jar in 2 to view the source code (here is the true source).



Since the above mentioned the "true source" concept, the relative should be the inevitable there will be pseudo-source (purely I make the word, if there is the same, you guess?) Haha, joking)

Here's another picture.


The left is that we use SETP 3 to achieve the effect, and the right side is that we have the Jad tool to decompile the Java source files from the class file, through the contrast is very obvious to get a very painful conclusion, the anti-compilation of the East can not bear to see AH, of course, The left side of the code can be directly copied out, but if you want to generate code to compile, please think again ~ ~ ~ after all, we decompile one is to use res resources, the other is the reference code, if you want to crack the original apk, I believe there is a way to decompile the better source code (with the tool to copy, This is essentially not anti-compilation of class, but has been relatively accurate source code)


Use the Jad tool specifically to decompile, I will not continue to write, the specific tutorial written in the toolkit Readme.text text, but also hope that you download:

Android Anti-compile tool

Jad Tool


APK app's anti-compilation and source code generation

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.