Add an `--avb-resolve-rollback-index-location-conflict`
option in merge_target_files. When this option is set,
the merge tool will resolve conflicting index locations
by assigning the smallest unused index location.
This is to support merging system and vendor target files
from two different targets. In this case, the two target
files may have conflict rollback index location because
they were built independently.
Test: atest releasetools_test
Test: validate_target_files *-target_files-*.zip
Test: merge_target_files &&
add_img_to_target_files &&
img_from_target_files &&
flash device
Bug: 300604688
Change-Id: Ibd18ef2a9f3784157fe17966f5364c3c81c9bd9f
The framework_partition_set would be generated from
framework_item_list and we should respect this partition
set while merging META/ab_partitions.txt.
This is to handle the case when we use a complete merged
target files package as the framework-target-files, where
its ab_partitions.txt may have non-framework partitions.
So we need to filter them out to prevent from the merged
meta file has some partitions that don't exist.
Test: merge_target_files &&
add_img_to_target_files &&
img_from_target_files &&
flash device
Bug: 300193612
Change-Id: I0a76d706a20dcaffa2533278db7383563f03ec02
super image generation is failing for non-ab target as it is not able to find update_engine_config.txt while calling MergeUpdateEngineConfig.
META/update_engine_config.txt exists when AB_OTA_UPDATER is true.
Avoid calling MergeUpdateEngineConfig for non-ab target.
Bug: 290811619
Change-Id: Ie88b31adce15df87f73031e1f5bff0d825601e0c
system_dlkm partition is related to GKI, so it should be
in the same category as boot image.
Test: merge_target_files \
--path otatools \
--framework-target-files framework-target_files.zip \
--vendor-target-files vendor-target_files.zip \
--output-target-files merged-target_files.zip
Bug: 294482075
Change-Id: Ie8f60d72f44d31e1bc3b556735b92ed0a2fda662
Host-side simulation of APEX activation is done by a new tool
'apexd_host'. This simplies checkvintf invocation for local builds and
for target-files.
For local builds, checkvintf no londer depends on $OUT/apex, a flattened
view of APEXes. In fact, the build system doesn't need to install
$OUT/apex. They are installed for now only for its side-effect of
installing symbol files. We'd better not rely on $OUT/apex.
For target-files, scanning/activating apexes are extracted and moved to
the new tool. Now check_target_files_vintf is not more efficient because
it doesn't copy .apex files to a temporary directory.
Bug: 260358957
Bug: 288826922
Test: m (running checkvintf) # for local builds
Test: m target-files-package && check_garget_files_vintf target-files.zip
Test: atest releasetools_test
Change-Id: Iba23f429d96f9ec31814196aa14bdbb800649218
Flattened apexes are deprecated. mege_dexopt does not need to care about
flattened apexes.
Bug: 278826656
Test: m otapackage
Change-Id: I527eed64c5f1a7466e2c48d73360f47f6cfa0911
aosp/2525591 remove SYSTEM/build.prop from vendor target_files,
and cause the same error reported in aosp/1836120.
Bug: 192422274
Change-Id: I3af33e44e395002a9cf26cf93677ff84c2c26207
For example, pvmfw.img comes from framework target files package
and dtbo.img comes from vendor target files package.
Test: merge_target_files
Change-Id: If2e6fac5ce3671e3387e801808a195fb7b2c55b5
To ensure that `AddImagesToTargetFiles` can still be used with
vendor item list that do not specify all of the required META/
files, those files should be included by default.
Test: atest --host releasetools_test
Bug: 278133178
Change-Id: I5a04bfc43d405d6838028f2535ced2124dbd43aa
Currently, ota_from_target_files(a python script) calls
brillo_update_payload(a bash script), which then calls delta_generator(a
C++ binary) to do the actual diffing. Having brillo_update_payload in
the middle does not offer any additional flexibility, but it makes
maintaince more difficult. Bash code is less readable and harder to
debug. Further more, everytime we want to add a new flag to
delta_generator, we have to add the flag in three places:
ota_from_target_files, brillo_update_payload, delta_generator.
Historically, brillo_update_payload was there because we inherited from
ChromeOS side. This bash scripts extracts target_files.zip and invoke
delta_generator to generate the actual OTA. Any customizations we want
on OTA must be implemented by modifying the input target_files.zip ,
Manipuating big zip files is slow and inefficient.
To make thing simpler/faster, remove the intermdiary call to
brill_update_payload. ota_from_target_files will now extract target
files and call delta_generator directly.
Test: th
Bug: 227848550
Change-Id: I44b296e43bf7921bcf48ef6a1e4021a12669739c
Expand `merge_target_files.py` API capabilities so that
`--framework-target-files` and `--vendor-target-files`
can be either zip archives or directories.
Test: Create a merged package by vendor target files folder
Test: atest --host releasetools_test
Bug: 276068400
Change-Id: I200be2a458ae59a61e05bfd7c78ab66093db32eb
The `--rebuild-sepolicy` option should work when the target
files folder `ODM/` or `VENDOR/` exists. We should not
assume that there is always an image to remove.
Bug: 270529723
Test: m otatools; Create merged builds with rebuild_sepolicy.
Change-Id: I93aeea2cd084fdc7f8179732d77a78bb1d144616
Currently, when merging target files, system side's update_engine
version info is copied into the merged target_files. This causes
recovery OTA failure, because update_engine_sideload daemon in recovery
is from vendor side. To fix it, use the older version of update_engine
config when merging target files.
Test: th
Bug: 257426678
Change-Id: I5d3304366749995c99a61ca0645a22ee047f1465
To support erofs apex extract via deapexer, we need blkid to tell the filesystem type of underlying payload image. If it is ext4, debugfs_static will be used, if it is erofs, then we should use fsck.erofs. Thus we now need explicit blkid input.
Also, remove dependency on fsck.erofs for other deapexer calls. Only extract deapexer call needs blkid and fsck.erofs.
BUG: b/255963179, b/240288941
Change-Id: I8cea0f2def664f9cabf8b14c9a7ecc47bbddfbdd
Rather than hardcoding a list of allowed vendor partitions, we accept
anything in the vendor target files that is not a framework partition.
Also extend support for inferred misc_info keys when the device uses
SYSTEM/product or SYSTEM/system_ext.
Test: test --host releasetools_test
Test: Use to merge a device with a custom IMAGES/*.img in the vendor
build, and SYSTEM/system_ext in the system build.
Bug: 225902565
Change-Id: I638c0f9c019357150516ea6c208ecd60c03c450f
This will be used in the following change to split
merge_target_files into a collection of smaller
more-focused scripts.
Bug: 221858722
Test: m otatools; Use to create merged builds
Change-Id: Ie01dac81c5f9f28f1e0fe037259eabd2478e60b6