Android 2.2工程混淆代码并反编译查看解决方案
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Android 2.2工程混淆代码解决步骤
一、首先因为Android2.2是没有proguard.cfg文件的,所以我们要先创建一个Android2.3.3
或者是以上版本的工程
二、创建成功后查找SDk路径下tools文件夹中lib文件夹下如:
E:\information\android-sdk-windows\tools\lib下就会有proguard.cfg文件
该文件源码
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/mergin g/*
-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
}
-keepclasseswithmembers class * {
public
-keepclasseswithmembers class * {
public
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(ng.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
三、把该文件拷贝到要打包的工程下(和)proguard-project.txt一个路径下
四、修改proguard.cfg文件内容为:(红色标记与源代码不同)把dontpreverify改成
dontwarn 并加了引入包android-support-v4.jar的路径
-dontwarn
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-ignorewarnings
-dontwarn
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/mergin g/*
-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
}
-keepclasseswithmembers class * {
public