Commit graph

81958 commits

Author SHA1 Message Date
Snehal Koukuntla
64f76a4460 Merge changes from topic "coverage-build" into main am: 6ac2c1693d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2646884

Change-Id: I3f4d984e88a7698be1738d0e6793e54fb09c2d6f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 11:46:19 +00:00
Snehal Koukuntla
6ac2c1693d Merge changes from topic "coverage-build" into main
* changes:
  Add Coverage controller
  Coverage library on the NS side for the coverage controller
2023-08-07 10:53:44 +00:00
David Anderson
76f3af72a3 Merge "snapuserd: Split Tempdevice into a separate file." into main am: 1d8e349cce
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2640541

Change-Id: I413ad10511f86143d20b65932d5941b4e067196a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 03:40:12 +00:00
David Anderson
1d8e349cce Merge "snapuserd: Split Tempdevice into a separate file." into main 2023-08-07 02:55:24 +00:00
David Anderson
ee91991f25 Merge changes from topic "libsnapuserd_client" into main am: babf3a9874
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2647522

Change-Id: I6176a6477fcb23ac1ad65b5375fb54ba5adf83bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 21:06:51 +00:00
David Anderson
45798edba6 snapuserd: Rename libsnapshot_snapuserd to libsnapuserd_client. am: 75c5deed52
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2647521

Change-Id: I917ad3980532ea488c6bcbe9f0af8f9726a4dc96
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 21:06:47 +00:00
David Anderson
babf3a9874 Merge changes from topic "libsnapuserd_client" into main
* changes:
  snapuserd: Remove dependence on libfs_mgr.
  snapuserd: Rename libsnapshot_snapuserd to libsnapuserd_client.
2023-08-04 20:14:54 +00:00
Snehal
806e70bb94 Add Coverage controller
Bug: 289523068

Change-Id: I5b36c274acc7da4e2d6b9cf91409a7b1af5f0d34
2023-08-04 08:54:52 +00:00
Snehal
ed34b6e232 Coverage library on the NS side for the coverage controller
Bug: 289520358

Change-Id: I6c2c0e5db9e8d9a0edec93d2fb123d185c7c4416
2023-08-04 08:54:32 +00:00
Yi-Yo Chiang
207951385a Merge "libfstab: Optimize out C++ object copy" into main am: 656e28174b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2688928

Change-Id: I0742d12929f78d9a436d0bdd67313563682e82ad
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 06:17:49 +00:00
Yi-Yo Chiang
656e28174b Merge "libfstab: Optimize out C++ object copy" into main 2023-08-04 05:29:48 +00:00
Yi-Yo Chiang
3cffba1bed Merge "init: Use libfs_mgr kernel cmdline parser" into main am: 63a3f34e4c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2687407

Change-Id: I774523069e97413b11d23bb28491f907e7ec6c48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 04:22:42 +00:00
Yi-Yo Chiang
18cea8df37 Merge "remount: Replace ServiceManager::getService with checkService" into main am: 4131a3afd1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2690886

Change-Id: I0edade2adc78401e6f5291d1a2a579ac102d2087
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 04:22:27 +00:00
Yi-Yo Chiang
63a3f34e4c Merge "init: Use libfs_mgr kernel cmdline parser" into main 2023-08-04 03:46:07 +00:00
Yi-Yo Chiang
4131a3afd1 Merge "remount: Replace ServiceManager::getService with checkService" into main 2023-08-04 03:31:33 +00:00
David Anderson
95f46b0758 snapuserd: Split Tempdevice into a separate file.
Bug: 288273605
Test: snapuserd_test
Change-Id: I3f1b01de8986d22de03bb31355ec09fe48c9204b
2023-08-03 16:15:37 -07:00
David Anderson
c132bf80ae snapuserd: Remove dependence on libfs_mgr.
The only function we use from libfs_mgr is WaitForFile, so factor that
out into libfs_mgr_file_wait. libfs_mgr has too much dependence on AOSP
internals to build on the host.

Bug: 288273605
Test: builds
Change-Id: I8e5eb4075ae01b9ca64074422171a487179e7943
2023-08-03 16:15:34 -07:00
David Anderson
75c5deed52 snapuserd: Rename libsnapshot_snapuserd to libsnapuserd_client.
We don't need this on the host, since the host will not be running
snapuserd as a server. Rename it for clarity and remove it where we can.

Bug: 288273605
Test: snapuserd_test
Change-Id: I679ef668a89411c670fea8d3b758bde589623548
2023-08-03 16:15:33 -07:00
David Anderson
c7b9ece0c4 Merge "libsnapshot: Fix missing return keyword in error path." into main am: c8ce6347db
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2691212

Change-Id: I223ac6defc12d300f9cee99cdb6c46831487343f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 19:52:25 +00:00
Treehugger Robot
ecc86c1f93 Merge "Remove references to the pdk product variable" into main am: 0950447d18
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2692949

Change-Id: Ib1681df19e0c2829066cdc69ba81ed46c9a9470b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 19:49:15 +00:00
David Anderson
c8ce6347db Merge "libsnapshot: Fix missing return keyword in error path." into main 2023-08-03 18:57:37 +00:00
Treehugger Robot
0950447d18 Merge "Remove references to the pdk product variable" into main 2023-08-03 18:56:33 +00:00
Cole Faust
355ae4154e Remove references to the pdk product variable
pdk is deprecated and has no effect as of aosp/1319667.

Test: Presubmits
Change-Id: I78d7afaaa71b93e575dcd5c20716ffb295b9f522
2023-08-03 10:54:59 -07:00
David Anderson
fbc5f59737 libsnapshot: Fix missing return keyword in error path.
Bug: 288273605
Test: vts_libsnapshot_test
Change-Id: I0bee5ee1ebfb61f17d2a495440048d02e2c347b1
2023-08-03 09:45:20 -07:00
Yi-Yo Chiang
67e3e637a4 Merge "init: Unify kernel bootconfig parser with libfs_mgr" into main am: f2368d0744
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2682016

Change-Id: I9f4d70d3202c35d1ec8686efb6658dfe250fd60f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-03 08:44:05 +00:00
Yi-Yo Chiang
f2368d0744 Merge "init: Unify kernel bootconfig parser with libfs_mgr" into main 2023-08-03 07:54:14 +00:00
Yi-Yo Chiang
59442132d1 remount: Replace ServiceManager::getService with checkService
Address this build log message:
```
[ 18% 2/11] //system/core/fs_mgr:remount clang++ fs_mgr_remount.cpp
system/core/fs_mgr/fs_mgr_remount.cpp:133:31: warning: 'getService' is deprecated: this polls for 5s, prefer waitForService or checkService [-Wdeprecated-declarations]
        if (auto binder = sm->getService(android::String16("vold"))) {
                              ^
```

Bug: 293695109
Test: adb-remount-test
Change-Id: I3b5c7d338e9307dee58edeb0f6a00ba9a73d46f6
2023-08-02 18:01:19 +00:00
Mitchell Wills
cf244ae185 Merge "Add logs in SuperLayoutBuilder::Open when the metadata isn't supported" into main am: b7cfba1ca2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2665257

Change-Id: Ifa7f47c7e5f464f05cc6429f801fa6176c6f7fcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-02 17:34:38 +00:00
Yi-Yo Chiang
e54c0be60f libfstab: Optimize out C++ object copy
* Edit / truncate string objects in-place, don't copy a temporary string
  object just for storing intermeidate results.
* Replace copy construct semantics with move semantics.
* Use range-based std::vector::insert() to move whole range.

Bug: 293695109
Test: CtsFsMgrTestCases
Change-Id: I5437303ba9900dbad3276a981413cba138f17157
2023-08-03 01:31:16 +08:00
Mitchell Wills
b7cfba1ca2 Merge "Add logs in SuperLayoutBuilder::Open when the metadata isn't supported" into main 2023-08-02 16:30:04 +00:00
Yi-Yo Chiang
5d6e684874 Merge "init: Unify duplicated get_android_dt_dir with libfs_mgr" into main am: 0b30e34a04
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2675395

Change-Id: Ie92ec1006c0af058e809867aded4a7303ee0a67b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-02 10:38:20 +00:00
Yi-Yo Chiang
da5323e2d6 init: Use libfs_mgr kernel cmdline parser
Bug: 293695109
Test: CtsFsMgrTestCases
Change-Id: Ie2567d84cb80c392ad68aef0c438d8acc03a311e
2023-08-02 17:59:05 +08:00
Yi-Yo Chiang
79ad1e2e9b init: Unify kernel bootconfig parser with libfs_mgr
Right now there are two bootconfig parsers that gets linked into `init`.
One is from libinit itself and the other is from libfs_mgr.

The one in libinit removes all space characters between list elements,
so `key = "val1", "val2"` gets unquoted and squeezed into:
  `key=val1,val2`
The one in libfs_mgr doesn't remove spaces, it only unquotes:
  `key=val1, val2`

The libinit behavior is due to existing systems (such as sysprop)
expect the config value to be in the same format as kernel cmdline.
(aosp/1757971)
THe libfs_mgr behavior is due to the `androidboot.boot_device[s]`
format explicitly allows quoted comma appear in its list value, thus
relies on space, not comma, as the list value delimeter.

This commit merges the two parsers into libfs_mgr. Since all usages in
libfs_mgr besides `boot_device[s]` do not care about how list value are
delimited, and most usages in init expects the bootconfig value format
to be the same format as cmdline. We just special case the
`boot_device` scenario.

Also harden the test cases to cover all the different config value
format and expected result.

Note:
The format of kernel bootconfig is described here
https://docs.kernel.org/admin-guide/bootconfig.html

Bug: 293695109
Test: CtsFsMgrTestCases
Change-Id: I42b9bf626e8de38a60e8e09fac0693126b7efd91
2023-08-02 09:57:37 +00:00
Yi-Yo Chiang
0b30e34a04 Merge "init: Unify duplicated get_android_dt_dir with libfs_mgr" into main 2023-08-02 09:56:36 +00:00
David Anderson
633e1f51d6 Merge "libsnapshot: Introduce a dynamically linked version of libsnapshot." into main am: c99cd86610
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2670618

Change-Id: I2ab1a051bb12d7a2d125a78483c1547b1b3e10ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 17:18:55 +00:00
David Anderson
c99cd86610 Merge "libsnapshot: Introduce a dynamically linked version of libsnapshot." into main 2023-08-01 16:35:44 +00:00
David Anderson
a637416a87 libsnapshot: Introduce a dynamically linked version of libsnapshot.
This will cut down on the binary sizes of update_engine, snapshotctl,
and lpdumpd.

Bug: 291688516
Test: treehugger
Change-Id: Idae5ea075ab21c2bd4fdb839eb065d865cb07d58
2023-08-01 16:35:38 +00:00
Jooyung Han
2e438b3a5d Merge "Revert "Use /bootstrap-apex for bootstrap APEXes"" into main am: deff223842
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2685548

Change-Id: Ie8f8741baff37b992952a0cbc3da41b6ad3f80df
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 11:19:12 +00:00
Jooyung Han
deff223842 Merge "Revert "Use /bootstrap-apex for bootstrap APEXes"" into main 2023-08-01 10:44:45 +00:00
Yi-Yo Chiang
b8c23259b1 init: Unify duplicated get_android_dt_dir with libfs_mgr
init and libfs_mgr both defines get_android_dt_dir() with subtle
differences. Merge the two implementations into libfs_mgr to reduce code
duplication (in terms of source code and code gen)

Note:
init's implementation checks the kernel cmdline first and then the
kernel bootconfig, while libfs_mgr's order is the opposite.
Realistically I don't think this order matter much though. If any, we
should prioritize bootconfig over kernel cmdline most of the time.

Bug: 293695109
Test: Presubmit
Merged-In: Ic8d2c965c62f9e873ccdaf77d67c7708f25a7b56
Change-Id: Ic8d2c965c62f9e873ccdaf77d67c7708f25a7b56
2023-08-01 10:15:05 +00:00
Jooyung Han
840691be71 Revert "Use /bootstrap-apex for bootstrap APEXes"
Revert submission 2666915-share-bootstrap

Reason for revert: b/293949266 vold_prepare_subdirs fails to create apexdata directories.

Reverted changes: /q/submissionid:2666915-share-bootstrap

Change-Id: I3e97e8511755844de4b54f51ff20afc154bd8e74
2023-08-01 09:06:47 +00:00
Yi-Yo Chiang
974ed3575d Merge changes Ib70a8498,I06f7450c into main am: d53c1a7b62
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2671361

Change-Id: Idb00910809cfaa3e8d8381be88b05acec7d72bae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 05:40:22 +00:00
Yi-Yo Chiang
c2f876b3db Merge "fs_mgr: Refactor mandatory overlayfs kernel patch checks" into main am: bb1cc95f6c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2670897

Change-Id: Iedb91d59db16d18f88cbe2dfb9e46cce41a5b0c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 05:40:07 +00:00
Kelvin Zhang
8e6a2c8fab Merge "Make libdebuggerd ramdisk available." into main am: dccb1e904d
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2684517

Change-Id: I2cc4e64d59114868e5038835378690b22ddb5e9d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 05:39:51 +00:00
Yi-Yo Chiang
d53c1a7b62 Merge changes Ib70a8498,I06f7450c into main
* changes:
  fs_mgr: Split libfs_mgr and libfstab
  fs_mgr: Remove `include_dirs` declaration
2023-08-01 05:11:13 +00:00
Yi-Yo Chiang
96126069c2 fs_mgr: Split libfs_mgr and libfstab
The goal is to make the header definitions of the two curiously
intertwined libraries less chaotic.

After this change, libfstab's header would be self contained. In the
sense that all symbols exported by its headers are defined in its
compilation units.
libfs_mgr would still embed libfstab like before, it can use internal
symbols (symbols not exported by public headers) of libfstab through
the libfstab/fstab_priv.h private header.

Keep include_fstab/ as a symbolic link pointing to its new location.
This is a temporary workaround as there are still some bad build rules
(incorrectly) depending on the old include path with Android.bp
`include_dirs` directive.

Bug: 293695109
Test: build
Change-Id: Ib70a84984ac2cbfca5f5b27fadebf6a16e58146a
2023-08-01 04:56:41 +00:00
Yi-Yo Chiang
c30f033b4e fs_mgr: Remove include_dirs declaration
We aren't using anything through the removed path.
We also shouldn't use `include_dirs` to begin with, as it bypasses any
build system checks.

Bug: 293695109
Test: build
Change-Id: I06f7450c3ce545aa2583f8c3f8db18c45073f69e
2023-08-01 04:56:41 +00:00
Yi-Yo Chiang
bb1cc95f6c Merge "fs_mgr: Refactor mandatory overlayfs kernel patch checks" into main 2023-08-01 04:56:06 +00:00
Kelvin Zhang
dccb1e904d Merge "Make libdebuggerd ramdisk available." into main 2023-08-01 04:46:48 +00:00
Yi-Yo Chiang
ea70c490fa Merge "libfstab: Unexport InRecovery()" into main am: f6dc8ee31e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2682015

Change-Id: Icf7aa381f4dfe669e6261e47219ce65f86b846e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-01 03:51:01 +00:00