to top

Development Environment

The Trade Federation source is stored in git along with the rest of the Android platform, and uses the Android platform build system to create its binary. First and foremost, follow these instructions to set up your machine to be able to compile and run things from the Android tree.

Getting the Source

The TF source lives in the Android codebase, but you need to specify an extra option to get at it. Follow these instructions to download the source, but use the branch tradefed to actually pull down the Trade Federation source. The actual command you run should look something like

$ repo init -u https://…/manifest -b tradefed


Trade Federation is set up in a lightweight "unbundled" branch that uses slightly different build commands from the platform source. In particular, unbundled branches use the tapas command to set up the build environment, rather than the lunch command. So starting from the root directory of the source tree you checked out, try:

$ . build/
$ tapas tradefed-all
$ m -j8
Note that once the $ . build/ step is done, the other two commands will run equally well from anywhere in the tree.

Running from Command Line

First and foremost, tradefed requires the adb utility to be in your current $PATH.

$ export PATH=$PATH:<path to adb>

Building TF using the steps mentioned above will add the launcher script to your path. So to launch the TF console, run


At this point, your environment is set up for Trade Federation.