From b43faa9d8f1428a3fb2ee190dbd19074320ed1fe Mon Sep 17 00:00:00 2001 From: shafik Date: Tue, 19 Feb 2019 12:19:48 +0000 Subject: 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 --- cmds/installd/utils.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmds/installd/utils.cpp') diff --git a/cmds/installd/utils.cpp b/cmds/installd/utils.cpp index 5b487bb515..f2452725e3 100644 --- a/cmds/installd/utils.cpp +++ b/cmds/installd/utils.cpp @@ -892,6 +892,8 @@ bool validate_secondary_dex_path(const std::string& pkgname, const std::string& static int validate_apk_path_internal(const std::string& path, int maxSubdirs) { if (validate_path(android_app_dir, path, maxSubdirs) == 0) { return 0; + } else if (validate_path(android_staging_dir, path, maxSubdirs) == 0) { + return 0; } else if (validate_path(android_app_private_dir, path, maxSubdirs) == 0) { return 0; } else if (validate_path(android_app_ephemeral_dir, path, maxSubdirs) == 0) { -- cgit v1.2.3-59-g8ed1b