Summary of proguard Obfuscation

Source: Internet
Author: User

Proguard obfuscator running process (other processes are not discussed at the moment): run the proguard script in the command line and directly add parameters and call proguard. CFG, while eclipse ADT releases release
This process is executed during APK, and most of the work is completed. It includes parameters specified for injars, outjars, and libraryjars (the jar path in libs is automatically added, the proguard is generated by combining two files in JDK/tools/proguard/proguard-android.txtand proguard-android.txt in the project. CFG implements parameter settings. In this case, we simply set the classes and methods that require-keep in proguard-android.txt of the project. Note that due to the complexity of the third-party jar, we do not know which jar files need to be obfuscated or not required) they can directly confuse their keep.


After proguard obfuscated the Java code, problems may occur: classes or methods that are not Java or dynamically called, and must be configured as-keep during obfuscation.

These include: Methods for intermodulation between JavaScript and Java, methods for intermodulation in JNI, reflected classes, and methods for calling classes through reflection.


Although errors may occur after the above content is obfuscated with proguard, manual obfuscation can be used to achieve the same obfuscation effect, that is, the corresponding class or method of the response is defined with an inexplicable name and then Annotated (the comment will be deleted at the shrunk stage ).

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.