Commit Graph

100007 Commits

Author SHA1 Message Date
Marybeth Fair
45b0438cc0 Add ability to manually write to binary files.
I was updating the format of PackageTableHeader to add an additional
field (and due to that change incremented the file version). This broke
several tests under aconfig_storage_read_api and
aconfig_storage_write_api that were operating on files written in the
old schema. I tried to re-generate them using aconfig create-storage as
explained in aosp/2933375, but was having some trouble. Figure if we can
just update the files directly it will be easier to make updates in the
future anyway. This isn't bypassing logic that's tested - IIUC the tests
cover reading the file correctly (writing is covered in separate tests).

Usage:
$ aconfig-storage print --file=path/to/flag.map --type=flag_map
--format=json > flag_map.json
$ vim flag_map.json // Manually make updates
$ aconfig-storage write-bytes --input-file=flag_map.json
--output-file=path/to/flag.map --type=flag_map

Change-Id: I212bf0b97483740b30130eb121acb895d350da84
Test: manual (adding debug-only tooling) + cargo t
Bug: 316357686
2024-09-16 10:30:04 -04:00
Treehugger Robot
1c0e255327 Merge "aconfig: Don't log matching validated flags" into main 2024-09-12 16:37:30 +00:00
Treehugger Robot
435145d063 Merge "Move create_root_structure.mk to the dont_bother block." into main 2024-09-12 08:29:21 +00:00
Treehugger Robot
c2b351babb Merge "Move building bootloader/radio image task to proper place" into main 2024-09-12 07:22:38 +00:00
Ankita Vyas
69bb727e5a Merge "Add new framework-photopicker inside MediaProvider module" into main 2024-09-12 05:46:50 +00:00
Treehugger Robot
1d09815d07 Merge "Add a new Soong config variable EMMA_INSTRUMENT" into main 2024-09-12 03:09:24 +00:00
Treehugger Robot
ec37b55bc8 Merge "Add 16K boot image and dtbo image to dependency list of target files" into main 2024-09-12 00:29:16 +00:00
Treehugger Robot
0908f9d93d Merge "Add soong system image configs" into main 2024-09-12 00:25:22 +00:00
Kelvin Zhang
278f34add3 Merge "Fix OTA package re-sign on release key servers" into main 2024-09-12 00:09:00 +00:00
Kelvin Zhang
8ac5145307 Add 16K boot image and dtbo image to dependency list of target files
In aosp/3236458 these two artifacts are added to target-files.zip, but
they are not listed as dependency of target-files.zip. Depending on
build order and clean spec, sometimes this leads to missing files.

Test: th
Change-Id: I70e3b3691e77112c2427d95930b0c27a8042884b
2024-09-11 16:31:06 -07:00
Jared Duke
f43413c53f aconfig: Don't log matching validated flags
Avoid log spam by skipping log statements for matching validated flag
entries in the Java codegen. Also change any mismatched logs from
info to warning.

Change-Id: Icb8bba38d8594438757d76957c4c0188f6c2758a
Test: atest aconfig.test
Flag: EXEMPT bugfix
2024-09-11 23:15:58 +00:00
Kelvin Zhang
4837944712 Fix OTA package re-sign on release key servers
Release key signing passes more args than just --package_key, honor
these flags properly in signing script.

Test: th
Bug: 354019928
Change-Id: I49215e92f28da2ac4cd72fb9e5c6bbc94a3e3f02
2024-09-11 16:07:04 -07:00
Treehugger Robot
44bebf7ccb Merge "Add flag for enabling only new storage and use in aflags" into main 2024-09-11 21:58:52 +00:00
Treehugger Robot
6fbebd4570 Merge "Move copy destination to "sts-sdk"" into main 2024-09-11 21:58:14 +00:00
Treehugger Robot
edb3ba3ae4 Merge "Add missing vendor_kernel_ramdisk dependency to target-files.zip" into main 2024-09-11 20:33:35 +00:00
Ted Bauer
b1edaae899 Add flag for enabling only new storage and use in aflags
Change-Id: I73218de38d005d77987d5103364a102cec3abc07
Test: m && cargo t
Bug: 324436145
2024-09-11 20:24:47 +00:00
Luca Farsi
b5484c4b5b Merge "Refactor package_outputs" into main 2024-09-11 18:05:27 +00:00
Colin Cross
757d8cb7fd Add missing vendor_kernel_ramdisk dependency to target-files.zip
The rule that builds target-files.zip has no dependency on the
vendor_kernel_ramdisk image, which means the files in that image
may not be in place when target-filse.zip is built, causing a
build error:
mkbootfs: cannot open directory '/mnt/disks/build-disk/src/googleplex-android/aosp-main-future-without-vendor/out/target/product/cheetah/obj/PACKAGING/target_files_intermediates/aosp_cheetah-target_files/VENDOR_KERNEL_BOOT/RAMDISK': No such file or directory

Add the missing dependency.

Bug: 365887100
Test: none
Flag: EXEMPT bugfix
Change-Id: I5cdec9bbb35970e4d5e27a6b10ad118ce11835a9
2024-09-11 11:03:36 -07:00
Nelson Li
87ef4b8aee Move create_root_structure.mk to the dont_bother block.
Bug: 353642907
Test: m -j init.environ.rc
Change-Id: I54671a194dbf2005286cb8386cafd93fbef75975
2024-09-11 16:46:45 +08:00
Justin Yun
c9dd2d5b2e Add soong system image configs
USE_SOONG_DEFINED_SYSTEM_IMAGE is true when the target is using a
system image defined in soong.
PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE is the module name of the soong
defined system image.

Bug: 350599535
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-userdebug
      && m
Change-Id: Ic5c848fb649a5a61de1a5a253438b2d77d200a6b
2024-09-11 05:06:42 +00:00
Herbert Xue
48ab2f75c2 Move building bootloader/radio image task to proper place
Move the task of building bootloader/radio images and unpack their
partitions to build/core/tasks/tools.

Bug: 359426542
Test: presubmit
Change-Id: I3ac1a1a6eb0e21fb1eac6db628e094a13c9fc73f
2024-09-11 10:04:16 +08:00
Treehugger Robot
963298af97 Merge "Move the creation of the root structure to build/core/main.mk" into main 2024-09-11 01:01:40 +00:00
Luca Farsi
d4e4b64eeb Refactor package_outputs
Refactor package_outputs in the TestOptimizer so it just returns a list
of soong_zip commands to be run by build_test_suites.

Since we already have a tested implementation for running subprocesses
in build_test_suites.py there's no reason to reimplement it in
optimized_targets.py. Because any packaging will ultimately use
soong_zip to package its final outputs change the code to just do
whatever prep it needs to and return a list of soong_zip commands.

This way the code is simpler to test without requiring subprocesses and
no reimplementation of subprocess running code is necessary.

Test: atest build_test_suites_test; atest optimized_targets_test
Bug: 358215235
Change-Id: I3025aefeeb7186f537266a72d8422211ca9835ba
2024-09-10 16:37:51 -07:00
Kelvin Zhang
e1f224cd4f Merge "Specify tooling dependency for create_brick_ota" into main 2024-09-10 22:52:05 +00:00
Kelvin Zhang
41d3833a07 Specify tooling dependency for create_brick_ota
create_brick_ota relies on signapk for OTA package signing, hence
add relevant tools in dependency list.

Bug: 365701163

Change-Id: Ib414a468bc690ee35cc7cae7bc0d3062c89d0bbe
2024-09-10 14:36:00 -07:00
Cole Faust
f4053ef8c0 Merge "Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES" into main 2024-09-10 19:33:04 +00:00
Nelson Li
1646e5c028 Move the creation of the root structure to build/core/main.mk
Since Soong currently doesn't support the `install_directory`
functionality, `system/core/rootdir/Android.mk` cannot be directly
converted to Android.bp. Moreover, its main content is to create
directories and symlinks for the root file system. Therefore, we'll
first rename it and move it to build/core/main.mk for handling.

In addition, consolidate the handling of meta-lic related parts into
`build/core/tasks/meta-lic.mk`.

Bug: 353642907
Test: m -j init.environ.rc
Change-Id: Ie8f8bcae5752d22c331b33a33981a959410f0a69
2024-09-10 06:51:10 +00:00
Cole Faust
f72ec7ae1d Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES
It's been available for over a year, lets progress the python3 migration
by removing it.

Bug: 203436762
Test: Presubmits
Change-Id: I4193767a6a72a527eeca56fbabe477bee9e21c7a
2024-09-09 18:08:01 -07:00
Treehugger Robot
f5a82529c2 Merge "Fix missing dir error for certain targets" into main 2024-09-09 19:12:32 +00:00
Kelvin Zhang
2427d9d402 Fix missing dir error for certain targets
Test: th
Bug: 364967828
Change-Id: I31f76533c3e3be63aa55f96be8fd697c4a629e65
2024-09-09 11:14:53 -07:00
Xin Li
7c11265724 Merge "Merge 24Q3 to AOSP main" into main 2024-09-07 01:12:23 +00:00
Treehugger Robot
611bbbc49d Merge "Create parent directories before writing to output target files" into main 2024-09-06 22:44:14 +00:00
Kelvin Zhang
cc758d9609 Create parent directories before writing to output target files
Sometimes the output path's parent directory doesn't exist yet,
causing a failure in open() syscall.

Test: sign_target_files_apks solios-target_files-12328286.zip
solis_signed.zip
Bug: 364967828

Change-Id: I85f91ca5d1321c1ba763cac058eb28acc7f48e70
2024-09-06 14:49:12 -07:00
Treehugger Robot
492eea80d9 Merge "Add script that dumps all product config varaibles." into main 2024-09-06 17:58:16 +00:00
Ankita Vyas
d51b2e3edd Add new framework-photopicker inside MediaProvider module
Bug: 359548801
Test: presubmit and m

Change-Id: Ic29a1097bf73657973174769973e50e7dd985cc6
Merged-In: Ic29a1097bf73657973174769973e50e7dd985cc6
2024-09-06 09:37:50 +00:00
Treehugger Robot
86514e58df Merge "Revert "Revert "Export variable to soong for converting vintf_co..."" into main 2024-09-06 00:48:26 +00:00
Xin Li
5ca18247dc Merge 24Q3 to AOSP main
Bug: 357762254
Merged-In: I3e2152d0e109ecc6c89c249dea678afc93faf62b
Change-Id: I7162a45227c1bf61bb686b6bacebf4fced8b2c95
2024-09-05 17:02:34 -07:00
Treehugger Robot
7575a8174b Merge "Reland Support incremental dev option OTA during signing" into main am: 7f9092291f
Original change: https://android-review.googlesource.com/c/platform/build/+/3257139

Change-Id: I673212e73356136e88b2c64a40c094eddd2113f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 19:01:57 +00:00
Treehugger Robot
7f9092291f Merge "Reland Support incremental dev option OTA during signing" into main 2024-09-05 18:49:29 +00:00
Kelvin Zhang
065c5f5f5b Reland Support incremental dev option OTA during signing
This allows incremental dev option to be used on release-key devices.
Boot images are signed during the signing process, and hence the dev
option OTAs(which are derivative of boot image) need to be re-generated.
Previously we only re-generate full OTAs, now we support incrementals
too.

Previous land of the CL had a bug where AddDtbo() is called even for
devices which do not have a DTBO partition, causing signing failures.
This reland fixes the issue above by checking "has_dtbo" in
misc_info.txt

Test: th
Bug: 339658378

This reverts commit 29c7842c02.

Change-Id: Ifb080aaa15faf752ab1cff687c54d00290c1bfa6
2024-09-05 10:50:03 -07:00
Treehugger Robot
baeab42b59 Merge "Fix str/bytes type error in ReplaceOtaKeys" into main am: f54075d5d4
Original change: https://android-review.googlesource.com/c/platform/build/+/3255473

Change-Id: Icd7a835359eaeee9d96d0c663e9a195dcce884ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 17:30:20 +00:00
Treehugger Robot
f54075d5d4 Merge "Fix str/bytes type error in ReplaceOtaKeys" into main 2024-09-05 17:27:48 +00:00
Joe Onorato
0462cc589b Merge "Add new script for metadata build target" into main am: 502175c0ad
Original change: https://android-review.googlesource.com/c/platform/build/+/3112939

Change-Id: I1171b175ea72e20e6dfc2ae064782318a53c6368
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 16:44:06 +00:00
Joe Onorato
502175c0ad Merge "Add new script for metadata build target" into main 2024-09-05 16:40:45 +00:00
Bill Yang
01c18ba25c Revert "Revert "Export variable to soong for converting vintf_co..."
Revert submission 3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW

Reason for revert: The root cause of the break is already be merged. Related changes: ag/29139095, ag/29139608

Reverted changes: /q/submissionid:3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW

Change-Id: I40d9e6c03dd092783e86338a334851a36f5488dd
2024-09-05 09:22:17 +00:00
Automerger Merge Worker
80c3e721b9 Merge changes from topic "am-510e537a7c34466d8ed3053298cfa958" into main am: 84aefc948e
Original change: https://android-review.googlesource.com/c/platform/build/+/3198230

Change-Id: Iaa8c952276cc1fb752bdfe1f4a0cba61a67ef08e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 02:57:12 +00:00
Ziwei Zhang
bcdc8a9615 [automerger skipped] Merge "RESTRICT AUTOMERGE: Package xTS console into CTS 14 to support MCTS." into android14-tests-dev am: 57fa0d3215 -s ours am: 81d9588d4c -s ours
am skip reason: contains skip directive

Original change: https://android-review.googlesource.com/c/platform/build/+/3198230

Change-Id: Ie7603b90387d5c1a9672ee4d719bdbdbc476d654
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 02:57:07 +00:00
Automerger Merge Worker
98bcae86d6 Merge changes from topic "am-37a6674c47d345d5b8c04c1839d9e0dc" into android15-tests-dev am: ffc71467f0
Original change: https://android-review.googlesource.com/c/platform/build/+/3198230

Change-Id: Ieda77ff6124ece43382b6f5c4231460eb1b82e03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 02:56:43 +00:00
Ziwei Zhang
23de46a4dd [automerger skipped] Merge "RESTRICT AUTOMERGE: Package xTS console into CTS 14 to support MCTS." into android14-tests-dev am: 57fa0d3215 -s ours am: 6032c5082b -s ours
am skip reason: contains skip directive

Original change: https://android-review.googlesource.com/c/platform/build/+/3198230

Change-Id: Iff2d6b0c0f2b3ece8de3fb7436380b54db2cf9f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 02:56:40 +00:00
Automerger Merge Worker
ffc71467f0 Merge changes from topic "am-37a6674c47d345d5b8c04c1839d9e0dc" into android15-tests-dev
* changes:
  [automerger skipped] Merge "RESTRICT AUTOMERGE: Package xTS console into CTS 14 to support MCTS." into android14-tests-dev am: 57fa0d3215 -s ours
  [automerger skipped] RESTRICT AUTOMERGE: Package xTS console into CTS 14 to support MCTS. am: 660e2ef531 -s ours
2024-09-05 02:46:32 +00:00