java - Proguard doesn't hide class and folder names in Android -


i have android application wanted obfuscate using proguard.

after time managed make work external libraries using. configure proguard release build using gradle

buildtypes {     release {         signingconfig signingconfigs.release         minifyenabled true         proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'     }  

there 1 problem tho.

i testing obfuscated code smali2java, can read code , methods if not obfuscated, , when is, can see variables , imports. the problem can see class names , folders. it's important me hide them user couldn't see project structure , code this:

public class dtostoprintrequestsmapper {     private final transactionlinecreator a;     private final protocoldiscountcreator b;     private final protocolpaymentcreator c; } 

i not want user able see things. folders structure in project.

here proguard-rules:

# add project specific proguard rules here. # more details, see #   http://developer.android.com/guide/developing/tools/proguard.html  # add project specific keep options here:  # ignore warnings -dontwarn com.google.common.** -dontwarn com.octo.** -dontwarn com.squareup.javawriter.** -dontwarn okio.**  # butterknife -dontwarn butterknife.internal.** -keep class **$$viewinjector { *; } -keepnames class * { @butterknife.injectview *;}  # dagger -dontwarn dagger.** -keepclassmembers,allowobfuscation class * {     @javax.inject.* *;     @dagger.* *;     <init>(); } -keep class dagger.* { *; } -keep class javax.inject.* { *; } -keep class * extends dagger.internal.binding -keep class * extends dagger.internal.moduleadapter -keep class * extends dagger.internal.staticinjection -keep class * extends dagger.internal.bindingsgroup  -keep class com.someapp.waiterapp.infrastructure.someappmodule -keep class com.someapp.waiterapp.infrastructure.androidmodule -keep class com.someapp.waiterapp.infrastructure.rootmodule -keep class dagger.lazy  # retrofit, okhttp, gson -dontwarn retrofit.** -keepattributes *annotation* -keepattributes signature -keep class com.squareup.okhttp.** { *; } -keep interface com.squareup.okhttp.** { *; }  -keepattributes exceptions -keep class retrofit.** { *; } -keepclasseswithmembers class * {     @retrofit.http.* <methods>; } -keep class com.someapp.waiterapp.lib.api.contract.** { *; } -keepclassmembernames interface * {     @retrofit.http.* <methods>; } -keep class sun.misc.unsafe { *; }  # otto -keepattributes *annotation* -keepclassmembers class ** {     @com.squareup.otto.subscribe public *;     @com.squareup.otto.produce public *; } 

i've tried change

keepnames class * { @butterknife.injectview *;} 

to

keep class * { @butterknife.injectview *;} 

and

keepclassmembernames interface  

to

keepclassmembers interface  

but no result.

if there comes mind rename class , folder names typical a/b/c/d appreciated.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -