This reverts commit 61c07a09e8.
Reason for revert: Likely culprit for b/359414718 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: Ie40dcc6d3549183ba146c4ff37edc0d1e57d0cca
This refactors HandleImminentDataWipe to address some shortcomings
discovered through testing. Previously, it always called
CreateSnapshotsAndLogicalPartitions, which meant trying to use snapuserd
even if completely unnecessary.
Instead we now peek at the update state and eliminate the "easy" cases
ahead of time. These are "none", "initiated", and "unverified" when
either a rollback happens or there is no forward merge indicator. In
this case we simply return early and allow the wipe to continue
(disabling the current slot if necessary).
The hard case, when a merge is needed, is still handled within
ProcessUpdateStateOnDataWipe. However it's no longer recursive, and it
can assume a merge is about to initiated or already in progress.
In all cases except a merge failure, we change the update state to None
to clear any roadblocks update_engine or the bootloader might encounter.
A merge failure, however, still blocks a data wipe. The way to recover
from this is adb sideload.
Bug: 350613336
Test: vts_libsnapshot_test
wipe in INITIATED state, no merge
wipe in UNVERIFIED state, no merge
wipe in UNVERIFIED + rollback state, no merge
wipe in MERGING state, merge
Change-Id: I387aabcfa6304118be88ddbb85842111d5c2ef6a
Adding formatting here, as we will start a push for people
using this, if they run into any linkToDeath issue, or if
they want to test this.
Bugs: me
Test: N/A
Change-Id: I72510d61926ce694671d897519463f37892a8d12
SetupCgroups was moved from CgroupMap in libprocessgroup to SetupCgroup
in libprocessgroup_setup, but the old declaration was not removed.
Fixes: 6f9ce2e548 ("libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup")
Test: m
Change-Id: I9f85000392b59a105bb202fae277a5582449822a
These are for ACgroupController and ACgroupFile, but share a filename
with libcgrouprc_format's CgroupController which can be confusing.
Bug: 349105928
Test: m
Change-Id: Idb270068169b71b0a33101407ddbb5a38cc8d469
So that the name is not overloaded with libcgrouprc_format's
CgroupController, which can be confusing.
Bug: 349105928
Test: m
Change-Id: I39df9814c500de68fd20139e661363ba51ea3543
For Android 12 vendor project, SnapshotTestEnvironment setup is skipped. So, test_device is not initialized, which will cause other tests to fail.
Change-Id: I6ce6a9e7ea2c210e25c2a5ffadaaa6348086ea7f
BUG:350678717
Test:run vts -m vts_libsnapshot_test
For the debuggerd_test.cpp tests, don't include any libdebuggerd
internal headers.
Test: Compiles and unit tests pass.
Change-Id: I6335dc9e09992f5725a24fc45a8356efab7158e6
Original CL reverted due to missing permission on vold.
The missing permission is added in aosp/3202313 , hence re-submit.
This reverts commit 1f00f794e6.
Reason for revert: b/349507086
Change-Id: Ia1086f3c8c65c476bdc119fe59ed4fd3a21f8591
This removes implicit assumption that BufferSink can only be used with
dm-user. User of BufferSink can specify size of header during
BufferSink::Initialize to reserve the space for the header.
Also get rid of now unused structure dm_user_payload and
dm_user_message.
Test: TH
Test: ota
Test: vts_snapused_test
Bug: 357711761
Change-Id: I1e550393ce1f0277fe215015fa6948ad3c3b68ba
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
Add support for connecting to a vsock port that multiplexes trusty
services. The first vsock packet contains the tipc port name. To enable
this mode, pass "VSOCK:<cid>:<port>" as the device name string (where
<cid> and <port> is replaced with the cid and port numbers you want to
connect to).
Test: manual - ran storageproxyd and storage test with new option
Bug: 298705967
Change-Id: I9b75244ca38b7eb69ed7fc19b27aa309d0f7ed13
To ensure stable loading of parallel modules, switch to an ordered map structure. This will prevent potential dependency issues and conflicts.
Bug: 314213605
Change-Id: I8e00678e18417550b3be0c4228e4908a830e648c
Signed-off-by: Chungkai Mei <chungkai@google.com>
The best time to attach a BPF filter to a socket is before a socket
starts receiving data. Netlink sockets start receiving data after bind()
has been called. uevent_open_socket() calls socket() and bind(). Hence
split uevent_open_socket() into two functions: one function that calls
socket() and another function that calls bind().
Bug: 203462310
Change-Id: Ia41dee4683358cf9fbb6288fad863cd4f4ac9924
Signed-off-by: Bart Van Assche <bvanassche@google.com>