proguard

How to make Proguard to obfuscate jars within a jar file

巧了我就是萌 提交于 2019-12-12 04:25:40
问题 I have a run-able java jar file let's call it masterProgram.jar . Inside this masterProgram.jar if I extract it using 7Zip or WinRAR there are other jars, lets call it lib1.jar, lib2.jar . Proguard managed to obfuscated the master jar, but when I look-inside the lib jars are not. and because of this the program (masterProgram.jar) breaks at a certain point. I also already set overloadaggressively option in my condig. I'm calling the proguard.jar through an ant build.xml. and here is my config

Proguard Obfuscation doesnt work on activities?

半腔热情 提交于 2019-12-12 04:12:48
问题 i ran proguard on my project but it doesnt obfuscate my activity name. i have tried several rules and it is not working. i dont know what exactly it means for example the rule below: -keep public class models.* { *; } and whats the difference between -keepclassmembers class * { } and -keepclasseswithmembers class * { } i am having difficulty on how these rules work. please help. 回答1: During the build process, proguard checks the AndroidManifest and keeps all activity classes. This is needed

Hiding strings in Obfuscated code

白昼怎懂夜的黑 提交于 2019-12-12 03:54:50
问题 I just Obfuscated my Android code using proguard and then decompiled it. There are a number of strings I would really like to hide from prying eyes. When I decompiled my code the strings were there for everyone to see...and change. One of the strings is a URL to my licensing server and they could in effect change the url to point to a fake server (as I will be releasing the server code to the public). What is the best way of hiding this sort of information? Also, I noticed that the R class

Android Proguard “Can't find referenced”

旧城冷巷雨未停 提交于 2019-12-12 03:43:47
问题 I want to generate a signed apk. But I reached the 64k methods limit so I searched for some solutions and one of them is to use proguard. I edited my build.gradle like this: buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } When I then try to generate the signed apk I get a lot of warnings: Warning:com.akexorcist.roundcornerprogressbar.TextRoundCornerProgressBar$2: can't find referenced method

MultiDex problems with Gradle and ProGuard

时光总嘲笑我的痴心妄想 提交于 2019-12-12 03:24:41
问题 I am having difficulties with MultiDex. I have enabled it in Gradle ( multiDexEnabled true ) and main class is calling MultiDex.install in attachBaseContext . I suspect the Gradle is not adding MultiDexExtractor class to first dex file (it is not in maindexlist_deobfuscated.txt ). Snippet from log: 06-03 07:56:59.030 4088-4088/xxx.android I/dalvikvm: Could not find method android.support.multidex.MultiDexExtractor.verifyZipFile, referenced from method android.support.multidex.MultiDex

classes.jar not found after using ProGuard in Android studio

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 03:24:20
问题 I have enabled minifyEnabled true in build.grade . [...] Information:Gradle tasks [:app:assembleRelease] Warning:com.caverock.androidsvg.SVGImageView: can't find referenced class com.caverock.androidsvg.R$styleable Warning:com.caverock.androidsvg.SVGImageView: can't find referenced class com.caverock.androidsvg.R Warning:there were 3 unresolved references to classes or interfaces. You may need to add missing library jars or update their versions. If your code works fine without the missing

ProGuard and HoloEverywhere: Export Signed Application Errors

蹲街弑〆低调 提交于 2019-12-12 03:03:23
问题 I'm using ActionBarSherlock and HoloEverywhere in my project. Everything works perfectly, except when I try to export my signed application, ProGuard gives me grief: [2013-05-19 00:13:53 - ] Proguard returned with error code 1. See console [2013-05-19 00:13:53 - ] Warning: com.actionbarsherlock.widget.SuggestionsAdapter: can't find referenced field 'android.content.Context mContext' in class com.actionbarsherlock.widget.SuggestionsAdapter [2013-05-19 00:13:53 - ] Warning: com

google play services shows class not found after using proguard

强颜欢笑 提交于 2019-12-12 02:34:20
问题 Im using compile 'com.google.android.gms:play-services-maps:9.4.0' compile 'com.google.android.gms:play-services-location:9.4.0' compile 'com.google.android.gms:play-services-places:9.4.0' compile 'com.google.android.gms:play-services-analytics:9.4.0' The official docs says: ProGuard directives are included in the Play services client libraries to preserve the required classes. The Android Plugin for Gradle automatically appends ProGuard configuration files in an AAR (Android ARchive) package

Unzip from assets doesn't work when using proguard

≡放荡痞女 提交于 2019-12-12 02:27:25
问题 I have a 20MB database stored in the apk's assets, which on first run is extracted for use. To do this I use PackageManager pm = context.getPackageManager(); String apkFile = pm.getApplicationInfo(context.getPackageName(), 0).sourceDir; ZipFile zipFile = new ZipFile(apkFile); ZipEntry entry = zipFile.getEntry("assets/FILENAME"); myInput = zipFile.getInputStream(entry); myOutput = new FileOutputStream(file); byte[] buffer = new byte[1024*4]; int length; int total = 0; int counter = 1; while (

proguard obfuscation of package-private members shared across maven modules

筅森魡賤 提交于 2019-12-12 02:21:43
问题 I'm using the com.pyx4me.proguard-maven-plugin to obfuscate code in a multi-module project. How can I obfuscate a module that depends upon 'friend' methods from a different (obfuscated) module? I wish to keep everything from the base module but shrink/optimize as much as possible in the dependent module. I've tried a variety of 'keep*', 'dontoptimize' and 'dontshrink' options but nothing seems to help. Cross-posting from https://groups.google.com/forum/#!topic/pyx4me-users/1auM9xSQkLY. The