Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb.""

This reverts commit 997a2d93d7.

Reason for revert: This revert is needed, just also need some selinux rules for changes to the script that runs if this folder is present.

Bug: 136199978
Change-Id: Ie0544954965e3c90abc2f833c41949976c3bea65
(cherry picked from commit 35708b9d7b)
This commit is contained in:
Daniel Rosenberg 2019-07-12 23:43:56 +00:00 committed by android-build-team Robot
parent 2d8a30db31
commit d7d475d470
2 changed files with 2 additions and 8 deletions

View File

@ -589,6 +589,7 @@ on post-fs-data
symlink /data/data /data/user/0
mkdir /data/media 0770 media_rw media_rw
mkdir /data/media/obb 0770 media_rw media_rw
mkdir /data/cache 0770 system cache
mkdir /data/cache/recovery 0770 system cache

View File

@ -214,14 +214,7 @@ static void run_sdcardfs(const std::string& source_path, const std::string& labe
if (multi_user) {
std::string obb_path = source_path + "/obb";
// Only attempt to prepare the /obb dir if it already exists. We want
// the legacy obb path "/data/media/obb" to be fixed up so that we can
// migrate it to its new location, but we don't want the directory to be
// created if it doesn't already exist.
struct stat sb;
if (TEMP_FAILURE_RETRY(lstat(obb_path.c_str(), &sb)) == 0) {
fs_prepare_dir(obb_path.c_str(), 0775, uid, gid);
}
fs_prepare_dir(obb_path.c_str(), 0775, uid, gid);
}
exit(0);