proguard

How to prevent a “teardown” of my apk

泪湿孤枕 提交于 2019-12-12 18:40:19
问题 According to this link, "Android Police" were able to teardown the Google Play apk and clearly read the strings file. I thought there were ways to prevent this using proguard, but does it work well? I remember watching the I/O conference this year and they mentioned something about encrypting your app I believe. I haven't read anything that has cured my anxiety about sending out an app that can not be decompiled/deconstructed or anything. Can anyone with experience vouch for this (proguard

Netbeans. Obfuscator type (PROGUARD) is not found in obfuscator classpath

自古美人都是妖i 提交于 2019-12-12 18:27:24
问题 I'm trying to build my project obfuscated but It's not working. I get this warning: Obfuscator type (PROGUARD) is not found in obfuscator classpath, using NONE. Please use Plugins Manager to install the missing obfuscator library. I looked at the plugins option but I don't know how to add proguard. 回答1: Goto the Tools > Plugins then goto Available Plugins tab and search for Proguard you will have that listed. Tick the checkbox that follows it and press install. You can see the screenshot

Obfuscating a module/library

元气小坏坏 提交于 2019-12-12 18:25:25
问题 I have a library that will be consumed by apps. This module has interfaces and helper classes. How can I obfuscate the whole module but still allow access to all those interfaces and helper classes? I tried this: buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } Then I found myself having to do --keep on all my classes in proguard. Is there something I can add to pro guard so that I can keep all those interfaces

Library class (from Android sdk) depends on program class (again, Android sdk)

你说的曾经没有我的故事 提交于 2019-12-12 15:11:33
问题 We are migrating from Android Gradle plugin 2.3.3 to Gradle plugin 3.0.1. Our application consists of an Application module and a Library module. Several dependencies are transitive (connected using api keyword) but even making them non-transitive using implementation doesn't help. After changing all the compile -type dependencies to the new ones, debug build works well. However, release build with Proguard shows thousands of warnings (on 2.3.3 everything goes well) In particular, I don't get

Field.getGenericType() returns instance of java.lang.Class instead of Type

为君一笑 提交于 2019-12-12 15:08:26
问题 I'm having issues with proguard and some reflection stuff. Myclass.java package not.obfuscated class MyClass { public List<InnerClass> childs; } InnerClass.java package not.obfuscated class InnerClass { //.somestuff } Inside proguard.cfg I have: -keep class not.obfuscated.** {*;} Inside another class I manage to get the "Field" instance for the MyClass.childs field and then try to get the getGenericType to determine which class is inside the List brackets (< InnerClass >) For logging purposes

How to make R8 + proguard-android-optimize.txt + Google Drive API works seamlessly?

拟墨画扇 提交于 2019-12-12 12:21:49
问题 This is our R8 version Current version is: 1.4.94 (build 390954928f0db9c3b888a367f7f128ce3bbfb160 from go/r8bot (luci-r8-ci-archive-0-5g74)). When I switch from buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } to buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } We're getting the following error. com.google.api.client

Is merging classes with ProGuard recommended on Android/Dalvik?

送分小仙女□ 提交于 2019-12-12 11:55:36
问题 It just occurred to me that one of the ProGuard code optimizations we used, namely merging class hierarchies, may perhaps not be a good choice at all. My hunch was that it would be beneficial to merge classes in order to cut down on invocations of the ClassLoader, which at least on a JVM is a particularly slow operation, and in our code we opted for many smaller (often inner) classes rather than large God object classes, so the ClassLoader will run relatively often. However, given the extreme

How can I tell which classes Proguard warns me about?

爷,独闯天下 提交于 2019-12-12 11:26:53
问题 I am trying to release my app and ProGuard is causing all sorts of errors with my server code so I went into the gradle console and see this: Note: there were 2 references to unknown classes. You should check your configuration for typos. (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass) Note: there were 26 unkept descriptor classes in kept class members. You should consider explicitly keeping the mentioned classes (using '-keep'). (http://proguard.sourceforge.net

How can I use different proguard files in different flavors or for different build types?

荒凉一梦 提交于 2019-12-12 11:23:29
问题 I need to make different flavors for test libraries. Why? Well, I want project to be fully secured so I wanna minifying to be enabled all the time(even for debug build type). While making tests I'm using different classes from project, so I decided to change proguard files using flavor. It looks like something this : android { ... buildTypes { release { minifyEnabled true testProguardFile 'test-proguard-rules.pro' } debug { minifyEnabled true testProguardFile 'test-proguard-rules.pro' } } ...

Parcelable Issues When Obfuscating With Proguard

两盒软妹~` 提交于 2019-12-12 10:34:48
问题 My app works fine before obfuscation but when I enable proguard I get the following error: 2013-05-02 13:43:58.772 E 30138/AndroidRuntime: FATAL EXCEPTION: main java.lang.NumberFormatException: Invalid long: "0.20" at java.lang.Long.invalidLong(Long.java:125) at java.lang.Long.parse(Long.java:362) at java.lang.Long.parseLong(Long.java:353) at java.lang.Long.parseLong(Long.java:319) at com.sourcetone.data.model.Station.long getId()(SourceFile:195) at com.sourcetone.STStationListFragment.void