Android 9 includes support for building
/product partitions using the Android build system. Previously,
Android 8.x enforced the separation of System-on-Chip (SoC)-specific
components from the
/system partition to the
partition without dedicating space for OEM-specific components built from
Android build system.
About product partitions
Many OEMs customize the AOSP system image to implement their own features
and requirements from carriers. However, such customizations make it
impossible to use a single system image for multiple software SKUs as each
image must be different to support a different locale, carrier, etc. Using a
/product partition to contain customizations makes it
possible to use a single system image for multiple software SKUs (the
/system partition hosts generic code that can be shared among
many software SKUs). The
/vendor partition continues to host
SoC-specific Board-Specific (BSP) code that can be shared among multiple
devices based on the given SoC.
Using separate partitions has some disadvantages, such as difficulties in
managing disk space (a limited amount of space should be reserved for future
growth) and in maintaining
stable Application Binary Interface (ABI) between partitions. Before
deciding to use
/product partitions, take time to consider your
unique AOSP implementation and possible mitigation tactics (such as
repartitioning a device during an Over-the-Air
(OTA) update, which is not done by Google but is done by some OEMs).
Legacy /oem vs /product
/product partition is different than the legacy
For these reasons, Android 9 supports the new
/product partition and also retains support for the legacy
/oem partition for devices that depend on it.
/product partition contains the following components:
- Product-specific system properties (
- Product-specific RROs (
- Product-specific apps (
- Product-specific priv-apps (
- Product-specific libraries (
- Product-specific java libraries (
- Product-specific Android Framework system configs
- Product-specific media files (
You cannot use
custom_images as they lack support for the
- Installing modules into a specific target.
custom_imagessupport copying artifacts into an image but cannot install a module into a specific partition by specifying its target partition as a part of a build rule.
- Soong support.
custom_imagescannot be built using the Soong build system.
- OTA update support.
custom_imagesare used as factory ROM images that cannot be OTA-ed.
Maintaining ABIs between partitions
/product partition in Android 9
is an extension of the
/system partition. As there is weak ABI
/system partitions, both must
be upgraded at the same time and the ABI should be System SDK-based. If the
System SDK doesn't cover all API surfaces between
/system, it is up to the OEM to maintain their own ABI between
the two partitions.
/system partitions can have
dependency on each other. However, tests with the
Generic System Image (GSI) must work properly
/product partition must not have any dependency on
/vendor partition and no direct interaction between the
/product partition and the
/vendor is permitted
(enforced by SEpolicy).
Implementing product partitions
Before implementing a new product partition, review the
product partition changes in AOSP. Then, to set up
include the following board or product build flags.
PRODUCT_PRODUCT_PROPERTIES for /product/build.prop. Should be within a
$(call inherit-product path/to/device.mk), e.g.,
PRODUCT_PRODUCT_PROPERTIES += product.abc=ok.
Installing a module to product partition
Use following build flags to install a module to
LOCAL_PRODUCT_MODULE := truein
Enabling verified boot
To prevent the
/product partition from being tampered with by
malicious software, you should enable
Verified Boot (AVB) for that partition (just as you do for
/system partitions). To enable AVB,
include the following build flags: