Using the Shielding Tool with ProGuard or R8
  • 22 Jan 2025
  • 1 Minute à lire
  • Sombre
    Lumière
  • PDF

Using the Shielding Tool with ProGuard or R8

  • Sombre
    Lumière
  • PDF

The content is currently unavailable in French. You are viewing the default English version.
Résumé de l’article

If you use ProGuard or R8 to obfuscate the Java classes of your application, then the obfuscation tool generates a mapping.txt file which contains a mapping of the obfuscated class, method, and field names to the original names. When publishing your app on Google Play, you can upload the mapping.txt file for each version of your APK. Then Google Play will deobfuscate incoming stack traces from user-reported issues so you can review them in the Google Play Console.

The Shielding Tool also obfuscates class, method, and field names of App Shielding classes and writes a mapping of this obfuscation to a mapping.txt file in the same directory as the shielded-app.aab. The mapping file - mapping.txt - generated by the Shielding Tool is compatible with the Android Studio tools and the Play console. They can be used to de-obfuscate stack traces from applications which were obfuscated by the Shielding Tool.

If you use both ProGuard or R8 and the Shibaselding Tool, then the Shielding Tool can combine the ProGuard/R8 mapping.txt file with the Shielding Tool obfuscation and write a single, combined mapping.txt if you pass the path to the ProGuard/R8 mapping.txt file with the command line argument --proguard-mapping to the Shielding Tool:

java -jar Shielder.jar [options] app.aab \
  --proguard-mapping app/build/outputs/mapping/release/mapping.txt

R8 saves the file in the <module-name>/build/outputs/mapping/build-type/ directory.

See:


Cet article vous a-t-il été utile ?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, facilitant la découverte de connaissances grâce à l’intelligence conversationnelle