diff options
author | 2019-02-19 12:19:48 +0000 | |
---|---|---|
committer | 2019-02-20 14:52:30 +0000 | |
commit | b43faa9d8f1428a3fb2ee190dbd19074320ed1fe (patch) | |
tree | 69d628b669f9158b98614ce8b55d772095ca4409 /cmds/installd/globals.cpp | |
parent | cf867594cf11c27855578d9554658f3fbee4e32f (diff) |
Whitelist the staging directory in installd
Make the path /data/pkg_staging a valid path for APK and APEX files, inorder
to allow the deletion of APEX files after their corresponding sessions
reach a final state.
Bug: 123624108
Test: manual - trigger APEX deletion from the mentioned directory
Change-Id: I9bf03c924080e8c75a6c0e9d163460d365061487
Diffstat (limited to 'cmds/installd/globals.cpp')
-rw-r--r-- | cmds/installd/globals.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmds/installd/globals.cpp b/cmds/installd/globals.cpp index b3a6dafa9a..f52c2e778b 100644 --- a/cmds/installd/globals.cpp +++ b/cmds/installd/globals.cpp @@ -44,6 +44,8 @@ static constexpr const char* PROFILES_SUBDIR = "misc/profiles"; // sub-directory static constexpr const char* PRIVATE_APP_SUBDIR = "app-private/"; // sub-directory under // ANDROID_DATA +static constexpr const char* STAGING_SUBDIR = "pkg_staging/"; // sub-directory under ANDROID_DATA + std::string android_app_dir; std::string android_app_ephemeral_dir; std::string android_app_lib_dir; @@ -54,6 +56,7 @@ std::string android_media_dir; std::string android_mnt_expand_dir; std::string android_profiles_dir; std::string android_root_dir; +std::string android_staging_dir; std::vector<std::string> android_system_dirs; @@ -110,6 +113,9 @@ bool init_globals_from_data_and_root(const char* data, const char* root) { // Get the android profiles directory. android_profiles_dir = android_data_dir + PROFILES_SUBDIR; + // Get the android session staging directory. + android_staging_dir = android_data_dir + STAGING_SUBDIR; + // Take note of the system and vendor directories. android_system_dirs.clear(); android_system_dirs.push_back(android_root_dir + APP_SUBDIR); |