apex
apex packages other modules into an APEX file which is a packaging format for system-level
components like binaries, shared libraries, etc.
name
,
host_supported
,
device_supported
,
allowed_files
,
androidManifest
,
apex_name
,
apps
,
arch
,
binaries
,
certificate
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
enabled
,
file_contexts
,
host_required
,
ignore_system_library_special_case
,
init_rc
,
installable
,
java_libs
,
key
,
licenses
,
logging_parent
,
manifest
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_shared_libs
,
notice
,
overrides
,
owner
,
package_name
,
payload_type
,
prebuilts
,
product_specific
,
proprietary
,
provide_cpp_shared_libs
,
ramdisk
,
recovery
,
required
,
sdk_member_name
,
soc_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
test_only_no_hashtree
,
test_only_unsigned_payload
,
tests
,
updatable
,
use_vendor
,
uses
,
uses_sdks
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
allowed_files
string, A txt file containing list of files that are allowed to be included in this APEX.
androidManifest
string, AndroidManifest.xml file used for the zip container of this APEX bundle.
If unspecified, a default one is automatically generated.
apex_name
string, Canonical name of the APEX bundle. Used to determine the path to the activated APEX on
device (/apex/<apex_name>).
If unspecified, defaults to the value of name.
apps
list of strings, List of APKs to package inside APEX
arch
interface
binaries
list of strings, List of executables that are embedded inside this APEX bundle
certificate
string, The name of a certificate in the default certificate directory, blank to use the default product certificate,
or an android_app_certificate module name in the form ":module".
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
defaults
list of strings
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
file_contexts
string, Determines the file contexts file for setting security context to each file in this APEX bundle.
For platform APEXes, this should points to a file under /system/sepolicy
Default: /system/sepolicy/apex/<module_name>_file_contexts.
host_required
list of strings, names of other modules to install on host if this module is installed
ignore_system_library_special_case
bool, For telling the apex to ignore special handling for system libraries such as bionic. Default is false.
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, Whether this APEX is installable to one of the partitions. Default: true.
java_libs
list of strings, List of java libraries that are embedded inside this APEX bundle
key
string, Name of the apex_key module that provides the private key to sign APEX
licenses
list of strings, Names of the licenses that apply to this module.
logging_parent
string, Logging Parent value
manifest
string, Json manifest file describing meta info of this APEX bundle. Default:
"apex_manifest.json"
min_sdk_version
string, The minimum SDK version that this apex must be compatible with.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_shared_libs
list of strings, List of native shared libs that are embedded inside this APEX bundle
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
package_name
string, Apex Container Package Name.
Override value for attribute package:name in AndroidManifest.xml
payload_type
string, The type of APEX to build. Controls what the APEX payload is. Either
'image', 'zip' or 'both'. Default: 'image'.
prebuilts
list of strings, List of prebuilt files that are embedded inside this APEX bundle
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
provide_cpp_shared_libs
bool, Indicates this APEX provides C++ shared libaries to other APEXes. Default: false.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
sdk_member_name
string, Name of the module that this sdk member is representing
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.android, target.host, target.linux_bionic, target.linux_glibc
Multilib properties only for android.
Multilib properties only for host.
Multilib properties only for host linux_bionic.
Multilib properties only for host linux_glibc.
multilib
apexMultilibProperties
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
test_only_no_hashtree
bool, Whenever apex_payload.img of the APEX should include dm-verity hashtree.
Should be only used in tests#.
test_only_unsigned_payload
bool, Whenever apex_payload.img of the APEX should not be dm-verity signed.
Should be only used in tests#.
tests
list of strings, List of tests that are embedded inside this APEX bundle
updatable
bool, Whether this APEX is considered updatable or not. When set to true, this will enforce additional
rules for making sure that the APEX is truly updatable.
- To be updatable, min_sdk_version should be set as well
This will also disable the size optimizations like symlinking to the system libs.
Default is false.
use_vendor
bool, For native libraries and binaries, use the vendor variant instead of the core (platform) variant.
Default is false.
uses
list of strings, List of providing APEXes' names so that this APEX can depend on provided shared libraries.
uses_sdks
list of strings, List of SDKs that are used to build this APEX. A reference to an SDK should be either
`name#version` or `name` which is an alias for `name#current`. If left empty, `platform#current`
is implied. This value affects all modules included in this APEX. In other words, they are
also built with the SDKs specified here.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
apex_defaults
name
,
host_supported
,
device_supported
,
allowed_files
,
androidManifest
,
apex_available
,
apex_name
,
apps
,
arch
,
binaries
,
certificate
,
compile_multilib
,
defaults
,
defaults_visibility
,
device_specific
,
dist
,
enabled
,
file_contexts
,
host_required
,
ignore_system_library_special_case
,
init_rc
,
installable
,
java_libs
,
key
,
licenses
,
logging_parent
,
manifest
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_shared_libs
,
notice
,
overrides
,
owner
,
package_name
,
payload_type
,
prebuilts
,
product_specific
,
proprietary
,
provide_cpp_shared_libs
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
test_only_no_hashtree
,
test_only_unsigned_payload
,
tests
,
updatable
,
use_vendor
,
uses
,
uses_sdks
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
allowed_files
string, A txt file containing list of files that are allowed to be included in this APEX.
androidManifest
string, AndroidManifest.xml file used for the zip container of this APEX bundle.
If unspecified, a default one is automatically generated.
apex_available
list of strings, Availability of this module in APEXes. Only the listed APEXes can contain
this module. If the module has stubs then other APEXes and the platform may
access it through them (subject to visibility).
"//apex_available:anyapex" is a pseudo APEX name that matches to any APEX.
"//apex_available:platform" refers to non-APEX partitions like "system.img".
Default is ["//apex_available:platform"].
apex_name
string, Canonical name of the APEX bundle. Used to determine the path to the activated APEX on
device (/apex/<apex_name>).
If unspecified, defaults to the value of name.
apps
list of strings, List of APKs to package inside APEX
arch
interface
binaries
list of strings, List of executables that are embedded inside this APEX bundle
certificate
string, The name of a certificate in the default certificate directory, blank to use the default product certificate,
or an android_app_certificate module name in the form ":module".
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
defaults
list of strings
defaults_visibility
list of strings, Controls the visibility of the defaults module itself.
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
file_contexts
string, Determines the file contexts file for setting security context to each file in this APEX bundle.
For platform APEXes, this should points to a file under /system/sepolicy
Default: /system/sepolicy/apex/<module_name>_file_contexts.
host_required
list of strings, names of other modules to install on host if this module is installed
ignore_system_library_special_case
bool, For telling the apex to ignore special handling for system libraries such as bionic. Default is false.
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, Whether this APEX is installable to one of the partitions. Default: true.
java_libs
list of strings, List of java libraries that are embedded inside this APEX bundle
key
string, Name of the apex_key module that provides the private key to sign APEX
licenses
list of strings, Names of the licenses that apply to this module.
logging_parent
string, Logging Parent value
manifest
string, Json manifest file describing meta info of this APEX bundle. Default:
"apex_manifest.json"
min_sdk_version
string, The minimum SDK version that this apex must be compatible with.
multilib
apexMultilibProperties
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_shared_libs
list of strings, List of native shared libs that are embedded inside this APEX bundle
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
package_name
string, Apex Container Package Name.
Override value for attribute package:name in AndroidManifest.xml
payload_type
string, The type of APEX to build. Controls what the APEX payload is. Either
'image', 'zip' or 'both'. Default: 'image'.
prebuilts
list of strings, List of prebuilt files that are embedded inside this APEX bundle
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
provide_cpp_shared_libs
bool, Indicates this APEX provides C++ shared libaries to other APEXes. Default: false.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.android, target.host, target.linux_bionic, target.linux_glibc
Multilib properties only for android.
Multilib properties only for host.
Multilib properties only for host linux_bionic.
Multilib properties only for host linux_glibc.
multilib
apexMultilibProperties
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
test_only_no_hashtree
bool, Whenever apex_payload.img of the APEX should include dm-verity hashtree.
Should be only used in tests#.
test_only_unsigned_payload
bool, Whenever apex_payload.img of the APEX should not be dm-verity signed.
Should be only used in tests#.
tests
list of strings, List of tests that are embedded inside this APEX bundle
updatable
bool, Whether this APEX is considered updatable or not. When set to true, this will enforce additional
rules for making sure that the APEX is truly updatable.
- To be updatable, min_sdk_version should be set as well
This will also disable the size optimizations like symlinking to the system libs.
Default is false.
use_vendor
bool, For native libraries and binaries, use the vendor variant instead of the core (platform) variant.
Default is false.
uses
list of strings, List of providing APEXes' names so that this APEX can depend on provided shared libraries.
uses_sdks
list of strings, List of SDKs that are used to build this APEX. A reference to an SDK should be either
`name#version` or `name` which is an alias for `name#current`. If left empty, `platform#current`
is implied. This value affects all modules included in this APEX. In other words, they are
also built with the SDKs specified here.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
apex_key
name
,
host_supported
,
device_supported
,
arch
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
host_required
,
init_rc
,
installable
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
owner
,
private_key
,
product_specific
,
proprietary
,
public_key
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
arch
interface
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, Whether this key is installable to one of the partitions. Defualt: true.
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
owner
string, vendor who owns this module
private_key
string, Path or module to the private key file in pem format. Used to sign APEXs.
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
public_key
string, Path or module to the public key file in avbpubkey format. Installed to the device.
Base name of the file is used as the ID for the key.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
apex_set
prebuilt_apex imports an `.apex` file into the build graph as if it was built with apex.
name
,
arch
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
filename
,
host_required
,
init_rc
,
installable
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
overrides
,
owner
,
prefer
,
prerelease
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
set
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
arch
interface
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
filename
string, optional name for the installed apex. If unspecified, name of the
module is used as the file name
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, whether the extracted apex file installable.
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
prerelease
bool, apexes in this set use prerelease SDK version
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
set
string, the .apks file path that contains prebuilt apex files to be extracted.
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
apex_test
apex_test is an APEX for testing. The difference from the ordinary apex module type is that
certain compatibility checks such as apex_available are not done for apex_test.
name
,
host_supported
,
device_supported
,
allowed_files
,
androidManifest
,
apex_name
,
apps
,
arch
,
binaries
,
certificate
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
enabled
,
file_contexts
,
host_required
,
ignore_system_library_special_case
,
init_rc
,
installable
,
java_libs
,
key
,
licenses
,
logging_parent
,
manifest
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_shared_libs
,
notice
,
overrides
,
owner
,
package_name
,
payload_type
,
prebuilts
,
product_specific
,
proprietary
,
provide_cpp_shared_libs
,
ramdisk
,
recovery
,
required
,
sdk_member_name
,
soc_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
test_only_no_hashtree
,
test_only_unsigned_payload
,
tests
,
updatable
,
use_vendor
,
uses
,
uses_sdks
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
allowed_files
string, A txt file containing list of files that are allowed to be included in this APEX.
androidManifest
string, AndroidManifest.xml file used for the zip container of this APEX bundle.
If unspecified, a default one is automatically generated.
apex_name
string, Canonical name of the APEX bundle. Used to determine the path to the activated APEX on
device (/apex/<apex_name>).
If unspecified, defaults to the value of name.
apps
list of strings, List of APKs to package inside APEX
arch
interface
binaries
list of strings, List of executables that are embedded inside this APEX bundle
certificate
string, The name of a certificate in the default certificate directory, blank to use the default product certificate,
or an android_app_certificate module name in the form ":module".
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
defaults
list of strings
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
file_contexts
string, Determines the file contexts file for setting security context to each file in this APEX bundle.
For platform APEXes, this should points to a file under /system/sepolicy
Default: /system/sepolicy/apex/<module_name>_file_contexts.
host_required
list of strings, names of other modules to install on host if this module is installed
ignore_system_library_special_case
bool, For telling the apex to ignore special handling for system libraries such as bionic. Default is false.
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, Whether this APEX is installable to one of the partitions. Default: true.
java_libs
list of strings, List of java libraries that are embedded inside this APEX bundle
key
string, Name of the apex_key module that provides the private key to sign APEX
licenses
list of strings, Names of the licenses that apply to this module.
logging_parent
string, Logging Parent value
manifest
string, Json manifest file describing meta info of this APEX bundle. Default:
"apex_manifest.json"
min_sdk_version
string, The minimum SDK version that this apex must be compatible with.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_shared_libs
list of strings, List of native shared libs that are embedded inside this APEX bundle
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
package_name
string, Apex Container Package Name.
Override value for attribute package:name in AndroidManifest.xml
payload_type
string, The type of APEX to build. Controls what the APEX payload is. Either
'image', 'zip' or 'both'. Default: 'image'.
prebuilts
list of strings, List of prebuilt files that are embedded inside this APEX bundle
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
provide_cpp_shared_libs
bool, Indicates this APEX provides C++ shared libaries to other APEXes. Default: false.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
sdk_member_name
string, Name of the module that this sdk member is representing
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.android, target.host, target.linux_bionic, target.linux_glibc
Multilib properties only for android.
Multilib properties only for host.
Multilib properties only for host linux_bionic.
Multilib properties only for host linux_glibc.
multilib
apexMultilibProperties
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
test_only_no_hashtree
bool, Whenever apex_payload.img of the APEX should include dm-verity hashtree.
Should be only used in tests#.
test_only_unsigned_payload
bool, Whenever apex_payload.img of the APEX should not be dm-verity signed.
Should be only used in tests#.
tests
list of strings, List of tests that are embedded inside this APEX bundle
updatable
bool, Whether this APEX is considered updatable or not. When set to true, this will enforce additional
rules for making sure that the APEX is truly updatable.
- To be updatable, min_sdk_version should be set as well
This will also disable the size optimizations like symlinking to the system libs.
Default is false.
use_vendor
bool, For native libraries and binaries, use the vendor variant instead of the core (platform) variant.
Default is false.
uses
list of strings, List of providing APEXes' names so that this APEX can depend on provided shared libraries.
uses_sdks
list of strings, List of SDKs that are used to build this APEX. A reference to an SDK should be either
`name#version` or `name` which is an alias for `name#current`. If left empty, `platform#current`
is implied. This value affects all modules included in this APEX. In other words, they are
also built with the SDKs specified here.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
apex_vndk
apex_vndk creates a special variant of apex modules which contains only VNDK libraries.
If `vndk_version` is specified, the VNDK libraries of the specified VNDK version are gathered automatically.
If not specified, then the "current" versions are gathered.
name
,
host_supported
,
device_supported
,
allowed_files
,
androidManifest
,
apex_name
,
apps
,
arch
,
binaries
,
certificate
,
compile_multilib
,
defaults
,
device_specific
,
dist
,
enabled
,
file_contexts
,
host_required
,
ignore_system_library_special_case
,
init_rc
,
installable
,
java_libs
,
key
,
licenses
,
logging_parent
,
manifest
,
min_sdk_version
,
multilib
,
native_bridge_supported
,
native_shared_libs
,
notice
,
overrides
,
owner
,
package_name
,
payload_type
,
prebuilts
,
product_specific
,
proprietary
,
provide_cpp_shared_libs
,
ramdisk
,
recovery
,
required
,
sdk_member_name
,
soc_specific
,
system_ext_specific
,
target
,
target.android
,
target.host
,
target_required
,
test_only_no_hashtree
,
test_only_unsigned_payload
,
tests
,
updatable
,
use_vendor
,
uses
,
uses_sdks
,
vendor
,
vintf_fragments
,
visibility
,
vndk_version
name
string, The name of the module. Must be unique across all modules.
host_supported
bool, If set to true, build a variant of the module for the host. Defaults to false.
device_supported
bool, If set to true, build a variant of the module for the device. Defaults to true.
allowed_files
string, A txt file containing list of files that are allowed to be included in this APEX.
androidManifest
string, AndroidManifest.xml file used for the zip container of this APEX bundle.
If unspecified, a default one is automatically generated.
apex_name
string, Canonical name of the APEX bundle. Used to determine the path to the activated APEX on
device (/apex/<apex_name>).
If unspecified, defaults to the value of name.
apps
list of strings, List of APKs to package inside APEX
arch
interface
binaries
list of strings, List of executables that are embedded inside this APEX bundle
certificate
string, The name of a certificate in the default certificate directory, blank to use the default product certificate,
or an android_app_certificate module name in the form ":module".
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
defaults
list of strings
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
file_contexts
string, Determines the file contexts file for setting security context to each file in this APEX bundle.
For platform APEXes, this should points to a file under /system/sepolicy
Default: /system/sepolicy/apex/<module_name>_file_contexts.
host_required
list of strings, names of other modules to install on host if this module is installed
ignore_system_library_special_case
bool, For telling the apex to ignore special handling for system libraries such as bionic. Default is false.
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool, Whether this APEX is installable to one of the partitions. Default: true.
java_libs
list of strings, List of java libraries that are embedded inside this APEX bundle
key
string, Name of the apex_key module that provides the private key to sign APEX
licenses
list of strings, Names of the licenses that apply to this module.
logging_parent
string, Logging Parent value
manifest
string, Json manifest file describing meta info of this APEX bundle. Default:
"apex_manifest.json"
min_sdk_version
string, The minimum SDK version that this apex must be compatible with.
multilib
apexMultilibProperties
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
native_shared_libs
list of strings, List of native shared libs that are embedded inside this APEX bundle
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
package_name
string, Apex Container Package Name.
Override value for attribute package:name in AndroidManifest.xml
payload_type
string, The type of APEX to build. Controls what the APEX payload is. Either
'image', 'zip' or 'both'. Default: 'image'.
prebuilts
list of strings, List of prebuilt files that are embedded inside this APEX bundle
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
provide_cpp_shared_libs
bool, Indicates this APEX provides C++ shared libaries to other APEXes. Default: false.
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
sdk_member_name
string, Name of the module that this sdk member is representing
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.android, target.host, target.linux_bionic, target.linux_glibc
Multilib properties only for android.
Multilib properties only for host.
Multilib properties only for host linux_bionic.
Multilib properties only for host linux_glibc.
multilib
apexMultilibProperties
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
test_only_no_hashtree
bool, Whenever apex_payload.img of the APEX should include dm-verity hashtree.
Should be only used in tests#.
test_only_unsigned_payload
bool, Whenever apex_payload.img of the APEX should not be dm-verity signed.
Should be only used in tests#.
tests
list of strings, List of tests that are embedded inside this APEX bundle
updatable
bool, Whether this APEX is considered updatable or not. When set to true, this will enforce additional
rules for making sure that the APEX is truly updatable.
- To be updatable, min_sdk_version should be set as well
This will also disable the size optimizations like symlinking to the system libs.
Default is false.
use_vendor
bool, For native libraries and binaries, use the vendor variant instead of the core (platform) variant.
Default is false.
uses
list of strings, List of providing APEXes' names so that this APEX can depend on provided shared libraries.
uses_sdks
list of strings, List of SDKs that are used to build this APEX. A reference to an SDK should be either
`name#version` or `name` which is an alias for `name#current`. If left empty, `platform#current`
is implied. This value affects all modules included in this APEX. In other words, they are
also built with the SDKs specified here.
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
vndk_version
string, Indicates VNDK version of which this VNDK APEX bundles VNDK libs. Default is Platform VNDK Version.
override_apex
override_apex is used to create an apex module based on another apex module
by overriding some of its properties.
name
,
allowed_files
,
apps
,
arch
,
base
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
host_required
,
init_rc
,
licenses
,
logging_parent
,
multilib
,
native_bridge_supported
,
notice
,
overrides
,
owner
,
package_name
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
allowed_files
string, A txt file containing list of files that are allowed to be included in this APEX.
apps
list of strings, List of APKs to package inside APEX
arch
interface
base
string, Name of the base module to be overridden
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
licenses
list of strings, Names of the licenses that apply to this module.
logging_parent
string, Logging Parent value
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
package_name
string, Apex Container Package Name.
Override value for attribute package:name in AndroidManifest.xml
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.
prebuilt_apex
prebuilt_apex imports an `.apex` file into the build graph as if it was built with apex.
name
,
src
,
arch
,
arch.arm
,
compile_multilib
,
device_specific
,
dist
,
enabled
,
filename
,
host_required
,
init_rc
,
installable
,
licenses
,
multilib
,
native_bridge_supported
,
notice
,
overrides
,
owner
,
prefer
,
product_specific
,
proprietary
,
ramdisk
,
recovery
,
required
,
soc_specific
,
system_ext_specific
,
target
,
target.host
,
target_required
,
vendor
,
vintf_fragments
,
visibility
name
string, The name of the module. Must be unique across all modules.
src
string
arch
interface
⊕arch.arm, arch.arm64, arch.x86, arch.x86_64
compile_multilib
string, control whether this module compiles for 32-bit, 64-bit, or both. Possible values
are "32" (compile for 32-bit only), "64" (compile for 64-bit only), "both" (compile for both
architectures), or "first" (compile for 64-bit on a 64-bit platform, and 32-bit on a 32-bit
platform
device_specific
bool, whether this module is specific to a device, not only for SoC, but also for off-chip
peripherals. When set to true, it is installed into /odm (or /vendor/odm if odm partition
does not exist, or /system/vendor/odm if both odm and vendor partitions do not exist).
This implies `soc_specific:true`.
⊕dist
targets
list of strings, copy the output of this module to the $DIST_DIR when `dist` is specified on the
command line and any of these targets are also on the command line, or otherwise
built
dest
string, The name of the output artifact. This defaults to the basename of the output of
the module.
dir
string, The directory within the dist directory to store the artifact. Defaults to the
top level directory ("").
suffix
string, A suffix to add to the artifact file name (before any extension).
enabled
bool, emit build rules for this module
Disabling a module should only be done for those modules that cannot be built
in the current environment. Modules that can build in the current environment
but are not usually required (e.g. superceded by a prebuilt) should not be
disabled as that will prevent them from being built by the checkbuild target
and so prevent early detection of changes that have broken those modules.
filename
string, Optional name for the installed apex. If unspecified, name of the
module is used as the file name
host_required
list of strings, names of other modules to install on host if this module is installed
init_rc
list of strings, init.rc files to be installed if this module is installed
installable
bool
licenses
list of strings, Names of the licenses that apply to this module.
multilib
interface
native_bridge_supported
bool, Whether this module is built for non-native architecures (also known as native bridge binary)
notice
string, relative path to a file to include in the list of notices for the device
overrides
list of strings, Names of modules to be overridden. Listed modules can only be other binaries
(in Make or Soong).
This does not completely prevent installation of the overridden binaries, but if both
binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
from PRODUCT_PACKAGES.
owner
string, vendor who owns this module
prefer
bool, When prefer is set to true the prebuilt will be used instead of any source module with
a matching name.
product_specific
bool, whether this module is specific to a software configuration of a product (e.g. country,
network operator, etc). When set to true, it is installed into /product (or
/system/product if product partition does not exist).
proprietary
bool, whether this is a proprietary vendor module, and should be installed into /vendor
ramdisk
bool, Whether this module is installed to ramdisk
recovery
bool, Whether this module is installed to recovery partition
required
list of strings, names of other modules to install if this module is installed
soc_specific
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
system_ext_specific
bool, whether this module extends system. When set to true, it is installed into /system_ext
(or /system/system_ext if system_ext partition does not exist).
target
interface
⊕target.host, target.android
target_required
list of strings, names of other modules to install on target if this module is installed
vendor
bool, whether this module is specific to an SoC (System-On-a-Chip). When set to true,
it is installed into /vendor (or /system/vendor if vendor partition does not exist).
Use `soc_specific` instead for better meaning.
vintf_fragments
list of strings, VINTF manifest fragments to be installed if this module is installed
visibility
list of strings, Controls the visibility of this module to other modules. Allowable values are one or more of
these formats:
["//visibility:public"]: Anyone can use this module.
["//visibility:private"]: Only rules in the module's package (not its subpackages) can use
this module.
["//visibility:override"]: Discards any rules inherited from defaults or a creating module.
Can only be used at the beginning of a list of visibility rules.
["//some/package:__pkg__", "//other/package:__pkg__"]: Only modules in some/package and
other/package (defined in some/package/*.bp and other/package/*.bp) have access to
this module. Note that sub-packages do not have access to the rule; for example,
//some/package/foo:bar or //other/package/testing:bla wouldn't have access. __pkg__
is a special module and must be used verbatim. It represents all of the modules in the
package.
["//project:__subpackages__", "//other:__subpackages__"]: Only modules in packages project
or other or in one of their sub-packages have access to this module. For example,
//project:rule, //project/library:lib or //other/testing/internal:munge are allowed
to depend on this rule (but not //independent:evil)
["//project"]: This is shorthand for ["//project:__pkg__"]
[":__subpackages__"]: This is shorthand for ["//project:__subpackages__"] where
//project is the module's package. e.g. using [":__subpackages__"] in
packages/apps/Settings/Android.bp is equivalent to
//packages/apps/Settings:__subpackages__.
["//visibility:legacy_public"]: The default visibility, behaves as //visibility:public
for now. It is an error if it is used in a module.
If a module does not specify the `visibility` property then it uses the
`default_visibility` property of the `package` module in the module's package.
If the `default_visibility` property is not set for the module's package then
it will use the `default_visibility` of its closest ancestor package for which
a `default_visibility` property is specified.
If no `default_visibility` property can be found then the module uses the
global default of `//visibility:legacy_public`.
The `visibility` property has no effect on a defaults module although it does
apply to any non-defaults module that uses it. To set the visibility of a
defaults module, use the `defaults_visibility` property on the defaults module;
not to be confused with the `default_visibility` property on the package module.
See https://android.googlesource.com/platform/build/soong/+/master/README.md#visibility for
more details.