Android Mode
PreEmptive Protection™ DashO™ for Android & Java includes Android Mode that is specifically designed to work with the DashO Gradle Plugin for Android as part of an Android build process that uses R8. DashO operates in Android Mode whenever it is working with an Android Mode project file, whether this is during a DashO Gradle Plugin for Android build or when the project file is loaded in the DashO GUI.
In contrast, Standard Mode is used whenever DashO is not using an Android Mode project file. Standard Mode is used for Java projects and to Post-process an APK.
Note:
If you have DashO integrated with an existing Android project build, see the upgrade instructions to convert it to Android Mode.
Works with R8
The DashO Gradle Plugin for Android operates in tandem with the Android Gradle Plugin and R8 to protect your application. R8 performs certain transformations that DashO can also perform, so DashO's Android Mode automatically disables those transformations:
Because DashO does not perform these transformations, it is essential for your application's protection that you enable R8 in your Android project alongside DashO.
Entry Points, used by DashO's Renaming and Removal, are also disabled in Android Mode.
Additional Changes in Android Mode
Some of DashO's transformations are not applicable and/or not supported for Android projects, and are also disabled:
Automatic Input Management
In Android Mode, Inputs, Dependencies, and Outputs are controlled by the DashO Gradle Plugin for Android using Path Map files and are not configured in your project file or via 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 so that the GUI can 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 will look for this cache and will prompt you to run a build if no cache is found. Additionally, if you build your project while the DashO GUI is open, DashO will detect this and indicate that you may want to refresh the list of classes to reflect this most recent build.
Different build variants will have different Path Maps and may have different sets of classes, methods, and fields. DashO will use the cache for the most recently built build variant when you load a project. If you would like your project file to contain rules regarding classes only available in some build variants, you may want to create variant-specific project files.
NOTE:
The Path Map location is cached in a{variantName}.pathmap
file inside a.dasho/{project file name}.cache
directory located in the same directory containing your.dox
file (e.g../.dasho/project.dox.cache/release.pathmap
).
Android Mode GUI
When an Android Mode project file is loaded in the DashO GUI, DashO will use the Android Mode GUI. This UI is optimized for Android Mode, omitting screens, buttons, and menu options that are unnecessary.
Project File Syntax Differences
Android Mode is enabled in your project file using 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 will 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: