Home
last modified time | relevance | path

Searched refs:dex_path (Results 1 – 7 of 7) sorted by relevance

/frameworks/native/cmds/installd/
Ddexopt.cpp990 static bool validate_dex_path_size(const std::string& dex_path) { in validate_dex_path_size() argument
991 if (dex_path.size() >= (PKG_PATH_MAX - 8)) { in validate_dex_path_size()
992 LOG(ERROR) << "dex_path too long: " << dex_path; in validate_dex_path_size()
1084 const std::string& dex_path, const char* profile_name, bool profile_guided, in maybe_open_reference_profile() argument
1107 location = dex_path; in maybe_open_reference_profile()
1342 static bool prepare_secondary_dex_oat_dir(const std::string& dex_path, int uid, in prepare_secondary_dex_oat_dir() argument
1344 unsigned long dirIndex = dex_path.rfind('/'); in prepare_secondary_dex_oat_dir()
1346 LOG(ERROR ) << "Unexpected dir structure for secondary dex " << dex_path; in prepare_secondary_dex_oat_dir()
1349 std::string dex_dir = dex_path.substr(0, dirIndex); in prepare_secondary_dex_oat_dir()
1354 LOG(ERROR) << "Could not prepare oat dir for secondary dex: " << dex_path; in prepare_secondary_dex_oat_dir()
[all …]
Ddexopt.h113 bool reconcile_secondary_dex_file(const std::string& dex_path,
118 bool hash_secondary_dex_file(const std::string& dex_path,
160 UniqueFile maybe_open_reference_profile(const std::string& pkgname, const std::string& dex_path,
Dutils.cpp338 static bool get_secondary_dex_location(const std::string& dex_path, in get_secondary_dex_location() argument
340 size_t dirIndex = dex_path.rfind('/'); in get_secondary_dex_location()
344 if (dirIndex == dex_path.size() - 1) { in get_secondary_dex_location()
347 *out_dir_name = dex_path.substr(0, dirIndex); in get_secondary_dex_location()
348 *out_file_name = dex_path.substr(dirIndex + 1); in get_secondary_dex_location()
1086 bool validate_secondary_dex_path(const std::string& pkgname, const std::string& dex_path, in validate_secondary_dex_path() argument
1091 if (dex_path.empty()) { return false; } in validate_secondary_dex_path()
1093 if (dex_path[0] != '/') { return false; } in validate_secondary_dex_path()
1095 if (dex_path[dex_path.size() - 1] == '/') { return false; } in validate_secondary_dex_path()
1097 if (dex_path.find("/.") != std::string::npos) { return false; } in validate_secondary_dex_path()
[all …]
Dutils.h160 bool validate_secondary_dex_path(const std::string& pkgname, const std::string& dex_path,
DInstalldNativeService.cpp2301 char dex_path[PKG_PATH_MAX]; in rmdex() local
2310 if (!create_cache_path(dex_path, path, instruction_set)) { in rmdex()
2314 ALOGV("unlink %s\n", dex_path); in rmdex()
2315 if (unlink(dex_path) < 0) { in rmdex()
2319 return error(StringPrintf("Failed to unlink %s", dex_path)); in rmdex()
/frameworks/native/cmds/installd/tests/
Dinstalld_utils_test.cpp438 const std::string& dex_path, int uid, int storage_flag) { in pass_secondary_dex_validation() argument
439 EXPECT_TRUE(validate_secondary_dex_path(package_name, dex_path, /*volume_uuid*/ nullptr, uid, in pass_secondary_dex_validation()
441 << dex_path << " should be allowed as a valid secondary dex path"; in pass_secondary_dex_validation()
445 const std::string& dex_path, int uid, int storage_flag) { in fail_secondary_dex_validation() argument
446 EXPECT_FALSE(validate_secondary_dex_path(package_name, dex_path, /*volume_uuid*/ nullptr, uid, in fail_secondary_dex_validation()
448 << dex_path << " should not be allowed as a valid secondary dex path"; in fail_secondary_dex_validation()
Dinstalld_dexopt_test.cpp600 const std::string& dex_path, in GetPrimaryDexArtifact() argument
603 std::string path = dex_path; in GetPrimaryDexArtifact()
612 std::string::size_type name_end = dex_path.rfind('.'); in GetPrimaryDexArtifact()
613 std::string::size_type name_start = dex_path.rfind('/'); in GetPrimaryDexArtifact()
615 dex_path.substr(name_start + 1, name_end - name_start) + type; in GetPrimaryDexArtifact()