From 891a0113941136544509886c1638d973a6c9773c Mon Sep 17 00:00:00 2001 From: Gerry Fan Date: Thu, 11 Jul 2019 20:44:58 +0000 Subject: Revert "rootdir / sdcard : Stop creating /data/media/obb." This reverts commit c6ca823710d49754c3717e9cf3ba11b9c2648825. Reason for revert: Q-GSI on Pie devices would crash kernel. Bug: 136199978 Change-Id: I16a2cb81a1f21627db0cb00324679a322ba42fe0 --- rootdir/init.rc | 1 + sdcard/sdcard.cpp | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 260199794..1b7367c46 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -586,6 +586,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 diff --git a/sdcard/sdcard.cpp b/sdcard/sdcard.cpp index 0acea7266..2b358197a 100644 --- a/sdcard/sdcard.cpp +++ b/sdcard/sdcard.cpp @@ -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); -- cgit v1.2.3 From 997a2d93d7a9216c248be9c983adec2d91283f5a Mon Sep 17 00:00:00 2001 From: Gerry Fan Date: Fri, 12 Jul 2019 15:07:59 +0000 Subject: Revert "Revert "rootdir / sdcard : Stop creating /data/media/obb."" This reverts commit 891a0113941136544509886c1638d973a6c9773c. Reason for revert: Some Test failed, need more investigation Bug: 136199978 Change-Id: Ibad0dad02a6701447c39ddcc805d44c9e68bdcce --- rootdir/init.rc | 1 - sdcard/sdcard.cpp | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 1b7367c46..260199794 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -586,7 +586,6 @@ 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 diff --git a/sdcard/sdcard.cpp b/sdcard/sdcard.cpp index 2b358197a..0acea7266 100644 --- a/sdcard/sdcard.cpp +++ b/sdcard/sdcard.cpp @@ -214,7 +214,14 @@ static void run_sdcardfs(const std::string& source_path, const std::string& labe if (multi_user) { std::string obb_path = source_path + "/obb"; - fs_prepare_dir(obb_path.c_str(), 0775, uid, gid); + // 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); + } } exit(0); -- cgit v1.2.3 From 35708b9d7bcae0f9183de2848d782b2d0c54bcb6 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Fri, 12 Jul 2019 23:43:56 +0000 Subject: Reland "Revert "rootdir / sdcard : Stop creating /data/media/obb."" This reverts commit 997a2d93d7a9216c248be9c983adec2d91283f5a. 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 --- rootdir/init.rc | 1 + sdcard/sdcard.cpp | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index 260199794..1b7367c46 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -586,6 +586,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 diff --git a/sdcard/sdcard.cpp b/sdcard/sdcard.cpp index 0acea7266..2b358197a 100644 --- a/sdcard/sdcard.cpp +++ b/sdcard/sdcard.cpp @@ -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); -- cgit v1.2.3 From 48515dcfcbd5d4c0359c3f054de25dbff32cdfb8 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Tue, 23 Jul 2019 17:06:52 -0700 Subject: VtsKernelMemInfoTest: only enforce on Q+ launching devices Bug: 135553509 Test: VtsKernelMemInfoTest Change-Id: I299d24623c363238e46229f8d09865e3afd6f9c0 Merged-In: I299d24623c363238e46229f8d09865e3afd6f9c0 (cherry picked from commit ad986341a44de776f3b0f1e140eb359754c45284) --- libmeminfo/vts/AndroidTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/libmeminfo/vts/AndroidTest.xml b/libmeminfo/vts/AndroidTest.xml index 530d16ef0..9614025ae 100644 --- a/libmeminfo/vts/AndroidTest.xml +++ b/libmeminfo/vts/AndroidTest.xml @@ -24,6 +24,7 @@