-optimizationpasses 5 设置混淆的压缩比率: 0 ~ 7
-dontusemixedcaseclassnames 类名都为小写
-dontskipnonpubliclibraryclasses 如果应用程序引入的有jar包,并且想混淆jar包里面的class
-dontpreverify
-verbose 混淆后生产映射文件 map 类名->转化后类名的映射
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 混淆采用的算法.
-keep public class * extends android.app.Activity 所有activity的子类不要去混淆
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native
; 所有native的方法不能去混淆.
}
-keepclasseswithmembers class * {
public
(android.content.Context, android.util.AttributeSet);
//某些构造方法
}
-keepclasseswithmembers class * {
public
(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
Android混淆文件proguard.cfg解析
最新推荐文章于 2021-02-13 09:06:37 发布