• Home
  • Raw
  • Download

Lines Matching refs:dex_path

1103 static bool validate_dex_path_size(const std::string& dex_path) {  in validate_dex_path_size()  argument
1104 if (dex_path.size() >= (PKG_PATH_MAX - 8)) { in validate_dex_path_size()
1105 LOG(ERROR) << "dex_path too long: " << dex_path; in validate_dex_path_size()
1313 const std::string& dex_path, const char* profile_name, bool profile_guided, in maybe_open_reference_profile() argument
1336 location = dex_path; in maybe_open_reference_profile()
1600 static bool prepare_secondary_dex_oat_dir(const std::string& dex_path, int uid, in prepare_secondary_dex_oat_dir() argument
1602 unsigned long dirIndex = dex_path.rfind('/'); in prepare_secondary_dex_oat_dir()
1604 LOG(ERROR ) << "Unexpected dir structure for secondary dex " << dex_path; in prepare_secondary_dex_oat_dir()
1607 std::string dex_dir = dex_path.substr(0, dirIndex); in prepare_secondary_dex_oat_dir()
1612 LOG(ERROR) << "Could not prepare oat dir for secondary dex: " << dex_path; in prepare_secondary_dex_oat_dir()
1620 LOG(ERROR) << "Could not prepare oat/isa dir for secondary dex: " << dex_path; in prepare_secondary_dex_oat_dir()
1648 static bool process_secondary_dexoptanalyzer_result(const std::string& dex_path, int result, in process_secondary_dexoptanalyzer_result() argument
1665 dex_path.c_str(), in process_secondary_dexoptanalyzer_result()
1695 dex_path.c_str(), in process_secondary_dexoptanalyzer_result()
1707 static SecondaryDexAccess check_secondary_dex_access(const std::string& dex_path) { in check_secondary_dex_access() argument
1709 if (access(dex_path.c_str(), R_OK) == 0) { in check_secondary_dex_access()
1713 LOG(INFO) << "Secondary dex does not exist: " << dex_path; in check_secondary_dex_access()
1716 PLOG(ERROR) << "Could not access secondary dex " << dex_path; in check_secondary_dex_access()
1734 static bool create_secondary_dex_oat_layout(const std::string& dex_path, const std::string& isa, in create_secondary_dex_oat_layout() argument
1736 size_t dirIndex = dex_path.rfind('/'); in create_secondary_dex_oat_layout()
1738 *error_msg = std::string("Unexpected dir structure for dex file ").append(dex_path); in create_secondary_dex_oat_layout()
1744 std::string apk_dir = dex_path.substr(0, dirIndex); in create_secondary_dex_oat_layout()
1748 if (!create_oat_out_path(dex_path.c_str(), isa.c_str(), out_oat_dir, in create_secondary_dex_oat_layout()
1750 *error_msg = std::string("Could not create oat path for secondary dex ").append(dex_path); in create_secondary_dex_oat_layout()
1836 for (const std::string& dex_path : dex_paths) { in open_dex_paths() local
1837 zip_fds->emplace_back(open(dex_path.c_str(), O_RDONLY)); in open_dex_paths()
1840 "installd cannot open '%s' for input during dexopt", dex_path.c_str()); in open_dex_paths()
1872 static bool process_secondary_dex_dexopt(const std::string& dex_path, const char* pkgname, in process_secondary_dex_dexopt() argument
1877 LOG(DEBUG) << "Processing secondary dex path " << dex_path; in process_secondary_dex_dexopt()
1888 dex_path, instruction_set, oat_dir, oat_isa_dir, oat_path, error_msg)) { in process_secondary_dex_dexopt()
1900 if (!validate_secondary_dex_path(pkgname, dex_path, volume_uuid, uid, storage_flag)) { in process_secondary_dex_dexopt()
1901 LOG(ERROR) << "Could not validate secondary dex path " << dex_path; in process_secondary_dex_dexopt()
1907 zip_fd.reset(open(dex_path.c_str(), O_RDONLY)); in process_secondary_dex_dexopt()
1924 if (!prepare_secondary_dex_oat_dir(dex_path, uid, instruction_set)) { in process_secondary_dex_dexopt()
1931 if (!maybe_open_oat_and_vdex_file(dex_path, in process_secondary_dex_dexopt()
1941 bool profile_was_updated = analyze_profiles(uid, pkgname, dex_path, in process_secondary_dex_dexopt()
1947 RunDexoptAnalyzer run_dexopt_analyzer(dex_path, in process_secondary_dex_dexopt()
1963 dex_path.c_str(), in process_secondary_dex_dexopt()
1970 bool success = process_secondary_dexoptanalyzer_result(dex_path, in process_secondary_dex_dexopt()
1978 LOG(DEBUG) << "Processed secondary dex file " << dex_path << " result=" << result; in process_secondary_dex_dexopt()
1992 *is_public_out = ((dexopt_flags & DEXOPT_PUBLIC) != 0) && is_file_public(dex_path); in process_secondary_dex_dexopt()
1997 static std::string format_dexopt_error(int status, const char* dex_path) { in format_dexopt_error() argument
2002 return StringPrintf("Dex2oat invocation for %s failed: %s", dex_path, code_name); in format_dexopt_error()
2005 return StringPrintf("Dex2oat invocation for %s failed with 0x%04x", dex_path, status); in format_dexopt_error()
2008 int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* instruction_set, in dexopt() argument
2019 if (!validate_dex_path_size(dex_path)) { in dexopt()
2020 *error_msg = StringPrintf("Failed to validate %s", dex_path); in dexopt()
2050 if (process_secondary_dex_dexopt(dex_path, pkgname, dexopt_flags, volume_uuid, uid, in dexopt()
2071 unique_fd input_fd(open(dex_path, O_RDONLY, 0)); in dexopt()
2073 *error_msg = StringPrintf("installd cannot open '%s' for input during dexopt", dex_path); in dexopt()
2087 Dex2oatFileWrapper out_oat_fd = open_oat_out_file(dex_path, oat_dir, is_public, uid, in dexopt()
2097 if (!open_vdex_files_for_dex2oat(dex_path, out_oat_path, dexopt_needed, instruction_set, in dexopt()
2126 pkgname, dex_path, profile_name, profile_guided, is_public, uid, is_secondary_dex); in dexopt()
2136 LOG(VERBOSE) << "DexInv: --- BEGIN '" << dex_path << "' ---"; in dexopt()
2143 dex_path, in dexopt()
2175 LOG(VERBOSE) << "DexInv: --- END '" << dex_path << "' (success) ---"; in dexopt()
2177 LOG(VERBOSE) << "DexInv: --- END '" << dex_path << "' --- status=0x" in dexopt()
2179 *error_msg = format_dexopt_error(res, dex_path); in dexopt()
2184 update_out_oat_access_times(dex_path, out_oat_path); in dexopt()
2238 bool reconcile_secondary_dex_file(const std::string& dex_path, in reconcile_secondary_dex_file() argument
2262 if (!validate_secondary_dex_path(pkgname, dex_path, volume_uuid_cstr, in reconcile_secondary_dex_file()
2264 LOG(ERROR) << "Could not validate secondary dex path " << dex_path; in reconcile_secondary_dex_file()
2268 SecondaryDexAccess access_check = check_secondary_dex_access(dex_path); in reconcile_secondary_dex_file()
2289 dex_path,isas[i], oat_dir, oat_isa_dir, oat_path, &error_msg)) { in reconcile_secondary_dex_file()
2301 multiuser_get_user_id(uid), pkgname, dex_path, /*is_secondary*/true); in reconcile_secondary_dex_file()
2303 pkgname, dex_path, /*is_secondary*/true); in reconcile_secondary_dex_file()
2309 std::string old_current_profile = dex_path + ".prof"; in reconcile_secondary_dex_file()
2317 PLOG(ERROR) << "Failed to clean secondary dex artifacts for location " << dex_path; in reconcile_secondary_dex_file()
2324 LOG(WARNING) << "reconcile dex failed for location " << dex_path << ": " << return_code; in reconcile_secondary_dex_file()
2329 LOG(DEBUG) << "Reconcile secondary dex path " << dex_path << " result=" << return_code; in reconcile_secondary_dex_file()
2361 bool hash_secondary_dex_file(const std::string& dex_path, const std::string& pkgname, int uid, in hash_secondary_dex_file() argument
2389 if (!validate_secondary_dex_path(pkgname, dex_path, volume_uuid_cstr, uid, storage_flag)) { in hash_secondary_dex_file()
2390 LOG(ERROR) << "Could not validate secondary dex path " << dex_path; in hash_secondary_dex_file()
2394 unique_fd fd(TEMP_FAILURE_RETRY(open(dex_path.c_str(), O_RDONLY | O_CLOEXEC | O_NOFOLLOW))); in hash_secondary_dex_file()
2400 PLOG(ERROR) << "Failed to open secondary dex " << dex_path; in hash_secondary_dex_file()
2413 PLOG(ERROR) << "Failed to read secondary dex " << dex_path; in hash_secondary_dex_file()