"Android" apk anti-compile and prevent anti-compilation

Source: Internet
Author: User

Anti-compilation
Related Tools Download: http://pan.baidu.com/s/1bnAkIb9
Apktool
This is a tool that can be used to decompile and re-package the APK. : http://code.google.com/p/android-apktool/
Decompile Apk1. Put the apk file into the Apktool decompression directory. 2. Open the command line, CD-to-tool unzip the directory, and use the "Apktool d apk file path" command to decompile the APK.
Apktool Anti-compilation command-assisted scripting code (Windows) 3. The anti-compilation generated file is in the tool decompression directory, you can see all the resource files in the APK, library files, smali files (Java bytecode disassembly code files).

Smali2java is a tool that can decompile Smali code into Java code. : http://www.hensence.com/cn/smali2java/

RePack 1. Use the Apktool B folder path command to repackage the APK.
Apktool repackaging Command-assisted scripting code (Windows)
2. After the package is complete, there will be two more folder build and dist under the target folder, where the APK in the Dist folder is the re-packaged apk.

Dex2jar
This tool is used to decompile the Dex file and export the jar. : Http://code.google.com/p/dex2jar/downloads/list1. Use the Unzip tool to open the APK and put the Classes.dex file in the Dex2jar directory
2. Open the command line and execute the "Dex2jar classes.dex" command under the Dex2jar unzip directory to decompile the Dex file and generate the jar.

Jd-gui
This tool is used to view the source code of all classes in the jar file. : http://jd.benow.ca/Open the Jd-gui.exe and drag the jar file directly into the tool.
Click on File-save all Sources (Ctrl + Alt + S) to save Java source code.
Related tools: http://www.kanxue.com/android/decompilers.htm
Prevent anti-compilation
APK Shell tool Download: Http://pan.baidu.com/s/1qW5G1Ta The tool is from here >>http://www.kanxue.com/bbs/showthread.php?t=177590
Shell Description The full name of the shell should be executable program resource compression, is a common means of protecting files. Shell-over programs can run directly, but cannot view the source code. You can view the source code by shelling.
Another common way of Packers is to embed a piece of code in a binary program, giving priority to the control of the program at run time and doing some extra work. Most viruses are based on this principle.

APK Shell 1. Open the Shell tool (I'm using the Windows version here), select APK, click Encrypt.
2. Wait for the prompt "encrypted success" below to generate xx.apk.dexcrypt.apk (encrypted but unsigned apk) and dg.apk.dexcrypt.signed.apk (encrypted and use the default signature apk) in the directory where the APK resides. 3. In general, we also need to re-sign the APK with a custom. keystore file. You can use the command "jarsigner-keystore. KeyStore file path-storepass alias-keypass password-signedjar signature apk build path unsigned apk path alias" To sign the APK (requires Java environment)

Example: Jarsigner-keystore release.keystore-storepass linchaolong-keypass Xxx-signedjar dg-final.apk dg.apk.dexcrypt.apk Linchaolong

4. Decompile the dg-final.apk after the signature. You can see that there is no anti-compilation success.

"Android" apk anti-compile and prevent 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.