Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

my app is not obfuscated due to -dontoptimize and -dontobfuscate rules in progaurd-rules.pro #76

Open
malik082009 opened this issue Nov 30, 2020 · 3 comments

Comments

@malik082009
Copy link

malik082009 commented Nov 30, 2020

I raised an issue #74
this issue was resolved by adding following lines in progaurd-rules.pro

-dontoptimize -dontobfuscate -keepattributes SourceFile,LineNumberTable -keep class org.whispersystems.** { *; } -keep class org.thoughtcrime.securesms.** { *; } -keepclassmembers class ** { public void onEvent*(**); }

after adding above line of code, my whole app code is not obfuscated now because of just these two lines -dontoptimize -dontobfuscate.
If i remove these two instructions my app crashes during serialization of signal protocol classes.

my configuration in build.gradle file

release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard.cfg' useProguard true debuggable false } debug { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile( 'proguard-android-optimize.txt'), 'proguard-rules.pro', 'proguard.cfg' useProguard true debuggable false }

I tried adding rules for signal in seperate file proguard.cfg, as you can see above. but no lock :(
kindly let me know how to obfuscate my app.

@malik082009 malik082009 changed the title my code is not obfuscated due to -dontoptimize and -dontobfuscate rules in progaurd-rules.pro my app is not obfuscated due to -dontoptimize and -dontobfuscate rules in progaurd-rules.pro Nov 30, 2020
@Mubashir313
Copy link

I'm facing the same Issues
someone please resolve this issue.

@gowtham1094
Copy link

@malik082009 @Mubashir313 did u guys find any work around?

@malik082009
Copy link
Author

@gowtham1094 yeah. use this.
-keepattributes SourceFile,LineNumberTable -keep class org.whispersystems.** { *; } -keep class org.thoughtcrime.securesms.** { *; } -keepclassmembers class ** { public void onEvent*(**); }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants