Avoid the name as it is currently confusing given that we're not
actually building the image.
Bug: 216975821
Test: -
Change-Id: Ifac7047e72f590d6acb3997efa20f5f348e39491
The post-build signing step expects to find a version code in every
APK, add the version code and version name.
Bug: 216584708
Test: manual
Change-Id: Ic43730df50ef32611d5b4159b46c8bbf9906e009
Add support to copy built system_dlkm to IMAGES;
or prebuilt image to PREBUILD_IMAGES for release
tools to pick up for the dist zip.
Bug: 200082547
Test: Manual builds:
1. Set BOARD_USES_SYSTEM_DLKM_PARTITION
2. Set BOARD_PREBUILT_SYSTEM_DLKM_IMAGE to external image
- Check "m" builds the system_dlkm.img in both cases;
and drops image at out/target/product/vsoc_x86_64/
- Check that "m dist" can find the image in
$(zip_root)/IMAGES and $(zip_root)/PREBUILT_IMAGES
Test: launch_cvd && atest vts_system_dlkm_partition_test
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I77dfcc51746fd97cb205aa9c139a08f5cdf3d9ea
$(MKFSEROFS) -> $(MKEROFS) in target dependency
for INSTALLED_SYSTEM_DLKM_IMAGE_TARGET in case
when AVB is not enabled.
Bug: 200082547
Test: TH
Test: atest vts_system_dlkm_partition_test
Fixes: 1065523a5e ("Add support to build system_dlkm.img")
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I03a4463b1fa01b95e706d623aa8a3888e37488d6
There are 2 choices to build system_dlkm.img for
the system_dlkm partition for Android T launch
devices and must choose one.
1. Use kernel prebuilt system_dlkm.img
- BOARD_PREBUILT_SYSTEM_DLKM_IMAGE to point image
2. Build from kernel prebuilt system_dlkm_staging
- PRODUCT_BUILD_SYSTEM_DLKM_IMAGE
Both requires: BOARD_SYSTEM_DLKM_PARTITION_SIZE and
must be 64MB or higher in size (enforced via vts).
Bug: 200082547
Test: TH
Test: atest vts_system_dlkm_partition_test
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I83435123bd8aa3d04ab8a8b650a95fbab0bc49f2
win_sdk is deprecated, if given on the command line
sdk will be build instead.
Bug: 212724080
Test: Presubmits
Change-Id: Ib3bd51923142b00100b49585ad88bc1292da2463
New scheme is to certify kernel & ramdisk image separately, and
effectively decouple kernel & user space ramdisk image.
Under the new scheme, the --os_version and --os_patch_level boot header
field must be empty in order to maintain consistency.
Instead, these values must be in the vbmeta hash descriptor and
GKI certificate.
The new scheme also validates the image metadata, including the security
patch level.
The 'generic_kernel' certificate is associated with the 'boot' partition
and 'generic_ramdisk' certificate with 'init_boot' partition.
The 'generic_ramdisk' certificate may be packed into the 'boot' image if
product configuration doesn't have 'init_boot' image, this is only for
testing purposes and would be removed eventually.
Bug: 210367929
Bug: 211741246
Bug: 203698939
Test: unpack_bootimg --boot_img boot.img
Test: unpack_bootimg --boot_img init_boot.img
Test: avbtool info_image --image out/boot_signature
Change-Id: Iaf48a6e3d4b97fa6bfb5e1635a288b045baa248f
This file will be used by OTA generator to compress generated patches.
We need the host copy of LZ4 to ensure that compressed bytes matches
what the device would get if the compression were to be done on device.
For more details see go/lz4diff
Bug: 206729162
Test: m dist
Change-Id: I9c4ab772b001bf47da75cb87b028a1f27e2321a8
sign_target_files_apks demands it.
Bug: 213823227
Test: run com.google.android.tradefed.ota.SigningToolTest#Testcase1_Signingtest
Change-Id: I1bba2b25a71449a57d284024e77fb76d1b79a0ee
Else the branch condition would always evaluate to true, making the
other branch useless and wrong!
Bug: 211741246
Test: m dist
Change-Id: I4791712632cbe0d5a9e20962c8425dd20bbe0bfd
For system/framework, it now also includes *.jar.prof (needed by
odrefresh), *.vdex and <arch>/*.{odex,art} (for future-proof).
system/etc/classpaths/*.pb are also added so that we can run
derive_classpath to collect from.
system/etc/updatable-bcp-packages.txt is removed because it's no longer
used by ART.
Bug: 206869687
Test: see new files in `unzip -p $OUT/system/etc/security/fsverity/ \
BuildManifest.apk assets/build_manifest.pb`
Change-Id: Id759f5caec8ba683af8629956b9268a4fbd74186
This variable can be set instead of TARGET_RECOVERY_FSTAB
in order to specify a generated fstab file.
Bug: 201700692
Test: Presubmits
Change-Id: If0fae81ec53915e9ed4bab2e8b1a9f8376894537
Otheriwse, the build complains about missing files when
PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA is enabled (aosp/1937717).
Bug: 206326351
Test: clobber, set PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true, build
Change-Id: I11d18914d63cab0b84ae711f2334747cb26ca234
build_image.py has been handling fsverity metadata generation in the
packing step, but it can cause issues because the metadata files are
missing in the $OUT directory, and they only exist in result system.img.
This change moves the generation logic into Makefile, and makes the
metadata tracked by ninja graph.
Bug: 206326351
Test: PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true and build
Change-Id: I1f910d8ac6e2cc3c54f35916871733c632f18e44
releasetools preconditions requires build metadata defined in
SYSTEM/build.prop even when building a system.img-less product.
Copy the SYSTEM/build.prop into the build artifact archive whenever
possible to make add_img_to_target_files happy.
Bug: 212486689
Bug: 213028932
Test: Dist build a system.img-less product. Product properties are
read from SYSTEM/build.prop and no build error occurred.
Change-Id: I2ce7f8b8ae981eaf06e2d8d2485b55b4e975caa9
Equivalent to PRODUCT_EXTRA_RECOVERY_KEYS but for A/B OTA.
Bug: 211848136
Test: set PRODUCT_EXTRA_OTA_KEYS and check otacerts.zip
Change-Id: I81e27d12a22b405f6227b09c01ed684dfcede19e
These options are for certifying official GKI release, so they should
never be added to build command of recovery.img and boot-debug.img.
Also define gki_signing_signature_args in misc_info.txt iff.
BOARD_GKI_SIGNING_KEY_PATH is defined, so there's one less conditional.
We need to define it even if BOARD_GKI_SIGNING_SIGNATURE_ARGS is empty,
so that sign_target_files_apks.py can modify the option during image
signing.
Bug: 210367929
Test: Presubmit
Change-Id: I9546fcda796586d97af244955e15c1b8dc9f6d92
Some targets, e.g., the newly added `gki_arm64`:
https://r.android.com/1935340, have no system.img.
To avoid the build error when making the vbmeta.img on a no-system-image
target, only sets system.img's AVB settings when it exists,.
Bug: 212486689
Test: `lunch gki_arm64-userdebug; make` with BOARD_AVB_ENABLE := true
Change-Id: I5e3c531e74116e421506a86ffce83848e7a9d6ea
Macro images-for-partitions() returns $(INSTALLED_INIT_BOOTIMAGE_TARGET)
for the 'init_boot' partition, which is empty. It should return
$(INSTALLED_INIT_BOOT_IMAGE_TARGET) instead.
Bug: 203698939
Test: `make` without chaining 'init_boot' partition
Change-Id: I387813283dfad7e1b2f762a5fa4065775977caf7
If a build target does not contain system image, it doesn't
output anything to root folder. The patch fix the build error for
the case the root folder is empty.
Bug: 212486689
Test: make bootimage dist
Test: Build pass
Change-Id: I4f1376eb7e615f48171ed9c3057c5a78074abaa6
This ramdisk used to be in boot.img, and is now placed into this new
init_boot.img instead.
This new image is used for a new init parition to seperate Android
platform artifacts from the kernel artifacts in boot.img.
Test: boot Cuttlefish
Bug: 203698939
Change-Id: Iaaf82486259979ab728730ce72a4e847ae005c18
OTA will need to know the compression parameter used to construct EROFS
images. Currently, mkfs.erofs uses lz4hc,9 if the user didn't specify
one. But mkfs's default behavior is subject to change in future
versions. Therefore, explicitly specify the compression parameters so
OTA tooling can properly encode/decode erofs images.
Test: th
Change-Id: Ibbf67502827ee79437b766349be289048e685759
external/zucchini/version_info.h contains version info for zucchini
diffing algorithm. OTA tools will use these version info to check for
compatibility and determine if zucchini can be used safely. Owners of
zucchini agreed to keep the format of version_info.h stable so it's
parser friendly.
Bug: 194237829
Test: m dist
Change-Id: If8e37533933b346d3f03adab9263679910ab328c
Layoutlib native can handle fonts as the Android framework does. So
simply copy the Android fonts for layoutlib.
Exempt-From-Owner-Approval: experimental branch
Bug: 143073883
Test: layoutlib tests
Change-Id: Ida2e081d1b0737c70ea8621b23b5f0e729d5df35
Merged-In: Ida2e081d1b0737c70ea8621b23b5f0e729d5df35
fsverity digest manifest stores a map from files to fsverity digests.
The manifest is installed as a serialized protobuf file, to a signed apk
system/etc/security/fsverity/BuildManifest.apk.
Bug: 193113311
Test: build with PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true
Change-Id: I55fc10400206b8ce0d5f198faea08fe3930b362c
Using fsverity tool, fsverity metadata for specific artifacts in system
mage can be generated. Users can do that by setting a makefile variable
PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA to true.
If set to true, the following artifacts will be signed.
- system/framework/*.jar
- system/framework/oat/<arch>/*.{oat,vdex,art}
- system/etc/boot-image.prof
- system/etc/dirty-image-objects
One fsverity metadata container file per one input file will be
generated in system.img, with a suffix ".fsv_meta". e.g. a container
file for "system/framework/foo.jar" will be
"system/framework/foo.jar.fsv_meta".
Bug: 193113311
Test: build with PRODUCT_SYSTEM_FSVERITY_GENERATE_METADATA := true
Change-Id: Ib70d591a72d23286b5debcb05fbad799dfd79b94
Gets rid of .meta_module files and instead defers emitting rules until
after all the non-module targets have been processed. Allows direct
dependency on .meta_lic files, which in turn depend on license text
files.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Test: m systemlicense
Test: m reportmissinglicenses
Change-Id: I2c467feac6e13a9366ff66f924889f1dbd48c3f1
When an APEX specifies its custom signing tool (custom_sign_tool:),
apexkeys.txt contains the info and sign_target_files_apks pass the value
to apex_util.
For now the Virt APEX has its own custom signing tool (sign_virt_apex),
which is added to OTATOOLS.
Bug: 193504286
Test: sign_target_files_apks invokes sign_virt_apex
Change-Id: Iba845723fe3e18f542963324b9c58cd00914c5ba
This reverts commit a2a5db4466.
Reason for revert: original change was obsoleted by
I3161e42b00a93177a1a4cb3b22da2218d294b7a7
Bug: 202129499
Test: Presubmit; change should be noop
Change-Id: Ib7be1ed73dbf08758276666f8ce35ed9cbf18a36
Since those were the only components of the Windows SDK, this removes a
lot of special casing around that as well.
Bug: 187222815
Change-Id: I2690aadcf78e9ccad43314c8475893e81a2e2735
This adds BOARD_xIMAGE_EROFS_PCLUSTER_SIZE and
BOARD_EROFS_PCLUSTER_SIZE, which set the "pcluster size" of erofs images
for individual images or all erofs images respectively. The pcluster
size affects the maximum size of a physical compressed block.
This also adds BOARD_EROFS_SHARE_DUP_BLOCKS, which turns on chunk
support in EROFS.
Bug: 201685920
Test: manual test
Change-Id: I27ec0899f89890562796dd9fa567fc74182fbefb
This accidentally got omitted in the recent refactoring of
generate-image-prop-dictionary.
Bug: N/A
Test: build, system.img is not sparsed
Change-Id: Ie2e095aff08e937111f5c7ffc06e38e87c2d7d43
Package the image even if it was built (previously, only the pre-built
version was being included).
Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img
Change-Id: Ifb68ad571be78434f815307a5e4939222a28e7b7
Remove redundant dependencies and adjust build rule, so that
ramdisk-debug.img is built iff. boot-debug.img is built
same adjustment for vendor_boot-debug.img, boot-test-harness.img,
vendor_boot-test-harness.img.
Also remove "rsync" build rule in test harness ramdisk.
Bug: 201753847
Test: PRODUCT_BUILD_DEBUG_BOOT_IMAGE=true \
PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE=false \
=> ramdisk-debug.img is built; vendor_ramdisk-debug.img is not
Test: PRODUCT_BUILD_DEBUG_BOOT_IMAGE=false \
PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE=true \
=> ramdisk-debug.img is not built; vendor_ramdisk-debug.img is
Test: PRODUCT_BUILD_DEBUG_BOOT_IMAGE=true \
PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE=true \
=> ramdisk-debug.img is built; so do vendor_ramdisk-debug.img
Change-Id: I33f526bd3c50b9c4010f46e490cab778fcb23371
* changes:
Add generic board-agnostic pre-built pvmfw.img
Add framework for building the pvmfw.img partition
Stop assuming that pvmfw.img can only be pre-built
Rename the BOARD_PVMFWIMG_PARTITION_SIZE variable to follow the format
used by all other partitions: BOARD_$(name)IMAGE_PARTITION_SIZE. Note
that all boards using that variable should have been updated to also
define the new version, by now.
Define the new variable as board read-only, as done for other
partitions.
Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img
Change-Id: I5664c903db6388458e906e996115b695220932ca
Make use of the pvmfw.img-building AOSP framework to provide a common
default image instead of requiring boards to necessarily provide their
own but allow over-writing it through BOARD_PREBUILT_PVMFWIMAGE, if
desired.
Note: The Android Virtualization Framework requires the pvmfw partition.
Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img
Change-Id: I5e06f08d6e22178e45254b7ab63acd3855d99a38
Adapt the variables necessary for building pvmfw.img by following what
was done for other Android partitions and introducing:
- PRODUCT_BUILD_PVMFW_IMAGE
- BUILDING_PVMFW_IMAGE
- BUILT_PVMFWIMAGE_TARGET
Replace the manual 'cp' by the more common 'copy-one-file'.
Bug: 199831815
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img # with TARGET_PKVM_ENABLED=true
Change-Id: I5e4bbcbdbf4b96281ee54631938f097e9744883c
Introduce the BOARD_USES_PVMFWIMAGE variable, similarly to all other
partitions, and use it where appropriate (in particular, where the
soon-to-be incorrect assumption that pvmfw.img could only be a pre-built
board image was made).
Bug: 199717422
Test: m ${ANDROID_PRODUCT_OUT}/pvmfw.img # with TARGET_PKVM_ENABLED=true
Change-Id: I8f4faa78c741d29b473303b521834387dbd48cd1
Adjust code location, factor out common code, eliminate dead code.
Bug: 201753847
Test: Presubmit; change is noop
Change-Id: If929bcf92bc03305058d2d8179c8dba351961c8e
Add PRODUCT variables
PRODUCT_BUILD_DEBUG_BOOT_IMAGE
PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE
as toggles to enable/disable building boot-debug & vendor_boot-debug.
Bug: 200945738
Test: m bootimage_debug
Change-Id: Ic032b8594f776f911d7b6345a97d64fed930d890
Those boot-debug-*.img is used with `repack_bootimg` for a
vendor_boot-debug.img in VTS setup. It is not for GKI boot.img
release.
https://source.android.com/compatibility/vts/vts-on-gsi#repacking
Renames boot-debug-*.img to boot-with-debug-ramdisk-*.img to
avoid confusion with the official GKI boot.img release.
Bug: 200878300
Test: `lunch gsi_arm64-user` then `make bootimage_debug`
Change-Id: Ia1f6ba847d5b7409fb7a8534432484d2aa972494
This adds BOARD_EROFS_COMPRESSOR to change the compression algorithm
globally, and BOARD_{x}IMAGE_EROFS_COMPRESSOR to change it for
individual partitions.
Bug: N/A
Test: manual test
Change-Id: I2ef831558242a4070ee96269140c33b66c689351
It's really error prone to add new partitions or image flags given the
amount of code duplication here. Since most images have (or should have)
roughly the same flags, this factors the work out into a helper
function.
Bug: N/A
Test: m, m otapackage
Change-Id: If1a22b9d7b5cf028ba52608322c4383792dae6b9
The Mac SDK build is being reduced to just the build-tools and
platform-tools packages. I'm still working on refactoring those builds
not to require the monolithic SDK to be built first, but we can at least
stop distributing it (and other related files) now.
Most of these checks can likely go away once the build refactor is
complete, since we'll be able to move away from the `sdk` target to
something more specific. Right now there's a lot of logic around sdk
being in MAKECMDGOALS that I don't want to unravel with the current
build logic.
Bug: 187222815
Change-Id: I1f711ce063170e41078ad4a125bcd77340a1746c
boot-(test-harness|debug).img is not needed for devices with
a /vendor_boot partition. They can use vendor_boot-(test-harness|debug).img
instead.
Bug: 196001476
Test: make then checks $OUT/*.img
Change-Id: If76df0329c96f718ebf0a0ac138cde3ae859a6c6
When we introduced Dynamic Partitions, we stopped giving readonly
partitions fixed sizes. In addition we introduced deduplication for
ext4. These two factors greatly reduce the impact of sparse images,
since there aren't many fill blocks to optimize.
This patch disables sparsing for images that are rightsized and do not
explicitly specify extra reserved space. This makes the images a little
easier to work with from an engineering perspective. They no longer have
to be unsparsed to interact with any tooling. It also eases a potential
source of bugs, as b/184225422 is not reproducible with sparsing off.
On Pixel, the difference between the sparsed partitions and unsparsed is
12M (out of roughly 4G).
Bug: 198001223
Test: make, treehugger, make target-files-package
dynamic partitions are no longer sparse images
Change-Id: I74459f8abe74a15a24ba5a40cf701e6af2db8179
odm, odm_dlkm, vendor_dlkm call generate-userimage-prop-dictionary. This
appears to be inadvertent as it pulls in props from all the other
partitions. Instead, call generate-image-prop-dictionary which is
specific to one partition.
Bug: 198001223
Test: builds, treehugger green
Change-Id: Ib177c740068f1c087d517b363649551092038760
Strip recovery kernel modules by default which make
recovery.img smaller.
Also, add BOARD_DO_NOT_STRIP_RECOVERY_MODULES to make
it configurable like vendor modules did.
Change-Id: Id4e8c88b91dad38afc1fec5eae83fcb29c825be3
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Zucchini is a new diffing algorithm we plan to add to Android OTA, add
it to otatools.zip first.
Bug: 194237829
Test: th
Change-Id: I9561101decc2d13afb0a8d4329c3ecc044c96c9d
boot-test-harness.img is used to allow adb root on user build
images. It also sets properties: ro.audio.silent=1 & ro.test_harness=1.
GKI 2.0 devices will use BOARD_PREBUILT_BOOTIMAGE so
boot-test-harness.img will not be generated.
Therefore, we have to introduce the vendor_boot-test-harness.img
as an alternative for boot-test-harness.img.
In the future, we'll simplify the flow as:
+ If a device has a /vendor_boot partition, builds
vendor_boot-(test-harness|debug).img.
+ Otherwise, builds boot-(test-harness|debug).img.
boot-(test-harness|debug).img needs to be kept for some clients
to gracefully transit to using vendor_boot-(test-harness|debug).img.
Bug: 194654549
Test: make then `unpack_bootimg --boot_img $OUT/vendor_boot-test-harness.img`
Test: Check the ramdisk content in ./out/vendor_ramdisk
Change-Id: If3a1393b4ff3e69bb9b62f3b843b7858437d47bf
When rule action contains something like
cp $(FOO) ...
and FOO is set with
FOO := a \
b \
the generated Ninja file constains extra spaces, making it
difficult to compare it to the same file generated by the
Starlark-based product configuration.
Bug: 181797530
Test: manual
Change-Id: I278bd8edf0f017a31c5b5115b2a38f4f663c55fc
When using the VSDK, dexopt is not applied during the vendor build.
To avoid a first-boot time regression, dexopt is applied during the
merge stage, by running dexopt on the vendor apps and rebuilding
the vendor image.
Bug: 188179859
Test: Tested in keystone with VSDK target
Change-Id: Ie8e2d0a82850a2901fa6f250433bcbb43f0a97f2
Change Id397ad097539 alone would break hikey build, which
is a non-A/B device with a boot image, but without recovery.
Do not build OTA in this case.
Test: lunch hikey && m dist
Fixes: 194018054
Bug: 193588301
Change-Id: I8d09ad5c62d44699eb910ff62d32044bd97e8e44
This reverts commit bf77787cc9.
Reason for revert: relanding change
Test: see next CL
Bug: 193925883
Bug: 193588301
Change-Id: Id397ad0975390617bd277573f2cdba9a2677842d
On devices with a prebuilt boot image, TARGET_NO_KERNEL
may be set to enable signing, etc. In this case we still
want to build the OTA package.
Test: m otapackage on a device with generic boot image
(where TARGET_NO_KERNEL is set)
Bug: 193588301
Change-Id: I4e5adc3f42a516ac0e2f66c313dbe34a469ebe05
On devices with prebuilt generic boot image:
TARGET_NO_KERNEL := true
BOARD_PREBUILT_BOOTIMAGE is set
In this case, the process for extracting the kernel
config and version must also try extracting from the
prebuilt boot image.
Test: build on device with prebuilt boot image
Fixes: 193588301
Change-Id: I43dd8e206bcd1c9f3f5f51869f126791c50af01a
Bug: 188179858
Test: compare dexpreopt_config.zip files from
1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
2. m dexpreopt_config_zip
(note that m clean should run between steps)
Change-Id: I92623b59e4fcac397c7fed3d7ab1070fe5281027