Incremental Obfuscation lets PreEmptive Protection™ DashO™ reuse the class, method, and field names, and the String Encryption and decryption methods, from a previous build. Use it when you redistribute part of your application, such as a patch, or when you rename serialized classes. Without it, newly protected code may not work with code you already shipped.
Prerequisites
- The Renaming Map File and String Encryption Map File from the original build.
- The DashO configuration from the original build.
Prepare Every Release for Incremental Obfuscation
You can't perform Incremental Obfuscation later without the map files from the original build. Set up every release build to produce them.
- Configure the Renaming Map File as an output. For more information, see Configure Map Files.
- Configure the String Encryption Map File as an output. For more information, see Configure String Encryption Map Files.
- Build your release.
- Store both map files internally, for example in source control, so they're ready when you need to decode stack traces or perform Incremental Obfuscation.
Perform an Incremental Obfuscation
- Rename the Renaming Map File and String Encryption Map File from the original build.
- Set the renamed Renaming Map File as the input map on the Renaming - Map Files page.
- Set the renamed String Encryption Map File as the input map on the String Encryption - Options page.
- Use the same configuration as the original build. Changes to settings such as Renaming exclusions or entry points can change whether DashO renames or removes classes, methods, and fields.
- Build your project.
- Compare the new output maps with the input maps, and check for unexpected inconsistencies.
For more information, see Configuring Renaming and Configuring String Encryption.
Examples and Use Cases
Patch One JAR File in a Multi-JAR Application
Your application consists of three JAR files. After a release, you find a major issue in some logic and want to redistribute just one JAR file as a patch. Use Incremental Obfuscation so the patched JAR file:
- Has the same class, method, and field names as before.
- Calls, or contains, the same injected string decryption methods.
- Works correctly with the renamed classes, methods, and fields in the other two JAR files.
Limitations and Troubleshooting
| Issue | Cause and resolution |
| DashO reports an error about a name in the input map. |
The input map contains a new name DashO can't use, because either:
Restore the original configuration. |
| The patched code doesn't work with previously shipped code. | Make sure you set both input maps, and that the configuration matches the original build. |
| You can't find the map files from the original build. | You can't perform Incremental Obfuscation without them. Output and store map files for every release. |
| Incremental Obfuscation isn't available. | It applies only to Standard Mode. String Encryption Map Files aren't supported in Android Mode. |