Android Obfuscation code sample

Source: Internet
Author: User

# to enable Proguard in your project, edit project.properties# to define the Proguard.config property as described  file.## ADD Project specific Proguard rules here.# by default, the ' flags in ' This file is appended to ' flags specified# in  ${sdk.dir}/tools/proguard/proguard-android.txt# You can edit the include path and order by changing the proguard# include Property in project.properties.## to more details, see# Http://developer.android.com/guide/developing/tools/proguard . html# ADD any project specific keep options here:-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 Androi D.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 *;} -keep class Com.tencent.mm.sdk.openapi.WXMediaMessage {*;}-keep class com.tencent.mm.sdk.openapi.** implements com.tencent.mm.sdk.openapi.wxmediamessage$imediaobject {*;} -libraryjars \libs\marsorutils-1.0.0-snapshot.jar-libraryjars \libs\pinyin4j-2.5.0.jar-libraryjars \libs\ytcore_fat.jar-dontwarn org.jsoup.**-keep class org.jsoup.** {*;} -keep class com.laiguo.app.data.** {*;} -dontwarn org.apache.**-keep class org.apache.** {*;} -dontwarn javax.swing.**-keep class javax.swing.** {*;} -dontwarn java.awt.**-keep class java.awt.** {*;} -dontwarn Demo. Pinyin4jappletdemo-keep class Demo. Pinyin4jappletdemo-keep class com.baidu.** {*;}-keep class vi.com.gdi.bgl.android.**{*;}-  dontskipnonpubliclibraryclassmembers# If your project uses WebView with JS, uncomment the following# and specify the fully Qualified class name to the JavaScript interface# Class:#-keepclassmembers class Fqcn.of.javascript.interface.for.webview {# public *;#}

Android Obfuscation code sample

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.