OTA Package Tools

The ota_from_target_files tool provided in build/make/tools/releasetools can build two types of package: full and incremental. This applies both to devices using A/B system updates and non-A/B system updates. The tool takes the target-files .zip file produced by the Android build system as input.

Full updates

A full update is one where the entire final state of the device (system, boot, and recovery partitions) is contained in the package. As long as the device is capable of receiving and applying the package, the package can install the desired build regardless of the current state of the device.


# first, build the target-files .zip
. build/envsetup.sh && lunch tardis-eng
mkdir dist_output
make dist DIST_DIR=dist_output


./build/make/tools/releasetools/ota_from_target_files \
    dist_output/tardis-target_files.zip \


Incremental updates


  • Files that have not changed don't need to be included.


./build/make/tools/releasetools/ota_from_target_files \
    -i PREVIOUS-tardis-target_files.zip \
    dist_output/tardis-target_files.zip \
    incremental_ota_update.zip # make incremental from the older version


Distribute an incremental package only to devices running exactly the same previous build used as the incremental package's starting point. You must flash the images in PREVIOUS-tardis-target_files.zip or PREVIOUS-tardis-img.zip (both built with make dist, to be flashed with fastboot update), instead of the ones under the PRODUCT_OUT directory (built with make, which will be flashed with fastboot flashall). Attempting to install the incremental package on a device with some other build results in an installation error. When the install fails, the device will remain in the same working state (running the old system); the package verifies the previous state of all the files it updates before touching them, so the device shouldn't be left in a half upgraded state if this occurs.