-
Notifications
You must be signed in to change notification settings - Fork 2
Running on the edge
If you want to write drozer modules, you may want the latest code. We work on the develop branch on Github, which is often newer than the most recent release.
If you want to run drozer from Github, there are a few things that you will have to set up first. In addition to the normal requirements for drozer, you will need to install:
You should also set the following environment variables:
- add to your PATH
/path/to/drozer/bin
- add to your PYTHONPATH
/path/to/drozer/src
and/path/to/drozer/test
- set SDK to
/path/to/android-sdk-linux/platforms/android-16/android.jar
You will also need javac
(for Java 6) and dx
available on your path. dx
can be found under platform-tools/ in the Android SDK.
To compile Java sources for Android, you will need jdk6 installed and configured as the default version for javac
. If you use jdk7, the generated class files will not be compatible with the Android dx
tool.
drozer is made up from a few repositories on Github.
To run the drozer Server and Console, you only need the drozer repository:
git clone https://github.com/mwrlabs/drozer
cd drozer && git submodule init && git submodule update
To build the drozer Agent from source you need a few repositories:
git clone https://github.com/mwrlabs/drozer-agent
git clone https://github.com/mwrlabs/jdiesel
git clone https://github.com/mwrlabs/mwr-android
git clone https://github.com/mwrlabs/mwr-tls
cd jdiesel && git submodule init && git submodule update
You can import these projects into the Eclipse IDE (take care not to change the folder names), or use the ant build system to compile the APK file:
ant debug
Once you have set up your environment, you should be able to start drozer using the normal command:
drozer console connect
Note: the behaviour is undefined if you have drozer installed on your system from a distribution. You may want to adjust your PYTHONPATH
to exclude installed drozer or use virtualenv to create an isolated environment.
Some drozer commands deliver an APK file to the Agent. These are built from the various Java source files in the src/drozer/modules/
tree.
A Makefile is provided to automate building of these sources. To invoke it, run the apks
target from the drozer root directory:
make apks
This should be run every time you make a change to a Java file or if you have just started using the development version and these APK files have not yet been generated.
Some drozer commands use a small piece of Native code, to get lower level access to the underlying system than Java allows. These are typically provided with a C/C++ implementation in the src/drozer/modules/
tree.
A Makefile is provided to automate building of these sources. To invoke it, run the native-libraries
target from the drozer root directory:
make native-libraries
This should be run every time you make a change to a native file or if you have just started using the development version and these native sources have not yet been compiled.