Deobfuscation using Zoho Apptics
Overview
Obfuscation of your code is the process of renaming all the classes and their methods names in a way that is difficult to reverse-engineer but will still function correctly. ProGuard (it's successor R8) is the default Java code optimizer and obfuscator for Android that performs compile-time tasks and helps in making android applications 90% Faster and 20% smaller in size.
If you are using Android Studio for development, mapping files will not be produced when you make instant runs. You need to choose the Build APK option to generate the mapping files. After the build is completed, the symbol file called mapping.txt can be found <module-name>/build/outputs/mapping/release/ or <module-name>/build/outputs/mapping/debug/, depending on how you initiate the build process.
Deobfuscation of crash reports
Obfuscated code might be helpful for code optimization, but can also add a challenge while debugging. During obfuscation, the some class and method names, symbol files, and debugging information required for diagnosing crashes and issues will be missing. The process of retracing the original stack traces and names of classes, methods in the app's code using the mapping.txt file is called deobfuscation.
In Zoho Apptics, you can upload and maintain mapping files for your every build of your Android apps.
Proguard rules
If you use pro-guard to obfuscate classes then the Apptics plugin will automatically upload the mapping file. You can add some rules to the ProGuard file and modify how code obfuscation happens for your app. Add the below-mentioned rules to the proguard-rules.pro file:
- -keep class com.zoho.zanalytics.**
- -dontwarn com.zoho.zanalytics.**
Add Proguard file manually
- Navigate to Developer > Symbols & Mapping. Select the ProGuard Mapping file and the package name for which you want to upload from the drop-down menu.
- Click Upload and a popup will appear.
- Select the appropriate app version and build version from the drop down.
- Click on Choose file and select the appropriate .txt file.
- Click Upload and the ProGuard Mapping file will be listed in the console.