Migrating from ProGuard or DexGuard to DashO – Updated!

Categories
DashO

Published on August 27, 2019 by Nathan Arthur

Reading Time: 2 minutes

Over a year ago we wrote instructions for migrating from ProGuard or DexGuard to DashO. Since that time, Google introduced R8, fundamentally changing the Android build process. Now, we have released PreEmptive Protection DashO for Android & Java, version 10.0 with a new Android Mode that is designed to work with R8. With this release, migrating from ProGuard or DexGuard to DashO is so simple that it almost doesn’t need instructions – so we’re posting new instructions to make that clear!

Welcome to our new instructions!

Before we begin, let’s make sure we’re all on the same page. We assume you are currently:

  • using Android Gradle Plugin 3.2.0 or above (but 3.4.0 or above makes it easier).
  • using ProGuard to minify/obfuscate your Android app or AAR. (We’ll cover DexGuard separately, below.)
  • enabling ProGuard via the minifyEnabled setting in your Gradle config.

Now, to update your app (or AAR project) to use DashO (v10.0 or above) and R8:

  1. Run the DashO GUI
  2. Open the New Project Wizard, if it didn’t appear automatically.
  3. Hit Next to get to the Select Application Type page.
  4. Choose “Android (Most projects)” and hit Next.
  5. Choose the directory where your app’s (or .aar’s) build.gradle is located, and hit Next.
  6. Read the Summary of what will be changed in your Gradle build config, and hit Next.

That’s it!

From now on, your (release) builds will be automatically protected by DashO and R8. DashO will automatically apply advanced protections like Control Flow and String Encryption (and you will almost certainly want to add Checks, too), and R8 will perform minification and optimization using the exact same ProGuard config file(s) you were using before.

There are a few things you should do to wrap up:

  • If you are using Android Gradle Plugin version 3.2 or 3.3, explicitly enable R8.
  • Build and test to be sure everything is working. (And check out our Troubleshooting page, if not.)
  • Follow our documentation to Enhance Protection by adding Checks and turning up the protection level in DashO and R8.

We mentioned above that we’d cover DexGuard instructions later. Migrating from DexGuard is the same basic process, but first you have to turn DexGuard off. The instructions in our earlier blog for DexGuard are still relevant for DashO 10; just be sure to come back here and use the Wizard, once you are done removing DexGuard, rather than following the older migration instructions.

And that’s it!

If you have any questions or concerns, please reach out to our support team or sales team.

And welcome to DashO!