# Custom options for DexGuard, the Android app optimizer and obfuscator. # # You can enable DexGuard for Ant builds as follows: # 1) Define dexguard.dir in local.properties in your Android project, e.g. # dexguard.dir=/usr/local/dexguard # 2) Copy the following files from ${dexguard.dir}/ant to your Android project: # custom_rules.xml # dexguard-project.txt # # The build process will automatically pick up custom options from the # following (optional) configuration files: # dexguard-project.txt # dexguard-project-debug.txt (for target 'debug') # dexguard-project-release.txt (for target 'release') # proguard-project.txt (for backward compatibility with ProGuard) # # You can adapt this file to suit your needs. # Uncomment the following line (or run Ant in verbose mode) to get statistics # about the processed code. #-verbose # Uncomment and adapt the following line to encrypt the specified class(es). # You can use wildcards. #-encryptclasses mypackage.MySecretClass # Uncomment and adapt any of the following lines to encrypt the specified # string(s). You can use wildcards. #-encryptstrings "MySecretString" #-encryptstrings mypackage.MySecretClass #-encryptstrings mypackage.MySecretClass { # void mySecretMethod(); #} #-encryptstrings mypackage.MySecretConstants { # public static final java.lang.String MY_SECRET_KEY; #} # Uncomment and adapt the following lines to access specified classes and # class members by means of reflection. For good measure, you can then also # encrypt the resulting strings and the classes that contain the invocations. #-accessthroughreflection class android.SomeClass { # int someField; # void someMethod(java.lang.String, int); #} # #-encryptstrings "android.SomeClass", "someField", "someMethod", # "java.lang.String" # #-accessthroughreflection class android.content.pm.PackageManager { # int checkSignatures(int, int); # int checkSignatures(java.lang.String, java.lang.String); # android.content.pm.InstrumentationInfo getInstrumentationInfo(android.content.ComponentName, int); # java.util.List queryInstrumentation(java.lang.String, int); # android.content.pm.PackageInfo getPackageInfo(java.lang.String, int); # android.content.pm.PackageInfo getPackageArchiveInfo(java.lang.String, int); #} # #-encryptstrings "android.content.pm.PackageManager", # "checkSignatures", # "getInstrumentationInfo", # "queryInstrumentation", # "getPackageInfo", # "getPackageArchiveInfo", # "java.lang.String", # "java.util.List", # "android.content.pm.InstrumentationInfo", # "android.content.ComponentName" # #-accessthroughreflection class android.content.pm.PackageInfo { # java.lang.String packageName; # java.lang.String versionName; # int versionCode; # long firstInstallTime; # long lastUpdateTime; # android.content.pm.Signature[] signatures; # android.content.pm.InstrumentationInfo[] instrumentation; #} # #-encryptstrings "android.content.pm.PackageInfo", # "packageName", # "versionName", # "versionCode", # "firstInstallTime", # "lastUpdateTime", # "signatures", # "instrumentation", # "java.lang.String", # "android.content.pm.Signature", # "android.content.pm.InstrumentationInfo" # #-accessthroughreflection class android.content.pm.Signature { # byte[] toByteArray(); # char[] toChars(); # java.lang.String toCharsString(); #} # #-encryptstrings "android.content.pm.Signature", # "toByteArray", # "toChars", # "toCharsString", # "java.lang.String" # DexGuard's default configuration already handles Javascript interface methods # that are annotated with @JavascriptInterface. Uncomment and adapt the # following lines for any methods that are not annotated. #-keepclassmembers class mypackage.MyWebViewInterfaceClass { # public ; #} # Uncomment the following lines to remove Android logging code # (although you may want to keep error-level messages). #-assumenosideeffects class android.util.Log { # public static boolean isLoggable(java.lang.String, int); # public static int v(...); # public static int i(...); # public static int w(...); # public static int d(...); # public static int e(...); # public static java.lang.String getStackTraceString(java.lang.Throwable); #} # If your application seems to fail due to the optimization or obfuscation # in release builds, you can verify that by selectively disabling any of the # processing steps. You may then need to add some additional configuration # (see manual). Debug builds already disable these steps by default. #-dontshrink #-dontoptimize #-dontobfuscate