Android Obfuscation code

Source: Internet
Author: User

Android code obfuscation is a must, Java layer code if not confused equals to the source code to send people. So how do you confuse it?

Previously, it was generally mentioned that Proguard.cfg was used, but the new version of ADT did not have the file, and instead it was the Proguard-project.txt file. So how do you use it?

In the project root directory there is a project.properties, which has the following content:

# to enable Proguard to shrink and obfuscate your code, uncomment this (available Properties:sdk.dir, user.home):
#proguard. Config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

The meaning is clear, you can cancel this comment.

The result I cancel out after still have the problem, decompile the code did not confuse, tried n times still not.

Finally, because there is no experience, we usually only need to click to run, thought that the resulting apk will be able to, but in fact, this apk is the debug version, will not be based on these configuration changes.

So you need to manually export an apk file, the specific method:

Right click on the project->android tools->export Unsigned application package ..., because I have no signature to choose this, if there is a signature select Export signed Application Package ...

Completed.

Android Obfuscation code

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.