Common obfuscation configurations

Source: Internet
Author: User

I have developed many projects some time ago, but it is often difficult to confuse these projects. Now I will write down these commonly used obfuscation configurations for your reference only!

-Optimizationpasses failed! Code/simplification/arithmetic ,! Field /*,! Class/merging/*-libraryjars libs/afinal_0.5.1_bin.jar
# Mode obfuscation-keep class shzb. zhinaibo. mode .**{*;}
# Fastjson obfuscation # if there is a get and set method with mode, you need to set the following statement-dontwarn COM. alibaba. fastjson. **-keep class COM. alibaba. fastjson. ** {*;}-keepattributes signature #-keepattributes * annotation *
# V4 package obfuscation #-libraryjars. /libs/android-support-v4.jar #-dontwarn android. support. **-dontwarn android. support. v4. **-dontwarn ** compathoneycomb-dontwarn ** CompatHoneycombMR2-dontwarn ** CompatCreatorHoneycombMR2-keep interface android. support. v4.app. ** {*;}-keep class android. support. v4. ** {*;}-keep public class * extends android. support. v4. **-keep public class * extends android. app. fragment


# Slidingmenu obfuscation-dontwarn com. jeremyfeinstein. slidingmenu. Lib. **-keep class com. jeremyfeinstein. slidingmenu. Lib .**{*;}

# Actionbarsherlock obfuscation-dontwarn com. actionbarsherlock. **-keep class com. actionbarsherlock. ** {*;}-keep interface com. actionbarsherlock .**{*;}
-Keep class * extends java. Lang. annotation. annotation {*;}
# Keep custom control classes unchanged-keep public class * extends com. zhibaicc. Android. Adapter. packageadapter
-Keepclasseswithmembers class * {Public <init> (Android. content. Context, Android. util. attributeset );}
-Keepclasseswithmembers class * {Public <init> (Android. content. Context, Android. util. attributeset, INT );}
-Keepclassmembers class * implements Android. OS. parcelable {static Android. OS. parcelable $ creator ;}
-Keep public class * implements java. Io. serializable {public *;}
# Afinal obfuscation-dontwarn net. tsz. afinal. **-keep class net. tsz. afinal. ** {*;}-keep public class * extends net. tsz. afinal. **-keep public interface net. tsz. afinal. **{*;}
-Keepclasseswithmembers class shzb. zhinaibo. Base. ** {<fields >;< Methods> ;}
# Universal-image-loader obfuscation-dontwarn com. nostra13.universalimageloader. **-keep class com. nostra13.universalimageloader .**{*;}

# Sharesdk obfuscation-dontwarn CN. sharesdk. **-keep class CN. sharesdk .**{*;}

Common obfuscation configurations

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.