proguard

Getting too many Proguard warnings

南楼画角 提交于 2019-12-08 06:07:33
问题 I am trying to obfuscate my java application that is packed into a SINGEL jar. The application uses SWT gui libaries among others. I have duly listed them all in the Proguard configuration file via -libraryjars, but still I get too many warnings of the same type i.e.: "Warning: library class org.eclipse.swt.accessibility.Accessible$10 extends or implements program class org.eclipse.swt.internal.ole.win32.COMObject" What am doing wrong here?? Here is how my Proguard configuration looks like:

AdMob banner is blank with ProGuard enabled

孤街醉人 提交于 2019-12-08 05:23:16
问题 I've added the AdMob (320x50 banners) to my project and tested it successfully in debug mode. For production builds I have ProGuard obfuscation enabled and banners disappeared. I've tried using these ProGuard rules but it doesn't affect: -keep public class com.google.android.gms.ads.** { public *; } -keep public class com.google.ads.** { public *; } I initialize AdMob in my Application class like: MobileAds.initialize(getApplicationContext(), getString(R.string.banner_ad_id)); in xml layout I

Can proguard obfuscate raw filenames

隐身守侯 提交于 2019-12-08 04:57:17
问题 If you unzip an apk file you'll find that all the res files are on display. This can cause a vulnerability. Is it possible to get the proguard tool to obfuscate the filenames in order to hide their purpose? 回答1: ProGuard can handle resources files in the following ways: Rename them to follow obfuscated names of corresponding class files (-adaptresourcefilenames), Update obfuscated class names in text files (-adaptresourcefilecontents), Otherwise, just copy them. ProGuard doesn't change file

How to skip proguard models used by retrofit2 that is on the base package?

只愿长相守 提交于 2019-12-08 03:38:10
问题 I am writing an application with Kotlin and Retrofit 2. As I use proguard, I follow the rules here: https://github.com/krschultz/android-proguard-snippets/blob/master/libraries/proguard-square-retrofit2.pro Besides I also need to proguard my models too, as stated in https://stackoverflow.com/a/41136007/3286489 It works fine if I have my models in a package, and I have -keep class com.elyeproj.wikisearchcount.model.** { *; } package com.elyeproj.wikisearchcount.model object Model { data class

Duplicate resources when using ProGuard and an Android application

烂漫一生 提交于 2019-12-08 02:32:08
问题 I'm trying to use ProGuard with one of my applications, let's say A. This application includes another application as a library (let's say B). This is my proguard file. -optimizationpasses 5 -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -keep public class * extends android.app.Activity -keep public class * extends android.app.Application -keep public class * extends android.app

Spongycastle is missing many algorithms when loaded on android

耗尽温柔 提交于 2019-12-08 02:05:50
问题 In this stackoverflow answer you can see a code to print all available providers and corresponding algorithms: How to find out what algorithm [ encryption ] are supported by my JVM? I am using latest version of spongycastle and when I ask to get the algorithms of Spongycastle ("SC") on android I get only a handful of algorithm. In fact I get this very limited list : provider: SC algorithm: PBEWITHMD5ANDDES algorithm: PBEWITHSHA256AND192BITAES-CBC-BC algorithm: OLDHMACSHA384 algorithm:

Android Studio gradle build issue: local variable type mismatch

和自甴很熟 提交于 2019-12-08 01:54:49
问题 As I tried to find solution on internet but nothing too much related to my case Issue is next, build fails and getting error: Error:Uncaught translation error: com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type java.lang.Object using a local variable of type int. This is symptomatic of .class transformation tools that ignore local variable information. I have 2 configs buildTypes { debug { debuggable true minifyEnabled true

proguard does not stop obfuscating method name despite “Keep names”

[亡魂溺海] 提交于 2019-12-08 00:07:02
问题 I have following set up for keeping class and class method names. It works well with classes hence classes in package and sub packages of com.seleniumtests.** are not obfuscated. But despite I have selected Keep names - .class method names check box, methods in classes of package com.seleniumtests.** are still obfuscated. Did I miss any configuration? 回答1: The checkbox for Keep names - .class method names is unrelated. It preserves the names of classes that are used in .class constructs, for

Do not optimize a specific class path with Proguard

狂风中的少年 提交于 2019-12-07 19:23:30
问题 I try to implement Amazon In App Purchase in my android application. Amazons documentation requires to specify -dontoptimize in the proguard rules. The -dontoptimize rule is a global option which will turn off all optimization, but I do want to optimize the other code. So my question is how to specify the proguard rules to only not optimize the Amazon iap code? It seems that the -keep rule is not enough. This question is related to this SO answer but I am asking for a way to keep the

What are features of using Proguard in project with Protocol Buffers?

风流意气都作罢 提交于 2019-12-07 16:26:50
问题 I have a project in where Google Protocol Buffers are used. Once I try to obfuscate it with ProGuard it seems that protobuf causes problem. All my own classes I package into mybuildedclasses.jar . Google code is packaged into protbuf.jar mybuildedclasses.jar protobuf.jar other external jars After that I am trying to obfuscate mybuildedclasses.jar . Config file is similar to this one. Eventually all jars are packaged inside another fat jar. I run the program and once message is tried to be