我想问一个noob问题。做Proguard保存名不会混淆应用程序
这个proguard配置不会混淆我的文件或混淆我所有的java类,不包括类的名称吗?
这里行:
-keepnames class ** { *; }
我要建立我的应用程序的发布,并上传到公众,是此行我的应用程序有问题?这条线是否允许其他人轻松地对我的应用程序执行逆向工程?
我的应用程序只能使用这一行生成。
谢谢。
ProGuard的设置
-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-keep class sun.misc.Unsafe { *; }
#-keep class com.google.gson.stream.** { *; }
# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }
# Prevent proguard from stripping interface information from TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer
-dontwarn android.support.v4.**
-keep public class com.google.android.gms.* { public *; }
-dontwarn com.google.android.gms.**
-keepnames class org.apache.** {*;}
-keep class org.apache.http.** {*;}
-dontwarn org.apache.commons.logging.LogFactory
-dontwarn org.apache.http.annotation.ThreadSafe
-dontwarn org.apache.http.annotation.Immutable
-dontwarn org.apache.http.annotation.NotThreadSafe
-keepnames class ** { *; }
-keep class com.android.volley.** { *; }
-keep interface com.android.volley.** { *; }
-keep class com.sun.** {*;}
稍微更容易,是的。不是说那个慢跑者就是一种威慑力。事实是,即使你是一个大名字,没有人对你的应用程序的99.9%感兴趣。花费大量时间担心这只是浪费时间,而且无论如何他们会得到他们想要的。花费你的精力,让你的应用程序变得安全。 –
谢谢你的回答。我已经花了我的时间来保护我的应用程序,但现在我想为它提供最低程度的保护来模糊代码,并且想知道我的应用程序是否使用此线路进行了混淆处理,或者如果没有使用proguard进行生成,则需要进行相同的处理。 –
介于两者之间的某处。它会阻止某些东西被混淆(类名)。如果这需要让您的应用程序运行,那么您可能在某处使用反射来创建类,这可能会导致程序崩溃。 –