Android Obfuscation code

Source: Internet
Author: User

Android code obfuscation is a must, Java layer code assumes that does not confuse equals the source code to send the person.

So how do you confuse it?

Previously, the use of proguard.cfg was generally mentioned, but the new version number ADT does not have this file. Instead, it is the Proguard-project.txt file.

So how do you use it?

There is a project.properties under the project root folder. Inside there are for example 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 very clear, you can cancel the gaze out.

As a result, I still have problems after I cancel out. Decompile the code did not confuse, tried n times still not.

At last. Because there is no experience, we usually just need to click to execute. The APK will be able to do this, but in fact the APK is the debug version number, not based on these configuration changes.

So you need to manually export an APK file, detailed method:

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

Completed.

Android Obfuscation code

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.