Proguard output files and their usefulness
After the confusion, we will output some files, in the Gradle mode is under the <project_dir>/build/proguard/ directory, Ant is in the <project_dir>/bin/ Proguard directory, Eclipse is built in <project_dir>/proguard video.
Each of the following documents is available:
+ Dump.txt describes the internal structure between all the class files in the apk file.
+ Mapping.txt Lists the original classes, methods, and mappings between the field names and the code after the confusion.
+ Seeds.txt lists classes and members that are not confused
+ usage.txt lists the code removed from the APK
When the release version of our released program bug, you can use the above file (special time Mapping.txt) file to find the original location of the error, bug modification. At the same time, there may be errors at the beginning of the Proguard configuration, or through the error log, depending on the files, find which files should not be confused, thereby modifying the Proguard configuration.
Note: These files will be overwritten after the re-release is compiled, so it is best to keep a copy of the configuration file without having to eat the release program.
Debugging Proguard after confusing the program
The above said the output of several files, we can use when changing the bug, through the mapping.txt, through the mapping relationship to find corresponding classes, methods, fields and so on.
In addition, the Proguard file contains the retrace script, you can restore a confused stack trace information into a readable information, window Retrace.bat,linux and Mac is retrace.sh, in <sdk_root The >/tools/proguard/ folder. The syntax is:
retrace.bat|retrace.sh [-verbose] mapping.txt [<stacktrace_file>]
For example:
retrace.bat -verbose mapping.txt obfuscated_trace.txt
If you do not specify <stacktrace_file>, the retrace tool will read from the standard input.
Code debugging after Android obfuscation