Android APK anti-compilation (decompile-Change code-recompile-signature)

Source: Internet
Author: User

1. Tools (please search the website and download it yourself):

①apktool (anti-compilation: can get picture resources and layout files, etc.)

②dex2jar (decompile: Can get Java code such as activity)

③jd-gui (view Dex2jar The resulting Java file)

④ Mobile Phone Signature tool (signature)

2. Steps:

①apktool anti-compilation

(1) Place the Apktool.bat aapt.exe Apktool.jar in the same directory as the apk file to decompile

(2) run cmd and switch to the path where the Apktool is located

(3) input: Apktool d a.apk Test (format: Apktool D < file name > < folder >)

② Code Change

Find the relative path to generate a test folder, in which you can modify the picture resources and layout files.

③ re-compiling


Input: Apktool B Test (format: Apktool B < folder name to recompile >)

In this directory, the generated APK file is found and the resulting APK file cannot be installed because it is not signed.

④ Signature

Download on the phone: mobile phone signature tool, and the APK sent to the phone, using the phone signature tool to find, and then click the button signature selected files

Find the signature apk installation.

3. View the Java source code:

Change the apk file extension to RAR and unzip the Classes.dex file to the Dex2jar folder

Run cmd, switch to H:\C\dex2jar, and enter Dex2jar classes.dex (format: Dex2jar < file name >)

In the directory will generate a Classes_dex2jar.jar file, run D-gui.exe, and then use the tool to open the previously generated Classes_dex2jar.jar file, you can view the Java source code

That's all, hope to be helpful to everyone's study O (∩_∩) o~

Android APK anti-compilation (decompile-Change code-recompile-signature)

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.