Android: What is the display of Proguard and ProGuard

When I checked the crash of my application, I noticed this report

Download the Deobfuscation ProGuard file to clear future stack traces for this version of the APK. checked this link but did not understand https://support.google.com/googleplay/android-developer/answer/6295281?hl=en

+7
android crash proguard
source share
3 answers

As my answer is from here, Proguard is one of the main processes when you tried to compile apk (especially when you release apk in google play store)

  • Obfuscation

  • Optimization

  • Abbreviation

Problems with the work of the Android studio. (Apktool)

To say it in a simple way, you can see what apk without proguard will look like using some reverse engineering technologies

https://ahbsa.wordpress.com/2015/04/30/decompiling-apk-reverse-engineering-android-application/

Classes inside apk with proguard would be something similar using some reverse engineering technologies

enter image description here

Now you can have a mind. Even if you used Proguard, the .dex classes could still be decomposed. However, if you used Proguard, the code is almost unreadable. And if you used more advanced technologies (such as Dexguard), they can provide better performance, and the code will be more complex after decompiling .dex classes.

+2
source share

The proguard that you use for a number of reasons mentioned in this question. Should I use ProGuard?

I copy the answer from this question in case of link violation:

It is very easy to rebuild Android applications, so if you want to prevent this, yes, you should use ProGuard for its main function: obfuscation.

ProGuard also has two other important features: an abbreviation that eliminates unused code and is obviously very useful, as well as optimization. However, optimization works with Java bytecode, and since Android runs on Dalvik bytecode, which is converted from Java bytecode, some optimizations will not work as well. Therefore, you must be careful.

There are instructions for using proguard on the Android website. The main thing you need to check is that you have a string

proguard.config = $ {sdk.dir} /tools/proguard/proguard-android.txt:proguard-project.txt in the project.properties file. Since you mention that you are using Android Studio, and you do not have this file, but are asked about the configuration file, try choosing the one that is in the Android SDK (tools / proguard / proguard-android.txt).

0
source share

In android studio

1) Go to Project "build.gradle" (the build.gradle module is not the root directories of the build.gradle file)

2) Edit it and add the type in the "buildTypes" section (as I added the release and debug mode)

3) Here, "minifyEnable" is the proguard option, which allows Enable to run proguard in the appropriate mode, setting TRUE (Release and Debug, I am true for release mode and false in debug mode)

4) The line after this is “proguardFiles getDefaultProguardFile ('proguard-android.txt'), represent the proguard rule file you will receive this in the application module (module) up to the name“ proguard-rules.pro "(since you can identify the last entry in the above above line) edite / add rules for proguard.

5) and here you are done!

If I miss something, please tell me. Thanks.

proguard rules

0
source share

All Articles