最近做了專案寫的混淆加密程式碼,保留下來,下次備用
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-optimizationpasses 7
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
#遮蔽警告,指令碼中把這行註釋去掉
-ignorewarnings
-dontwarn //dontwarn去掉警告
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-dontwarn android.support.**
#混淆時應用侵入式過載
-overloadaggressively
#確定統一的混淆類的成員名稱來增加混淆
-useuniqueclassmembernames
#重用對映增加混淆
#-applymapping com.envee.patientClient.activity.CheckNetActivity
# 元件並沒有混淆,因為系統需要通過清單(AndroidManifest.xml)檔案來查詢和執行應用程式。
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-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
#保留R檔案
-keep class **.R$* {*;}
#如果系統中用到了註解對映機制,則需要保留
-keepattributes *Annotation*
#所有的native方法不能去混淆
-keepclasseswithmembernames class * {
native <methods>;
}
#某些構造方法不能去混淆
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(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);
}
#aidl檔案不被混淆
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
#### 上面是所有混淆基本模板 ######
#### 下面是專案自定義混淆 ######
#第三方jar包不能混淆
-libraryjars libs/alipay.jar
-libraryjars libs/android-support-v13.jar
-libraryjars libs/baidumapapi_v2_2_0.jar
-libraryjars libs/httpmime-4.1.3.jar
-libraryjars libs/jpinyin-1.0.jar
-libraryjars libs/locSDK_3.1.jar
-libraryjars libs/ShareSDK-Core-2.1.2.jar
-libraryjars libs/ShareSDK-QZone-2.1.2.jar
-libraryjars libs/ShareSDK-SinaWeibo-2.1.2.jar
-libraryjars libs/SocialSDK_QQZone_1.jar
-libraryjars libs/SocialSDK_QQZone_2.jar
-libraryjars libs/SocialSDK_tencentWB_1.jar
-libraryjars libs/SocialSDK_tencentWB_2.jar
-libraryjars libs/SocialSDK_WeiXin.jar
-libraryjars libs/umeng_sdk.jar
-libraryjars libs/umeng_social_sdk.jar
-libraryjars libs/UPPayAssistEx.jar
-libraryjars libs/UPPayPluginEx.jar
-libraryjars libs/zxing-core-2.2.jar
-keep class android.support.v4.**{*;}
#保留資料庫工具類
-keep class com.kklink.yuexia.db.**{*;}
-keep class com.kklink.database.**{*;}
#保留第三方程式碼
-keep class com.alipay.android.app.lib.**{*;}
-keep class com.google.zxing.client.android.**{*;}
#保留model實體
-keep class com.kklink.yuexia.model.**{*;}
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-optimizationpasses 7
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
#遮蔽警告,指令碼中把這行註釋去掉
-ignorewarnings
-dontwarn //dontwarn去掉警告
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-dontwarn android.support.**
#混淆時應用侵入式過載
-overloadaggressively
#確定統一的混淆類的成員名稱來增加混淆
-useuniqueclassmembernames
#重用對映增加混淆
#-applymapping com.envee.patientClient.activity.CheckNetActivity
# 元件並沒有混淆,因為系統需要通過清單(AndroidManifest.xml)檔案來查詢和執行應用程式。
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-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
#保留R檔案
-keep class **.R$* {*;}
#如果系統中用到了註解對映機制,則需要保留
-keepattributes *Annotation*
#所有的native方法不能去混淆
-keepclasseswithmembernames class * {
native <methods>;
}
#某些構造方法不能去混淆
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(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);
}
#aidl檔案不被混淆
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
#### 上面是所有混淆基本模板 ######
#### 下面是專案自定義混淆 ######
#第三方jar包不能混淆
-libraryjars libs/alipay.jar
-libraryjars libs/android-support-v13.jar
-libraryjars libs/baidumapapi_v2_2_0.jar
-libraryjars libs/httpmime-4.1.3.jar
-libraryjars libs/jpinyin-1.0.jar
-libraryjars libs/locSDK_3.1.jar
-libraryjars libs/ShareSDK-Core-2.1.2.jar
-libraryjars libs/ShareSDK-QZone-2.1.2.jar
-libraryjars libs/ShareSDK-SinaWeibo-2.1.2.jar
-libraryjars libs/SocialSDK_QQZone_1.jar
-libraryjars libs/SocialSDK_QQZone_2.jar
-libraryjars libs/SocialSDK_tencentWB_1.jar
-libraryjars libs/SocialSDK_tencentWB_2.jar
-libraryjars libs/SocialSDK_WeiXin.jar
-libraryjars libs/umeng_sdk.jar
-libraryjars libs/umeng_social_sdk.jar
-libraryjars libs/UPPayAssistEx.jar
-libraryjars libs/UPPayPluginEx.jar
-libraryjars libs/zxing-core-2.2.jar
-keep class android.support.v4.**{*;}
#保留資料庫工具類
-keep class com.kklink.yuexia.db.**{*;}
-keep class com.kklink.database.**{*;}
#保留第三方程式碼
-keep class com.alipay.android.app.lib.**{*;}
-keep class com.google.zxing.client.android.**{*;}
#保留model實體
-keep class com.kklink.yuexia.model.**{*;}
相關文章
- .net程式混淆、安全、保護、加密加密
- vue專案配置 `webpack-obfuscator` 進行程式碼加密混淆VueWeb行程加密
- 使用 yakpro-po 實現 Laravel 專案程式碼混淆加密Laravel加密
- 程式碼混淆工具ipaguard:如何使用ipaguard保護和混淆iOS應用程式程式碼iOS
- Android 專案程式碼混淆Android
- Python程式碼混淆工具,Python原始碼保密、加密、混淆Python原始碼加密
- SpringBoot程式碼混淆與反混淆加密工具詳解Spring Boot加密
- 前端專案程式碼加密教程前端加密
- Python 程式碼混淆和加密技術Python加密
- 逆向破解js程式碼加密,程式碼混淆不是難事JS加密
- 5個常用Java程式碼混淆器 助你保護你的程式碼Java
- 原始碼部分加密混淆方案原始碼加密
- Flutter 程式碼混淆 混淆Dart程式碼FlutterDart
- 我最近做了一個react的後臺管理系統,用於快速建立後臺專案模板React
- iOS應用加固--程式碼混淆iOS
- 【教程】深入探究 JS程式碼混淆與加密技術JS加密
- 保護C#程式碼的藝術:深入淺出程式碼混淆技術C#
- Vue 應用程式效能最佳化:程式碼壓縮、加密和混淆配置詳解Vue加密
- 最近面試多,於是做了個小程式,進來體驗體驗面試
- 我最近寫了個開源專案Datura
- 【程式碼混淆】react-native 程式碼混淆React
- Android 高階混淆和程式碼保護技術Android
- 用寫程式碼的方式來整理知識
- 用Java的加密機制來保護你的資料Java加密
- 如何徹底清除應用程式留下的殘留檔案?
- MSWord-用欄位程式碼混淆
- Jobfuscator:Java 原始碼混淆和保護Java原始碼
- 爆肝一週,做了個寫中大型專案必備的 VSCode 擴充套件VSCode套件
- 使用Wrap加密,保護Oracle程式原始碼加密Oracle原始碼
- 寫專案程式碼之前必須要做的事
- 程式碼混淆的規則
- js程式碼混淆JS
- 用7段程式碼來理解常用的寫作模式模式
- ios加固,ios程式碼混淆,ios程式碼混淆工具, iOS原始碼混淆使用說明詳解iOS原始碼
- 最近專案管理感悟專案管理
- Android程式碼混淆配置(Proguard檔案解析)Android
- Android程式碼混淆&元件化混淆方案Android元件化
- 【EXP】在備份檔案上留下“時間烙印”