proguard

Generating a Pro Guard configuration file with Android Studio

China☆狼群 提交于 2019-11-30 12:10:55
问题 I am using Android Studio since 0.1.0 ... I just learned yesterday that Pro Guard seems to be integrated in newly created projects. Unfortunately this is not true for my project (which was a former Eclipse project). I didn't know of Pro Guard until I started working with Android Studio. And now I am looking for examples on how to use Pro Guard with Android Studio. Unfortunately the Android Dev documentation is only mentioning situations where the configuration file is already created. Is

Error: Can't find common super class of

不想你离开。 提交于 2019-11-30 12:09:25
I am trying to process with Proguard a MS Windows desktop application (Java 6 SE using the SWT lib provided by Eclipse). And I get the following critical error: Unexpected error while performing partial evaluation: Class = [org/eclipse/swt/widgets/DateTime] Method = [<init>(Lorg/eclipse/swt/widgets/Composite;I)V] Exception = [java.lang.IllegalArgumentException] (Can't find common super class of [java/lang/StringBuffer] and [org/eclipse/swt/internal/win32/TCHAR]) Error: Can't find common super class of [java/lang/StringBuffer] and [org/eclipse/swt/internal/win32/TCHAR] -------------------------

Is using ProGuard worth the trouble?

久未见 提交于 2019-11-30 11:26:46
From what I've seen and read, if someone really wants to reverse-engineer your software or decompile it, ProGuard is not going to stop them. But is it at least a modest deterrent? I'm not sure if it's worth the hassle of translating my stack traces later on. I would recommend ProGuard. Even without obfuscation (which can significantly shorten the names used in the constant pool) it can remove "dead code" (unused methods) of used libraries, etc. (It can also be used to conveniently merge everything together). It takes a little bit of fiddling to "get correct", esp. if there is dynamically

Obfuscating resource strings that may give away too much information about programming logic

这一生的挚爱 提交于 2019-11-30 10:56:19
I currently use a combination of LVL and Proguard as a first line of defence against piracy. However, what about the resource strings? For example, if there is a resource string like "License check failed" then doesn't the pirate simply need to trace that resource id back to where it was used in the code? In fact, this is also true if the string is something generic like "Please contact dev". What is the best approach? If you define a resource string, you will probably define or use it in: the string resource file res/values/strings.xml , layout files res/layout/*.xml , the generated resource

Android Proguard not removing all log messages

血红的双手。 提交于 2019-11-30 10:42:49
问题 I want to create an obfuscated android application. I use ProGuard for that. I would like to automatically remove all the Log.* messages. How can I do that? I found this post but I still get them. (I use a decompiler to check the obfuscation). The proguard-project.txt is the following: -injars libs/In.jar -outjars libs/Out.jar #-libraryjars <java.home>/lib/rt.jar -libraryjars C:/Users/thomas/android-sdks/platforms/android-7/android.jar -dontpreverify -repackageclasses ''

How to integrate Proguard obfuscation in my JavaFX's IntelliJ artifact?

被刻印的时光 ゝ 提交于 2019-11-30 10:20:25
I'm developing a JavaFX application using IntelliJ IDEA as the IDE. So far, everything runs smoothly, I have all my external libs configured and my JavaFX artifact being correctly created. Now I would like to integrate obfuscation (using Proguard) when the artifact is created. IntelliJ have a 'Pre-processing' and 'Post-processing' option in artifact's properties where I can define an Ant task to be runned. But I have no idea how to create that task and tell the compiler my obfuscation options. Thank you very much in advance for any clues, Best regards There are 3 basic ways you do it: Create a

Android, ProGuard, and keepclasseswithmembernames

倾然丶 夕夏残阳落幕 提交于 2019-11-30 09:16:17
A common pattern in ProGuard configs for Android applications is to preserve custom View classes, since they are probably referenced only from layout XML instead of application code. Upon project creation, the ADT therefore add these rules to a project's proguard.cfg: -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet); } -keepclasseswithmembernames class * { public <init>(android.content.Context, android.util.AttributeSet, int); } I guess the idea here is to say that whenever a class defines a constructor that may be called by a layout

What is the default for minifyEnabled for buildType not explicitly scripted?

穿精又带淫゛_ 提交于 2019-11-30 08:50:30
I imported several eclipse projects to Android Studio (v1.1). In the original Eclipse environment, they use Proguard for release mode. In the Android Studio environment, this was translated to the following in the build.gradle script (by the import, not by me): buildTypes { release { minifyEnabled true proguardFiles 'proguard.cfg' } } I understand that this means that "in release build, enable Proguard's minify, using proguard.cfg" . The problem, however, is that minify seems to be happening in non-release build (i.e. debug) as well! How is this possible? What is the default for minifyEnabled

Android Build with Gradle and ProGuard : “The output jar must be specified after an input jar, or it will be empty”

前提是你 提交于 2019-11-30 08:01:24
I'm creating a build with different flavors with Gradle. It used to run quite good until now, until I wanted to enable Proguard . I enabled minifyEnabled for my Release Build and now I'm having an exception saying : " Caused by: org.gradle.internal.UncheckedException: java.io.IOException: The output jar [.../app/build/intermediates/multi-dex/dev/release/componentClasses.jar] must be specified after an input jar, or it will be empty. " Does anybody know what is causing this exception ? I basically want to enable ProGuard before I release my application. Here is my Gradle file below. lintOptions

Proguard tells me 'Please correct the above warnings first.'. How to address references of external jars?

喜你入骨 提交于 2019-11-30 07:55:05
问题 How can I address the warnings? Log says [proguard] Note: duplicate definition of library class... ... [proguard] Note: there were 370 duplicate class definitions. [proguard] Initializing... [proguard] Warning: abc.cba..: can't find superclass or interface xyz.zyx.... ... [proguard] Note: the configuration refers to the unknown class 'android.app.backup.BackupAgentHelper'... ... [proguard] Warning: library class android.content.IntentFilter depends on program class org.xmlpull.v1