Use the PreEmptive Protection™ DashO™ New Project Wizard to protect an Android APK you've already built. DashO analyzes the APK, detects your app's entry points automatically, applies default protection settings, and generates a protected, signed APK ready for distribution.
Prerequisites
- DashO installed.
- The Android SDK version your APK requires, installed on your machine.
- An APK built with R8 minification disabled.
Disable R8 Minification
Disable R8 minification before you build the APK you want to protect.
-
Set
minifyEnabledtofalse.minifyEnabled false - Build your APK.
If you process an APK that R8 already processed, DashO applies a second layer of obfuscation. This can cause class mapping inconsistencies, runtime failures, Android framework class resolution issues, and app startup failures.
Protect Your APK
Step 1: Create a New Project
- Open DashO.
- Navigate to New Project Wizard.
- Select Android Artifacts (APK/AAB).
- Click Next.
Step 2: Select the APK File
- Browse and select the APK file that needs to be obfuscated.
- Click Next.
Step 3: Verify Android SDK Detection
DashO automatically detects the Android SDK and SDK version based on the APK.
- Verify that the detected SDK information is correct.
- Click Next.
Step 4: Review Entry Points
DashO reads the AndroidManifest.xml file from the APK and displays the entry points it detects.
- Review the detected information.
- Click Next.
- Continue through the wizard and then select Finish.
Step 5: Load Input Classes
DashO loads all app classes from the APK and enables the following protections by default:
- Control Flow Obfuscation
- Removal Protection
- String Encryption
- Navigate to the Input page.
- Review all application classes.
Step 6: Configure Signing
- Navigate to Output > Signing.
- Select the Sign Jars/WAR/APK/AAB checkbox.
- Enter your signing details.
Step 7: Build the APK
- Click Build.
DashO obfuscates all classes loaded in the Input section and generates the protected APK in the output location.
For more information, see Understanding Protection.
Troubleshooting
| Issue | Cause and resolution |
| DashO doesn't detect the Android SDK, or processing fails. | The required Android SDK version isn't installed. Install the required Android SDK version. |
| Class mapping inconsistencies, runtime failures, Android framework class resolution issues, or app startup failures. | R8 processed the APK before DashO, which caused double obfuscation. Disable R8 minification and rebuild the APK. |