After you configure what PreEmptive Protection™ DashO™ protects, you decide where the protected build goes and what form it takes. The Output pages control the output format, reports, preverification, and signing. After the build, the Results page shows you what DashO renamed and removed, so you can confirm that your app is protected the way you expect.
Output Pages
| Page | Use it to |
| Output - Options | Choose where DashO places the build results and what form they take. |
| Output - APK | Configure settings specific to APK output. |
| Output - Reports | Generate reports that detail the build results. |
| Output - Preverification | Run the preverifier on CLDC applications. |
| Output - Signing | Sign the output JAR, WAR, or APK files. |
Configure the Output Format
- In Dasho, navigate to Output.
-
Select the output type: Create Directory, Single Jar, APK, or WAR. For more information, see the <output> element.
- If you output to a directory, choose whether to select Merge Inputs. Merging combines the obfuscated results into a single directory. Leave it cleared to keep the original packaging of the input classes.
- If you merge inputs, choose whether to select Auto Copy. See Auto Copy Behavior.
-
In the Name field, enter the name of the output directory or JAR file. DashO uses it as the root of the output and attempts to recreate the hierarchy of your original input JARs and directories.
- (Optional) If DashO creates a single merged JAR, specify a manifest. The manifest can be a text file or a JAR file. DashO extracts the manifest from a JAR file.
- (Optional) Set the JAR and WAR options. See Jar/War Options.
- (Optional) Enter a Constant Pool Tag. For more information, see <constpooltag>.
- (Optional) Enter a SourceFile Tag. For more information, see <sourcefile>.
- Save your project and build it to apply the changes.
Auto Copy Behavior
Auto Copy controls how DashO handles non-class files when you merge inputs. It's only available when Merge Inputs is on.
| Merge Inputs | Auto Copy | Non-class files from JAR inputs | Non-class files from input directories |
| Off | Not available | Copied | Not copied |
| On | On | Copied | Copied |
| On | Off | Not copied | Not copied |
Jar/War Options
| Option | Description |
| Compress | Compresses the data in addition to storing it. |
| Level | Sets the compression level, from 0 (no compression, fastest) to 9. The default is 6. |
| Exclude Directory Entries | Stores only file entries, not directory entries. |
| Preserve Jars With No Classes | Outputs JAR files even when they have no remaining classes. Use it to output resource JARs. |
Configure APK Output
- Navigate to Output > APK.
- In Build Tools Directory, enter the location of the Android build tools. The directory must contain the
zipaligncommand. -
(Optional) Select Zipalign to align the output APK with
zipalign. - In AAPT Version, choose whether to generate the output APK with
AAPTorAAPT2. - Save your project and build it to apply the changes.
Generate Build Reports
- Navigate to Output > Reports.
-
Enter the name and location for each report you want:
Field Report contents Report file The class and member Removal and Renaming DashO performed. It includes a summary of the total methods, fields, and constant pool entries, and the final number and percentage of reduction. It also lists dynamically loaded classes, including reflection and Class.forName()calls.Renaming Report File The old and new names of renamed classes and their renamed members. - Save your project and build it to generate the reports.
Run the Preverifier on CLDC Applications
- Navigate to Output > Preverification.
- Select Run Preverifier.
- By default, DashO looks for
preverifyon the system path. To run a particular version of the preverifier, specify its path in the Preverifier field. -
Select the restrictions to pass to the preverifier:
Option Passes Restriction No Finalize -nofinalizeNo finalizers allowed in the input. No Floating Point -nofpNo floating point operations allowed in the input. No Native Methods -nonativeNo native methods allowed. - Save your project and build it to apply the changes.
Sign Your Output
DashO signs the JAR, WAR, APK or AAB files it produces. By default, it uses jarsigner from your configured JDK location.
- Navigate to Output > Signing.
- Select Sign Jars/WAR/APK/AAB.
- Specify the path to the signing tool if you don't include the JDK, need a particular version of
jarsigner, or want to useapksigner. To use thejarsignerexecutable on the system path, enterjarsigner. - Under Key Store, enter the Password. It's the only required key store field.
-
Type defaults to the type the JVM running DashO specifies, such as
JKSorPKCS12. -
Location defaults to the
.keystorefile in your home directory.
-
Type defaults to the type the JVM running DashO specifies, such as
- Under Signing Key, enter the Alias of the private key. It's the only required signing key field. The Password defaults to the key store password.
-
Set the signing options:
Option jarsignerapksignerSignature File -sigFile--v1-signer-nameInternals .SF -internalsfNot applicable Sections Only -sectionsonlyNot applicable Additional Arguments -sigalg SHA1withRSA -digestalg SHA1--v1-signing-enabled [true|false] --v2-signing-enabled [true|false]or--min-sdk-version nn --max-sdk-version nn(wherennis an sdk version) - Save your project and build it to apply the changes.
Review Your Build Results
- Build your project.
- Navigate to Results.
- Review the class hierarchy of your input classes and the renaming results. The hierarchy doesn't list classes and members DashO removed.
- Open the reports you configured on the Output - Reports page for a detailed record of Removal and Renaming.
Limitations and Troubleshooting
| Issue | Resolution |
| The Output or Results pages aren't visible. | Switch your project to Standard Mode. For more information, see Use the DashO GUI. |
| Output settings reset unexpectedly. | Changing the output type may reset other settings on the Output - Options page. Re-enter them after you change the output type. |
| Zipalign is unavailable. | Enable signing on the Output - Signing page. |
Signing fails with an older version of jarsigner. |
DashO passes passwords through the environment instead of the command line. If your jarsigner version doesn't support this, add a User Property named SIGN_WITH_PLAINTEXT_PASSWORDS and set it to true. |
| A removed class doesn't appear on the Results page. | This is expected. The hierarchy doesn't list removed classes and members. Check the Report file for Removal details. |
Related Articles