proguard

Why proguard processes AndroidManifest.xml

早过忘川 提交于 2019-11-27 14:27:34
I see some unexplained Proguard behaviour. AFAIK proguard does not pay attention to android manifest. Also, in my proguard.cfg I have no mention of BroadcastReceiver related classes. So I assume that those should be stripped out. However I see something strange in bin/proguard.txt: # view AndroidManifest.xml #generated:784 -keep class com.fiksu.asotracking.InstallTracking { <init>(...); } and that class (descendand of BroadcastReceiver) does not get stripped. Reason does not say anything meaningful to me: [proguard] com.fiksu.asotracking.InstallTracking [proguard] is kept by a directive in the

Running ProGuard on OS X: Where is Apple's equivalent to the rt.jar?

烂漫一生 提交于 2019-11-27 14:27:05
问题 I'm running ProGuard to shrink my jar file. One of the parameters it needs is the system's runtime jar. This is at $JAVA_HOME/lib/rt.jar on Sun distributions, but not on Apple's Mac OS X (v10.6 (Snow Leopard) in my case). Is there an rt.jar for OS X? 回答1: It is called classes.jar and it is under /System/Library/Frameworks/JavaVM.framework/Classes Look here for details: http://lists.apple.com/archives/java-dev/2003/Mar/msg01530.html 回答2: This blog entry describes a relatively straight-forward

ProGuard Cannot Find Referenced Libraries

南笙酒味 提交于 2019-11-27 14:20:47
问题 [2014-07-15 23:57:43 - MozMeet] Proguard returned with error code 1. See console [2014-07-15 23:57:43 - MozMeet] Note: there were 662 duplicate class definitions. [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$1: can't find superclass or interface com.facebook.android.Facebook$ServiceListener [2014-07-15 23:57:43 - MozMeet] Warning: com.parse.FacebookAuthenticationProvider$2: can't find superclass or interface com.facebook.Session$StatusCallback [2014-07-15

In proguard, how to preserve a set of classes' method names?

廉价感情. 提交于 2019-11-27 14:19:14
I am using proguard to obfuscate my android application. The android application contains some native code, which makes callbacks to fully qualified java methods. I need to not obfuscate these classes and the names of their methods. The below properly keeps the class names, but not the method names. -keep public class com.me.dontobf.* -keepnames public class com.me.dontobf.* Eric Lafortune For native methods: ProGuard manual > Examples > Processing native methods # note that <methods> means any method -keepclasseswithmembernames,includedescriptorclasses class * { native <methods>; } In this

Java obfuscation - ProGuard/yGuard/other? [closed]

一个人想着一个人 提交于 2019-11-27 14:00:20
This is along similar lines as these recent questions: Best Java Obfuscation Application For Size Reduction Creating non-reverse-engineerable Java programs However, one ends up recommending yGuard and the other ProGuard but neither mention both. I wonder if we could get a comparison of each one and hear peoples experiences from both sides of the fence. Looking at this comparison chart on the ProGuard website its clearly angled towards ProGuard. But what about real-world experience of each - which one produces smaller output? which one is harder to decompile from? what Java versions are

Shrink Google Play Services library for use with Google Analytics only

二次信任 提交于 2019-11-27 13:48:06
Is it possible to remove unnecessary packages from the Google Play Services library so that the library will only contain everything needed for Google Analytics? I'm asking this because the Google Play Services library is bloated with extra packages, images and resources of which I think are unused by Google Analytics. Proguard removes unused code from jar files by default also from the Google Play Services library. But proguard cant be used to remove (unused) resources, but I have found that there are other options to further optimize the library. I was able using method two to shrink an app

Proguard obfuscation is breaking simplexml

烂漫一生 提交于 2019-11-27 13:42:25
问题 I am using simplexml in my android project, and everything works fine until I obfuscate the code. Then, errors start pouring in. Part of the XML is as follows: <categories success="true"> <category id="102" caption="Magazin" parent="0" num_mags="114" > <category id="15" caption="Kunst" parent="102" num_mags="13" > <category id="17" caption="Design" parent="15" num_mags="10" ></category> <category id="18" caption="Haute+Couture" parent="15" num_mags="2" > ... I have two classes:

can't generate signed APK from Android studio “Execution failed for task ':packageRelease'”

我们两清 提交于 2019-11-27 13:28:59
I am using Android Studio 1.2.2 and tried to generate APK with proguard setting. But I can't do it and got below error message. "Execution failed for task ':packageRelease'. Unable to compute hash of /Users/Documents/projectX/app/build/intermediates/classes-proguard/release/classes.jar " The proguard setting is just simple. -dontshrink -dontoptimize -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose And the gradle file is below. apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion "Google Inc.

Android proguard, keep inner class

微笑、不失礼 提交于 2019-11-27 13:24:54
My android program has a class A , which has two static inner class . They are found to be stripped from .dex after applying proguard. public class A{ ... static class B{ ... } static class C{ ... } } I have put the following lines in proguard.flags, but seem no luck. -keep class com.xxx.A -keep class com.xxx.A$* Any hint? Alexander Lucas Try adding InnerClasses to the keep attributes. e.g: -keepattributes Exceptions, InnerClasses, ... Also, try adding a body to the "keep" call with an asterisk, like so: -keep class com.xxx.A$* { *; } This is what I had to do for my config -keep class com.xxx

Is it possible to use proguard in debug mode?

我与影子孤独终老i 提交于 2019-11-27 12:58:04
In my android app, i want to test some features with proguard on. I don't need to really "debug" it, but i want proguard to run when i hit run in eclipse. I don't want to export the binary every time (so, in release mode) and save as apk and get it to the device to test. Is there any way to run proguard in this way? Update: It seems like this is possible if you are not using Eclipse ; as question title does not include Eclipse, there are multiple correct answers to this question. Raghunandan Old Answer : http://developer.android.com/tools/help/proguard.html ProGuard runs only when you build