update_engine: Enterprise channel downgrade
Powerwash and roll back when an enrolled user downgrades the channel:
- If the admin downgrades channel, check for ChannelDowngradebehavior
policy.
- If the user downgrades the channel, powerwash based on given boolean.
Add the "rollback" flag to the powerwash file to try to preserve some
data.
Note that this change is not affecting users yet: The
ChannelDowngradeBehavior policy is not available in DPanel and the UI
does not support chosing powerwash on channel downgrade for enrolled
users.
BUG=chromium:1122531
TEST=FEATURES=test emerge-amd64-generic update_engine
TEST=Set policy with YAPS and test on device
Change-Id: I2f02a6e752eed083b57484766f8e7ecc2eed7aca
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2397890
Tested-by: Miriam Polzer <mpolzer@google.com>
Commit-Queue: Miriam Polzer <mpolzer@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 59aa004..b1719e2 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -533,6 +533,7 @@
"update_boot_flags_action_unittest.cc",
"update_manager/boxed_value_unittest.cc",
"update_manager/chromeos_policy_unittest.cc",
+ "update_manager/enterprise_device_policy_impl_unittest.cc",
"update_manager/evaluation_context_unittest.cc",
"update_manager/generic_variables_unittest.cc",
"update_manager/prng_unittest.cc",