Android Users Guide
Android Users Guide
Document information
Information Content
Keywords Android, i.MX, android-15.0.0_1.2.0
Abstract This document provides the technical information related to the i.MX 8 and i.MX 95 series
devices.
NXP Semiconductors
UG10156
Android User's Guide
1 Overview
This document provides the technical information related to the i.MX 8 and i.MX 95 series devices. It provides
instructions for:
• Configuring a Linux OS build machine.
• Downloading, patching, and building the software components that create the Android system image.
• Building from sources and using pre-built images.
• Copying the images to boot media.
• Hardware and software configurations for programming the boot media and running the images.
For more information about building the Android platform, see source.android.com/docs/setup/build/building.
2 Preparation
Note:
Configure Git before use. Set the name and email as follows:
•
git config --global user.name "First Last"
•
git config --global user.email "[email protected]"
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To build Android in Docker container, skip this step of installing preceding packages and see Section 3.4 to build
Docker image, which has full i.MX Android build environment.
$ mkdir ~/bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=${PATH}:~/bin
$ source ~/imx-android-15.0.0_1.2.0/imx_android_setup.sh
# By default, after preceding command finishes execution, current working
directory changed to the i.MX Android source code root directory.
# ${MY_ANDROID} will be referred as the i.MX Android source code root directory
in all i.MX Android release documentation.
$ export MY_ANDROID=`pwd`
Note:
In the imx_android_setup.sh script, a .xml file that contains the code repository information is specified.
To make the code be synchronized by this script the same as the release state, code repository revision
is specified with the release tag in this file. The release tag is static and is not moved after the code is
published, so no matter when imx_android_setup.sh is executed, the working area of the code repositories
synchronized by this script are the same as the release state and images being built are the same as prebuilt
images.
If a critical issue bugfix is published, another .xml file is published to reflect those changes on the source code.
Then customers need to modify the imx_android_setup.sh. For this release, make the following changes
on the script.
cd "$android_builddir"
- repo init -u https://github.com/nxp-imx/imx-manifest.git -b imx-android-15
-m imx-android-15.0.0_1.2.0.xml
+ repo init -u https://github.com/nxp-imx/imx-manifest.git -b imx-android-15
-m rel_android-15.0.0_1.2.0.xml
rc=$?
if [ "$rc" != 0 ]; then
echo "---------------------------------------------------"
The wireless-regdb repository may fail to be synchronized with the following log:
If this issue occurs, execute the following command on the host to solve it:
The "Build Mode" is used to specify what debug options are provided in the final image. The following table lists
the build modes.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
c. Follow the steps below to set the external clang, kernel-build-tools, rust and clang-tools tools for
kernel building.
sudo git clone -b main-kernel-build-2024 --single-branch --depth 1 \
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86 /opt/prebuilt-android-clang
cd /opt/prebuilt-android-clang
sudo git fetch origin 7061673283909f372f4938e45149d23bd10cbd40
sudo git checkout 7061673283909f372f4938e45149d23bd10cbd40
export CLANG_PATH=/opt/prebuilt-android-clang
export LIBCLANG_PATH=/opt/prebuilt-android-clang/clang-r510928/lib
The preceding export commands can be added to /etc/profile. When the host boots up,
AARCH32_GCC_CROSS_COMPILE, AARCH64_GCC_CROSS_COMPILE, PATH, CLANG_PATH and
LIBCLANG_PATH are set and can be directly used.
Note: To build Android in Docker container, skip this step of installing GCC cross-compile and clang tools
on the host. See Section 3.3 to build Docker image, which has a full i.MX Android build environment.
2. Change to the top-level build directory.
$ cd ${MY_ANDROID}
3. Set up the environment for building. This only configures the current terminal.
$ source build/envsetup.sh
4. Execute the Android lunch command. In this example, the setup is for the production image of i.MX 8M
Mini EVK Board/Platform device with userdebug type.
$ lunch evk_8mm-nxp_stable-userdebug
Note: Execute the lunch command without any arguments to print the lunch menu. A warning occurs that
the lunch menu cannot be displayed. Execute the following two commands, and then execute the lunch
command to display the menu for selection.
$ export TARGET_RELEASE=nxp_stable
$ build_build_var_cache
5. Execute the imx-make.sh script to generate the image.
$ ./imx-make.sh -j4 2>&1 | tee build-log.txt
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
# Build U-Boot/kernel with imx-make.sh first, but not to build Android images.
$ ./imx-make.sh bootloader kernel -j4 2>&1 | tee build-log.txt
# build the Android images, with TARGET_IMX_KERNEL=true, the boot.img is
generated with i.MX kernel tree
$ TARGET_IMX_KERNEL=true make -j4 2>&1 | tee -a build-log.txt
# rename the boot.img as boot-imx.img
$ mv $OUT/boot.img $OUT/boot-imx.img
# generate boot.img which is the AOSP GKI boot image.
$ make bootimage -j4 2>&1 | tee -a build-log.txt
The output of make command is written to standard output and build-log.txt. If there are any errors when
building the image, error logs can be found in the build-log.txt file for checking.
To change BUILD_ID and BUILD_NUMBER, update build_id.mk in the ${MY_ANDROID}/device/nxp/
directory. For details, see the Android Frequently Asked Questions.
The following outputs are generated by default in ${MY_ANDROID}/out/target/product/evk_8mm:
• root/: Root file system. It is used to generate system.img together with files in system/.
• system/: Android system binary/libraries. It is used to generate system.img together with files in root/.
• recovery/: Root file system, integrated into vendor_boot.img as a part of the RAMDisk and used by the
Linux kernel when the system boots up.
• vendor_ramdisk/: Integrated into vendor_boot.img as a part of the RAMDisk and used by the Linux
kernel when the system boots up.
• ramdisk/: Integrated into the boot image as a part of the RAMDisk and used by the Linux kernel when the
system boots up. Because GKI is enabled on i.MX 8M Mini EVK, this is integrated into boot-imx.img.
• ramdisk.img: Ramdisk image generated from ramdisk/. Not directly used.
• dtbo-imx8mm.img: Board's device tree binary. It is used to support MIPI-to-HDMI output on the i.MX 8M
Mini EVK LPDDR4 board.
• dtbo-imx8mm-m4.img: Board's device tree binary. It is used to support MIPI-to-HDMI output and audio
playback based on Cortex-M4 FreeRTOS on the i.MX 8M Mini EVK LPDDR4 board.
• dtbo-imx8mm-mipi-panel.img: Board's device tree binary. It is used to support RM67199 MIPI Panel
output on the i.MX 8M Mini EVK LPDDR4 board.
• dtbo-imx8mm-mipi-panel-rm67191.img: Board's device tree binary. It is used to support RM67191 MIPI
Panel output on the i.MX 8M Mini EVK LPDDR4 board.
• dtbo-imx8mm-ddr4.img: Board's device tree binary. It is used to support MIPI-to-HDMI output on the i.MX
8M Mini EVK DDR4 board.
• vbmeta-imx8mm.img: Android Verify boot metadata image for dtbo-imx8mm.img.
• vbmeta-imx8mm-m4.img: Android Verify boot metadata image for dtbo-imx8mm-m4.img.
• vbmeta-imx8mm-mipi-panel.img: Android Verify boot metadata image for dtbo-imx8mm-mipi-
panel.img.
• vbmeta-imx8mm-mipi-panel-rm67191.img: Android Verify boot metadata image for dtbo-imx8mm-
mipi-panel-rm67191.img.
• vbmeta-imx8mm-ddr4.img: Android Verify boot metadata image for dtbo-imx8mm-ddr4.img.
• system.img: System image generated from system/ and root/.
• system_dlkm.img: System DLKM image generated from system_dlkm/
• system_ext.img: System extension image generated from system_ext/.
• product.img: Product image generated from product/.
• partition-table.img: GPT partition table image for single-bootloader condition. Used for 16 GB SD card
and eMMC.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
• partition-table-dual.img: GPT partition table image for dual-bootloader condition. Used for 16 GB SD
card and eMMC.
• partition-table-28GB.img: GPT partition table image for single-bootloader condition. Used for 32 GB
SD card.
• partition-table-28GB-dual.img: GPT partition table image for dual-bootloader condition. Used for 32
GB SD card.
• u-boot-imx8mm.imx: U-Boot image without Trusty OS integrated for the i.MX 8M Mini EVK LPDDR4 board.
• u-boot-imx8mm-trusty-secure-unlock.imx: U-Boot image with Trusty OS integrated and
demonstration secure unlock mechanism for i.MX 8M Mini EVK LPDDR4 board.
• u-boot-imx8mm-evk-uuu.imx: U-Boot image used by UUU for i.MX 8M Mini EVK LPDDR4 board. It is not
flashed to MMC.
• u-boot-imx8mm-ddr4.imx: U-Boot image for i.MX 8M Mini EVK DDR4 board.
• u-boot-imx8mm-ddr4-evk-uuu.imx: U-Boot image used by UUU for i.MX 8M Mini EVK DDR4 board. It is
not flashed to MMC.
• spl-imx8mm-dual.bin: SPL image without Trusty related configuration for i.MX 8M Mini EVK with
LPDDR4 on board.
• spl-imx8mm-trusty-dual.bin: SPL image with Trusty related configuration for i.MX 8M Mini EVK with
LPDDR4 on board.
• spl-imx8mm-trusty-secure-unlock-dual.bin: Secondary program loader image with Trusty and
secure unlock related configurations for i.MX 8M Mini EVK LPDDR4 board.
• bootloader-imx8mm-dual.img: Bootloader image without Trusty OS integrated for i.MX 8M Mini EVK
with LPDDR4 on board.
• bootloader-imx8mm-trusty-dual.img: Bootloader image with Trusty OS integrated for i.MX 8M Mini
EVK with LPDDR4 on board.
• bootloader-imx8mm-trusty-secure-unlock-dual.img: An image containing U-Boot proper, ATF,
and Trusty OS. It is a demonstration of secure unlock mechanism for i.MX 8M Mini EVK LPDDR4 board.
• imx8mm_mcu_demo.img: MCU FreeRTOS image to support audio playback on MCU side.
• vendor.img: Vendor image, which holds platform binaries. Mounted at /vendor.
• vendor_dlkm.img: Vendor DLKM image, which holds dynamically loadable kernel modules. Mounted at /
vendor_dlkm.
• super.img: Super image, which is generated with system.img, system_dlkm.img, system_ext.img,
vendor.img, vendor_dlkm.img, and product.img.
• boot.img: A composite image, which includes the AOSP generic kernel image and boot parameters.
• boot-imx.img: A composite image, which includes the kernel image built from i.MX Kernel tree and boot
parameters.
• init_boot.img: Generic RAMDisk.
• vendor_boot.img: A composite image, which includes vendor RAMDisk and boot parameters.
• rpmb_key_test.bin: Prebuilt test RPMB key. Can be used to set the RPMB key as fixed 32 bytes 0x00.
• testkey_public_rsa4096.bin: Prebuilt AVB public key. It is extracted from the default AVB private key.
Note:
• To build the U-Boot image separately, see Section 3.4.
• To build the kernel uImage separately, see Section 3.5.
• To build boot.img, see Section 3.6.
• To build dtbo.img, see Section 3.7.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
$ cd ${MY_ANDROID}
$ source build/envsetup.sh #set env
$ lunch evk_8mm-nxp_stable-userdebug
$ ./imx-make.sh -j4
$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch evk_8mm-nxp_stable-userdebug
$ ./imx-make.sh bootloader kernel -j4
$ make -j4
Then build the images. The GMS package is then installed into the target images.
Note:
product.mk means the build target make file. For example, for i.MX 8M Mini EVK Board, the product.mk is
named device/nxp/imx8m/evk_8mm/evk_8mm.mk.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Note:
• If it fails to use the apt command to install packages in the process of Docker image build, configure the
HTTP proxy. First, copy your host apt.conf with cp /etc/apt/apt.conf ${Dockerfile_path}/
apt.conf, or create a stripped down version. Then, remove the symbol "#" from the related content in
Dockerfile.
• If it fails to install clang tools in the process of Docker image build, remove the symbol "#" from the related
content in Dockerfile, and try to build it again.
• If you manage Docker as a non-root user, preface the docker command with sudo, such as sudo docker
build ... and sudo docker run ....
• You can use the command docker images to see the existing Docker image and use docker ps -a to
see the existing container. For other docker commands, see Docker Docs web.
• The Android build content above is taking the i.MX 8M Mini EVK board as an example. To build other board
images or single image, refer to the other content of this section.
For other platforms, use lunch <ProductName-nxp_stable-BuildMode> to set up the build configuration.
For detailed build configuration, see Section 3.2. Multiple U-Boot variants are generated for different purposes.
For more details, check {MY_Android}/device/nxp/{MY_PLATFORM}/{MY_PRODUCT}/UbootKernel
BoardConfig.mk.
To generate a U-Boot image with trusty, the size of bootloader image may be larger than the
corresponding partition size, especially for the single bootloader configuration. You can build image with
USE_TEE_COMPRESS=true to compress the TEE images. For example, execute the following command to
compress the TEE image and generate a U-Boot image with a smaller size.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
There is also an environment variable BUILD_ENCRYPTED_BOOT used to choose whether to insert a dummy
dek_blob (dek_blob_fit_dummy.bin) to the compiled image, where the real dek_blob is inserted when
encrypting the image. Execute the following command to generate a set of images with dummy dek_blob, but
only the image with trusty_secure_unlock_dual supports encrypted boot.
Note: The command above only applies to i.MX 8M Plus, i.MX 8M Mini, i.MX8M Nano, and i.MX 8MQuad.
More details about encrypted boot, See Sections "Encrypted boot with AHAB" and "Encrypted boot with HABv4"
in the i.MX Android Security User's Guide (UG10158).
The following table lists the U-Boot configurations and images for i.MX 8M Mini EVK.
$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch evk_8mm-nxp_stable-userdebug
$ ./imx-make.sh kernel -c -j4
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
For other platforms, use lunch <ProductName-nxp_stable-buildMode> to set up the build configuration.
For detailed build configuration, see Section 3.2.
For other platforms, use lunch <ProductName-nxp_stable-buildMode> to set up the build configuration.
For detailed build configuration, see Section 3.2.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
5 Programming Images
The images from the prebuilt release package or created from source code contain the U-Boot bootloader,
system image, GPT image, vendor image, and vbmeta image. At a minimum, the storage devices on the
development system (MMC/SD or NAND) must be programmed with the U-Boot bootloader. The i.MX 8 and
i.MX 9 series boot process determines what storage device to access based on the switch settings. When the
bootloader is loaded and begins execution, the U-Boot environment space is then read to determine how to
proceed with the boot process. For U-Boot environment settings, see Section 6.
The following download methods can be used to write the Android System Image:
• UUU to download all images to the eMMC or SD card.
• imx-sdcard-partition.sh to download all images to the SD card.
• fastboot_imx_flashall script to download all images to the eMMC or SD storage.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
The userdata partition is used to put the unpacked codes/data of the applications, system configuration
database, and so on. In normal boot mode, the root file system is first mounted with RAMDisk from boot
partition, and then the logical system partition is mounted and switched as root. In recovery mode, the root file
system is mounted with RAMDisk from the boot partition.
Note:
For the preceding table, in the "Partition Type/Index" column and "Start offset" column, the contents in brackets
is specific for dual-bootloader condition.
To create these partitions, use UUU described in the Android Quick Start Guide (UG10157), or use format tools
in the prebuilt directory.
The script below can be used to partition an SD card and download images to them as shown in the partition
table above:
Note:
• The SD card should be connected to the host via a USB adapter.
• The minimum size of SD card is 16G bytes.
• The -c option with an argument can be used to select a proper partition table image based on the SD card
volume size. If it is not used, the default partition-table.img or partition-table-dual.img is
used. Check the Android Quick Start Guide (UG10157) for the target SD card volume size of the partition
table images.
• In /dev/sdX, the X is the disk index from 'a' to 'z', which varies on each Linux PC.
• Unmount all the SD card partitions before running the script.
• If the images to be flashed are in the same directory as imx-sdcard-partition.sh, there is no need to
use -D <directory_containing_the_images>.
• This script requires the simg2img tool to be installed on your PC. The simg2img is a tool, which converts
Android sparse images to raw images on the Linux host PC. The android-tools-fsutils package
includes the simg2img command for Ubuntu Linux.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
With the help of fastboot_imx_flashall scripts, you do not need to use fastboot to flash Android images
one-by-one manually. These scripts automatically flash all images with only one command.
With virtual A/B feature enabled, your host fastboot tool version should be equal to or later than 30.0.4. You
can download the host fastboot tool from the Android website or build it with the Android project. Based on
Section 3.2, follow the steps below to build fastboot:
$ cd ${MY_ANDROID}
$ make -j4 fastboot
After the build process finishes building fastboot, the directory to find the fastboot is as follows:
• Linux version binary file: ${MY_ANDROID}/out/host/linux-x86/bin
• Windows version binary file: ${MY_ANDROID}/out/host/windows-x86/bin
The way to use these scripts is follows:
• Linux shell script usage: sudo fastboot_imx_flashall.sh <option>
• Windows batch script usage: fastboot_imx_flashall.bat <option>
Options:
-h Displays this help message
-f soc_name Flashes the Android image file with soc_name
-a Only flashes the image to slot_a
-b Only flashes the image to slot_b
-c card_size optional setting: 7 / 13 / 14 / 28
If this option is not used, partition-table.img or
partition-table-dual.img is flashed
If this option is used, partition-table-
<card_size>GB.img or partition-table-<card_size>GB-dual.img is flashed
Make sure the corresponding partition table image file
exists.
-m Flashes the MCU image.
-u uboot_feature Flashes U-Boot or spl&bootloader images with
"uboot_feature" in their names
For Standard Android:
If the parameter after "-u" option contains the
string of "dual", the spl&bootloader image is flashed;
Otherwise U-Boot image is flashed.
For Android Automative:
Only dual-bootloader feature is supported. By
default, spl&bootloader image is flashed.
-d dtb_feature Flashes dtbo, vbmeta and recovery image file with
"dtb_feature" in their names
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Note:
• The -f option is mandatory. The SoC name can be imx8mm, imx8mn, imx8mp, imx8mq, imx8qm, imx8qxp,
and imx95.
• i.MX 8ULP EVK does not support the -m option in this script. To flash the MCU image for i.MX 8ULP EVK, use
the uuu_imx_android_flash scripts.
• The -c option chooses the partition table image. For the suitable storage size of a partition table image, see
the Android Quick Start Guide (UG10157).
• Boot the device to U-Boot fastboot mode, and then execute these scripts. The device should be unlocked first.
Example:
Options explanation:
• -f imx8mm: Flashes images for i.MX 8M Mini EVK Board.
• -a: Only flashes slot a.
• -e: Erases user data after all image files are flashed.
• -D /imx_android/evk_8mm/: Images to be flashed are in the directory of /imx_android/evk_8mm/.
• -u trusty-dual: Flashes spl-imx8mm-trusty-dual.bin and bootloader-imx8mm-trusty-
dual.img.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To enter U-Boot fastboot mode, for example, make the board enter U-Boot command mode, and execute the
following command on the console:
> fastboot 0
To enter userspace fastboot mode, two commands are provided as follows for different conditions. You may
need root permission on Linux OS:
# board in U-Boot fastboot mode, execute the following command on the host
$ fastboot reboot fastboot
# board boot up to the Android system, execute the following command on the host
$ adb reboot fastboot
To use fastboot tool on the host to operate on a specific partition, choose the proper fastboot implemented on
the device, which can recognize the partition to be operated on. For example, to flash the system.img to the
partition of system_a, make the board enter userspace fastboot mode, and execute the following command on
the host:
6 Booting
This chapter describes booting from eMMC/SD.
To test booting from SD, change the board Boot_Mode switch to SW1101 0110110010 (1-10 bit) and SW1102
0001101000 (1-10 bit).
To test booting from eMMC, change the board Boot_Mode switch to SW1101 0110110010 (1-10 bit) and
SW1102 0001010100 (1-10 bit).
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
Note:
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
bootargs environment is an optional setting for boota. The boot.img includes a default bootargs, which is
used if there is no bootargs defined in U-Boot.
• To boot from SD, change the board Boot_Mode switch to SW1101 1100 (from 1-4 bit).
• To boot from eMMC, change the board Boot_Mode switch to SW1101 0100 (from 1-4 bit).
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
Note:
bootargs environment is an optional setting for boota. The boot.img includes a default bootargs, which is
used if there is no bootargs defined in U-Boot.
• To boot from SD, change the board Boot_Mode switch SW4 to 0011 (from 1-4 bit).
• To boot from eMMC, change the board Boot_Mode switch SW4 to 0010 (from 1-4 bit).
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
Note:
bootargs environment is an optional setting for boota. The boot.img includes a default bootargs, which is
used if if there is no bootargs defined in U-Boot.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To test booting from SD, change the board Boot_Mode switch to 10 (1-2 bit) and SW801 1100 (1-4 bit).
To test booting from eMMC, change the board Boot_Mode switch to 10 (1-2 bit) and SW801 0010 (1-4 bit).
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
Note:
bootargs environment is an optional setting for boota. The boot.img includes a default bootargs, which is
used if if there is no bootargs defined in U-Boot.
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To test booting from SD, change the board Boot_Mode switch to 001100 (1-6 bit).
To test booting from eMMC, change the board Boot_Mode switch to 000100 (1-6 bit).
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
Note:
bootargs environment is an optional setting for boota. The boot.img includes a default bootargs, which is
used if if there is no bootargs defined in U-Boot.
To test booting from SD, change the board Boot_Mode switch to 1100 (1-4 bit).
To test booting from eMMC, change the board Boot_Mode switch to 0100 (1-4 bit).
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
Note:
bootargs environment is an optional setting for boota. The boot.img includes a default bootargs, which is
used if if there is no bootargs defined in U-Boot.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To test booting from SD, change the board Boot_Mode switch to SW7 1011 (from 1-4 bit).
To test booting from eMMC, change the board Boot_Mode switch to SW7 1010 (from 1-4 bit).
The default environment is in boot.img. To use the default environment in boot.img, do not set bootargs
environment in U-Boot.
To clear the bootargs environment being set and saved before, use the following command:
Note:
bootargs environment is an optional setting for boota. The boot.img includes a default bootargs, which is
used if there is no bootargs defined in U-Boot.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
U-Boot=> reboot
Also, you can use the following command on the device console on boot-up:
reboot board_reset
To trigger a full board reset at the Android application layer, call the reboot method provided by the
PowerManager. The following is an example:
$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch evk_8mm-nxp_stable-userdebug
$ ./imx-make.sh bootloader kernel -j4
$ make target-files-package -j4
After building is complete, you can find the target files in the following path:
${MY_ANDROID}/out/target/product/evk_8mm/obj/PACKAGING/
target_files_intermediates/evk_8mm-ota-**.zip
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
You can use the following commands to build a full update package under the Android environment:
$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch evk_8mm-nxp_stable-userdebug
$ ./imx-make.sh bootloader kernel -j4
$ make otapackage -j4
After building is complete, you can find the OTA packages in the following path:
${MY_ANDROID}/out/target/product/evk_8mm/evk_8mm-ota-**.zip
evk_8mm-ota-**.zip includes payload.bin and payload_properties.txt. These two files are used
for full update, which is called full-ota.zip for convenience.
$ cd ${MY_ANDROID}
$ out/host/linux-x86/bin/ota_from_target_files -i PREVIOUS-target_files.zip NEW-
target_files.zip incremental-ota.zip
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
The dual-bootloader feature is the default configuration and it's useful as it can provide a secure way
to update the bootloader image. But if the single-bootloader image is used, to build the OTA package,
some configurations need to be made. Taking i.MX 8M Mini as an example, add the following changes to
${MY_ANDROID}/device/nxp:
-BOARD_PACK_RADIOIMAGES += bootloader.img
-INSTALLED_RADIOIMAGE_TARGET += $(PRODUCT_OUT)/bootloader.img
diff --git a/imx8m/evk_8mm/BoardConfig.mk b/imx8m/evk_8mm/BoardConfig.mk
index c6f94c82f..66414a65d 100644
--- a/imx8m/evk_8mm/BoardConfig.mk
+++ b/imx8m/evk_8mm/BoardConfig.mk
@@ -67,7 +67,6 @@ BOARD_PREBUILT_DTBOIMAGE := $(OUT_DIR)/target/product/
$(PRODUCT_DEVICE)/dtbo-imx
BOARD_USES_METADATA_PARTITION := true
BOARD_ROOT_EXTRA_FOLDERS += metadata
-AB_OTA_PARTITIONS += bootloader
# -------@block_security-------
ENABLE_CFI=false
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
AB_OTA_POSTINSTALL_CONFIG += \
RUN_POSTINSTALL_vendor=true \
POSTINSTALL_PATH_vendor=bin/imx_ota_postinstall \
FILESYSTEM_TYPE_vendor=erofs \
POSTINSTALL_OPTIONAL_vendor=false
$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch evk_8mm-nxp_stable-userdebug
$ ./imx-make.sh bootloader kernel -j4
$ make otapackage -j4 IMX_OTA_POSTINSTALL=1
This postinstall mechanism is not mutually exclusive with full update package or incremental update package. It
can be used with both of them.
In the demonstration, imx_ota_postinstall corresponds to a shell script, and the source code is under the
${MY_ANDROID}/vendor/nxp-opensource/imx/ota_postinstall/ directory. It is used to update the
bootloader0 partition, which does not have a/b slot.
Note: Be aware of the risk that the update of the bootloader0 partition may fail and there is no way to roll
back.
During the execution of this command, it invokes the dd command to write the file /postinstall/etc/
bootloader0.img to the appropriate offset of the boot device. You can modify the configuration source code
to decide which file is copied to the vendor partition and named as bootloader0.img. Taking i.MX 8M Mini
EVK as an example, the following code lines in the release code can copy the U-Boot image with Trusty OS to
vendor partition and name it as bootloader0.img. If the dual-bootloader feature is enabled, the SPL image
should be copied. If the board is closed, the image should be signed first.
PRODUCT_COPY_FILES += \
$(OUT_DIR)/target/product/$(firstword $(PRODUCT_DEVICE))/obj/UBOOT_COLLECTION/
u-boot-imx8mm-trusty.imx:$(TARGET_COPY_OUT_VENDOR)/etc/bootloader0.img
See the i.MX Android Security User's Guide (UG10158) about how to sign the bootloader0 image with CST.
In the default configuration, an SPL image is copied to be bootloader0.img because dual-bootloader is
recommended.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Implement your own postinstall command and perform the operations as needed during the OTA process.
7.1.6.1 Building SPL and bootloader images with encrypted boot enabled
Before compilation begins, see Section "Building Android images to construct the containers" and Section
"Enabling the encrypted boot support in U-Boot" in the i.MX Android Security User's Guide (UG10158) to enable
the encrypted boot function by modifying the target defconfig files.
Images including the encrypted boot enabled SPL and bootloader can be generated with the following
commands:
$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch evk_8mm-nxp_stable-userdebug
$ BUILD_ENCRYPTED_BOOT=true ./imx-make.sh bootloader -j4
Execute the following command to generate an OTA package, which includes the encrypted SPL and
bootloader images.
Then the OTA package includs the encrypted SPL and bootloader images. Besides the OTA package, DEK
Blobs of SPL and bootloader images need to be provisioned into the device before applying the OTA package.
For how to provision DEK Blobs into devices and enable the encrypted boot OTA, see Section "Setting up
encrypted boot OTA" in the i.MX Android Security User's Guide (UG10158).
METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ=
METADATA_SIZE=46866"
5. The system will update in the background. After it finishes, it displays "Update successfully applied, waiting
to reboot" in the logcat.
Note:
Make sure that the -- header equals to the exact content of payload_properties.txt without "space" or
"return" character.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
TARGET_BOARD_DTS_CONFIG ?= imx8mm-ddr4:imx8mm-ddr4-evk.dtb
TARGET_BOARD_DTS_CONFIG += imx8mm:imx8mm-evk-usd-wifi.dtb
TARGET_BOARD_DTS_CONFIG += imx8mm-mipi-panel:imx8mm-evk-rm67199.dtb
TARGET_BOARD_DTS_CONFIG += imx8mm-mipi-panel-rm67191:imx8mm-evk-rm67191.dtb
TARGET_BOARD_DTS_CONFIG += imx8mm-m4:imx8mm-evk-rpmsg.dtb
There is one variable to specify which DTBO image is stored in the OTA package:
BOARD_PREBUILT_DTBOIMAGE := out/target/product/evk_8mm/dtbo-imx8mm.img
Therefore, the default OTA package can only be applied for evk_8mm with single MIPI-DSI-to-HDMI
display. To generate an OTA package for evk_8mm with an RM67199 MIPI panel display, modify this
BOARD_PREBUILT_DTBOIMAGE as follows:
BOARD_PREBUILT_DTBOIMAGE := out/target/product/evk_8mm/dtbo-imx8mm-mipi-
panel.img
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To generate an OTA package for evk_8mm with an RM67191 MIPI panel display, modify this
BOARD_PREBUILT_DTBOIMAGE as follows:
BOARD_PREBUILT_DTBOIMAGE := out/target/product/evk_8mm/dtbo-imx8mm-mipi-panel-
rm67191.img
8 Customized Configuration
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Note:
Because not all UVC cameras can have 1080P, 30FPS resolution setting, it is recommended that
media_profiles_480p.xml is used for any board's configuration, which defines the UVC as the rear camera
or front camera.
8.1.3 Making cameras work on i.MX 8M Plus EVK with non-default images
The default image for i.MX 8M Plus EVK supports OS08A20 + OS08A20 and the cameras can work after the
image is flashed and boot up. To make cameras work with non-default images, execute the following additional
commands:
• Basler (CSI1) + OV5640 (CSI2) or only Basler (CSI1) on the host
# flash the image
sudo ./fastboot_imx_flashall.sh -f imx8mp -a -e -d basler-ov5640 // or "-d
basler" for Only basler(CSI1)
# set bootargs
# In serial console, enter into uboot command mode, run below commads:
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
# set bootargs
# In serial console, enter into uboot command mode, run below commad:
setenv append_bootargs androidboot.camera.layout=only-ov5640
saveenv
boota
Note:
-d ov5640 can be replaced by one of below:
-d lvds, -d lvds-panel, -d mipi-panel, -d mipi-panel-rm67191, -d rpmsg, -d sof.
• OS08A20 (CSI1) + OV5640 (CSI2) Or Only OS08A20 (CSI1)
# flash the image
sudo ./fastboot_imx_flashall.sh -f imx8mp -a -e -d os08a20-ov5640 # or "-d
os08a20" for Only os08a20(CSI1)
# set bootargs
# In serial console, enter into uboot command mode, run below commads:
# If enable os08a20 4k size, also add androidboot.camera.ispsensor.maxsize=4k.
setenv append_bootargs androidboot.camera.layout=os08a20-ov5640
saveenv
boota
• Basler (CSI1) + Basler (CSI2)
# flash the image
sudo ./fastboot_imx_flashall.sh -f imx8mp -a -e -d dual-basler
# set bootargs
# In serial console, enter into uboot command mode, run below commad:
setenv append_bootargs androidboot.camera.layout=dual-basler
saveenv
boota
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
saveenv
4. Boot up the system, and push the .wav audio files to /sdcard/. It is better to use a long-duration audio
file.
5. Open the DirectAudioPlayer application, and select a file from the spinner. The file selected is listed
under the spinner.
6. Click the Play button to play audio.
7. Press the ON/OFF button on the board. The system then enters suspend mode, and the audio can keep
playing.
Note:
• Only i.MX 95 EVK, i.MX 8M Mini EVK, i.MX 8M Plus EVK, and i.MX 8ULP EVK support this feature.
– For i.MX 8M Mini EVK, the audio is output from the "LPA Output" port on the audio expansion board. See
Figure "i.MX 8M Mini EVK with audio board" in the Android Quick Start Guide (UG10157).
– For i.MX 95 EVK, i.MX 8M Plus EVK, and i.MX 8ULP EVK, the audio is output from the HEADPHONE jack.
• DirectAudioPlayer supports limited audio files, which is declared in device's
audio_policy_configuration.xml with the AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FL
AG_HW_AV_SYNC flag. Other medians are not supported. For example, it does not support playing 44100 Hz
audio.
• DirectAudioPlayer supports 24/32 bits .wav file with sampling rates no more than 192000.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
device/nxp/common/audio-json/xxx_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/
configs/audio/xxx_config.json
2. Configure the audio mix port, device port, and route in ${MY_ANDROID}/device/nxp/imx8m/evk_8mp/
audio_policy_configuration.xml.
• Mix ports describe the possible configuration profiles for streams that can be opened at the audio HAL for
playback and capture.
• Device ports describe the devices that can be attached with their type.
• Routes describe which mix port can route to which device.
Take the following configuration as an example. It means that the system supports three output devices:
speaker, headphone, and HDMI. If the speaker or headphone is connected, it expects that the frameworks
can deliver 16 bit, 48 kHz, and stereo streams to them. If an HDMI device is connected, it expects 24 bit, 48
kHz, and stereo streams.
<mixPort name="primary output" role="source"
flags="AUDIO_OUTPUT_FLAG_PRIMARY">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<mixPort name="hdmi output" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_8_24_BIT"
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</mixPort>
<devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink" >
</devicePort>
<devicePort tagName="Wired Headphones"
type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
</devicePort>
<devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_AUX_DIGITAL"
role="sink">
</devicePort>
<route type="mix" sink="Speaker"
sources="primary output"/>
<route type="mix" sink="Wired Headphones"
sources="primary output"/>
<route type="mix" sink="HDMI Out"
sources="hdmi output"/>
3. (Optional) Support device hot plug.
Android frameworks support dynamically switching default output device by catching the device's hot-plug
event. The uevent can be sent in the kernel by extcon driver.
a. Declare which device type supports:
static const unsigned int xxx_extcon_cables[] = {
EXTCON_JACK_HEADPHONE,
EXTCON_NONE,
};
struct extcon_dev xxx_edev;
b. Allocate and register the extcon device:
xxx_edev = devm_extcon_dev_allocate(&pdev->dev, xxx_extcon_cables);
devm_extcon_dev_register(&pdev->dev, xxx_edev);
c. When the device is connected, execute the following command to tell frameworks that the headphone
device has been connected:
extcon_set_state_sync(extcon_dev, EXTCON_JACK_HEADPHONE, 1);
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Perform the following steps to play audio in powersave mode with the MCU image:
1. Use -u trusty-powersave-dual -d powersave-non-rpmsg -m when flashing images to enable
powersave mode, for example:
# For imx8mp
sudo uuu_imx_android_flash.sh -f imx8mp -e -u trusty-powersave-dual -d
powersave-non-rpmsg -m
2. Set bootargs in U-Boot command line:
setenv append_bootargs androidboot.lpa.enable=1
snd_pcm.max_alloc_per_card=134217728 clk-imx8mp.mcore_booted=1
saveenv
3. Set bootcmd in U-Boot command line:
setenv bootcmd "bootmcu && boota"
saveenv
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Make sure that only "MIPI DSI", "Debug UART", and "Power" ports are connected on the board.
4. To play local audio through LPA and output with wired headset:
a. Boot up the system.
b. Push the .wav audio files to /sdcard/. It is better to use a long duration audio file.
c. Open the DirectAudioPlayer application. Select a file from the spinner, and the file selected is listed
under the spinner.
d. Click the Play button to play audio.
e. Press the power key on the board to make the system enter suspend mode, and the audio can keep
playing.
Perform the following steps to play audio in powersave mode without the MCU image:
1. Use -u trusty-powersave -d powersave-non-rpmsg4 when flashing images to enable the
powersave mode, for example:
# For imx8mp
sudo uuu_imx_android_flash.sh -f imx8mp -e -u trusty-powersave -d powersave-
non-rpmsg
Make sure that only "MIPI DSI", "Debug UART", and "Power" ports are connected on the board.
2. To play audio and output with Bluetooth headset:
a. Boot up the system.
b. Push the .mp3 audio files to /sdcard/. It is better to use a long-duration audio file.
c. Connect a Bluetooth headset.
d. Play the .mp3 audio file and turn of the screen.
3. To play online audio and ouput with wired headset:
a. Boot up the system.
b. Connect to the Wi-Fi access point.
c. Open the Spotify application and play audio and turn off the screen.
Note: Only the i.MX 8M Plus EVK Board supports this feature.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
BOARD_KERNEL_CMDLINE += androidboot.lcd_density=240
The display density value can be changed by modifying the related lines mentioned above in files under
${MY_ANDROID}/device/nxp/ and recompiling the code or setting in U-Boot command line as bootargs
during boot up.
Note:
• For the i.MX 8M Mini EVK board, the source folder is ${MY_ANDROID}/device/nxp/imx8m/evk_8mm/
BoardConfig.mk.
• For the i.MX 8M Nano EVK board, the source folder is ${MY_ANDROID}/device/nxp/imx8m/evk_8mn/
BoardConfig.mk.
• For the i.MX 8M Plus EVK board, the source folder is ${MY_ANDROID}/device/nxp/imx8m/evk_8mp/
BoardConfig.mk.
• For the i.MX 8MQuad WEVK/EVK board, the source folder is ${MY_ANDROID}/device/nxp/imx8m/evk_
8mq/BoardConfig.mk.
• For the i.MX 8ULP EVK board, the source folder is ${MY_ANDROID}/device/nxp/imx8ulp/evk_8ulp/B
oardConfig.mk.
• For the i.MX 8QuadMax/8QuadXPlus MEK board, the source folder is ${MY_ANDROID}/device/nxp/
imx8q/mek_8q/BoardConfig.mk.
• For the i.MX 95 EVK board, the source folder is ${MY_ANDROID}/device/nxp/imx9/evk_95/Board
Config.mk.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To make the modifications take effect, modify the source file under the ${MY_ANDROID}/device/nxp/
directory and rebuild the images. Keep the connection of display devices and input devices unchanged and
reflash the images. Or you can disable DM-verity on the board and then use the adb push command to push
the file to the vendor partition to overwrite the original one.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Note: When the auto sleep feature is enabled, only RTD BUTTON1 can make the RTD UI show again (APD in
suspend mode).
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
bluetooth.profile.asha.central.enabled?=ture
bluetooth.profile.a2dp.source.enabled?=false
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
CONFIG_SPL_USB_SDP_SUPPORT=y
-CONFIG_SPL_SDP_USB_DEV=1
+CONFIG_SPL_SDP_USB_DEV=0
CONFIG_SDP_LOADADDR=0x80400000
CONFIG_FASTBOOT=y
@@ -147,7 +147,7 @@ CONFIG_FASTBOOT_UUU_SUPPORT=n
CONFIG_FASTBOOT_BUF_ADDR=0x98000000
CONFIG_FASTBOOT_BUF_SIZE=0x19000000
CONFIG_FASTBOOT_FLASH=y
-CONFIG_FASTBOOT_USB_DEV=1
+CONFIG_FASTBOOT_USB_DEV=0
CONFIG_BOOTAUX_RESERVED_MEM_BASE=0x88000000
CONFIG_BOOTAUX_RESERVED_MEM_SIZE=0x01000000
diff --git a/include/configs/imx8qm_mek_android.h b/include/configs/imx8qm_mek_android.h
index 1fb6b45768..c60f924f02 100644
--- a/include/configs/imx8qm_mek_android.h
+++ b/include/configs/imx8qm_mek_android.h
@@ -19,7 +19,6 @@
#define IMX_HDMITX_FIRMWARE_SIZE 0x20000
#define IMX_HDMIRX_FIRMWARE_SIZE 0x20000
-#define CONFIG_FASTBOOT_USB_DEV 1
#undef CONFIG_EXTRA_ENV_SETTINGS
#undef CONFIG_BOOTCOMMAND
For i.MX 8QuadXPlus, to enable USB 2.0 for the u-boot-imx8qxp.imx, make the following changes under
${MY_ANDROID}/vendor/nxp-opensource/uboot-imx:
More than one defconfig files are used to build U-Boot images for one platform. Make the same changes on
defconfig files as above to enable USB 2.0 for other U-Boot images. You can use the following command
under the ${MY_ANDROID}/vendor/nxp-opensource/uboot-imx/ directory to list all the related
defconfig files:
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
The VID/PID values for SPL SDP are 0x1fc9/0x0151. The VID value is the same as before, and the PID value
is changed to 0x0151 with the following function. The corresponding source code file is ${MY_ANDROID}/
vendor/nxp-opensource/uboot-imx/arch/arm/mach-imx/spl.c.
The UUU tool relies on the VID/PID value, the reference values can be found in the UUU source code
config.cpp. Therefoe, if the values are changed, UUU may not work. But the U-Boot image used with UUU is not
flashed to the board, so the one in prebuilt images can be used during development if the VID/PID values need
to be changed.
Customers can modify the Trusty OS code to make different configurations and enable different features. First,
use the following commands to fetch code and build the target Trusty OS binary.
# firslty create a directory for Trusty OS code and enter into this directory
$ repo init -u https://github.com/nxp-imx/imx-manifest.git -b imx-android-15 -m
imx-trusty-android-15.0.0_1.2.0.xml
$ repo sync
$ source trusty/vendor/google/aosp/scripts/envsetup.sh
$ ./trusty/vendor/google/aosp/scripts/build.py imx8mm #i.MX 8M Mini EVK Board
$ cp ${TRUSTY_REPO_ROOT}/build-imx8mm/lk.bin ${MY_ANDROID}/vendor/nxp/fsl-
proprietary/uboot-firmware/imx8m/tee-imx8mm.bin
Then, build the images, and the tee-imx8mm.bin file is integrated into bootloader-imx8mm-trusty-
secure-unlock-dual.img and bootloader-imx8mm-trusty-dual.img.
Flash the spl-imx8mm-trusty-dual.bin and bootloader-imx8mm-trusty-dual.img files to the
target device.
Note:
• For i.MX 8M Nano EVK, it uses the same Trusty target as i.MX 8M Mini EVK. Use the parameter imx8mm
to build the Trusty OS image, and copy the file lk.bin to ${MY_ANDROID}/vendor/nxp/fsl-
proprietary/uboot-firmware/tee-imx8mn.bin.
• For i.MX 8M Plus EVK, use the parameter imx8mp to build the Trusty OS image, and copy the file lk.bin to
${MY_ANDROID}/vendor/nxp/fsl-proprietary/ uboot-firmware/tee-imx8mp.bin.
• For i.MX 8M Quad EVK, use the parameter imx8m to build the Trusty OS image, and copy the final lk.bin to
${MY_ANDROID}/vendor/nxp/fsl-proprietary/uboot-firmware/imx8m/tee-imx8mq.bin.
• For i.MX 8ULP EVK, use the parameter imx8ulp to build the Trusty OS image, and copy the final lk.bin to
${MY_ANDROID}/vendor/nxp/fsl-proprietary/uboot-firmware/imx8ulp/tee-imx8ulp.bin.
• For i.MX 8QuadMax MEK, use the parameter imx8qm to build the Trusty OS image, and copy the final
lk.bin to ${MY_ANDROID}/vendor/nxp/fsl-proprietary/uboot-firmware/imx8q_car/tee-
imx8qm.bin.
• For i.MX 8QuadXPlus MEK, use the parameter imx8qxp to build the Trusty OS image, and copy the final
lk.bin to ${MY_ANDROID}/vendor/nxp/fsl-proprietary/uboot-firmware/imx8q_car/tee-
imx8qx.bin.
• For i.MX 95 EVK, use parameter imx95 to build the Trusty OS image, and copy the file lk.bin to ${MY_
ANDROID}/vendor/nxp/fsl-proprietary/uboot-firmware/imx9/tee-imx95.bin.
• ${TRUSTY_REPO_ROOT} is the root directory of the Trusty OS codebase.
• ${MY_ANDROID} is the root directory of the Android codebase.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Make your board enter fastboot mode, and then execute the following commands on the host side:
fastboot stage < path-to-your-rpmb-key >
fastboot oem set-rpmb-staged-key
After the board is rebooted, the RPMB service in the Trusty OS is initialized successfully.
Note:
– This method does not work on the platforms without CAAM (for example, i.MX 95).
– The RPMB key should start with magic "RPMB" and be followed with 32 bytes hexadecimal key.
– A prebuilt rpmb_key_test.bin whose key is fixed 32 bytes hexadecimal 0x00 is provided. It is generated
with the following shell commands:
– touch rpmb_key_test.bin
– echo -n -e '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' >> rpmb_key_test.bin
The \xHH means eight-bit character whose value is the hexadecimal value 'HH'. You can replace "00" above
with the key you want to set.
• Note:
For more details, see the i.MX Android Security User's Guide (UG10158).
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
The public key can be extracted from the private key. The avbtool in ${MY_ANDROID}/external/avb
supports such commands. You can get the public key test_rsa4096_public.bin with the commands:
By default, the Android build system uses the algorithm SHA256_RSA4096 with the private key from ${MY_
ANDROID}/external/avb/test/data/testkey_rsa4096.pem. This can be overwritten by setting the
BOARD_AVB_ALGORITHM and BOARD_AVB_KEY_PATH to use different algorithm and private key:
BOARD_AVB_ALGORITHM := <algorithm-type>
BOARD_AVB_KEY_PATH := <key-path>
Algorithm SHA256_RSA4096 is recommended. The Android build system signs the vbmeta struct in vbmeta
image with the private key above and stores one copy of the public key in the signed vbmeta image. During
AVB verification, the U-Boot validates the public key first, and then uses the public key to authenticate the
signed vbmeta image.
The public key test_rsa4096_public.bin should be extracted from the private key you have
specified. But if you do not specify any private key, you should set the public key as prebuilt
testkey_public_rsa4096.bin, which is extracted to form the default private key testkey_rsa4096.pem.
${MY_ANDROID}/external/avb/test/data/testkey_rsa2048.pem
Custom keys should be used for production. See Section 8.6.2.1 to generate the custom private key. The AVB
boot key and algorithm can be overridden by setting the following configurations:
BOARD_AVB_BOOT_ALGORITHM := <algorithm-type>
BOARD_AVB_BOOT_KEY_PATH := <key-path>
Google, parse the "keybox" and provision the keys and certificates to secure storage. Both keys and certificates
should be Distinguished Encoding Rules (DER) encoded.
Fastboot commands are provided to provision the attestation keys and certificates. Make sure that the secure
storage is properly initialized for Trusty OS:
• Set RSA private key:
fastboot stage < path-to-rsa-private-key >
fastboot oem set-rsa-atte-key
• Set ECDSA private key:
fastboot stage < path-to-ecdsa-private-key >
fastboot oem set-ec-atte-key
• Append RSA certificate chain:
fastboot stage < path-to-rsa-atte-cert >
fastboot oem append-rsa-atte-cert
This command may need to be executed multiple times to append the whole certificate chain.
• Append ECDSA certificate chain:
fastboot stage < path-to-ecdsa-cert >
fastboot oem append-ec-atte-cert
This command may need to be executed multiple times to append the whole certificate chain.
After provisioning all the keys and certificates, the keystore attestation feature should work properly.
Besides, secure provision provides a way to prevent the plaintext attestation keys and certificates from
exposure. For more details, see the i.MX Android Security User's Guide (UG10158).
The SCFW porting kit contains prebuilt binaries, libraries, and configuration files. For the board configuration
file, take i.MX 8QuadXPlus MEK as an example, it is scfw_export_mx8qx_b0/platform/board/mx8qx_
mek/board.c. Based on this file, some changes are made for Android and the file is stored in ${MY_
ANDROID}/vendor/nxp/fsl-proprietary/uboot-firmware/imx8q/board-imx8qxp.c.
You can copy board.c in vendor/nxp/fsl-proprietary to SCFW porting kit, modify it, and then build
the SCFW.
The following are steps to build Android SCFW (taking i.MX 8QuadXPlus as example):
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
1. Download GCC tool from the arm Developer GNU-RM Downloads page. It is suggested to download the
version of "6-2017-q2-update" as it is verified.
2. Unzip the GCC tool to /opt/scfw_gcc.
3. Export TOOLS="/opt/scfw-gcc".
4. Copy the board configuration file from ${MY_ANDROID}/vendor/nxp/fsl-proprietary/uboot-
firmware/imx8q/board-imx8qxp.c to the porting kit.
cp ${MY_ANDROID}/vendor/nxp/fsl-proprietary/uboot-firmware/imx8q/board-
imx8qxp.c scfw_export_mx8qx_b0/platform/board/mx8qx_mek/board.c
5. Build SCFW.
cd scfw_export_mx8qx_b0 # enter the directory just uncompressed for i.MX
8QuadXPlus MEK
make clean
make qx R=B0 B=mek
6. Copy the SCFW binary to the uboot-firmware folder.
cp build_mx8qx_b0/scfw_tcm.bin ${MY_ANDROID}/vendor/nxp/fsl-proprietary/
uboot-firmware/imx8q/mx8qx-scfw-tcm.bin
7. Build the bootloader.
cd ${MY_ANDROID}
./imx-make.sh bootloader -j4
Note:
To build SCFW for i.MX 8QuadMax MEK, use qm to replace qx in the steps above.
BOARD_SUPER_PARTITION_SIZE := 4294967296
BOARD_NXP_DYNAMIC_PARTITIONS_SIZE := 4284481536
Refer to the following patch to change the super partition size to 4 GB:
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Then, the images can be pushed to the board with the adb push command. Before the further debugging
work, be aware of the following notices:
• Do not erase the userdata partition after adb disable-verity is executed.
With the dynamic partition feature enabled in i.MX Android images, and the size is not specified for system,
system_ext, vendor, and product partitions when building the images. OverlayFS is used when
remounting the read-only filesystems. An upper directory that can be written in OverlayFS is needed in
this condition. When the adb push command is executed, the files are pushed to the upper directory of
OverlayFS, while the original read-only filesystems are not modified.
i.MX Android images use only one partition named super to store images in logical partitions, and
f2fs filesystem is used for the userdata partition, which is mounted on /data. When executing the adb
disable-verity command, an image is allocated under /data/gsi/remount/scratch.img.0000.
Its size is the value of the property fs_mgr.overlayfs.data_scratch_size_mb if it is set. If not, the
size is the less one between the super partition size and the userdata partition free space size. The layout
information of this image is stored in /metadata/gsi/remount/lpmetadata in the format logical partition
metadata.
When rebooting the system, at the first stage of the init program, the information in /metadata/gsi/
remount/lpmetadata is used to create a logical partition named scratch, and it is mounted on /mnt/
scratch. This is used as the upper directory in OverlayFS used in remount. When the adb push command
is executed to modify the originally read-only filesystems, files are written to the scratch partition.
At the first stage of the init program, the userdata partition is not mounted. The code judges whether
the backing image of the scratch partition exists in the userdata partition by checking whether the /
metadata/gsi/remount/lpmetadata file can be accessed. Therefore, if the userdata partition is
erased, but the logical partition is still created, this could be catastrophic and may make the system crash.
• To modify the files from the console, execute remount on the console first.
adb and sh are in different mount namespaces. adb remount does not change the mount status that sh
sees.
• For MEK boards, if files need to be pushed to /vendor/etc, /vendor/lib64, and /vendor/firmware/
tee, push them to another path.
Images for i.MX 8Quad Max MEK and i.MX 8QuadXPlus MEK are built together with one target. Media codec
configuration file names and paths are hardcoded in the framework, while these two SoCs need different
media codec configurations. It means that the media codec configuration files for the two boards with different
content should have the same name and be accessed with the same path. Therefore, OverlayFS is used, and
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
images for the two boards have different OverlayFS upper directories. The mount command can be found in
${MY_ANDROID}/device/nxp/imx8q/mek_8q/init.rc:
mount overlay overlay /vendor/etc ro lowerdir=/vendor/vendor_overlay_soc/
${ro.boot.soc_type}/vendor/etc:/vendor/etc,override_creds=off
mount overlay overlay /vendor/lib64 ro lowerdir=/system/lib64/
vendor_widevine_overlay_soc/${ro.boot.soc_type}/vendor/lib64:/vendor/
lib64,override_creds=off
mount overlay overlay /vendor/firmware/tee ro lowerdir=/vendor/
vendor_widevine_overlay_soc/${ro.boot.soc_type}/vendor/firmware/tee:/vendor/
firmware/tee,override_creds=off
The value of ${ro.boot.soc_type} can be imx8qxp or imx8qm here.
With the preceding command executed, access to files under /vendor/etc can access files both under
/vendor/etc and /vendor/vendor_overlay_soc/${ro.boot.soc_type}/vendor/etc. The /
vendor/vendor_overlay_soc/${ro.boot.soc_type}/vendor/etc:/vendor/etc directory is the
upper directory in overlayfs and /vendor/etc is both the lower directory and mount point.
After remount, the lower directory /vendor/etc is still read-only, and files can be pushed to other sub-paths
under /vendor except /vendor/etc. To push a modified file, which should be accessed from /vendor/
etc, push it to /vendor/vendor_overlay_soc/${ro.boot.soc_type}/vendor/etc, and then reboot
the system to make it take effect.
For example, if you modified the file cdnhdmi_config.json, a file should be under /vendor/etc/
configs/audio/. Execute the following commands on the console:
su
umask 000
cd /vendor/vendor_overlay_soc/imx8qm/vendor/etc/
mkdir -p configs/audio/
Then, execute the following commands on the host:
sudo adb push cdnhdmi_config.json /vendor/vendor_overlay_soc/imx8qm/vendor/etc/
At last, reboot the device to make this change take effect.
There are two limitations here:
– To delete a file under /vendor/etc/, you can only rebuild the image and flash the vendor image again.
– The OverlayFS is mounted with a command in an init .rc file. The init .rc files are all parsed by the init
program before the OverlayFS is mounted. Therefore, to modify init .rc files under /vendor/etc, you can
only rebuild the image and flash the vendor image again.
• For i.MX 8M Plus EVK boards, if files need to be pushed to /vendor/etc/configs/isp, push them to
another path.
Similar to the condition of images for MEK boards, the images for i.MX 8M Plus EVK board support different
Cameras, which require different configurations. The different configuration files have the same name, and
need to be accessed from the same directory of /vendor/etc/configs/isp, so OverlayFS is used and
mounted on this directory for some camera usages, and this directory is still read-only after remount.
The mount commands can be found in ${MY_ANDROID}/device/nxp/imx8m/evk_8mp/init.rc.
# default is for dual os08a20
on property:ro.boot.camera.layout=""
mount overlay overlay /vendor/etc/configs/isp ro lowerdir=/vendor/
vendor_overlay_sensor/os08a20/vendor/etc/configs/isp:/vendor/etc/configs/
isp,override_creds=off
on property:ro.boot.camera.layout=os08a20-ov5640
setprop ro.media.xml_variant.profiles _8mp-ispsensor-ov5640
mount overlay overlay /vendor/etc/configs/isp ro lowerdir=/vendor/
vendor_overlay_sensor/os08a20/vendor/etc/configs/isp:/vendor/etc/configs/
isp,override_creds=off
on property:ro.boot.camera.layout=dual-basler
mount overlay overlay /vendor/etc/configs/isp ro lowerdir=/vendor/
vendor_overlay_sensor/basler/vendor/etc/configs/isp:/vendor/etc/configs/
isp,override_creds=off
Files need to be pushed to the following directories based on the camera you are debugging with:
– /vendor/vendor_overlay_sensor/basler/vendor/etc/configs/isp
– /vendor/vendor_overlay_sensor/os08a20/vendor/etc/configs/isp
The limitations described in the preceding part for MEK images also exist in the images for the i.MX 8M Plus
EVK board:
– To delete a file under /vendor/etc/configs/isp, you can only rebuild the image and flash the vendor
image again.
– The OverlayFS is mounted with a command in an init .rc file. The init .rc files are all parsed by
init before the OverlayFS is mounted. Therefore, to modify init .rc files under /vendor/etc/
configs/isp, you can only rebuild the image and flash the vendor image again.
If only one camera usage is needed, the OverlayFS mount commands can be removed from the init.rc file
and put the corresponding configuration files directly under /vendor/etc/configs/isp.
PERMISSION_EXTCAM ?= true
ifeq ($(PERMISSION_EXTCAM),true)
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.camera.external.xml:vendor/
etc/permissions/android.hardware.camera.external.xml
endif
Currently, for a release image, PERMISSION_EXTCAM is false on the i.MX 8QuadMax, 8QuadXPlus, 8M Mini,
and 8M Nano, true on the i.MX 8M Plus, 8M Quad, 8ULP, and i.MX 95 by default. Therefore, on i.MX 8M Plus,
8M Quad, 8ULP, and i.MX 95, connect the USB camera when running CTS. On i.MX 8QuadMax, 8QuadXPlus,
8M Mini, and 8M Nano, although there is no vendor/etc/permissions/android.hardware.camera.
external.xml, the USB camera still works properly with camera APKs.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
fi
fi
fi
To build boot-imx.img, run ./imx-make.sh or TARGET_IMX_KERNEL=true make bootimage && mv
${OUT}/boot.img ${OUT}/boot-imx.img.
• Kernel defconfig
Kernel .config is generated by one generic gki_defconfig along with one board specific config, like
imx8mm_gki.fragment.
• Driver modules
As GKI requires, all vendor drivers need to be built as module. Their configurations are set to m in above-
mentioned board-specific configuration file.
In addition, explicitly install those modules on board by adding them to the following two Android predefined
macros. For example, see ${MY_ANDROID}/device/nxp/imx8m/evk_8mm/SharedBoardConfig.mk:
– BOARD_VENDOR_RAMDISK_KERNEL_MODULES
Modules under this macro are copied to ${MY_ANDROID}/out/target/product/evk_8mm/vendor_
ramdisk/lib/modules, and then built as vendor_boot.img.
They are installed to the kernel in the first stage of initialization. In general, put essential modules here and
be careful of the sequence.
– BOARD_VENDOR_KERNEL_MODULES
Modules under this macro are copied to ${MY_ANDROID}/out/target/product/evk_8mm/vendor_
dlkm/lib/modules, and then built as vendor_dlkm.img.
They are installed later than vendor_ramdisk, after the Android file system is ready.
• Note: Due to SoC errata TKT340553 in i.MX 8QuadMax, it has not fully enabled GKI. The boot_8q.img
and system_dlkm_staging_8q are built locally for both i.MX 8QuadMax and i.MX 8QuadXPlus.
./imx-make.sh bootimage
or
make bootimage
make system_dlkmimage
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
1. Set the driver configuration to m in the configuration fragment file of the board:
diff --git a/arch/arm64/configs/imx8q_gki.fragment b/arch/arm64/configs/
imx8q_gki.fragment
index 51ce20e5920d..e54f96cc5469 100644
--- a/arch/arm64/configs/imx8q_gki.fragment
+++ b/arch/arm64/configs/imx8q_gki.fragment
@@ -148,3 +148,4 @@ CONFIG_TRUSTY_CRASH_IS_PANIC=y
CONFIG_SOC_IMX8M=m
CONFIG_I2C_MUX=m
CONFIG_I2C_MUX_GPIO=m
+CONFIG_MHDP_HDMIRX=m
2. Add the driver .ko files to the board:
diff --git a/imx8q/mek_8q/SharedBoardConfig.mk b/imx8q/mek_8q/
SharedBoardConfig.mk
index 280c067f8568..0837e352a4a7 100644
--- a/imx8q/mek_8q/SharedBoardConfig.mk
+++ b/imx8q/mek_8q/SharedBoardConfig.mk
@@ -227,7 +227,8 @@ BOARD_VENDOR_KERNEL_MODULES += \
$(KERNEL_OUT)/drivers/watchdog/imx_sc_wdt.ko \
$(KERNEL_OUT)/drivers/rtc/rtc-imx-sc.ko \
$(KERNEL_OUT)/drivers/nvmem/nvmem-imx-ocotp-scu.ko \
-$(KERNEL_OUT)/drivers/soc/imx/secvio/soc-imx-secvio-sc.ko
+$(KERNEL_OUT)/drivers/soc/imx/secvio/soc-imx-secvio-sc.ko \
+$(KERNEL_OUT)/drivers/staging/media/imx/hdmirx/cdns_mhdp_hdmirx.ko
Note: If other driver modules depend on them, put them before others.
3. Fix symbol issues encountered when the driver is loaded.
If some symbols are not exported but used by the added driver modules, perform the following steps:
a. Export symbols with EXPORT_SYMBOL_GPL(xxx).
Note: If symbols are in core kernel code (which means not in loadable modules), such changes must
upstream to the AOSP GKI Kernel tree.
b. Add symbols to the AOSP GKI Kernel tree android/abi_gki_aarch64.stg.
In this case, the following errors are encountered when init tries to load this module:
cdns_mhdp_hdmirx: Unknown symbol v4l2_enum_dv_timings_cap (err -2)
cdns_mhdp_hdmirx: Unknown symbol kthread_freezable_should_stop (err -2)
After checking the kernel code, the two symbols are already exported by EXPORT_SYMBOL_GPL(), but are
not present in the android/abi_gki_aarch64.stg file. Therefore, follow the next section to add the two
symbols to the .stg file and upstream this change to AOSP as follows:
https://android-review.googlesource.com/c/kernel/common/+/2685966
Once the patch has been merged into the ACK tree, it usually takes a month or two to get it into the GKI
release image. To speed up this process, see the following link to request an emergency respin release:
https://source.android.com/docs/core/architecture/kernel/gki-
releases#emergency-respin
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
5. To export these symbols by the AOSP released GKI image, upstream the two files android/
abi_gki_aarch64_imx and android/abi_gki_aarch64.stg to AOSP.
See How do I submit patches to Android Common Kernels.
Example ANDROID: GKI: Add symbol to symbol list for imx.
After the Android OS merges your patch, a Emergency respin process is needed to respin it into aosp/
android15-6.6-2025-01. (This is an example. Upgrade to any branch as you need.)
Then, you will see your patch in aosp/android15-6.6-2025-01. (This is an example, upgrade to any
branch as you need.) You can obtain the certified boot images from Android GKI Release Builds.
See Section 9.3 to update boot.img and system_dlkm_staging_archive.tar.gz.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
To avoid the i.MX 95 camera ISP issue, i.MX 95 requires boot_95.img and system_dlkm_95.img.
The boot_95.img and system_dlkm_staging_95.img are built locally with the AOSP tag
android15-6.6-2025-01_r2, with the following patch from ${MY_ANDROID}/vendor/nxp-
opensource/imx-gki/boot_95_patches added:
0001-ILIE-12-include-videodev2.h-Add-meta-formats-used-fo.patch
0002-ILIE-17-media-v4l2-core-Add-meta-neoisp-formats-desc.patch
0003-LF-10587-08-media-v4l2-subdev-enable-stream-API.patch
10 imx-chip-tool application
Matter (previously known as Project CHIP) is a universal IPv6-based application-layer communication protocol
for smart home devices. Matter supports UDP and TCP at the transport layer, and supports Ethernet, Wi-Fi,
Thread, Bluetooth Low Energy (BLE) at the link layer. Depending on the networking technologies supported
by a device, discovery and commissioning are possible using BLE, Wi-Fi technologies, or over IP, if a device
is already on an IP network. Devices that use Thread networking technology must also support BLE for the
purposes of discovery and commissioning.
The imx-chip-tool application is a pre-installed apk on the i.MX 8M Nano. It is a Matter Controller
implementation that allows users to discover and commission a Matter device on the network and communicate
with it using Matter messages. This application currently supports commissioning with three types of devices:
• On Network Device
This method is used to discover and communicate with Matter devices on the same LAN as the Matter
Controller. The Android device discovers and communicates with a Matter device over IP.
• Wi-Fi Device
This method is used to discover and communicate with Matter devices that support Wi-Fi. The Android device
connected to a Wi-Fi AP that supports IPv6, discovers a Matter device through BLE, joins the Matter device to
the Wi-Fi network, and then communicates with it over the Wi-Fi network.
• Thread Device
This method is used to discover and communicate with Matter devices that support Thread. The Android
device discovers a Thread device through BLE, joins the Thread device to the Matter network through the
Open Thread Board Router (OTBR) (The Android device and the OTBR are on the same Wi-Fi network, and
the OTBR and the Thread device are on the same Thread network. Together, they form a Matter network),
and then communicates with the Thread device over IP.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
By following this process, the user can successfully download, apply necessary patches, and ultimately obtain
the Trout Android bootloader and kernel components suitable for running on Xen virtual machines.
$ source build/envsetup.sh
$ lunch aosp_trout_arm64-nxp_stable-userdebug
$ m -j16
https://www.nxp.com/design/design-center/software/embedded-software/i-mx-
software/embedded-linux-for-i-mx-applications-processors.
Then flash it to the EMMC or SD card of the i.MX 95 19x19 EVK using the uuu command.
Once the image has been successfully flashed onto the i.MX 95 19x19 EVK board, insert the network
cable and establish a connection with the monitor.
After the steps mentioned above are completed successfully, boot the Xen environment by entering 'enter' at
the beginning of the boot process from the serial console and then executing the U-Boot commands, which are
described in the subsequent sections.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Note: It is recommended to compress the disk.img file before transferring it through SCP, because it is 14
GB in size.
If the prebuilt images disk.img and u-boot.bin are used, the image paths are not the same as the paths
used in the preceding example commands, so the commands need to be modified to use the prebuilt images.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Then, on the host side, ensure that the host's network and the Trout's IP address are in the same subnet. Run
the following command:
13 Revision History
Revision history
Document ID Release date Description
UG10156 v.android-15.0.0_1.2.0 16 May 2025 Updated the codes for GKI export new symbols build in
Section 9.5 due to the update of the Google AOSP GKI
code.
UG10156 v.android-15.0.0_1.2.0 11 April 2025 i.MX 8M Mini, i.MX 8M Nano, i.MX 8M Plus, i.MX 8M Quad,
i.MX 8ULP, i.MX 8QuadMax, i.MX 8QuadXPlus GA release,
and i.MX 95 Beta release.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Revision history...continued
Document ID Release date Description
UG10156 v.android-15.0.0_1.0.0 24 January 2025 i.MX 8M Mini, i.MX 8M Nano, i.MX 8M Plus, i.MX 8M Quad,
i.MX 8ULP, i.MX 8QuadMax, i.MX 8QuadXPlus GA release,
and i.MX 95 Beta release.
UG10156 v.android-14.0.0_2.2.0 15 November 2024 Corrected the command lines to generate the symbol list
when GKI is used. See Section 9.5.
UG10156 v.android-14.0.0_2.2.0 18 October 2024 i.MX 8M Mini, i.MX 8M Nano, i.MX 8M Plus, i.MX 8M Quad,
i.MX 8ULP, i.MX 8QuadMax, i.MX 8QuadXPlus GA release,
i.MX 95 (A1 15x15) Alpha release, and i.MX 95 (A1 19x19)
Beta release.
UG10156 v.android-14.0.0_2.0.0 9 August 2024 i.MX 8M Mini, i.MX 8M Nano, i.MX 8M Plus, i.MX 8M Quad,
i.MX 8ULP, i.MX 8QuadMax, i.MX 8QuadXPlus GA release,
and i.MX 95 Alpha release.
Updated the document ID.
AUG v.android-14.0.0_1.2.0 19 April 2024 i.MX 8ULP EVK, i.MX 8M Mini, i.MX 8M Nano, i.MX 8M
Plus, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8Quad
XPlus GA release.
AUG v.android-14.0.0_1.0.0 6 Feburary 2024 i.MX 8ULP EVK, i.MX 8M Mini, i.MX 8M Nano, i.MX 8M
Plus, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8Quad
XPlus GA release.
AUG v.android-13.0.0_2.2.0 24 October 2023 i.MX 8ULP EVK, i.MX 8M Mini, i.MX 8M Nano, i.MX 8M
Plus, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8Quad
XPlus GA release.
AUG v.android-13.0.0_2.0.0 07/2023 i.MX 8ULP EVK Beta release, i.MX 8M Mini, i.MX 8M Nano,
i.MX 8M Plus, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8
QuadXPlus GA release.
AUG v.android-13.0.0_1.2.0 03/2023 i.MX 8ULP EVK Beta release, i.MX 8M Mini, i.MX 8M Nano,
i.MX 8M Plus, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8
QuadXPlus GA release.
AUG v.android-13.0.0_1.0.0 01/2023 i.MX 8ULP EVK Beta release, i.MX 8M Mini, i.MX 8M Nano,
i.MX 8M Plus, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8
QuadXPlus GA release.
AUG v.android-12.1.0_1.0.0 10/2022 i.MX 8ULP EVK Beta release, i.MX 8M Mini, i.MX 8M Nano,
i.MX 8M Plus, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8
QuadXPlus GA release.
AUG v.android-12.0.0_2.0.0 07/2022 i.MX 8ULP EVK Beta release, i.MX 8M Mini, i.MX 8M Nano,
i.MX 8M Plus, and i.MX 8M Quad GA release.
AUG v.android-12.0.0_1.0.0 03/2022 i.MX 8ULP EVK Beta release, i.MX 8M Mini, i.MX 8M Nano,
i.MX 8M Plus, and i.MX 8M Quad GA release.
AUG v.android-11.0.0_2.6.0 01/2022 i.MX 8ULP EVK Beta release, i.MX 8M Mini, i.MX 8M Nano,
i.MX 8M Plus, and i.MX 8M Quad GA release.
AUG v.android-11.0.0_2.4.0 10/2021 i.MX 8ULP EVK Alpha release, i.MX 8M Mini, i.MX 8M
Nano, i.MX 8M Plus, and i.MX 8M Quad GA release.
AUG v.android-11.0.0_2.2.0 07/2021 i.MX 8M Mini, i.MX 8M Nano, i.MX 8M Plus, and i.MX 8M
Quad GA release.
AUG v.android-11.0.0_2.0.0 04/2021 i.MX 8M Mini, i.MX 8M Nano, i.MX 8M Plus, and i.MX 8M
Quad GA release.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Revision history...continued
Document ID Release date Description
AUG v.android-11.0.0_1.0.0 12/2020 i.MX 8M Plus EVK Beta release, and all the other i.MX 8 GA
release.
AUG v.android-10.0.0_2.3.0 07/2020 i.MX 8M Plus EVK Beta1 release, and all the other i.MX 8
GA release.
AUG v.android-10.0.0_2.0.0 05/2020 i.MX 8M Mini, i.MX 8M Nano, i.MX 8M Quad, i.MX 8Quad
Max, and i.MX 8QuadXPlus GA release.
AUG v.android-10.0.0_2.1.0 04/2020 i.MX 8M Plus Alpha and i.MX 8QuadXPlus Beta release.
AUG v.android-10.0.0_1.0.0 03/2020 Deleted the Android 10 image.
AUG v.android-10.0.0_1.0.0 02/2020 i.MX 8M Mini, i.MX 8M Quad, i.MX 8QuadMax, and i.MX 8
QuadXPlus GA release.
AUG v.P9.0.0_2.0.0-ga 08/2019 Updated the location of the SCFW porting kit.
AUG v.P9.0.0_2.0.0-ga 04/2019 i.MX 8M, i.MX 8QuadMax, i.MX 8QuadXPlus GA release.
AUG v.P9.0.0_1.0.0-ga 01/2019 i.MX 8M, i.MX 8QuadMax, i.MX 8QuadXPlus GA release.
AUG v.P9.0.0_1.0.0-beta 11/2018 Initial release
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Legal information
Definitions Terms and conditions of commercial sale — NXP Semiconductors
products are sold subject to the general terms and conditions of commercial
sale, as published at https://www.nxp.com/profile/terms, unless otherwise
Draft — A draft status on a document indicates that the content is still agreed in a valid written individual agreement. In case an individual
under internal review and subject to formal approval, which may result agreement is concluded only the terms and conditions of the respective
in modifications or additions. NXP Semiconductors does not give any agreement shall apply. NXP Semiconductors hereby expressly objects to
representations or warranties as to the accuracy or completeness of applying the customer’s general terms and conditions with regard to the
information included in a draft version of a document and shall have no purchase of NXP Semiconductors products by customer.
liability for the consequences of use of such information.
Export control — This document as well as the item(s) described herein
may be subject to export control regulations. Export might require a prior
Disclaimers authorization from competent authorities.
Limited warranty and liability — Information in this document is believed Suitability for use in non-automotive qualified products — Unless
to be accurate and reliable. However, NXP Semiconductors does not give this document expressly states that this specific NXP Semiconductors
any representations or warranties, expressed or implied, as to the accuracy product is automotive qualified, the product is not suitable for automotive
or completeness of such information and shall have no liability for the use. It is neither qualified nor tested in accordance with automotive testing
consequences of use of such information. NXP Semiconductors takes no or application requirements. NXP Semiconductors accepts no liability for
responsibility for the content in this document if provided by an information inclusion and/or use of non-automotive qualified products in automotive
source outside of NXP Semiconductors. equipment or applications.
In no event shall NXP Semiconductors be liable for any indirect, incidental, In the event that customer uses the product for design-in and use in
punitive, special or consequential damages (including - without limitation - automotive applications to automotive specifications and standards,
lost profits, lost savings, business interruption, costs related to the removal customer (a) shall use the product without NXP Semiconductors’ warranty
or replacement of any products or rework charges) whether or not such of the product for such automotive applications, use and specifications, and
damages are based on tort (including negligence), warranty, breach of (b) whenever customer uses the product for automotive applications beyond
contract or any other legal theory. NXP Semiconductors’ specifications such use shall be solely at customer’s
own risk, and (c) customer fully indemnifies NXP Semiconductors for any
Notwithstanding any damages that customer might incur for any reason
liability, damages or failed product claims resulting from customer design and
whatsoever, NXP Semiconductors’ aggregate and cumulative liability
use of the product for automotive applications beyond NXP Semiconductors’
towards customer for the products described herein shall be limited in
standard warranty and NXP Semiconductors’ product specifications.
accordance with the Terms and conditions of commercial sale of NXP
Semiconductors.
HTML publications — An HTML version, if available, of this document is
provided as a courtesy. Definitive information is contained in the applicable
Right to make changes — NXP Semiconductors reserves the right to
document in PDF format. If there is a discrepancy between the HTML
make changes to information published in this document, including without
document and the PDF document, the PDF document has priority.
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
Translations — A non-English (translated) version of a document, including
to the publication hereof.
the legal information in that document, is for reference only. The English
version shall prevail in case of any discrepancy between the translated and
Suitability for use — NXP Semiconductors products are not designed,
English versions.
authorized or warranted to be suitable for use in life support, life-critical or
safety-critical systems or equipment, nor in applications where failure or
Security — Customer understands that all NXP products may be subject to
malfunction of an NXP Semiconductors product can reasonably be expected
unidentified vulnerabilities or may support established security standards or
to result in personal injury, death or severe property or environmental
specifications with known limitations. Customer is responsible for the design
damage. NXP Semiconductors and its suppliers accept no liability for
and operation of its applications and products throughout their lifecycles
inclusion and/or use of NXP Semiconductors products in such equipment or
to reduce the effect of these vulnerabilities on customer’s applications
applications and therefore such inclusion and/or use is at the customer’s own
and products. Customer’s responsibility also extends to other open and/or
risk.
proprietary technologies supported by NXP products for use in customer’s
applications. NXP accepts no liability for any vulnerability. Customer should
Applications — Applications that are described herein for any of these
regularly check security updates from NXP and follow up appropriately.
products are for illustrative purposes only. NXP Semiconductors makes no
representation or warranty that such applications will be suitable for the Customer shall select products with security features that best meet rules,
specified use without further testing or modification. regulations, and standards of the intended application and make the
ultimate design decisions regarding its products and is solely responsible
Customers are responsible for the design and operation of their
for compliance with all legal, regulatory, and security related requirements
applications and products using NXP Semiconductors products, and NXP
concerning its products, regardless of any information or support that may be
Semiconductors accepts no liability for any assistance with applications or
provided by NXP.
customer product design. It is customer’s sole responsibility to determine
whether the NXP Semiconductors product is suitable and fit for the NXP has a Product Security Incident Response Team (PSIRT) (reachable
customer’s applications and products planned, as well as for the planned at [email protected]) that manages the investigation, reporting, and solution
application and use of customer’s third party customer(s). Customers should release to security vulnerabilities of NXP products.
provide appropriate design and operating safeguards to minimize the risks
associated with their applications and products. NXP B.V. — NXP B.V. is not an operating company and it does not distribute
NXP Semiconductors does not accept any liability related to any default, or sell products.
damage, costs or problem which is based on any weakness or default
in the customer’s applications or products, or the application or use by
customer’s third party customer(s). Customer is responsible for doing all Trademarks
necessary testing for the customer’s applications and products using NXP
Semiconductors products in order to avoid a default of the applications
Notice: All referenced brands, product names, service names, and
and the products or of the application or use by customer’s third party
trademarks are the property of their respective owners.
customer(s). NXP does not accept any liability in this respect.
NXP — wordmark and logo are trademarks of NXP B.V.
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Contents
1 Overview ........................................................... 2 7.1.4 Building an OTA package for single-
2 Preparation ....................................................... 2 bootloader image ............................................. 29
2.1 Setting up your computer .................................. 2 7.1.5 Building an OTA package with the
2.2 Unpacking the Android release package ........... 3 postinstall command ........................................ 31
3 Building the Android Platform for i.MX ..........3 7.1.6 Building an OTA package with encrypted
3.1 Getting i.MX Android release source code ........ 3 boot enabled ....................................................32
3.2 Building Android images ....................................4 7.1.6.1 Building SPL and bootloader images with
3.2.1 Configuration examples of building i.MX encrypted boot enabled ................................... 32
devices ...............................................................9 7.1.6.2 Encrypting SPL and bootloader images ...........32
3.2.2 Build mode selection ......................................... 9 7.1.6.3 Building an OTA package with encrypted
3.2.3 Building with GMS package .............................10 boot .................................................................. 32
3.2.4 Building 32-bit and 64-bit images .................... 10 7.2 Implementing OTA update ............................... 33
3.3 Building an Android image With Docker .......... 10 7.2.1 Using update_engine_client to update the
3.4 Building U-Boot images ................................... 11 Android platform .............................................. 33
3.5 Building a kernel image ................................... 12 7.2.2 Using a customized application to update
3.6 Building boot.img ............................................. 13 the Android platform ........................................ 34
3.7 Building dtbo.img ............................................. 13 8 Customized Configuration ............................ 36
4 Running the Android Platform with a 8.1 Camera configuration ...................................... 36
Prebuilt Image ................................................ 13 8.1.1 Configuring the rear and front cameras ........... 36
5 Programming Images .................................... 14 8.1.2 Configuring camera sensor parameters ...........37
5.1 System on eMMC/SD ...................................... 14 8.1.3 Making cameras work on i.MX 8M Plus
5.1.1 Storage partitions .............................................14 EVK with non-default images .......................... 37
5.1.2 Downloading images with UUU ....................... 16 8.1.4 Switching between OS0A20 and AP1302
5.1.3 Downloading images with fastboot_imx_ on i.MX 95 EVK ...............................................38
flashall script ....................................................17 8.1.5 Making the AP1302 camera work on i.MX
5.1.4 Downloading a single image with fastboot ....... 18 95 ..................................................................... 39
6 Booting ........................................................... 19 8.1.6 DeviceAsWebcam feature ............................... 39
6.1 Booting from SD/eMMC ...................................19 8.2 Audio configuration .......................................... 40
6.1.1 Booting from SD/eMMC on the i.MX 8M 8.2.1 Enabling low-power audio ............................... 40
Mini EVK board ............................................... 19 8.2.2 Supporting a new sound card ..........................41
6.1.2 Booting from SD/eMMC on the i.MX 8M 8.2.3 Enabling powersave mode .............................. 43
Nano board ......................................................20 8.3 Display configuration ....................................... 44
6.1.3 Booting from SD/eMMC on the i.MX 8M 8.3.1 Configuring the logical display density .............44
Plus EVK board ............................................... 20 8.3.2 Enabling multiple-display function ................... 45
6.1.4 Booting from SD/eMMC on the i.MX 8M 8.3.2.1 Binding the display port with the input port ...... 46
Quad WEVK/EVK board ..................................21 8.3.2.2 Launching applications on different displays ....46
6.1.5 Booting from eMMC on the i.MX 8ULP EVK 8.3.3 Enabling low-power display function ................46
board ................................................................21 8.3.3.1 Enabling low-power display on i.MX 8ULP
6.1.6 Booting from SD/eMMC on the i.MX EVK ..................................................................47
8QuadMax MEK board .................................... 21 8.3.3.2 Some test commands in low-power display
6.1.7 Booting from SD/eMMC on the i.MX demo ................................................................ 47
8QuadXPlus MEK board ................................. 22 8.3.3.3 Test procedure for low-power display demo .....47
6.1.8 Booting from SD/eMMC on the i.MX 95 8.3.4 HDMI-CEC feature ...........................................48
EVK board ....................................................... 22 8.3.4.1 Implementation on i.MX platforms ................... 48
6.2 Boot-up configurations .....................................23 8.3.4.2 Test procedure for HDMI-CEC End-User
6.2.1 U-Boot environment .........................................23 features ............................................................ 48
6.2.2 Kernel command line (bootargs) ......................24 8.4 Wi-Fi/Bluetooth configuration ...........................49
6.2.3 DM-verity configuration ....................................27 8.4.1 Enabling or disabling Bluetooth profile .............49
6.2.4 Full reset for i.MX 8QuadMAX/8QuadXPlus 8.5 USB configuration ............................................49
and i.MX 95 ..................................................... 28 8.5.1 Enabling USB 2.0 in U-Boot for i.MX
7 Over-The-Air (OTA) Update ...........................28 8QuadMax/8QuadXPlus MEK ......................... 49
7.1 Building OTA update packages ....................... 28 8.5.2 Changing the VID/PID values of the USB
7.1.1 Building target files .......................................... 28 Gadget ............................................................. 50
7.1.2 Building a full update package ........................ 28 8.5.2.1 USB Gadget in U-Boot .................................... 51
7.1.3 Building an incremental update package ......... 29 8.5.2.2 USB Gadget on the Android platform .............. 51
8.5.2.3 USB Gadget in Recovery ................................ 51
UG10156 All information provided in this document is subject to legal disclaimers. © 2025 NXP B.V. All rights reserved.
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section 'Legal information'.