Android code obfuscation, third-party platform reinforcement encryption, channel distribution complete tutorial (text), android third-party

Source: Internet
Author: User

Android code obfuscation, third-party platform reinforcement encryption, channel distribution complete tutorial (text), android third-party

Step 1: code obfuscation (note the third-party jar introduced)

 

When creating a project in the new adtfile, the mixed file is no longer proguard.example, but project.propertiesand proguard-project.txt.

When a new project is created, the project.propertiesand proguard-project.txt files are automatically generated. If your project cannot be automatically generated, check your ADT version.

If you need to perform global mixed code for the project, you only need to perform one operation:

In project. properties

'# Proguard. config =$ {sdk. dir}/tools/proguard/proguard-android.txt: proguard-project.txt' # 'to remove it.

If some Code cannot be confused, for example, if you need to add the so file and call the method in it, the method that calls JNI to access the so file cannot be mixed. During export, no error may be reported. However, when the so file needs to be called when running on the mobile phone, the system reports that the method cannot be found. In this case, proguard-project.txt is used.

Obfuscation in the new version of code has become very intelligent, but the third-party jar needs to be written manually.

Case: introduced BaiduLBS_Android.jar, two packages of android-support-v4.jar

Proguard-project.txt scripting rules:

# The project contains third-party jar package-libraryjars libs/android-support-v4.jar-libraryjars libs/BaiduLBS_Android.jar # the package contained in the 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 2: export the apk (some third-party encryption platforms need to export the signed apk)

Export the apk according to the requirements of the third-party encryption platform. The export speed of the signed apk is a little slow. Right-click the project, select Android Tools, and export as needed.

Step 3: Third-party platform reinforcement (Multi-Channel package generation)

Popular encryption platforms include:

Http://www.bangcle.com

Http://www.ijiami.cn

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

If your project contains Baidu statistics, umeng statistics, and other functions, you must understand the downloads of different app stores. Therefore, it is important to generate channel packages. These platforms can help generate multiple

Is to use the "Love encryption" platform, the Project Integrated with umeng statistics

Reinforcement takes 10 minutes. After reinforcement is completed, packages from different channels can be downloaded, but the packages cannot be installed without signatures.

Step 4: re-sign the apk


The reinforced apk is unsigned, And the unsigned apk cannot be installed in the mobile phone. You need to use the signature tool to re-sign it.

You can use the built-in adt, but it is too troublesome. We recommend that you use a third-party signature tool.

For example: Love encryption provides http://www.ijiami.cn/apply/Sign

 


How does Android prevent the apk program from being decompiled? Preventing mobile games from being cracked, except for the proguard code obfuscation method

DEX encryption protection !!!

It is the advanced encryption protection for the Android APK. Generally, obfuscation code and anti-Secondary packaging will not work. Therefore, I now use encryption to encrypt the primary Android APK files, such as DEX, RES, And SO libraries. (And free)

I hope you can give an example or a tutorial on how to write obfuscator for obfuscator code. I am optimistic that the obfuscator is not a obfuscator code.

The code written in java is compiled into a. class file, but this class file can be decompiled to view the source code.
If the code author does not want the source code to be seen by others, the obfuscator can be used to confuse the source code, but the program functions are still normal and compiled for use by others, when others decompile the class file to view the source code, they find the obfuscated code. Although the obfuscated code can also be analyzed, it is very difficult
For example
Class Person
{
Private String name;
Private int age;
Public Person (String n, int ){
Name = n;
Age =;
}
}
After Obfuscation
Class OOOOo {
Private String oooo;
Private int ooo;
Public OOOOo (String oo, int o ){
Oooo = oo;
Ooo = o;
}
}


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.