10056 Commits

Author SHA1 Message Date
Zhuoyao Zhang
5335955317 The initial implementation of the edit monitor
Creates a class that will manager and monitor the actual edit watchdog
that run as a subprocess. As a first step, the class supports:
1) A start method that creates a pidfile and starts a subprocess with given target/args.
2) A stop method that terminates the created subprocess and removes the pidfile.

Detailed design in go/android-local-edit-monitor.

Test: atest daemon_manager_test
bug: 365617369
Change-Id: Ic6d7be67d284ade8033416235b9b0fb1e90e1b1a
2024-09-19 23:44:24 +00:00
Jeongik Cha
8ee4271956 Merge "Update OWNERS for allowlist" into main 2024-09-19 23:28:15 +00:00
Marybeth Fair
3884d56713 Merge "Add fingerprint to packages.map." into main am: df1a87770a am: 954288c041
Original change: https://android-review.googlesource.com/c/platform/build/+/3256996

Change-Id: I2fd1cc325bcf72279c963f3f7ba5c8ccd5bac4d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-19 19:27:58 +00:00
Marybeth Fair
df1a87770a Merge "Add fingerprint to packages.map." into main 2024-09-19 19:18:28 +00:00
Priyanka Advani (xWF)
159dd4c276 Merge "Revert "Add command line tool that generates NOTICE.xml.gz for p..."" into main am: 75501177a5 am: f13f451e8b
Original change: https://android-review.googlesource.com/c/platform/build/+/3272667

Change-Id: I922961cd61934fefb09d8e4dd3a9de2e703961ca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-19 18:02:33 +00:00
Wei Li
486c627e72 Revert "Revert "Add command line tool that generates NOTICE.xml...."
Revert submission 3272666-revert-3273112-soong-notice-xml-XKFAUDLTXP

Reason for revert: reland it

Reverted changes: /q/submissionid:3272666-revert-3273112-soong-notice-xml-XKFAUDLTXP

Change-Id: Ica8daafbc5f1bc0bc473c939c595666403349739
2024-09-19 17:55:12 +00:00
Priyanka Advani (xWF)
75501177a5 Merge "Revert "Add command line tool that generates NOTICE.xml.gz for p..."" into main 2024-09-19 17:53:20 +00:00
Treehugger Robot
0ccd5b29ba Merge "aconfig: cpp test-mode lib" into main am: 8e571eea6d am: a3c3cdce43
Original change: https://android-review.googlesource.com/c/platform/build/+/3272287

Change-Id: Ifc1596a84c3b7320b656ab3e2f63b96906891626
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-19 17:49:09 +00:00
Wei Li
71f114e347 Merge "Add command line tool that generates NOTICE.xml.gz for partitions." into main am: 9c3097d5fb am: 8c0d7cd133
Original change: https://android-review.googlesource.com/c/platform/build/+/3271576

Change-Id: I92d7fd14171ceedf62ddb111ea9bf277f9406243
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-19 17:48:09 +00:00
Priyanka Advani (xWF)
2f37c1980c Revert "Add command line tool that generates NOTICE.xml.gz for p..."
Revert submission 3273112-soong-notice-xml

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

Reverted changes: /q/submissionid:3273112-soong-notice-xml

Change-Id: I55e1e93aa6d4b311c6ee461d4216a104909af842
2024-09-19 17:43:39 +00:00
Treehugger Robot
8e571eea6d Merge "aconfig: cpp test-mode lib" into main 2024-09-19 17:42:29 +00:00
Wei Li
9c3097d5fb Merge "Add command line tool that generates NOTICE.xml.gz for partitions." into main 2024-09-19 17:37:06 +00:00
Treehugger Robot
a1ecbc8f2f Merge "Add etc/bpf/uprobestats/ProcessManagement.o in allowlist" into main am: 8a1e78aa9c am: 54f7f3cce5
Original change: https://android-review.googlesource.com/c/platform/build/+/3273919

Change-Id: I2b8399527de71fcad50e55f02cb8cb821cd5af8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-19 17:17:31 +00:00
Treehugger Robot
8a1e78aa9c Merge "Add etc/bpf/uprobestats/ProcessManagement.o in allowlist" into main 2024-09-19 17:04:32 +00:00
Jeongik Cha
ac740c3ef9 Update OWNERS for allowlist
Bug: n/a
Test: n/a
Change-Id: I7a186fbc89d5edf75efc76791e554c67bc02ef75
2024-09-20 00:33:25 +09:00
Jeongik Cha
392c0c954d Add etc/bpf/uprobestats/ProcessManagement.o in allowlist
to unblock build failure

Bug: 351698657
Bug: 368185982
Test: build
Change-Id: I1017091dd26cd74b471d1d71c3f3b6ad80a0c50a
2024-09-20 00:29:03 +09:00
Marybeth Fair
769d8eed37 Add fingerprint to packages.map.
No guards to this change because we will guard actually writing the
fingerprint, and right now new storage is not in trunkfood yet. This
change modifies the package map file structure. Note that if the new
storage was in trunkfood, this could (theoretically) cause issues if
there were cross-container READ_WRITE flags (not permitted per
documentation) and if the containers were built at separate aconfig
versions (ie before and after this change). Adding the fingerprint will
help prevent such issues in the future. Incremented the storage version
number as I've changed the format.

Again, fingerprint is not actually written in this CL, it always has a
value of 0.

Updated the test files as well to have the new version and the
fingerprint. Since this changed the package node size, some of the
information in the buckets there (offset) has changed as well.

Also added a test util for flags from another package to test future
changes.

Bug: 316357686
Test: atest aconfig.test
Change-Id: I09e10808492f241fe78028d2757f7d63328623c3
2024-09-19 10:17:23 -04:00
William Escande
01d6bb3aae aconfig: cpp test-mode lib
Incompatible interface between test-mode and normal mode.

Bluetooth is linking the normal flag for the code that is shipped, and
it is linking the test-mode library for unit testing.
While trying to move some test to use the test-mode, we noticed some
failure as the flag returned were not the one expected.

It appear the code and the test are built against 2 different library,
but linked against one.
The provide interface only contains getter in normal mode, and it is
alternating between getter/setter in test-mode.
By moving the setter in test-mode toward the end of the interface, we
are not modifying the assumed order for the code built against the
normal mode.

This CL is a short term fix, to make the test goes green and prevent
immediat failure. An refactor of the cpp generated code should be done
to avoid using 2 different version of the same symbol in 2 different
libs.

Bug: 311772251
Test: atest aconfig.test
Change-Id: I97f6523452c451d005d2e92bfa1ef861611ab840
2024-09-18 18:01:20 -07:00
Wei Li
e4c1ec9466 Add command line tool that generates NOTICE.xml.gz for partitions.
The tool currently generates a XML file with the root element only and its content will be filled in in following CLs.

Also disable the generation of NOTICE.xml.gz in make when USE_SOONG_DEFINED_SYSTEM_IMAGE is true, so the Soong module could be used without conflict.

Bug: 330949782
Bug: 338342381
Test: lunch aosp_cf_x86_64_phone-trunk_staging-eng && m, and check that system/etc/NOTICE.xml.gz have all the XML elements.
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-eng && m, and check that system/etc/NOTICE.xml.gz has root element only.
Change-Id: I82e90bd9aa3dabc605acfe8da697ab1f7e7ecf9b
2024-09-18 20:48:34 +00:00
Dennis Shen
a66e86a0b0 Merge "aconfig: update cpp_codegen to just read from new storage" into main am: 5b6b40e037 am: 390991bd61
Original change: https://android-review.googlesource.com/c/platform/build/+/3266995

Change-Id: Ie99ad0d876a2fe823952ab7df17a2c1f8292ec40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-18 02:35:16 +00:00
Dennis Shen
5b6b40e037 Merge "aconfig: update cpp_codegen to just read from new storage" into main 2024-09-18 01:53:30 +00:00
Zhuoyao Zhang
e27d217ae3 Merge "Bootstrap the edit monitor project" into main am: cd1908f552 am: 01b092672d
Original change: https://android-review.googlesource.com/c/platform/build/+/3261331

Change-Id: I51f32dcf34cc2c1f53bedaa035a86a64c5b5acaa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-17 21:17:36 +00:00
Dennis Shen
ee4e44ade7 aconfig: update cpp_codegen to just read from new storage
Change-Id: Ifc5886e587a64da0d940df903f972593c5e9c9d8
2024-09-17 21:11:22 +00:00
Zhuoyao Zhang
cd1908f552 Merge "Bootstrap the edit monitor project" into main 2024-09-17 20:14:39 +00:00
Dennis Shen
b015439ee6 Merge "aconfig: update rust_codegen to just read from new storage when flag is true" into main am: 869fdd13e8 am: 17b96f3ebc
Original change: https://android-review.googlesource.com/c/platform/build/+/3267213

Change-Id: If075964fad86e2a50e10b694305c0779c7cd5cc9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-17 19:58:33 +00:00
Zhuoyao Zhang
9e103e98e0 Bootstrap the edit monitor project
Add basic files required for the edit monitor project.

The project aims to monitor file changes on Android source trees that are checked out to local disk and upload the edit event logs for post analysis. More details and design doc can be found in the bug.

Bug: b/365617369
Test: None
Change-Id: Ie5e2bdb0747823f200c87ebe071f5f9a2e567b46
2024-09-17 19:16:55 +00:00
Dennis Shen
869fdd13e8 Merge "aconfig: update rust_codegen to just read from new storage when flag is true" into main 2024-09-17 19:14:14 +00:00
Dennis Shen
1b0a6667b1 aconfig: update rust_codegen to just read from new storage when flag is true
This is the last launch of new storage. Use the flag enable_only_new_storage to control if the rust codegen should read from new storage or old storage.

Change-Id: Id2bea8df191a939acb5e07b6a9ac8dc1ddd0f7fb
2024-09-17 15:03:59 +00:00
Kelvin Zhang
c07a0d1c44 Merge "Fix missing signer arg error after re-generate OTA" into main am: 0b181c9098 am: a877e85601
Original change: https://android-review.googlesource.com/c/platform/build/+/3269802

Change-Id: Ia35da1cab0cdbcd21c9e2a9318c0c1be2281b6ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-16 21:46:36 +00:00
Kelvin Zhang
c0ae029e87 Fix missing signer arg error after re-generate OTA
sign_target_files_apks invokes ota_from_raw_img's main function directly(without creating a new process). As a result, flag overrides in  ota_from_raw_img impacts further signing. To fix, remove unnecessary flag overrides.

Test: th
Bug: 365697483
Change-Id: Iaf6ad4132afcab4912bd4b9ea002bfa3d9a1462a
2024-09-16 21:01:45 +00:00
Treehugger Robot
ef48beb370 Merge "Don't show staged value if flag is RO" into main am: 112c4886c7 am: b51df30f56
Original change: https://android-review.googlesource.com/c/platform/build/+/3268192

Change-Id: Ic50b110179d79b1ca2fb9b3c8e64651cee7adb11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-16 17:54:58 +00:00
Marybeth Fair
ad3a183e02 Merge "Add ability to manually write to binary files." into main am: a323229292 am: 91b3cef7d1
Original change: https://android-review.googlesource.com/c/platform/build/+/3264236

Change-Id: If8b63c958389871df8c237c23bcab27d35978645
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-16 17:53:54 +00:00
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
11aa3a17f9 Merge "Fix error in payload_signer_args passing" into main am: 703b4830dc am: 323c046d44
Original change: https://android-review.googlesource.com/c/platform/build/+/3267753

Change-Id: Ibd1987e27ba1e4a86bc4112866f880e004bd1590
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-13 18:43:33 +00:00
Treehugger Robot
703b4830dc Merge "Fix error in payload_signer_args passing" into main 2024-09-13 17:46:02 +00:00
Ted Bauer
2c671f679f Merge "Show containers in list new storage" into main am: 0eb513b222 am: d33f812022
Original change: https://android-review.googlesource.com/c/platform/build/+/3266997

Change-Id: I6aad4a85c8fa26c24aafa22275036030ecd2a6c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-13 17:35:06 +00:00
Treehugger Robot
11d7bc829b Merge "Allow mix of full and incremental updates in OTA" into main am: e1e07f892e am: 7a08b486df
Original change: https://android-review.googlesource.com/c/platform/build/+/3265835

Change-Id: If1a97898cd76b5ec9102e9ec99cefd07ec7df6bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-13 17:32:08 +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
Dennis Shen
1760706461 Merge "Treat system_ext as system in container designation" into main am: 6940b7898d am: b0d8105009
Original change: https://android-review.googlesource.com/c/platform/build/+/3261300

Change-Id: I2fa3f3306cd29b7d730020fd015930dfbc899f7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-13 02:20:12 +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
5bbf6701eb Merge "Expose DeviceProtos' paths to parse in Framework" into main am: 187e280d3c am: ebad1406dc
Original change: https://android-review.googlesource.com/c/platform/build/+/3265027

Change-Id: I984b09f9f5c4c6045c66f81acc0b46197c4705dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-12 22:11:43 +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
905172ddc7 Merge "aconfig: Don't log matching validated flags" into main am: 1c0e255327 am: 8c56d035d1
Original change: https://android-review.googlesource.com/c/platform/build/+/3262192

Change-Id: Ib907a88258c95d30a4f45cf359666e9e43e48138
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-12 17:01:20 +00:00
Treehugger Robot
1c0e255327 Merge "aconfig: Don't log matching validated flags" into main 2024-09-12 16:37:30 +00:00