During development process, you would typically use plain m with no particular target to compile Android sources. (See Build your development images.) However, when you prepare for release, you must use the target dist to generate the proper release images. To do so, follow these steps:

  1. Set up your environment and install the sources. If you have not already done so, see Set up your development workstation and Install Digi Embedded for Android.

  2. Change to the directory where the source code is installed.

    $ cd dea-11.0-r2
  3. Initialize the build environment:

    $ source build/envsetup.sh
  4. Select a ConnectCore 8M Mini target to build:

    • ccimx8mmdvk-user creates images with no root access, suitable for production.

    • ccimx8mmdvk-userdebug like user images but with root access and debug capability.

      For more information about build types, go to Choosing a target.

      For production, use user build type:

      $ lunch ccimx8mmdvk-user
      PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl external/mesa3d vendor/nxp-opensource/imx/power hardware/google/pixel vendor/partner_gms hardware/google/camera vendor/nxp-opensource/imx/camera
  5. Build the kernel and U-Boot images

    $ ./imx-make.sh bootloader kernel -j<Number_Of_Jobs>
    The command make can handle parallel tasks with a -jN argument, and it’s common to use a number of tasks N that’s between 1 and 2 times the number of hardware threads on the computer used for the build.

    This generates several artifacts inside the out/target/product/ccimx8mmdvk folder of the dea-11.0-r2 directory. The bootloader images are required to program your device:

    • u-boot-ccimx8mmdvk.imx: Bootloader image without Trusty.

    • u-boot-ccimx8mmdvk-trusty.imx: Bootloader image with Trusty. See Secure boot.

  6. Use dist target to generate the release images:

    $ make -j<Number_Of_Jobs> dist

    It compiles the whole source tree, as a plain make does. Then it generates several zip files inside the out/dist folder of the dea-11.0-r2 directory:

    • ccimx8mmdvk-target_files-<build_id>.zip contains all the target files (apk, binaries, libraries, etc.) that will go into the final release package.

      You will use this file later on to get privately signed artifacts. The next step is to Sign for release.

    • ccimx8mmdvk-ota-<build_id>.zip is an OTA update package that can be installed through recovery. It is a full update package with all the files needed by system, boot, vendor, and recovery partition.

      You can use it during testing or development, but not as a final distributable artifact as it is signed with non-private keys.

    • ccimx8mmdvk-apps-<build_id>.zip contains all the apks.

    • ccimx8mmdvk-img-<build_id>.zip contains image files boot, dtbo, partition-table, super, vbmeta, and vendor_boot.

      The images inside are using test-keys, use them only for development purposes.

    • ccimx8mmdvk-symbols-<build_id>.zip contains all files in out/target/product/ccimx8mmdvk/symbols.

All these files are signed using test-keys. These keys are insecure because they are distributed with the code. For this reason, these generated files should not be use for production.

You must sign the ccimx8mmdvk-target_files-<build_id>.zip file with your own private key to, later, generate your release images and/or update package. See Sign for release.