Dare: Installation and usage

Files are available for Linux and Mac OS. They were compiled on Ubuntu 11.04 and Mac OS 10.6. If you have any question, please use the Dare support mailing list. Dare is released under the GPL; instructions to download the source and build it are available at the source page. For your convenience, Soot is included in the Dare archive. It can be used to optimize and/or decompile the output of Dare.

Installation of Dare (retargeting .dex/.apk to .class)

Dare requires a Java runtime environment version 1.6 or 1.7 (Dare has not been tested with Java 1.5). In order to install Dare, you need to download the latest version:

Additionally, if you are running a 64-bit version of Linux, you also need to install the ia32-libs libraries. This is not required on Mac OS. On Ubuntu, this is done with:

% sudo apt-get install ia32-libs

Then you need to extract the archive. After this is done, if you are using the Linux version, you should follow these instructions:

% cd dare-1.1.0-linux
% ./dex-preopt --bootstrap

This will optimize the bootstrap classes to allow for the preverification step. Please note that the preverification is not currently supported on the Mac OS version.

Usage of Dare

Dare is used with:

% dare [options] -d <output dir> <dex/apk file>

Valid options are:

  • -c : Optimize and decompile using Soot.
  • -o : Optimize using Soot.
  • -e : Do not split exception tables. By default, Dare splits exception tables to account for the differences in how try blocks are handled by the Dalvik and Java verifiers. This can make it more difficult for decompilers to process the resulting code. It is recommended to use this option if decompilation is your goal.
  • -p : Preverify the application using the Dalvik verifier and rewrite parts which are not verifiable.
  • -b : Generate class stubs for some missing class references.
  • -x <JVM option> : Set a Java VM option for the optimization and decompilation operations.

One of the important features of Dare is the ability to rewrite unverifiable Dalvik code to make it verifiable. The rewrites mimic the runtime behavior of the VM to ensure that the semantics of the program are not modified. This new feature uses a modified version of the Dalvik VM to verify the input bytecode. Unfortunately, this option is not currently supported on the Mac OS version of Dare.