Commit Graph

10032 Commits

Author SHA1 Message Date
Andrew Dodd
155e4eba66 ota: Disable downgrade check
We want users to be able to downgrade their packages.

Change-Id: I6bcbd4ee2a02640fe0855b0f1f197a02e914c927
2025-02-05 20:35:57 +08:00
M1cha
9b91836d1f releasetools: ota_from_target_files: add FullOTA_PostValidate
Change-Id: I152412049f90fd546d4516cc064238c3192be553
2025-02-05 20:35:57 +08:00
Michael Bestas
2360e10760 Don't enable ADB by default on userdebug builds
Squashed with the following commits:

Author: Scott Mertz <scott@cyngn.com>
Date:   Thu Feb 26 10:51:44 2015 -0800
    Enable ADB by default when ro.adb.secure is not 1
    * Property ro.build.type is not part of the default.prop we can't
      use this to decide how to apply adb by default within this function
    Change-Id: Ib3eb24c655353966d64c7148d7530244b628ce94

Author: LibXZR <i@xzr.moe>
Date:   Sat Apr 30 16:29:35 2022 +0800
    tools: Let adb secure check depend on "==0" rather than "!=1"
    We are using PRODUCT_SYSTEM_DEFAULT_PROPERTIES to set
    `ro.adb.secure` property. But unfortunately this flag only
    affect system partition, which means in other partitions
    e.g. vendor and system_ext `ro.adb.secure` stays empty.
    Thus `persist.sys.usb.config=adb` is unconditionally set
    in partitions other than system, which lead to adb enabled
    by default even on user build.
    Change-Id: I1f8b463b3ec645309369f36014bed556e75ed210
    Signed-off-by: LibXZR <i@xzr.moe>

Change-Id: I33ae5c6f2787017a62e679aa0c28d4b909d45935
2025-02-05 20:35:57 +08:00
TheScarastic
abb95af328 Don't make recovery patch for devices with prebuilt vendor
Change-Id: I05c0155e6331bfeccd4ad545e003fa3fa3498044
2025-02-05 20:35:57 +08:00
dianlujitao
6a1b8b765e Move recovery-from-boot.p from /system to /vendor
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
2025-02-05 20:35:57 +08:00
Steve Kondik
6d06aad39d Allow override of device asserts, including multi-device support.
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>
2025-02-05 20:35:57 +08:00
Wei Li
1911f735a4 Merge "Extract class MetadataDb to a separate python library so it can be used in notice files generation." into main am: eda61c1a85 am: 93f32d1d5e
Original change: https://android-review.googlesource.com/c/platform/build/+/3277554

Change-Id: I6a690da843200cee9c9b6979672c7f6d2239a80e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-24 00:19:26 +00:00
Zhuoyao Zhang
cc877453a1 Merge "Ensure a single running instance of edit monitor" into main am: 549513a4ab am: 2e7473f31a
Original change: https://android-review.googlesource.com/c/platform/build/+/3270767

Change-Id: I45029c27abfb063722dda6652ad206b8cea97820
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-24 00:18:32 +00:00
Wei Li
eda61c1a85 Merge "Extract class MetadataDb to a separate python library so it can be used in notice files generation." into main 2024-09-23 23:23:43 +00:00
Zhuoyao Zhang
549513a4ab Merge "Ensure a single running instance of edit monitor" into main 2024-09-23 23:05:50 +00:00
Marybeth Fair
01e1e1f886 Merge "Revert "Add fingerprint to packages.map."" into main am: 1127718899 am: e61e7bdb4a
Original change: https://android-review.googlesource.com/c/platform/build/+/3277272

Change-Id: Ib434845a48bf6f8708e745cbc7729ffe3b9dfcea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-23 22:40:27 +00:00
Zhuoyao Zhang
21a719c4ca Merge "The initial implementation of the edit monitor" into main am: 8478830c57 am: 46d0d8ca11
Original change: https://android-review.googlesource.com/c/platform/build/+/3266757

Change-Id: I034705d582ca5951a520978105262c5b0b5b7534
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-23 22:40:09 +00:00
Marybeth Fair
1127718899 Merge "Revert "Add fingerprint to packages.map."" into main 2024-09-23 22:17:36 +00:00
Zhuoyao Zhang
4d48559e2d Ensure a single running instance of edit monitor
This cl ensures at most 1 instance of edit monitor running from the
same binary by killing any existing instance before starting.

Specifically, When an edit monitor process starts, it will write a pidfile containing its pid and if such pidfile already exists (which means there's another instance there), it will read the pid contained in that pidfile and kill the corresponding process first.

Test: atst daemon_manager_test
bug: 365617369
Change-Id: I76954344df649aa79a6ef07ce55a62985decdb53
2024-09-23 22:04:44 +00:00
Zhuoyao Zhang
8478830c57 Merge "The initial implementation of the edit monitor" into main 2024-09-23 21:56:58 +00:00
Wei Li
0c6bc1ad45 Extract class MetadataDb to a separate python library so it can be used in notice files generation.
Bug: 330949782
Test: m sbom, no diffs in generated SBOM before/after the change
Test: build/soong/tests/sbom_test.sh
Test: CIs
Change-Id: I3cf944f744a1a5d359fd925621d1597b9681da9b
2024-09-23 21:25:12 +00:00
Marybeth Fair
a80e298d34 Revert "Add fingerprint to packages.map."
This reverts commit 769d8eed37.

Reason for revert: Caused crashed in places where old version files were present.

Change-Id: I7d529773226cd834979400aa018c47bbf6891b72
2024-09-23 19:37:21 +00:00
Wenshan Fu
d55bb477b7 Merge "Add a hostside Java lib to read proto paths" into main am: 1f56027906 am: 738ab744fe
Original change: https://android-review.googlesource.com/c/platform/build/+/3271535

Change-Id: I9d781ab6f80f46e15c2d23581e267e8b2d22a0ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 23:26:30 +00:00
Wenshan Fu
1f56027906 Merge "Add a hostside Java lib to read proto paths" into main 2024-09-20 22:44:12 +00:00
Dennis Shen
1bb460b089 Merge "aconfig: update cpp codegen" into main am: 41cb1204d5 am: 57b758db32
Original change: https://android-review.googlesource.com/c/platform/build/+/3273637

Change-Id: Iaa32eb02942fb5f05465ccd893bc850905728567
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 21:44:35 +00:00
Wenshan Fu
2924961d8a Add a hostside Java lib to read proto paths
Bug: 365157972
Test: m aconfig_host_device_paths_java
Change-Id: I858cda31e1e20b7df95bd0e6883694f0dd1cdef0
2024-09-21 05:06:51 +08:00
Dennis Shen
41cb1204d5 Merge "aconfig: update cpp codegen" into main 2024-09-20 20:40:50 +00:00
Wei Li
7b1440b53a Merge "Revert "Revert "Add command line tool that generates NOTICE.xml...."" into main am: ec85ca3e8a am: 12d93c5553
Original change: https://android-review.googlesource.com/c/platform/build/+/3273293

Change-Id: Ic81f445d3209898dbed09ffc53842c0ba7990cff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 18:30:35 +00:00
Wei Li
ec85ca3e8a Merge "Revert "Revert "Add command line tool that generates NOTICE.xml...."" into main 2024-09-20 18:03:06 +00:00
Dennis Shen
46986a4f02 aconfig: update cpp codegen
Use access system call to check existence of a file to reduce the cost.

Change-Id: Id64b419db81b2f8ac923b49f7293ee8a54aa78ca
2024-09-20 14:06:47 +00:00
Jeongik Cha
dc85c5c831 Merge "Update OWNERS for allowlist" into main am: 8ee4271956 am: 39d07fc3a7
Original change: https://android-review.googlesource.com/c/platform/build/+/3273920

Change-Id: Iebacbd163958ce81c3bc41f6141697f0c99aeb18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-20 00:05:35 +00:00
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