Configure PreEmptive Protection™ DashO™ Control Flow Obfuscation from three pages in the DashO user interface: Control Flow - Options, Control Flow - Include, and Control Flow - Exclude. Use them to turn Control Flow Obfuscation on, tune each feature, and choose which methods DashO protects.
To learn how Control Flow Obfuscation works, see Control Flow.
Prerequisites
- A DashO project.
Configure Control Flow Options
- Go to Control Flow to open the Control Flow — Options page.
- Select Control Flow to enable Control Flow Obfuscation.
-
Configure the Control Flow features:
Setting Description Block Jumbling Enables or disables Block Jumbling. Try/Catch Enables or disables Try/Catch Obfuscation. Max Number The maximum number of Try/Catch handlers DashO adds to a single method. It's next to the Try/Catch checkbox. Block Splitting Enables or disables Block Splitting. Target Block Size The minimum number of instructions in each block Block Splitting creates. A higher value produces fewer, longer blocks and fewer new instructions. It's next to the Block Splitting checkbox. Dalvik Compatibility Scales down Block Splitting to support the Dalvik VM, which KitKat (v4.4) and older Android devices use. - Save your project and build it to apply the changes.
Choose Which Methods to Protect
Use the Control Flow - Include and Control Flow - Exclude pages to select the methods, classes, or entire packages DashO protects with Control Flow Obfuscation. Both pages use the DashO rules editor. For details on creating, editing, and previewing rules, see Graphical Rules Editor.
Choose the page based on what you want to do:
| Goal | Page | Result |
| Protect everything except performance-critical code | Control Flow - Exclude | DashO protects all methods not covered by an exclude rule. |
| Protect only particularly sensitive code | Control Flow - Include | DashO protects only methods covered by an include rule. Adding even one include rule limits protection to the methods your include rules cover. |
- Go to Control Flow > Include or Control Flow > Exclude to open the Control Flow - Include or Control Flow - Exclude page.
- Create rules for the methods, classes, or packages you want to include or exclude. For more information, see Graphical Rules Editor.
- Preview your rules to confirm which methods they match.
- Save your project and build it to apply the changes.
Limitations and Troubleshooting
| Issue | Resolution |
| Feature checkboxes and settings are unavailable. | Select Control Flow first. The feature settings apply only when Control Flow Obfuscation is enabled. |
| Control Flow Obfuscation skips methods you expected it to protect. | Check the Control Flow - Include page. If it contains any rules, DashO protects only the methods those rules cover. |
| The protected app runs slower. | Exclude performance-critical methods, raise Target Block Size, or lower Max Number. |
| DashO warns that it removed local variable information. | This is expected. See Effect on LocalVariableTable and LocalVariableTypeTable. |