Incremental Obfuscation allows PreEmptive Protection™ DashO™ to reuse the same class, method, and field renames and String Encryption/decryption methods used during a previous obfuscation.
This is important if you need to redistribute a portion of your application or if you rename serialized classes.
For example, suppose your application consists of three
After a release you discover a major issue in some logic and you would like to redistribute one of the
.jar files in a patch.
You would need to use incremental obfuscation to make sure the jar file:
- has the same class, method, and field names
- calls (or contains) the same injected string decryption methods
- properly interfaces with the renamed classes, methods, and fields in the other two jars
Incremental Obfuscation is supported by two mapping files which should always be configured to be output:
- Renaming Map File - A Renaming Map File contains a mapping of the original and new names of classes, methods, and fields. This information is necessary for stack-trace decoding and incremental obfuscation.
- String Encryption Map File - A String Encryption Map File contains information about the algorithms used by DashO to encrypt strings and the locations and algorithms used when injecting the decrypters (decryption methods). This information is necessary for incremental obfuscation.
Both these output files should be kept internally, possibly in source control, so that when the need arises for either stack-trace decoding or incremental obfuscation, you will be ready.
To perform an incremental obfuscation, these files should be renamed and set as the input maps for renaming and String Encryption. You should use the same configuration as the original build because changes to items such as renaming-exclusions or entry points may impact if classes, methods, or fields are renamed or removed. Once the build is finished, you should compare the new output maps with the input maps to make sure there are no unexpected inconsistencies.
An error will be output if the input map contains a new name for a class, method, or field which cannot be used because:
- The configuration has changed to prevent that class, method, or field from being renamed.
- The new name conflicts with another name.