From 561670501b9f5f3cf3b5a8fc5df6b91bb59df6aa Mon Sep 17 00:00:00 2001 From: Zheng Yongjun Date: Thu, 3 Mar 2022 21:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E5=86=99/data/bundle=20=E8=83=BD?= =?UTF-8?q?=E8=A2=AB=E7=9C=8B=E5=88=B0=E7=9A=84app=E7=9A=84=E8=8C=83?= =?UTF-8?q?=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zheng Yongjun --- src/appspawn_server.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) mode change 100644 => 100755 src/appspawn_server.cpp diff --git a/src/appspawn_server.cpp b/src/appspawn_server.cpp old mode 100644 new mode 100755 index df76ef36..2a6d0373 --- a/src/appspawn_server.cpp +++ b/src/appspawn_server.cpp @@ -649,14 +649,16 @@ int32_t AppSpawnServer::DoAppSandboxMountCustomized(const ClientSocket::AppPrope std::string currentUserId = std::to_string(appProperty->uid / UID_BASE); std::string destInstallPath = rootPath + "/data/storage/el1/bundle"; - // account_0/applications/ dir can still access other packages' data now for compatibility purpose - std::string oriapplicationsPath = "/data/app/el1/bundle/public/"; - std::string destapplicationsPath = rootPath + "/data/accounts/account_0/applications/"; - DoAppSandboxMountOnce(oriapplicationsPath.c_str(), destapplicationsPath.c_str()); - - // need permission check for system app here - std::string destbundlesPath = rootPath + "/data/bundles/"; - DoAppSandboxMountOnce(oriapplicationsPath.c_str(), destbundlesPath.c_str()); + if (bundleName.find("launcher") != std::string::npos || bundleName.find("systemui") != std::string::npos) { + // account_0/applications/ dir can still access other packages' data now for compatibility purpose + std::string oriapplicationsPath = "/data/app/el1/bundle/public/"; + std::string destapplicationsPath = rootPath + "/data/accounts/account_0/applications/"; + DoAppSandboxMountOnce(oriapplicationsPath.c_str(), destapplicationsPath.c_str()); + + // need permission check for system app here + std::string destbundlesPath = rootPath + "/data/bundles/"; + DoAppSandboxMountOnce(oriapplicationsPath.c_str(), destbundlesPath.c_str()); + } // Add distributedfile module support, later reconstruct it std::string oriDistributedPath = "/mnt/hmdfs/" + currentUserId + "/account/merge_view/data/" + bundleName; -- Gitee