Use function LoadDictionaryFromFile(), instead of
LoadDictionaryFromLines(). Makes codes conciser.
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
Change-Id: I15d6d4281a03be8a2f6f855054b1e4c1c3010fcd
When testing on cuttlefish, space consumption isn't a concern, so
compression can be disabled to save time. We also want to test the
non-compressed code path, as we expect some OEMs to use userspace COW
w/o compression.
If no --vabc_compression_param option specified to
ota_from_target_files, we will use the compression algo specified in
target_files's dynamic_partition_info.txt.
Bug: 219966986
Test: th
Change-Id: Ie18064b15938550ad6fb4efc86fc100c12321dc0
These wrapper scripts are difficult to maintain and there's not really
any value add. The argument strings don't match and every new build flag
has to be connected in an extra place.
Bug: 222715577
Test: make with EROFS enabled
Change-Id: Ie0e51cc30aa08b004d5d8345a2a2d885e193ffa9
Add PLATFORM_DISPLAY_VERSION to version_defaults.mk that will propagate
to the ro.build.version.release_or_preview_display property and
be shown as the Android version for preview releases by Settings.
Bug: 221950960
Test: manual
Change-Id: I697cc59f77f92aa98a8a2573662797e6d3bd2042
Summary of changes:
- Rename extract_items args to be more generic.
- For many other functions, replace large argument lists with
the OPTIONS shared object.
- Rename process_* functions to merge_* to be more clear about
the purpose of the function.
- Remove verbose code in merge_ab_partitions_txt().
- Extract certain logic from merge_misc_info_txt() and place it
into other existing functions: dynamic partition and selinux
keys are now processed in their own functions.
- Remove verbose code in merge_package_keys_txt().
- Remove verbose code in create_file_contexts_copies().
- Handle extracting from META directly in merge_meta_files(),
rather than doing this extraction in create_merged_package()
- Storing the set of framework and vendor partitions in OPTIONS
so it can be reused by multiple functions without needing to
be parsed again.
Bug: 221858722
Test: atest test_merge_target_files
Test: Use merge_target_files to merge some builds
Change-Id: I8aa429c8fbb05223127b116aab84b2678ac264a8
These files are difficult to support in the Starlark product
configuration. They also aren't really a good representation
of products even with Makefiles, because they only display
information from products that have been imported with
import-nodes, but generate empty files for the other products
that are included from the imported ones.
For example, lunching aosp_arm64 then running
`m out/products/build/make/target/product/core_64_bit.mk.txt`
would generate a file full of empty variable assignments.
Bug: 221312856
Test: Presubmits
Change-Id: I18613a628968acc25b57b44e229de7df1b2476ef
Includes more folks to increase "bus factor" for these files,
as well as including the merge test.
Change-Id: I8a5e8d1600fd4e03f75338193609f496a964f790
Companion change of I143680b1cab50a6915df56c8273f8741beaf1180.
Basically does the same thing as the other change.
Bug: 211741246
Test: m dist
Test: ./boot_signature_info.sh boot-5.10.img
Change-Id: I40c4d5866c74a9a2d525f9455969b8a71f22bdbb
The virt APEX payload public key needs to be embedded in pvmfw so that
is verifies the right set of images. As things are being resigned,
update that embedded key so that it matches the APEX.
Bug: 220018566
Test: sign_target_files_apks
Change-Id: I09be91275ec1d1aa6f921c54a96c5159571ddead
Add recovery-from-boot.p for device with
BOARD_USES_FULL_RECOVERY_IMAGE disabled
Bug: 219871887
Change-Id: Id4bafaa44afe28f57e0a35846012073307965940
Test: Used to merge non-AB VF device
For vendor freeze, vendor.img/odm.img is rebuilt and moved to
the merged target files dir in a special build flow:
https://android-review.googlesource.com/c/platform/build/+/1752968
But considering non-AB case, some more files are generated by
MakeRecoveryPatch() along with vendor.img, such as:
IMAGES/vendor.map
VENDOR/etc/recovery.img
VENDOR/bin/install-recovery.sh
They should be copied to the merged target files dir as well,
in order to pass the check in HasRecoveryPatch() and
GetSparseImage().
Bug: 219871887
Test: Used to merge non-AB VF device
Change-Id: I003186b30e700413d54ee1b7521bd03ba83ad3f5
The protobuf addition is present only in S+
while the legacy metadata is always present
Test: tools/gen_update_config.py with ota from R
Change-Id: I482c75b6b3b2b1ade139e59dc9dc57dbf9731d45
This is bad, python already prints exceptino message and exit with
non-zero code when an exception is raised, no need to catch the
exception just to print it. In addition, printing an exception does not
print stacktrace, so catch + sys.exit provide less information than
python's default behavior.
Test: th
Change-Id: If6cf2e34d4ebc9f7d172063b4396bf4377dad447
This function is already called by add_img_to_target_files, when needed.
Bug: 187432243
Test: Create a merged build with ab partitions and OTA package
Change-Id: I1d1ec878f4dcf16c8fcbbea10e787a78d1478328
Some mountpoints are only available at device runtime, so ignore import
failures in release tools.
Bug: 214322896
Test: th
Change-Id: I1e8c4fb08c6b825fa19c0f0e019dfaf2b03f2927
boot.img and init_boot.img get their build properties from the platform
ramdisk properties.
Test: "m dist" then drop the OTA zip file into
android.github.io/analyseOTA to verify init_boot is present.
Bug: 211823573
Change-Id: I411e62bf0fc3cb49d4b12dadb52d9820fca041fa
It defines values for Build.VERSION.KNOWN_CODENAMES constant, and should
contain all codenames starting from Q, including current codename
for in development branches.
Bug: 211747008
Test: presubmit
Change-Id: If8995750e369ba39bfc7041580c21b2f96632a78
zip -d doesn't work when no entry names specified. So if the list of
entry is empty, just skip calling zip -d.
Bug: 218438888
Test: th
Change-Id: Ie4419b9d6fdc2780255c6f12f9f4d35e5c0a7b26
The prior interface to make supported only a single package name per
target; although, a target might have multiple licenses each with its
own package name.
Bug: 151177513
Bug: 210912771
Test: m all dist
Test: flash; About Phone -> Legal Information -> Third-party licenses
Change-Id: I5cf1964ec18af91ec7e258a1c6722527e3596cf3
Otatools archive can be unpacked to an arbitrary directory together
with bundled external/avb/test/data keys. Calling add_img_to_target_files
from a different directory fails to build an image which has
avb_{}_key_path pointing to the bundled key since add_hash_footer
can't find the key file.
Fix this by applying the same logic as in common.AppendAVBSigningArgs.
Steps to reproduce:
$ . build/envsetup.sh && lunch aosp_cf_arm64_phone-userdebug && make dist
$ cd out/dist && rm -rf otatools && unzip otatools.zip -d otatools
$ zip -d aosp_cf_arm64_phone-*target_files*.zip IMAGES/system_other.img
$ otatools/bin/add_img_to_target_files -a -v -p otatools \
aosp_cf_arm64_phone-target_files-*.zip
Bug: 218531463
Test: manual, see "steps to reproduce" above
Change-Id: Id3f7cf2678e998ef1beda2b6741944c6455c2404