This happens when the fingerprint property is blacklisted for the
purposes of unified device builds.
Change-Id: I9f8a5041248c3f73fce7a16da73cb8f68c06c8e2
Add support for optional device tree image (dt.img)
to boot and recovery images. Some devices use kernel device
tree and this adds the device tree image as a section within
the boot/recovery images.
Change-Id: I91431ef2f4b86485895678916e39a8572be878eb
Build: add DT image variable to Makefile
DT image variable is currently present in
generate_extra_images.mk.This file is moved to
build/tasks to support persist image generation
during parallel make. As build/tasks is called
at the end of Makefile, DT image variable is not
available for other images generation like boot and
recovery. Adding this variable in Makefile ensures
the variable is defined before usage
Change-Id: I21f675d8ce648dc1cf1f4f3aede33278300e08c9
CRs-fixed: 548299
Fix case where boot/recovery.img were being built with wrong params.
The boot and recovery images now get built using the same params during ota package
generation as during a normal build.
Change-Id: I93d46e11a4245288f0e87c87a2e4bf45ac5aff69
Fix the extra dt.img compilation issue.
Add support for optional device tree image (dt.img)
for device that doesnt have TARGET_BOOTIMAGE_USE_EXT2
Change-Id: I6e07b3ca6d049a8ebdad7ea304b4f39e7c846151
releasetools: Store and use the dt image file through target files
Target files packages may be used for signing images separate from the
build process. Store the device tree image file in the target files
package so it can be used during the signing process.
Change-Id: Ie8507121fa9c4ba57ecffeab05bd859ae5f5b788
key passphrases may live in some sort of secure storage, support running
an arbitrary command to retrieve them.
Change-Id: I49862cf60f1b73a2356e0c492e1038beef28a95f
(cherry picked from commit 9caf8603575aecf51761feaeac6db619be76cfd3)
* Before this commit, the generated `dynamic_partitions_op_list` in
FullOTA packages always tries to remove all partitions and recreate
them upon flashing. This makes it impossible to have a system-only
"FullOTA" because vendor partition(s) are always removed.
* This commit detects if a build is vendor-less and disables every
dynamic partition operation except `resize`, in order to keep the
original content around after the flash. The change should not affect
non-dynamic-partition or builds with vendor image included.
Change-Id: I0cded7f3b2958f35103d73d19b7fb5f292f6c17f
Signed-off-by: Jesse Chan <jc@lineageos.org>
There may be multiple entries in fstab for a mount point. Use the first
value found so the entries are prioritized in order.
Change-Id: Ibd2631413d3e00507d3a0ec84fb91755f1c7993c
Ticket: OPO-326
The file was missed when moving recovery resources, but the assertion
path was changed, as a result non-Treble devices failed to build.
Fixes: Ia4045bd67ffb3d899efa8d20dab4c4299b87ee5f
Change-Id: Ib7822a9bd5b1a2ab7e762e9fb35dbb22291a3a76
Set in board file with TARGET_OTA_ASSERT_DEVICE.
(cherry-picked from commit 0f452f21fc9323b9d1fe746161761cf40aaa5030)
Change-Id: I3d06bdc0e3e26bde0c0e646accd050364f9713b9
ota_from_target_files: Remove device dependent arguments
These device-specific arguments are defined at build time and are
necessary to generate the zip correctly. Don't use command line
arguments to specify them, but write all the needed information
in misc_info.txt when the target-files zip is generated.
ota_from_target_files will then read misc_info.txt and set
everything automatically.
Change-Id: Ibdbca575b76eb07b53fccfcea52a351c7e333f91
Signed-off-by: André Pinela <sheffzor@gmail.com>
Currently, dev option OTAs are generated using dev-key signed boot.img
On release-key devices, OTA will install successfully, but user would be
using dev-key signed boot image after reverting to 4K mode, and
subsequent OTAs would fail. This CL re-generates 4K boot OTA using
release-key signed boot.img , which allows normal OTAs after toggling
dev options.
Test: th
Bug: 354019928
Change-Id: I40811d6ed7a37f50edea77d245bf559b66da5a71
While building CHD image, it failed with the error
KeyError: 'system_dlkm_base_fs_file'
Fix the build error by deleting proper props in the python code.
Bug: 359578756
Test: Building CHD image using build_cf_hybrid_device.py should not failed
Change-Id: Iae84ff080b8f6bf3b8d22b26865ea3e74815ac37
erofs_compress_hints files should be copied into target-files and then
sign_target_files_apks should use them from the target-files.
Bug: 357721652
Test: m target-files-package (with aosp/3204257)
Test: sign_target_files_apks <target_file> signed-target-files.zip
Change-Id: Id55000004ecb72ea8fec19bfbe144c9b4d3f06cb
This reverts commit 6871779d9b.
Reason for revert: Potential culprit for b/356752725- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I4c29b27f0318901130036dbe8ab9edef37f08875
The script was not breaking out of the loop when a handler was found, which could lead to multiple handlers being called for the same option.
This fixes the issue that a single option can be handled in two handlers.
Bug: 345402175
Test: sign_target_files_apks -k ..
Change-Id: I9f4ef801df99a4a0f2ba5be994b3f37fbedc22c0
ro.product.first_api_level looks like the value we actually want to read
to since it inherits from $PRODUCT_SHIPPING_API_LEVEL. Other variables
we attempted to look at were giving other values (e.g 202504 for pixel
watch)
Bug: 331202590
Test: th
Change-Id: Ied3da247cba45611132db6c9e3cdefb447891f96
The order of items in `partitions` map is non-deterministic. To make
sure that builds are hermetic, sort the map before use.
Test: th
Bug: 332550989
Change-Id: I76c7037ef9f03904899339813819fcf985a7c893
Logging the apk_name will improve debugging process if
`GetMinSdkVersion` returns an exception.
Test: None
Change-Id: I3ddf602d92701dcaaa4821fe42a76a870a721a11
In the case that a vendor is on s build (which doesn't have snapuserd),
and is takinga v3 -> v3 upgrade, we want to fallback to v2 vabc ota.
Test: th
Change-Id: Iba259b139b9b423ac77d82e14a113cf35fbfea64
If a device's source or target cow version is specified at 2 (or
undefined) we should fallback on using the v2 writer.
e.g.
1. v3 -> v2 downgrade OTA
2. v2 -> v3
Bug: 322279333
Test: ota_from_target_files
Change-Id: I8c5139eceeb64ee255ddea66017b3e17bbdc44c0
(Re-land of Ie882fccd864920289e48366e99a4ebd67e784d0d)
We no longer build GKIs from the platform tree.
These build commands were neither used nor maintained anymore, so clean
them up to reduce maintenance effort.
Keep the command line options as no-op, so existing scripts that still
specifies the deprecated options don't break.
Bug: 229701033
Test: presubmit
Change-Id: I0f7d05562dbc3eed29e902d6dc9a0f2e4083aaa6
This variable is always false or empty now, so clean up remaining
references to the variable.
Bug: 241346584
Test: Presubmit
Change-Id: I5dd3d356729d0bd2639633580bbb85f8b03582cf
We no longer build GKIs from the platform tree.
These build commands were neither used nor maintained anymore, so clean
them up to reduce maintenance effort.
Bug: 229701033
Fix: 229701033
Test: presubmit
Change-Id: Ie882fccd864920289e48366e99a4ebd67e784d0d
There are certain options which we need to share in multiple binaries,
for example, the signer options. Current options parsing function only
accepts 1 extra option handler, which is inflexible. Extend it to take a
list of extra option handlers.
Currently, to add a new CLI flag, caller must append the flag name to
`extra_long_opts`, then pass an extra option handler which can handle
that option. Define a new dataclass which contains both the CLI flag
name and the code to handle that flag for better composition.
Test: th
Bug: 293313353
Change-Id: I758db66dfd95934f5b2701454d97bfe7d37dc16d
Break when we find a working salt, certain devices have boot image
containing both the kernel and ramdisk, resulting in the ramdisk being
used as salt. Since core/Makefile uses kernel as salt, update python
code to match.
Bug: 293313353
Test: th
Change-Id: I68b5a8c2f0747ddf68f775bc2a6c5db46eb7eb64
non-AB has different lifetime and development cycles from AB. To avoid
accidentally breaking each other when making changes, put non-AB code in
its own files.
Test: local non-AB OTA generation
Bug: 296485685
Merged-In: I0736ecef343834c746464666a454a8bfcd4a20ea
Change-Id: I0736ecef343834c746464666a454a8bfcd4a20ea
When target specified a prebuilt boot.img, current build system will add
avb hash footer to it with a random salt. Use a deterministic salt
instead for more reproducible builds. To stay consistent with
non-prebuilt boot.img code path, we extract the kernel image from
prebuilt boot.img and uses sha256sum of kernel image as the salt.
Test: th
Bug: 293313353
Change-Id: I988999ddc4f18e0b8677b05a3165c847b6a11b52
Setting logging level to 'NOTSET' would tell logging module to inherit
logging level from handlers. Since the verbosity of handlers is
controlled by -v option, this allows sign_apex.py to give verbose output
if -v is specified.
Test: th
Bug: 307191956
Change-Id: I9c1db107cf4eae80ab570d892b0465b3902298fd
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
avbtool by default generates a random salt everytime, this makes builds
less reproducible. Use sha256 checksum of kernel image as the hex to
make the build reproducible.
Test: th
Bug: 293313353
Change-Id: I959b3dee77654098ab9fde475f11eaee8d40c790