- 23 Dec 2024
- 1 Minute à lire
- SombreLumière
- PDF
Using the Shielding Tool with ProGuard or R8
- Mis à jour le 23 Dec 2024
- 1 Minute à lire
- SombreLumière
- PDF
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: