Android confusing incomplete version

Source: Internet
Author: User
Tags eventbus

1. Do not confuse easy to locate the problem (easy to crack)

2.proguard obfuscation requires one to add trouble (not easy to crack)

3. Good reinforcement (not easy to crack)

Not complete confusion

# ADD Project specific Proguard rules here.# bydefault, the Flagsinch  Thisfile is appended to flags specified#inch/users/weidingqiang/downloads/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt# You can edit the include path and order by changing the proguardfiles# Directiveinchbuild.gradle.## 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 spec Ify the fully qualifiedclassName to the JavaScriptInterface# class:#-keepclassmembersclassFqcn.of.javascript.Interface. for. WebView {# Public*; #}# code confuses the compression ratio, in 0~7, default is 5, generally do not modify-optimizationpasses5# Blending does not use case blending, the mixed class name is lowercase-dontusemixedcaseclassnames# specifies not to ignore classes for non-public libraries-dontskipnonpubliclibraryclasses# This sentence can confuse our project to produce a mapping file # contains the class name-mapping relationships of class names after confusion-verbose# specifies not to ignore class members of non-public libraries-dontskipnonpubliclibraryclassmembers# does not do pre-calibration, preverify is one of the four steps of Proguard, Android does not need preverify, removing this step can speed up the confusion. -dontpreverify# reserved annotation not confused-keepattributes *annotation*, innerclasses# avoid confusing generics-keepattributes signature# to keep code line numbers when throwing exceptions-keepattributes sourcefile,linenumbertable# Specifies that obfuscation is the algorithm used, the following parameter is a filter # This filter is the Google recommended algorithm, generally do not make changes-optimizations!code/simplification/cast,!field/*,!class/merging/*# preserves the four components we use, custom application, and so on. These classes are not confused # because these subclasses can be called externally-keep public class * extends Android.app.activity-keep public class * extends Android.app.appliction-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 * extends Android.view.view-keep public class com.android.vending.licensing.ilicensingservice# retains all classes under support and their internal classes-keep class android.support.** {*;} # Preserve inherited-keep public class * extends Android.support.v4.**-keep public class * extends Android.support.v7.**-keep public cl The extends android.support.annotation.**# reserves the resources under R-keep class * *. r$* {*;} # Keep Local native method not to be confused-keepclasseswithmembernames class * {native <methods>;} # The method parameter that remains in the activity is the method of view, # so that the onclick we write in layout will not be affected-keepclassmembers class * EXtends android.app.activity{public void * (Android.view.View);}    # reserved Enum class not to be confused-keepclassmembers enum * {public static **[] values (); public static * * VALUEOF (java.lang.String);}    # Keep our custom controls (inherited from view) not to be confused-keep public class * Extends android.view.view{* * * get* ();    void set* (* * *);    Public <init> (Android.content.Context);    Public <init> (Android.content.Context, Android.util.AttributeSet); Public <init> (Android.content.Context, android.util.AttributeSet, int);} # Keep Parcelable serialization class not to be confused-keep class * implements android.os.Parcelable {public static final Android.os.parcelable$creato R *;} # Keep Serializable serialized classes not to be confused-keepclassmembers class * Implements Java.io.Serializable {static final long Serialversionuid    ;    private static final java.io.objectstreamfield[] Serialpersistentfields;    !static!transient <fields>;    !private <fields>;    !private <methods>;    private void WriteObject (Java.io.ObjectOutputStream); private void ReadObject(Java.io.ObjectInputStream);    Java.lang.Object Writereplace (); Java.lang.Object readresolve ();}    # for Onxxevent, **on*listener with callback functions, cannot be confused-keepclassmembers class * {void * (**on*event); void * (**on*listener);} # WebView processing, the project is not used to WebView ignore can-keepclassmembers class Fqcn.of.javascript.interface.for.webview {public *;} -keepclassmembers class * extends Android.webkit.webViewClient {public void * (Android.webkit.WebView, java.lang.String    , Android.graphics.Bitmap); public Boolean * (Android.webkit.WebView, java.lang.String);} -keepclassmembers class * extends Android.webkit.webViewClient {public void * (Android.webkit.webView, jav.lang.String) ;} # Remove the log class to print the code of each level log, when the official package can be used as forbidden log, here can be used as a forbidden log printing function # Remember proguard-android.txt must not add-dontoptimize to function # Another implementation is to control the #-assumenosideeffects class Android.util.Log {# public static int V (...) through buildconfig.debug variables; # public static int I (...); # public static int W (...); # public static int d (...); # public static int E (...); #} #以上都是基本不变的 # entity class ################################################ three-party package ######################################### ###### #volley-keep class com.android.volley.** {*;} -keep class com.android.volley.toolbox.** {*;} -keep class com.android.volley.response$* {*;} -keep class com.android.volley.request$* {*;} -keep class com.android.volley.requestqueue$* {*;} -keep class com.android.volley.toolbox.hurlstack$* {*;} -keep class com.android.volley.toolbox.imageloader$* {*;} #glide-keep public class * implements Com.bumptech.glide.module.glidemodule-keep public enum  com.bumptech.glide.load.resource.bitmap.imageheaderparser$** {**[] $VALUES; public *;} #-keepresourcexmlelements Manifest/application/[email protected]=glidemodule#galleryfinal-keep Class cn.finalteam.galleryfinal.widget.*{*;} -keep class cn.finalteam.galleryfinal.widget.crop.*{*;} -keep class cn.finalteam.galleryfinal.widget.zoonview.*{*;} #Gson-keepattributes Signature-keep class Sun.misc.Unsafe {*;} -keep class Com.google.gson.examples.android.model.** {*;} #自定义强转的类-keep public class Com.fifedu.attendancestu.models.HomeTopModel {private *;} -keep public class Com.fifedu.attendancestu.models.HomeAttenceModel {private *;} #PushSDK allies push-dontwarn Com.taobao.**-dontwarn Anet.channel.**-dontwarn Anetwork.channel.**-dontwarn org.android.**- Dontwarn Org.apache.thrift.**-dontwarn Com.xiaomi.**-dontwarn com.huawei.**-keepattributes *Annotation*-keep class com.taobao.** {*;} -keep class org.android.** {*;} -keep class anet.channel.** {*;} -keep class com.umeng.** {*;} -keep class com.xiaomi.** {*;} -keep class com.huawei.** {*;} -keep class org.apache.thrift.** {*;} -keep class com.alibaba.sdk.android.**{*;} -keep class com.ut.**{*;} -keep class com.ta.**{*;} -keep public class * *. r$*{public static final int *;} #友盟统计-keepclassmembers class * {public <init> (org.json.JSONObject);} #-keep public class [your app package name]. R$*{-keep public class Com.fifedu.attendancestu.r$*{public static final int *;} -keepclassmembers enum * {    public static **[] values (); public static * * VALUEOF (java.lang.String);} #log4j-dontwarn Org.apache.log4j.**-keep class org.apache.log4j.** {*;} # Eventbus-keepattributes *annotation*-keepclassmembers Class * * {@org. Greenrobot.eventbus.Subscribe <methods> ;} -keep enum Org.greenrobot.eventbus.ThreadMode {*;} # only required if Asyncexecutor-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {<init> (java.lang.Throwable);} -keep class de.greenrobot.event.** {*;}    -keepclassmembers class * * {public void onevent* (* *); void onevent* (* *);} #一些jar包 #-libraryjars. /app/libs/httpcore-4.3.jar#-libraryjars. /app/libs/httpmime-4.3.jar#-libraryjars. /app/libs/android-logging-log4j-1.0.3.jar#-libraryjars. /app/libs/log4j-1.2.17.jar#-libraryjars. /fiflibrary/libs/sunjce_provider.jar-dontwarn Org.apache.http.**-keep class org.apache.http.**{*;} -dontwarn Org.apache.http.entity.mime.**-keep class org.apache.http.entity.mime.**{*;}-dontwarn Com.sun.crypto.provider.**-keep class com.sun.crypto.provider.**{*;} # Butterknife#-keep class butterknife.** {*;} #-dontwarn Butterknife.internal.**#-keep class **$ $ViewBinder {*;} #-keepclasseswithmembernames class * {@butterknife. * &LT;FIELDS&GT;;} #-keepclasseswithmembernames class * {@butterknife. * &LT;METHODS&GT;;} # Okhttp3-dontwarn Okhttp3.logging.**#-keep class okhttp3.internal.**{*;} #-dontwarn okio.**# Okio#-dontwarn com.squareup.**#-dontwarn okio.**#-keep public class org.codehaus.* {*;} #-keep public class Java.nio.* {*;} # Retrofit#-dontwarn Retrofit2.**#-keep class retrofit2.** {*;} #-keepattributes exceptions# Rxjava#-dontwarn Sun.misc.**#-keepclassmembers class rx.internal.util.unsafe.* arrayqueue*field* {# Long producerindex;# long Consumerindex;#}#-keepclassmembers class Rx.internal.util.unsafe.Base linkedqueueproducernoderef {# Rx.internal.util.atomic.LinkedQueueNode Producernode;#}#-keepclassmembers class Rx.internal.util.unsafe.BaseLinkedqueueconsumernoderef {# Rx.internal.util.atomic.LinkedQueueNode consumernode;#} 

Android confusing incomplete version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.