Android APK Anti-compilation

Source: Internet
Author: User

Objective:

Personal interest, want to self-develop an Android demo anti-compilation Look, do a record.

Tools:

Apktool: Obtain the resource file, extract the file under the Res path for viewing;

Dex2jar: Decompile The APK to Java source (that is, the Classes.dex file is converted back to the jar file);

Jd-gui: Anti-compilation Dex2jar The back-compiled jar file, view the source code.

Baidu Network Disk:

Link: https://pan.baidu.com/s/1655YcbCY5VBCtdyiKiM8Jg Password: T1JF

Environment:

Win10

OK, here's the anti-compilation process:

Retrieving resource files with Apktool decompile

Unzip the downloaded Apktool.rar file and put the APK file you need to compile into this directory, (demo01 is the file I need to decompile):

     

Under command line, navigate to the directory, enter the command:apktool.bat d-f demo01.apk demo01, as shown in:

     

Where demo01.apk is the name of the file that needs to be deserialized, demo01 the path to the post-compilation resource file, which holds all the resource files for the application, as shown in:

      

Get Java source code using Dex2jar and Gd-gui decompile

First, unzip the Dex2jar and Gd-gui and the two tools, then rename the apk file that needs to be recompiled to a. rar file or a. zip file, unzip it and get a Classes.dex file ( This file is compiled by the Java file and then packaged with the DX tool), the obtained Classes.dex file is placed in the previously extracted files Dex2jar tool , input command:d2j-dex2jar.bat Classes.dex, as shown in:

   

At this point, a Classes-dex2jar.jai file is generated under the path, and the file is opened with the Jd-gui.exe in Gd-gui to see the source code, as shown in.

Android APK Anti-compilation

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.