Android decompilation and prevention of Decompilation

Source: Internet
Author: User
1. Android decompilation 1) download two tools dex2jar, jar2java 2 modify apksuffix to .zip, and decompress classes. dex 3) Use dex2jar. bat open classes. dex obtains the classes. dex. dex2jar. jar 4) use jar2java to open the jar package above and get the Java file.

2. Android anti-decompilation the android decompilation tool described here is proguard. Proguard is a well-known open-source project on SourceForge. Official Website: http://proguard.sourceforge.net /. Java bytecode is generally very easy to decompile. To protect the Java source code, we often confuse compiled class files. Proguard is mainly used for obfuscation. Of course, it can also reduce the size and optimize the bytecode. Before Android 2.3, the android eclipse development environment and proguard obfuscation Android code can only be manually added to implement code obfuscation, which is inconvenient. After 2.3, Google has added this tool to the SDK tool set. Path: SDK \ tools \ proguard. When a new androidproject is created, the proguard-project.txt configuration file is displayed at the root of the project. We can use proguard to confuse the android project directly in the Elipse project through simple configuration. Usage: 1) Open a project. properties2) find this sentence # proguard. config =$ {SDK. dir}/tools/proguard/proguard-android.txt: proguard-project.txt removes the previous "#" 3) Android tools --> export application package
3. Compare the decompilation results after the decompilation Results Use proguard.


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.