App Development Combat 110-proguard Introduction

Source: Internet
Author: User
Proguard Confusion Introduction 28.1ProGuard Introduction

Java source code (. java files) is typically compiled into bytecode (. class files). Typically, the compiled bytecode still contains a lot of debugging information: source file name, line number, field name, method name, parameter name, and variable name, which makes the app easy to decompile and reverse engineer to get complete program code.

Proguard is a free tool for compressing, optimizing, and confusing Java bytecode files:

You can delete useless classes, fields, methods, and properties.

You can delete unused annotations to maximize the optimization of bytecode files.

You can also rename a class, field, method, and property that already exists by using a short, meaningless name.

Often used for Android development to confuse the final project and increase the difficulty of the project being deserialized.

Proguard the following four-step processing of code in the Java class:

1 compression (Shrink): Used to detect and delete unused classes, fields, methods, and properties.

2 Optimization (Optimize): Byte code is optimized and useless instructions are removed.

3 Obfuscation (obfuscate): Rename classes, fields, and methods using meaningless names such as A,b,c.

4 preflight (Preveirfy): The processed code is pre-checked on the Java platform.

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.