To protect your application, PreEmptive Protection™ DashO™ must first analyze its bytecode and resources. This article explains how to configure your project's inputs, supporting classpath, non-class files, and input options. DashO handles inputs differently in Standard Mode and Android Mode:
| Mode | How DashO manages inputs |
| Standard Mode | You manage the files DashO processes yourself. |
| Android Mode | DashO identifies your app's components automatically from the Path Map your Gradle build generates. |
Prerequisites
- A DashO project in Standard Mode or Android Mode.
- For Android Mode: A build of the current configuration that has run on the current machine.
Configure Inputs in Standard Mode
In Standard Mode, you manually manage the files DashO processes.
Jars and Classes
- Navigate to the Input page.
- Add inputs in one of these ways:
- Click Add, then select JAR, WAR, or ZIP files, single APK files, or directories of classes from your file system.
- Click New, then type the path. Use this option when the path contains property references.
- If you typed a path, refresh the class tree.
- Save your project.
For more information, see <inputpath> Element.
Supporting Classpath
DashO requires access to the Java or Android runtime and any third-party libraries your application uses. DashO needs the classes you reference here for analysis, but does not process them.
- Navigate to Input > Support.
- Add supports in one of these ways:
- Click Add, then select the entries.
- Click New, then type the entry.
- Configure the JDK settings. For more information, see Settings.
- Save your project.
Settings
| Setting | Description |
| Include JDK |
Includes all bootstrap and extension classes provided by the specified JDK home directory as supports. Projects that use the Android API or J2ME should not include the JDK. These projects require the runtime JAR for the applicable environment, such as The default value, Example locations: Windows: macOS: |
| Set JDK_HOME and JAVA_HOME properties | Sets the JDK_HOME and JAVA_HOME properties to the specified JDK value, assuming that Include JDK is enabled as well. |
For more information, see <classpath> Element.
Included Non-Class Files
Use the Included Non-Class Files page to specify resources like images, property files, or XML configurations that should be part of the final package.
- Navigate to Input > Non-Class Files.
- Add entries in one of these ways:
- Click Add, then select directories, individual files, or JAR files.
- Click New, then type the entry. In directory entries, use the * wildcard to select specific file types.
- Save your project.
DashO copies non-class files from directory, ZIP, JAR, and WAR sources to the output and keeps their relative internal directories. For directories and JAR files, it copies all non-class files.
How DashO handles non-class files from your inputs depends on whether you merge inputs:
| Inputs | Non-class files in input JARs | Non-class files in input directories |
| Not merged | Copied automatically | Not copied. Add them on this page. |
| Merged | Turn on Auto Copy, or add them on this page. | |
For more information, see <includenonclassfiles> element and Auto Copy.
Input Options
The Input > Options page controls basic options DashO uses while analyzing input classes.
- In the navigation tree, select Input > Options.
-
Select the options you need.
Option Description Ignore Missing Classes Instructs DashO to proceed with analysis even if a called class is missing.
Ignore Missing Members Instructs DashO to proceed with the build even if a referenced method or field cannot be located.
Ignore Missing Entry Points Generates warnings for entry points that DashO cannot locate, rather than stopping the build with errors. By default, the build stops with an error if any configured Java project entry point is missing.
On large projects with multiple missing entry points, this option prevents the build from halting repeatedly after you resolve or remove a single entry point.
Exclude classes having a method larger than 64K Automatically excludes classes containing methods that exceed 65,535 bytes of code after obfuscation to prevent build failures. When you enable this option, DashO adds these classes to the Global Processing Exclusions list.
This excludes all methods within those classes from obfuscation, even the smaller methods.
Bypass DashO Processing Configures DashO to perform no processing and simply copy the inputs directly to your output destination. This option is supported when you output to an unmerged directory or an APK. Reflection Halts Build Halts the build when DashO encounters reflection, making it easier to note reflection usage and identify targets.
Determine Reflected Classes Automatically detects reflection targets and ensures they appear in the final output.
Rename Reflected Classes Allows classes accessed via reflection to be renamed. By default, targets of reflection retain their original names. - Save your project and build it to apply the changes.
Configure Inputs in Android Mode
In Android Mode, DashO uses Automatic Input Management (AIM) to identify your application's components based on the Path Map generated during your Gradle build.
The Input page in Android Mode is populated only when:
- A build has run on the current machine using the current DashO configuration.
- The related files remain on disk.
If DashO cannot locate the inputs for a saved Android Mode configuration, it displays the following message:
Your inputs could not be located. Please run a build and refresh the path map.
| Item | Description |
|---|---|
| Current Build Variant | Displays the name of the most recently built Android project variant. When you load an Android Mode project or refresh its Path Map, DashO loads the inputs, dependencies, classes, and resources for that variant. To display a different variant, clean and build that variant by itself, then refresh the Path Map. Clean and build variant example: gradlew clean assembleSomeFlavorRelease
|
| Cache Directory | Displays the complete path to the directory where DashO caches the locations of the Path Maps used for the Android Mode project.[directory of DashO configuration]/.dasho/[configuration file name].cache
|
| Path Map |
Displays the path to the Path Map file that the DashO GUI currently uses to determine the project's inputs and dependencies. For more information, see Path Map Reference. |
| Inputs | Displays the JARs and directories described in the current Path Map. DashO uses these entries to populate class lists on other GUI pages. Project code is labeled <Project Classes> when applicable. The tooltip for a JAR or directory displays its full path. |
| Dependencies | Displays JARs and directories that DashO does not process but reads to interpret input classes, including Android SDK JARs and other libraries that are not included in the Android application or library code. |
Limitations and Troubleshooting
| Issue | Cause and resolution |
| The build fails with a Superclass Class Not Found error. | DashO can't find a superclass from an external dependency. Ignore Missing Classes doesn't help, because DashO can't ignore missing classes your application extends or implements. Add the JAR file that contains the superclass on the Input > Support page. For more information, see Resolve the [Superclass Class Not Found] Error. |
| The build fails because DashO can't find a support entry. | Fix or remove the entry. To get a warning instead of an error, set the WARN_ON_MISSING_SUPPORT_ENTRY User Property to true. |
| The class tree doesn't show a path you typed. | Refresh the class tree. DashO doesn't refresh it automatically for manually entered names. |
| The build stops repeatedly for missing entry points. | Select Ignore Missing Entry Points to get warnings instead. |
| The build fails because a method exceeds 64K after obfuscation. | Select Exclude classes having a method larger than 64K. DashO excludes those whole classes from obfuscation. |
| Reflection Halts Build stops on DashO's own Check code. | Disable Checks while you use this option. |
Android Mode shows: Your inputs could not be located. Please run a build and refresh the path map.
|
DashO can't find the inputs for the saved configuration. Run a build on this machine, then refresh the Path Map. |
| Android Mode shows the wrong build variant. | Clean and build only the variant you want, then refresh the Path Map. For more information, see Display a Different Build Variant. |
Resolve the Superclass Class Not Found Error
Maven and Spring Boot applications often depend on external JAR files. If one of your classes extends a class from an external JAR that DashO can't find, the build fails with a Superclass Class Not Found error. Ignore Missing Classes doesn't help, because DashO can't ignore missing classes your application extends or implements. Add the JAR file as a support instead:
- Build your Maven or Spring Boot application.
- Find the required external JAR file in your local
.m2repository. - Add the JAR file on the Input > Support page. For more information, see Supporting Classpath.
- Click Build.
- Validate the protected application:
java -jar <obfuscated-application>.war
The build completes without a Superclass Class Not Found error, and the protected application runs.
Display a Different Build Variant
- Clean and build only the variant you want to display.
gradlew clean assembleSomeFlavorRelease - Refresh the Path Map.