Loading cmds/installd/globals.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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); Loading cmds/installd/globals.h +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ extern std::string android_media_dir; extern std::string android_mnt_expand_dir; extern std::string android_profiles_dir; extern std::string android_root_dir; extern std::string android_staging_dir; extern std::vector<std::string> android_system_dirs; Loading cmds/installd/utils.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -928,6 +928,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) { Loading Loading
cmds/installd/globals.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading Loading @@ -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); Loading
cmds/installd/globals.h +1 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ extern std::string android_media_dir; extern std::string android_mnt_expand_dir; extern std::string android_profiles_dir; extern std::string android_root_dir; extern std::string android_staging_dir; extern std::vector<std::string> android_system_dirs; Loading
cmds/installd/utils.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -928,6 +928,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) { Loading