The obfuscation apk is hard to understand, such as the package name Class name in the anti-compilation code.
Use code obfuscation, enable the obfuscation, edit the relevant files, and then package the signature on it;
------------
In the 2.3 version, the project has this file proguard.cfg (no can be added manually)
Add a sentence: proguard.config=proguard.cfg
Contents of the Proguard.cfg file:
-optimizationpasses 5- Dontusemixedcaseclassnames-dontskipnonpubliclibraryclasses-dontpreverify-verbose-optimizations!code/ Simplification/arithmetic,!field/*,!class/merging/*-keep public class * extends Android.app.activity-keep public Class * Extends Android.app.application-keep public class * extends Android.app.service-keep public class * extends Androi D.content.broadcastreceiver-keep public class * extends Android.content.contentprovider-keep public class Com.android.vending.licensing.ilicensingservice-keepclasseswithmembernames class * {native <methods>;} -keepclasseswithmembernames class * {public <init> (Android.content.Context, android.util.AttributeSet);} -keepclasseswithmembernames class * {public <init> (Android.content.Context, android.util.AttributeSet, int);} -keepclassmembers enum * {public static **[] values (); public static * * VALUEOF (java.lang.String);} -keep class * Implements android.os.Parcelable {public static final Android.os.ParcElable$creator *;}
-------------------------
In the version after 4.0, the files in the project are Project.Properties and Proguard-project.txt.
Open Project.Properties and uncomment the following line of code:
Proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
The default settings are not optimized, and you can use the following settings to add code optimization features:
#proguard. Config=${sdk.dir}/tools/proguard/proguard-android-optimize.txt:proguard-project.txt
-------------------------------------------------------
Some editing rules for proguard-project.txt files:
-libraryjars Libs/android-support-v4.jar
-libraryjars Libs loading third-party jar packages
-ignorewarnings Removing warnings from your code
-keep class com.xxx.xxx.**
-keep preserving non-confusing classes
Public methods of this class are reserved and not confused.
-keep class com.xx.xx.test{
public *;
}
Protecting the specified class files and members of a class
-keep class * Implements Android.os.Parcelable {
public static final Android.os.parcelable$creator *;
}
----------------------------------------------------
To package a signature with the Eclipse tool:
In Eclipse, select Project, right-click Menu--Android Tools
---> Export signed application Package ... With RSA digital signature
---> Export Unsigned application Package ... With no digital signature
Choose a way to follow the wizard, and the resulting apk is a confusing process.
----------------------------------------
Android Code obfuscation notes