proguard

Proguard retrace missing line numbers

梦想与她 提交于 2019-12-01 05:39:25
I'm trying to deobfucate a stack trace from my Android app. I used proguard when building the app and running retrace seem to work, more or less. What isn't working is decoding the line numbers. No line numbers are shown on the output and it lists several choices for each "at". Here is my proguard-project.txt file: -keepattributes LineNumberTable -assumenosideeffects class android.util.Log { public static int v(...); public static int d(...); } This is my stack trace: uncaught exception java.lang.NullPointerException at com.myapp.myapp.dbaccess.ag.a(Unknown Source) at com.myuapp.myapp.dbaccess

Android ProGuard how to hide/obfuscate source code of exported library

柔情痞子 提交于 2019-12-01 05:34:03
问题 I'm developing Android library and I want to hide/obfuscate the source code implementation of the library. The way the user project app will use the library is: startActivity( new Intent(context, LibraryActivityName.class) ); So I need to keep just the name of entry point Activity inside the library project, That's all. When I used the default ProGuard settings: buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } as

Android, Proguard and Javamail

本小妞迷上赌 提交于 2019-12-01 05:30:09
First off, i've already to referred to a similar post, Android, javamail and proguard The solution mentioned was to explicitly keep the following in proguard-project.txt: -dontwarn java.awt.** -dontwarn java.beans.Beans -dontwarn javax.security.** -keep class javamail.** {*;} -keep class javax.mail.** {*;} -keep class javax.activation.** {*;} -keep class com.sun.mail.dsn.** {*;} -keep class com.sun.mail.handlers.** {*;} -keep class com.sun.mail.smtp.** {*;} -keep class com.sun.mail.util.** {*;} -keep class mailcap.** {*;} -keep class mimetypes.** {*;} -keep class myjava.awt.datatransfer.** {*;

Using “dontwarn” in proguard

末鹿安然 提交于 2019-12-01 04:40:23
I use proguard successfully but whenever I add external library (those that belongs to advertising) proguard fails with "can't find reference ...etc". I tried many combination such as libraryjars, injars ...etc but no luck. Then I used the " -dontwarn " option on the external file and things worked magically. Is this bad to do? I mean is there a problem I am not seeing with handling external jars using this attribute? Thank you For warnings about missing third-party classes, the options -ignorewarnings or -dontwarn are probably fine. If the code already works in debug mode, it means that the

Proguard stops Javascript in WebView from working

ⅰ亾dé卋堺 提交于 2019-12-01 04:28:46
I have a class JSBridge (an inner class) which is a javascript interface: private class JsBridge implements JsCallback { /** * @param handlerName method required * @param jsonData data passed through from javascript * @param jsCallback A callback to trigger when handler specified by handlername has finished, could be null */ @JavascriptInterface public void callHandler(final String handlerName, final String jsonData, final String jsCallback) { Log.d(App.TAG, "Bridge call from JS, received " + handlerName); } @JavascriptInterface public void onPageLoad(final String pageName) { Log.d(App.TAG,

android release apk bigger than debug apk

删除回忆录丶 提交于 2019-12-01 03:31:19
I'm using proguard to reduce my apk size. The debug apk reduce from 90mb to 55mb, but the signed apk is 71mb. Here is my build.gradle code: apply plugin: 'com.android.application' android { signingConfigs { XXXX { keyAlias 'xxxx' keyPassword 'xxxx' storeFile file('/Users/xxxx.jks') storePassword 'xxxxxx' } } compileSdkVersion 23 buildToolsVersion "24.0.2" defaultConfig { applicationId "com.xxxx" minSdkVersion 14 targetSdkVersion 22 versionCode 61 versionName "4.1.8.1" multiDexEnabled true signingConfig signingConfigs.XXXX ndk { abiFilters "armeabi", "armeabi-v7a", "x86", "mips" } } buildTypes

Android, Proguard and Javamail

风格不统一 提交于 2019-12-01 03:16:38
问题 First off, i've already to referred to a similar post, Android, javamail and proguard The solution mentioned was to explicitly keep the following in proguard-project.txt: -dontwarn java.awt.** -dontwarn java.beans.Beans -dontwarn javax.security.** -keep class javamail.** {*;} -keep class javax.mail.** {*;} -keep class javax.activation.** {*;} -keep class com.sun.mail.dsn.** {*;} -keep class com.sun.mail.handlers.** {*;} -keep class com.sun.mail.smtp.** {*;} -keep class com.sun.mail.util.** {*

Android Proguard - how to keep onClick handlers only referenced from XML layouts

混江龙づ霸主 提交于 2019-12-01 03:14:01
In my Android app I ofter don't create a View's on-click handler in code, but rely on the ability to specify it in the XML layout file, like this: <Button .... android:onClick="onSearchClicked" ...../> And then have the method in the Activity like this: public void onSearchClicked( View v ) { ........} Meaning there is no obvious reference to this method in my own code. When running Proguard for a production release it seems to remove this method and the on-click fails. What can I add to my proguard config file to avoid this that won't oblige me to rename all these methods? An annotation I

JavaFX Proguard Obfuscation

折月煮酒 提交于 2019-12-01 03:10:14
问题 I'm struggling with obfuscation of JavaFX application. Using this project as a base: https://github.com/openjfx/samples/tree/master/IDE/IntelliJ/Non-Modular/Gradle Proguard throws this error: java.io.IOException: Can't write [Path\infile.jar] (Can't read [Path\outfile.jar] (Duplicate jar entry [a.class])) Proguard config file: -dontoptimize -dontshrink -libraryjars 'E:\Prog\jdk-11.0.2\jmods' -libraryjars 'E:\Prog\javafx-sdk\lib' # Save meta-data for stack traces -renamesourcefileattribute

Proguard retrace missing line numbers

时间秒杀一切 提交于 2019-12-01 02:55:45
问题 I'm trying to deobfucate a stack trace from my Android app. I used proguard when building the app and running retrace seem to work, more or less. What isn't working is decoding the line numbers. No line numbers are shown on the output and it lists several choices for each "at". Here is my proguard-project.txt file: -keepattributes LineNumberTable -assumenosideeffects class android.util.Log { public static int v(...); public static int d(...); } This is my stack trace: uncaught exception java