Android开发_混淆器防止反编译-原始proguard.cfg文件
来源:互联网 发布:淘宝店装修流程图解 编辑:程序博客网 时间:2024/06/07 03:45
使用Android混淆器proguard.cfg来防止程序被反编译,也其实就是将变量的名称混淆一下,降低程序的可读性
使用步骤:
1.default.properties文件中添加一行proguard.config=proguard.cfg, 例如以下是我的default.properties的源文件
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.# Project target.
target=android-8proguard.config=proguard.cfg
2.将SDK路径中的D:\android-sdk-windows\tools\lib\proguard.cfg复制到项目的根目录下面即可,以下的proguard.cfg文件是我直接从sdk的根目录拷贝过来的,源码如下:
-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 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 <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);
}-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
完成, proguard.cfg是可以配置很多参数的,就不介绍了..这样就可以达到混淆代码了...
- Android开发_混淆器防止反编译-原始proguard.cfg文件
- android开发混淆文件proguard.cfg详解
- Android 混淆器 ProGuard (一定程度防止反编译)
- Android 混淆器 ProGuard (一定程度防止反编译)
- Proguard android代码混淆 防止反编译
- Proguard android代码混淆 防止反编译
- Proguard android代码混淆 防止反编译
- Proguard android代码混淆 防止反编译
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- Android:混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解 .
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- android 混淆文件proguard.cfg详解
- Unity 绘制数字
- Free OCR Software Downloads
- jquery 动态生成html后事件不触发
- MFC 初始化组合框的选中状态
- Xcode 4 and nested projects — header files not found
- Android开发_混淆器防止反编译-原始proguard.cfg文件
- Tesseract-OCR引擎 入门
- WM_CHAR,WM_KEYDOWN和WM_SYSKEYDOWN
- Extjs.Date 常用函数
- 从6万到6000万:网络作家上演比特币投资神话
- JAVA实现多线程生产者消费者模型
- tcp 与udp 的区别
- 计数排序(BitMap实现)
- 关于linux(centos)安装有些软件时,出现 Requires: libstdc++.so.6(GLIBCXX_3.4.15)的解决方法