proguard

how to obfuscate the war file using proguard

纵然是瞬间 提交于 2019-12-07 04:44:35
问题 I want to obfuscate a war file using proguard,how can i do so ? Please explain me the steps 回答1: I'm puzzled by this question. As other Java obfuscators, Proguard obfuscates the compiled bytecode (.class files) by renaming every variable, method etc. it considers safe to rename. I suppose you know this and know how to use Proguard for class files since you specifically asked about it. If not, read the proguard manual. As for war files, you can extract the class files from war (or jar) by

Proguard Breaks Android WebView, Why?

不羁岁月 提交于 2019-12-07 03:46:10
问题 I have a WebView in my activity, and using Proguard for obfuscation seems to break my WebView and i don't understand why. The code is pretty simple, I have the HTML file in my res/raw directory, here is the code that loads it fine when debugging. WebView mv = (WebView)findViewById(R.id.webView1); mv.loadUrl("file:///android_res/raw/wesite.html"); As soon as I create the apk for release, running it through proguard it doesn't work, i just get the cannot load page. I haven't added anything to

Proguard retrace isnt mapping the stack trace to the actual source

爱⌒轻易说出口 提交于 2019-12-07 02:51:51
问题 I have been using the eclipse built in proguard tool to obsucate the code, which Works fine. However when I try to retrace the stack trace of the obfuscated code, retrace doesn't output an un-obfuscated stacktrace. I have double check the mapping.txt to sure that i am using the right one. here is my stack trace ERROR/AndroidRuntime(19398): FATAL EXCEPTION: Thread-35 ERROR/AndroidRuntime(19398): java.lang.NullPointerException ERROR/AndroidRuntime(19398): at android.graphics.Canvas

Proguard makes reflection with the R class in android application no longer work

久未见 提交于 2019-12-07 02:13:32
问题 I have activated proguard in my project since I am trying to release this on Google Play. Even though proguard-android.txt has -keepclassmembers class **.R$* { public static <fields>; } which means it should not obfuscate the R.raw class that I need, I find that when running this code import headwayEnt.Blackhole_Darksun.R; private static final String RES_PATH = "headwayEnt.Blackhole_Darksun.R"; public static int getFileHandle(String fileName, String path) { String fullPath = RES_PATH + '$' +

Proguard - also use proguard files from modules

瘦欲@ 提交于 2019-12-07 01:40:30
问题 My projects build.gradle looks like following: android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "..." minSdkVersion 15 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile project(':androKnife') } And my androKnife module does have it's own proguard file. How can I make my main project use this file as

How to exclude R*.class files from a proguard build

99封情书 提交于 2019-12-07 00:41:08
问题 I am one step away from making the method described here: Targeting Android with Scala 2.8 Trunk builds work with a single project (vs one project for scala and one for android). I've come across a problem. Using this input file (arguments to) proguard: -injars bin;lib/scala-library.jar(!META-INF/MANIFEST.MF,!library.properties) -outjar lib/scandroid.jar -libraryjars lib/android.jar -dontwarn -dontoptimize -dontobfuscate -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers

what is the difference between -keep class and -dontwarn

不问归期 提交于 2019-12-06 23:04:30
问题 Hey I'm new with proGuard , I use it to protect my code from reverse engineering , but when I built my signed apk I got a lot of errors when I enabled proGuard ,I have googled my problem I've found answers that says use -dontwarn for the classes that showing in the error message but after seeing the documentation from proGuard it says If you don't feel like filtering out the problematic classes, you can try your luck with the -ignorewarnings option, or even the -dontwarn option. Only use

Android-Studio-1.2.RC Proguard warnings on Square's Okio library reference

放肆的年华 提交于 2019-12-06 22:40:13
问题 WIth Android Studio: 1.2.RC I enabled proguard in .gradle: ``` minifyEnabled=true and added these rules to my proguard-rules.pro: -dontwarn com.squareup.** -dontwarn okio.** and added these lint rules to my .gradle file: warningsAsErrors false abortOnError false disable 'InvalidPackage' ``` But I still get these warning when I try to run the app in debug mode: ``` Warning: okio.DeflaterSink: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement Warning: okio.Okio:

Proguard Duplicate Zip Entry

為{幸葍}努か 提交于 2019-12-06 21:55:37
问题 I am trying to run my android application through Proguard, however this keeps appearing: Warning:Exception while processing task java.io.IOException: Can't write [C:\Users\Aliaksei\AndroidStudioProjects\SignOutSystem\app\build\intermediates\transforms\proguard\debug\jars\3\1f\main.jar] (Can't read [D:\Users\Aliaksei\.android\build-cache\f7a6034d02d095f18cc21950f131d07fa78b41c0\output\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [android/support/v4/os/j.class == classes.jar:android

Signed apk getting crashed in proguard enable

左心房为你撑大大i 提交于 2019-12-06 20:58:15
问题 I am trying to use proguard in my app set the proguard to true and then the problem starts I am importing lib when I use proguard by following this -keepnames class com.somepackage.* with my package name the app is getting getting crashed when I try to use the signed apk. I know this iS a dumb question but I am stuck at this for last 5 hr not able to find an easy solution as I am using about 20 lib. I followed this also. Plz guide me in this how can I do this? This is my proguard rule class