From a232fd7fc88a95c6997672debf72f953acb8c580 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Mon, 14 Jan 2019 10:03:07 +0000 Subject: [PATCH] vold_prepare_subdirs: prepare /data/misc_[ce|de]/rollback. These directories are managed by installd and used to store snapshots of application data directories in order to roll them back in the case of bad updates. Bug: 112431924 Test: make, device boot & manual verification. Change-Id: Ieaca697a45d013937327e0f16f36b9b1eaad6b22 --- vold_prepare_subdirs.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vold_prepare_subdirs.cpp b/vold_prepare_subdirs.cpp index 8c3df30..e7264ab 100644 --- a/vold_prepare_subdirs.cpp +++ b/vold_prepare_subdirs.cpp @@ -128,6 +128,7 @@ static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int fla auto misc_de_path = android::vold::BuildDataMiscDePath(user_id); if (!prepare_dir(sehandle, 0700, 0, 0, misc_de_path + "/vold")) return false; if (!prepare_dir(sehandle, 0700, 0, 0, misc_de_path + "/storaged")) return false; + if (!prepare_dir(sehandle, 0700, 0, 0, misc_de_path + "/rollback")) return false; auto vendor_de_path = android::vold::BuildDataVendorDePath(user_id); if (!prepare_dir(sehandle, 0700, AID_SYSTEM, AID_SYSTEM, vendor_de_path + "/fpdata")) { @@ -138,6 +139,7 @@ static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int fla auto misc_ce_path = android::vold::BuildDataMiscCePath(user_id); if (!prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/vold")) return false; if (!prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/storaged")) return false; + if (!prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/rollback")) return false; } } return true;