Commit Graph

9880 Commits

Author SHA1 Message Date
Treehugger Robot
112c4886c7 Merge "Don't show staged value if flag is RO" into main 2024-09-16 16:58:33 +00:00
Marybeth Fair
a323229292 Merge "Add ability to manually write to binary files." into main 2024-09-16 15:57:24 +00:00
Ted Bauer
431f44a314 Don't show staged value if flag is RO
Bug: 324436145
Change-Id: I493421f29d6e7f5e844dd47cc6417b3d5fe9cdbb
Test: m aflags && aflags list
2024-09-16 15:50:50 +00:00
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
703b4830dc Merge "Fix error in payload_signer_args passing" into main 2024-09-13 17:46:02 +00:00
Ted Bauer
83d2a58dd9 Show containers in list new storage
Test: m
Bug: 324436145
Change-Id: I695aa130aee356451aa8196911d31b87d45d745d
2024-09-13 17:08:31 +00:00
Treehugger Robot
e1e07f892e Merge "Allow mix of full and incremental updates in OTA" into main 2024-09-13 16:56:44 +00:00
Kelvin Zhang
e2b7599437 Fix error in payload_signer_args passing
payload_signer_args is a list returned from shlex.split, need to unparse
it before passing to shell CLI

Test: th
Bug: 354019928
Change-Id: I4d308557b5bb808bf34c9d4514408c21176c81f6
2024-09-13 16:53:33 +00:00
Kelvin Zhang
71565fb070 Allow mix of full and incremental updates in OTA
This allows a subset of partitions to be updated in in full OTA fashion
when generating an incremental OTA. The benefit is faster OTA
generation(mostly for testing purposes).

Test: th
Bug: 365843325
Change-Id: Iff9f649c0646342eb9bdece9a46c942cb432b5e8
2024-09-12 18:19:14 -07:00
Dennis Shen
b3681ad5c6 Treat system_ext as system in container designation
Bug: b/365135457
Test: m
Change-Id: Iece264cdd49d84ef0e5acccdbcf68059c876395f
2024-09-12 23:32:03 +00:00
Treehugger Robot
187e280d3c Merge "Expose DeviceProtos' paths to parse in Framework" into main 2024-09-12 21:33:17 +00:00
Treehugger Robot
1c0e255327 Merge "aconfig: Don't log matching validated flags" into main 2024-09-12 16:37:30 +00:00
Yurii Zubrytskyi
45e02d3c76 Expose DeviceProtos' paths to parse in Framework
Framework currently hardcodes the paths to flags protos, with
this change it will be able to reuse the globally defined ones
and also gets access to all APEX flags

Bug: 301491148
Test: build + boot
Flag: EXEMPT build change
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1e85e40c3ead83585ac3d7c71a712d35cd420a36)
Merged-In: I91dae72c32c47888697914265c90918389aa4c25
Change-Id: I91dae72c32c47888697914265c90918389aa4c25
2024-09-12 05:53:21 +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
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
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
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
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
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
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
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
Kelvin Zhang
0c9a6ffb00 Fix str/bytes type error in ReplaceOtaKeys
ZipFile.read() returns byte sequence, while re.match expects str.
Decode the bytes read first.

Test: th
Bug: 315855025
Change-Id: Id2da071f3caeab56cfac845a9e4f842c4e102f49
2024-09-04 17:03:24 -07:00
Treehugger Robot
b7c2e20d68 Merge "Don't show container in list new storage" into main am: 9263e3e447
Original change: https://android-review.googlesource.com/c/platform/build/+/3255342

Change-Id: I9c0c9fbc85c70d081499be8d57f38a5dc9726b2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 19:33:23 +00:00
Ted Bauer
c50121613d Don't show container in list new storage
Change-Id: I24263e244d5b86ef066cd2efd511a890b03bf6e7
Test: m
Bug: 324436145
2024-09-04 18:11:59 +00:00
Marybeth Fair
27327f5586 Merge "Add a function to fingerprint flag/offset info." into main am: 2610f480aa
Original change: https://android-review.googlesource.com/c/platform/build/+/3249040

Change-Id: I91bb4dd3a8e2f8105ffdc19264eb92bb9de22653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 15:48:12 +00:00
Marybeth Fair
2610f480aa Merge "Add a function to fingerprint flag/offset info." into main 2024-09-04 15:37:59 +00:00
Marybeth Fair
df1b7d1d81 Add a function to fingerprint flag/offset info.
Uses SipHasher implementation added to the project. Ideally the output
would remain consistent between builds (though the worst case of an
updated algorithm would be a string lookup for cross-container reads
only).

Sort the flags first so everything is always added to the hasher in the
same order - note this code is only run at build time, not runtime.

Next step is to write this fingerprint into the package.map file and
introduce a flag to guard this change.

Bug: 316357686
Test: atest aconfig.test
Change-Id: Ie5f34541d982dfa120ffb05fc0790603689d47c0
2024-09-03 16:24:51 -04:00
Treehugger Robot
364dca6ca5 Merge "aconfig: Use LazyLock rather than lazy_static" into main am: 36a352cd02
Original change: https://android-review.googlesource.com/c/platform/build/+/3252494

Change-Id: I94320dad1867cb3c49c4e446365fb4de4634be5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-03 17:00:07 +00:00
Treehugger Robot
36a352cd02 Merge "aconfig: Use LazyLock rather than lazy_static" into main 2024-09-03 16:56:06 +00:00
Andrew Walbran
d3878575ac aconfig: Use LazyLock rather than lazy_static
Now that we have Rust 1.80 LazyLock is available in the standard library
so we no longer need to use external crates such as lazy_static.

Bug: 364211748
Test: atest aconfig.test
Test: atest aconfig.prod_mode.test.rust
Test: atest aconfig.test_mode.test.rust
Test: atest aconfig.force_read_only_mode.test.rust
Change-Id: If2862eaf20065c118daa9fc51e9fb403b99dada3
2024-09-03 17:01:49 +01:00
Treehugger Robot
f4565686e4 Merge "java reader reads directly from map" into main am: 9f254c6b5d
Original change: https://android-review.googlesource.com/c/platform/build/+/3251572

Change-Id: I9e3d941414a961bbce2f5ef507bb77f8b37536b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 21:14:05 +00:00
Zhi Dou
9c85770aa4 java reader reads directly from map
This commit changes java reader to directly read the flag value from the
map file instead of load the entire file.

Change-Id: Icee42d99506894da1e3e32a31c6554895719de7b
Test: atest aconfig_storage_read_api.test.java aconfig_storage_file.test.java
Bug: 352078117
2024-08-30 18:49:07 +00:00
Pechetty Sravani (xWF)
ad531c35b0 Merge "Revert "Support incremental dev option OTA during signing"" into main am: dbba064366
Original change: https://android-review.googlesource.com/c/platform/build/+/3250456

Change-Id: Iee71e26a88b5d29d9df8115cd7beae18673cbdff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 07:28:31 +00:00
Priyanka Advani (xWF)
29c7842c02 Revert "Support incremental dev option OTA during signing"
This reverts commit 5fcaa1f635.

Reason for revert: Droidmonitor created revert due to b/363090380.

Change-Id: I366b12a303190f73e6ac16a1fcff83b1e16ebf2d
2024-08-30 00:33:08 +00:00
Steven Moreland
0b78a4cfd8 Merge "Support incremental dev option OTA during signing" into main am: 4713911b81
Original change: https://android-review.googlesource.com/c/platform/build/+/3236459

Change-Id: I1dde20dc24eefe6987632e2f92b496c6ae7d4ab8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-29 23:39:20 +00:00
Kelvin Zhang
5fcaa1f635 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.

Test: th
Bug: 339658378
Change-Id: I4755379b49ff8adf351ccaf76fe38f19c1685e9e
2024-08-29 13:38:45 -07:00
Treehugger Robot
0a79e2158c Merge "aconfig Rust: Support huge list of flags" into main am: d713353ab8
Original change: https://android-review.googlesource.com/c/platform/build/+/3247857

Change-Id: I679d7a46f43f3b00cd7792744a3552bd6a65ce8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-29 14:49:26 +00:00
Treehugger Robot
d713353ab8 Merge "aconfig Rust: Support huge list of flags" into main 2024-08-29 14:46:45 +00:00
William Escande
a8454c30ed aconfig Rust: Support huge list of flags
Test: m libbluetooth_aconfig_flags_rust
Test: atest aconfig.prod_mode.test.rust
Test: atest aconfig.test_mode.test.rust
Test: atest aconfig.force_read_only_mode.test.rust
Test: atest aconfig.test
Bug: 311772251
Bug: 362773105
Change-Id: I48e268fc783e491a045d1bb6298c2b3c87045722
2024-08-28 16:52:56 -07:00
Treehugger Robot
11d717cd22 Merge "Implement SipHasher" into main am: d53df1b115
Original change: https://android-review.googlesource.com/c/platform/build/+/3243780

Change-Id: I5917a9b03103b335c2b6d6468f18365d12c7d6ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 17:45:51 +00:00
Treehugger Robot
d53df1b115 Merge "Implement SipHasher" into main 2024-08-28 17:34:42 +00:00
Treehugger Robot
39603ad5c5 Merge "Update diff allowlist for soong system image build" into main am: 53c4ec42ad
Original change: https://android-review.googlesource.com/c/platform/build/+/3241532

Change-Id: Ia3b78cb0f99afe17c9cd1be80d76a48ed2ea7251
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-28 17:24:20 +00:00
Zhi Dou
bca30dd13f Implement SipHasher
This change implements SipHasher in rust and java to make sure same
bytes array will be hashed into the same u64.

The implementation is needed, thus when rust, and java code read the
same flag file, they can find the same entry based on the same key.

Test: atest aconfig_storage_file.test.java aconfig_storage_file.test.cpp
Bug: 352078117
Change-Id: I2ce470039213a09a1df7637e60f4649b053fb2ea
2024-08-28 16:02:42 +00:00
Justin Yun
0fa47f4a54 Update diff allowlist for soong system image build
We already resolved files in system etc.
Remove them from the allowlist.

Bug: 346873717
Test: lunch aosp_cf_x86_64_phone-trunk_staging-userdebug && m
Change-Id: Ia38796aebe0e2e9a5d55e16f9c509c68214f687f
2024-08-28 06:22:25 +00:00
Spandan Das
259692c6f3 Merge "Remove some files from packaging allowlist" into main am: 03b680d4ba
Original change: https://android-review.googlesource.com/c/platform/build/+/3241405

Change-Id: I7b3ac632a4eabc19702c5d9460ec7d6ca3606fdf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-26 23:29:20 +00:00
Spandan Das
03b680d4ba Merge "Remove some files from packaging allowlist" into main 2024-08-26 23:26:10 +00:00