Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ProGuard - only obfuscation

Is it possible to use ProGuard for only obfuscation. I don't want ProGuard to remove any classes from my projects. My intention to use ProGuard is only for obfuscation so as to prevent reverse engineering.

like image 248
Vinoth Avatar asked Jul 09 '11 07:07

Vinoth


People also ask

Does ProGuard obfuscate code?

You can obfuscate Android code to provide security against reverse engineering. You can use the Android ProGuard tool to obfuscate, shrink, and optimize your code.

Should I use R8 or ProGuard?

R8 is having a faster processing time than Proguard which reduces build time. R8 gives better output results than Proguard. R8 reduces the app size by 10 % whereas Proguard reduces app size by 8.5 %. The android app having a Gradle plugin above 3.4.

What is ProGuard obfuscation?

ProGuard is a command-line tool that reduces app size by shrinking bytecode and obfuscates the names of classes, fields and methods. It's an ideal fit for developers working with Java or Kotlin who are primarily interested in an Android optimizer.


1 Answers

Yes, by specifying

-dontshrink -dontoptimize 

You can find details on all configuration options in the ProGuard manual.

Note that shrinking and optimization may help preventing reverse engineering a bit.

like image 83
Eric Lafortune Avatar answered Oct 03 '22 03:10

Eric Lafortune