Android code obfuscation and anti-compilation

Source: Internet
Author: User

Overview:

If you're still a student or have not uploaded apps in the App Store, I'm afraid that's not a deep feeling. In the enterprise, the confusion of Java code is a very important step, from the security point of view, code confusion, it is very important to prevent intentioned people from malicious tampering with the code. The following is the process of code obfuscation and cryptographic signing for Android projects.


steps:

1. Add a file to the project's directory Proguard.cfg

2. Add Proguard.cfg in the Project.Properties file in the project


3. Add in the Proguard.cfg file

-ignorewarnings
-libraryjars Libs/android-support-v4.jar

As follows:


4. Project Right click->export->android->export Android application->next


5.Next after the first step, will enter the KeyStore selection session box, fill in the following information:


6. In the next Key Creation session box, fill in the following format information:


7. Configure your APK file name, last finish


If not unexpected, it will be fun to end up here and get the confusing apk signature file you want to get.


anti-compilation validation:

The steps for anti-compilation can be consulted:

http://blog.csdn.net/lemon_tree12138/article/details/41889363

If it goes smoothly it will be if similar result:



Proguard returned with error code 1. See console:


This problem is caused by code obfuscation and the reference package cannot be found. Just add the following two lines to your proguard.cfg.
-ignorewarnings
-libraryjars Libs/android-support-v4.jar
You can add the required jar based on your project tips.

Android code obfuscation and anti-compilation

Related Article

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.