PreEmptive Protection™ DashO™ includes Android Mode for use with the DashO Gradle Plugin for Android as part of an Android build process that uses R8. DashO uses Android Mode whenever it works with an Android Mode project file, whether through the DashO Gradle Plugin for Android or when the project file is open in the DashO GUI.
DashO uses Standard Mode when it is not using an Android Mode project file. Standard Mode is used for Java projects and to post-process an APK.
Note: If you use the older DashO Gradle Plugin for Android, see the upgrade instructions to convert it to Android Mode.
Works with R8
The DashO Gradle Plugin for Android operates with the Android Gradle Plugin and R8 to protect an application. Because R8 performs transformations that DashO can also perform, DashO Android Mode automatically disables the following transformations in DashO:
Because DashO does not perform these transformations, enable R8 in your Android project alongside DashO to protect the application.
Entry Points, which DashO uses for Renaming and Removal, are also disabled in Android Mode.
Additional Changes in Android Mode
The following transformations do not apply to or are not supported for Android projects, so they are also disabled:
Automatic Input Management
In Android Mode, the DashO Gradle Plugin for Android controls Inputs, Dependencies, and Outputs through Path Map files. These are not configured in the project file or through the DashO GUI.
When building an Android Mode project, DashO automatically caches the location of the Path Map used to describe the inputs, dependencies, and outputs. The GUI uses this cache to determine which inputs are used and populate lists of classes, methods, and fields. When you open an Android Mode project in the DashO GUI, DashO looks for this cache and prompts you to run a build if no cache is found.
If you build the project while the DashO GUI is open, DashO detects this and indicates that you may want to refresh the class list to reflect the latest build.
Different build variants can have different Path Maps and different sets of classes, methods, and fields. When you load a project, DashO uses the cache for the most recently built variant. To create project-file rules for classes available only in some variants, you may want to create variant-specific project files.
Android Mode GUI
When an Android Mode project file is loaded in the DashO GUI, DashO uses the Android Mode GUI, which omits screens, buttons, and menu options that are unnecessary for Android Mode.
Project File Syntax Differences
Enable Android Mode in the project file with the mode attribute on the top-level <dasho> element:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dasho mode="android" version="10.0.0">The following project-file elements are ignored and generate warnings in Android Mode:
<classpath><entrypoints>-
<exclude>(nested under<global>) <includenonclassfiles><inputpath><make-synthetic><methodCallRemoval><optimization><output><premark><preverifier><removal><renaming><report><seInput><seOutput><signjar>
The following <global> options are ignored and will generate warnings in Android Mode: