From 570f0585b9fc22907807b8a0d879cc8bea26643e Mon Sep 17 00:00:00 2001 From: Tianjie Date: Tue, 5 Oct 2021 22:17:22 -0700 Subject: [PATCH] Create the checkin subdirectory under misc_ce We need some storage on the device to backup the token for checkin services. So users won't lose the checkin tokens when they clear the app's storage. If the device accidentally loses the token without backup, it won't be able to checkin again until factory reset. Because we want the token to be user specific, put it under misc_ce and let vold create the sub-directory. Bug: 197636740 Test: boot device, check selinux label of the dir Change-Id: I0e19dcb7f4feb98fd9d1013cfd84b56ff1325373 --- vold_prepare_subdirs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/vold_prepare_subdirs.cpp b/vold_prepare_subdirs.cpp index e2afb81..ad4fa99 100644 --- a/vold_prepare_subdirs.cpp +++ b/vold_prepare_subdirs.cpp @@ -208,6 +208,7 @@ static bool prepare_subdirs(const std::string& volume_uuid, int user_id, int fla 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; + if (!prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/checkin")) return false; // TODO: Return false if this returns false once sure this should succeed. prepare_dir(sehandle, 0700, 0, 0, misc_ce_path + "/apexrollback");