Android code obfuscation, third-party platform hardening Encryption, channel distribution complete Tutorials (graphic)

Source: Internet
Author: User

First step: Code obfuscation (note the introduction of third-party jars)

When creating a project in a new version of ADT, the mixed files are no longer proguard.cfg, but Project.Properties and Proguard-project.txt.

When you create a new project, the Project.Properties and Proguard-project.txt files are automatically generated, and you do not need to create your own, and if your project is not automatically generated, then you need to check your ADT version.

If you need to make a global mix of items, you only need to do one step:

The project.properties in the

The "#" of "#proguard. Config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt" will be removed.

If some code can not be confused, such as the need to add the so file, need to call the inside of the method, then call JNI Access so file method can not be mixed code. When exporting, you may not get an error. But when running on the phone, you need to call so file, it will be reported that such a method cannot be found. We need to use proguard-project.txt at this time.

In the new version of the code is confusing, has become very smart, but the introduction of the third-party jar still need to manually write obfuscation rules

Case: Introduction of Baidulbs_android.jar,android-support-v4.jar Two packages

Proguard-project.txt Script Writing rules:

The package contained within the #工程中含有第三方jar包-libraryjars Libs/android-support-v4.jar-libraryjars libs/baidulbs_android.jar# Project cannot be confused-keep Class com.baidu.** {*;} -dontwarn Com.baidu.**-keep class vi.com.gdi.bgl.android.java.** {*;} -dontwarn vi.com.gdi.bgl.android.java.**-keep class android.** {*;} -dontwarn android.**

Step Two: Export apk (some third-party encryption platform needs to export the signed apk)

Please export the APK according to the requirements of the third-party encryption platform, with the signed APK export speed is slightly slower. Right-click the project select Android Tools and export as required

Step three: Third-party platform hardening (multi-channel package generation)

Now the more popular encryption platforms are:

Http://www.bangcle.com

http://www.ijiami.cn

Http://dev.360.cn/protect/welcome

If your project contains Baidu statistics, friends League statistics and other functions, then you definitely need to understand the download volume of different app stores, so it is important to generate channel packages. These platforms can help generate multiple go-to APK

is to use the "Love Encryption" platform, the project integrates the Friends of the League statistics

The reinforcement takes more than 10 minutes, the reinforcement is completed and can be downloaded to different channels of the package, but no signature, unable to install

Fourth Step: apk re-signing


The hardened apk is unsigned, no signature apk is not installed on the phone and needs to be re-signed with the signature tool

Can be used with ADT, but too cumbersome, we recommend using a third-party signature tool

For example: Love encryption provided by Http://www.ijiami.cn/apply/Sign

Android code obfuscation, third-party platform hardening Encryption, channel distribution complete Tutorials (graphic)

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.