Building Custom ROM and SDK


  • Login to the VPS as user aga
  • Verify ~/bin/repo exists, if not download this file from and make it executable and verify the repo file is in the PATH
  • Verify ~/bin/ is available, if not copy the file to ~/bin and make it executable


The AGA build scripts are available at



It is recommended to use screen as the build process is time consuming and screen makes it possible to detach from the shell and later attach again.

To create a screen session:

screen -S <my-build-session-name>

To detach from the current session:

<Ctrl-a> <d>

To list current sessions:

screen -list

To attach to a session:

screen -r <my-build-session-name>

To force detach first and then re-attach (if someone is holding a session):

screen -d -r <my-build-session-name>


Use tee command to duplicate output to a log file, e.g.:  sdk-eng 2>&1 | tee logfile.txt
Also by using tee with -a an exisiting file is being appended. Normally errors are printed to stderr instead of stdio, in bash these can be re-directed with 2>&1 so these are captured by tee as well.

​Build Process

Issue the command to get help:

Please provide one argument: [ full_grouper-userdebug | aosp_manta-userdebug | sdk-eng ]

​The command provides you with a number of arguments that may be used.

Depending on the argument, a folder will be created:

  • ~/AGA_BUILD_aosp_manta_userdebug is created when the argument is aosp_manta-userdebug
  • ~/AGA_BUILD_full_grouper_userdebug is created when the argument is full_grouper-userdebug 
  • ~/AGA_BUILD_sdk_eng is created when the argument is sdk-eng

After the build, the following artifacts are available:

  • ~/aga/AGA_BUILD_aosp_manta_userdebug/out/target/product/manta/ when the argument is aosp_manta-userdebug
  • ~/aga/AGA_BUILD_full_grouper_userdebug/out/target/product/grouper/ when the argument is full_grouper-userdebug
  • ~/aga/AGA_BUILD_sdk_eng/out/host/windows/sdk/ and ~/aga/AGA_BUILD_sdk_eng/out/host/linux-x86/sdk/ when the argument is sdk-eng

Post build actions

Please copy out the build artifacts to /srv/repo with the owner jenkins.nogroup.

Flashing a device

Boot up  the device in recovery mode and attach the device with an USB and type:

fastboot devices

to verify that the device shows up and enter:

fastboot -w update <>

to flash the device.