Lines Matching refs:dex_path

1151 static bool validate_dex_path_size(const std::string& dex_path) {  in validate_dex_path_size()  argument
1152 if (dex_path.size() >= (PKG_PATH_MAX - 8)) { in validate_dex_path_size()
1153 LOG(ERROR) << "dex_path too long: " << dex_path; in validate_dex_path_size()
1363 const std::string& dex_path, const char* profile_name, bool profile_guided, in maybe_open_reference_profile() argument
1386 location = dex_path; in maybe_open_reference_profile()
1638 static bool prepare_secondary_dex_oat_dir(const std::string& dex_path, int uid, in prepare_secondary_dex_oat_dir() argument
1640 unsigned long dirIndex = dex_path.rfind('/'); in prepare_secondary_dex_oat_dir()
1642 LOG(ERROR ) << "Unexpected dir structure for secondary dex " << dex_path; in prepare_secondary_dex_oat_dir()
1645 std::string dex_dir = dex_path.substr(0, dirIndex); in prepare_secondary_dex_oat_dir()
1650 LOG(ERROR) << "Could not prepare oat dir for secondary dex: " << dex_path; in prepare_secondary_dex_oat_dir()
1658 LOG(ERROR) << "Could not prepare oat/isa dir for secondary dex: " << dex_path; in prepare_secondary_dex_oat_dir()
1686 static bool process_secondary_dexoptanalyzer_result(const std::string& dex_path, int result, in process_secondary_dexoptanalyzer_result() argument
1706 dex_path.c_str(), in process_secondary_dexoptanalyzer_result()
1736 dex_path.c_str(), in process_secondary_dexoptanalyzer_result()
1748 static SecondaryDexAccess check_secondary_dex_access(const std::string& dex_path) { in check_secondary_dex_access() argument
1750 if (access(dex_path.c_str(), R_OK) == 0) { in check_secondary_dex_access()
1754 LOG(INFO) << "Secondary dex does not exist: " << dex_path; in check_secondary_dex_access()
1757 PLOG(ERROR) << "Could not access secondary dex " << dex_path; in check_secondary_dex_access()
1775 static bool create_secondary_dex_oat_layout(const std::string& dex_path, const std::string& isa, in create_secondary_dex_oat_layout() argument
1777 size_t dirIndex = dex_path.rfind('/'); in create_secondary_dex_oat_layout()
1779 *error_msg = std::string("Unexpected dir structure for dex file ").append(dex_path); in create_secondary_dex_oat_layout()
1785 std::string apk_dir = dex_path.substr(0, dirIndex); in create_secondary_dex_oat_layout()
1789 if (!create_oat_out_path(dex_path.c_str(), isa.c_str(), out_oat_dir, in create_secondary_dex_oat_layout()
1791 *error_msg = std::string("Could not create oat path for secondary dex ").append(dex_path); in create_secondary_dex_oat_layout()
1824 static bool process_secondary_dex_dexopt(const std::string& dex_path, const char* pkgname, in process_secondary_dex_dexopt() argument
1829 LOG(DEBUG) << "Processing secondary dex path " << dex_path; in process_secondary_dex_dexopt()
1840 dex_path, instruction_set, oat_dir, oat_isa_dir, oat_path, error_msg)) { in process_secondary_dex_dexopt()
1852 if (!validate_secondary_dex_path(pkgname, dex_path, volume_uuid, uid, storage_flag)) { in process_secondary_dex_dexopt()
1853 LOG(ERROR) << "Could not validate secondary dex path " << dex_path; in process_secondary_dex_dexopt()
1859 zip_fd.reset(open(dex_path.c_str(), O_RDONLY)); in process_secondary_dex_dexopt()
1869 if (!prepare_secondary_dex_oat_dir(dex_path, uid, instruction_set)) { in process_secondary_dex_dexopt()
1876 if (!maybe_open_oat_and_vdex_file(dex_path, in process_secondary_dex_dexopt()
1886 bool profile_was_updated = analyze_profiles(uid, pkgname, dex_path, in process_secondary_dex_dexopt()
1890 exec_dexoptanalyzer(dex_path, in process_secondary_dex_dexopt()
1906 dex_path.c_str(), in process_secondary_dex_dexopt()
1913 bool success = process_secondary_dexoptanalyzer_result(dex_path, in process_secondary_dex_dexopt()
1921 LOG(DEBUG) << "Processed secondary dex file " << dex_path << " result=" << result; in process_secondary_dex_dexopt()
1935 *is_public_out = ((dexopt_flags & DEXOPT_PUBLIC) != 0) && is_file_public(dex_path); in process_secondary_dex_dexopt()
1940 static std::string format_dexopt_error(int status, const char* dex_path) { in format_dexopt_error() argument
1945 return StringPrintf("Dex2oat invocation for %s failed: %s", dex_path, code_name); in format_dexopt_error()
1948 return StringPrintf("Dex2oat invocation for %s failed with 0x%04x", dex_path, status); in format_dexopt_error()
1951 int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* instruction_set, in dexopt() argument
1962 if (!validate_dex_path_size(dex_path)) { in dexopt()
1963 *error_msg = StringPrintf("Failed to validate %s", dex_path); in dexopt()
1987 if (process_secondary_dex_dexopt(dex_path, pkgname, dexopt_flags, volume_uuid, uid, in dexopt()
2008 unique_fd input_fd(open(dex_path, O_RDONLY, 0)); in dexopt()
2010 *error_msg = StringPrintf("installd cannot open '%s' for input during dexopt", dex_path); in dexopt()
2017 Dex2oatFileWrapper out_oat_fd = open_oat_out_file(dex_path, oat_dir, is_public, uid, in dexopt()
2027 if (!open_vdex_files_for_dex2oat(dex_path, out_oat_path, dexopt_needed, instruction_set, in dexopt()
2056 pkgname, dex_path, profile_name, profile_guided, is_public, uid, is_secondary_dex); in dexopt()
2066 LOG(VERBOSE) << "DexInv: --- BEGIN '" << dex_path << "' ---"; in dexopt()
2084 dex_path, in dexopt()
2102 LOG(VERBOSE) << "DexInv: --- END '" << dex_path << "' (success) ---"; in dexopt()
2104 LOG(VERBOSE) << "DexInv: --- END '" << dex_path << "' --- status=0x" in dexopt()
2106 *error_msg = format_dexopt_error(res, dex_path); in dexopt()
2111 update_out_oat_access_times(dex_path, out_oat_path); in dexopt()
2165 bool reconcile_secondary_dex_file(const std::string& dex_path, in reconcile_secondary_dex_file() argument
2189 if (!validate_secondary_dex_path(pkgname.c_str(), dex_path.c_str(), volume_uuid_cstr, in reconcile_secondary_dex_file()
2191 LOG(ERROR) << "Could not validate secondary dex path " << dex_path; in reconcile_secondary_dex_file()
2195 SecondaryDexAccess access_check = check_secondary_dex_access(dex_path); in reconcile_secondary_dex_file()
2216 dex_path,isas[i], oat_dir, oat_isa_dir, oat_path, &error_msg)) { in reconcile_secondary_dex_file()
2228 multiuser_get_user_id(uid), pkgname, dex_path, /*is_secondary*/true); in reconcile_secondary_dex_file()
2230 pkgname, dex_path, /*is_secondary*/true); in reconcile_secondary_dex_file()
2236 std::string old_current_profile = dex_path + ".prof"; in reconcile_secondary_dex_file()
2244 PLOG(ERROR) << "Failed to clean secondary dex artifacts for location " << dex_path; in reconcile_secondary_dex_file()
2251 LOG(WARNING) << "reconcile dex failed for location " << dex_path << ": " << return_code; in reconcile_secondary_dex_file()
2256 LOG(DEBUG) << "Reconcile secondary dex path " << dex_path << " result=" << return_code; in reconcile_secondary_dex_file()
2288 bool hash_secondary_dex_file(const std::string& dex_path, const std::string& pkgname, int uid, in hash_secondary_dex_file() argument
2316 if (!validate_secondary_dex_path(pkgname, dex_path, volume_uuid_cstr, uid, storage_flag)) { in hash_secondary_dex_file()
2317 LOG(ERROR) << "Could not validate secondary dex path " << dex_path; in hash_secondary_dex_file()
2321 unique_fd fd(TEMP_FAILURE_RETRY(open(dex_path.c_str(), O_RDONLY | O_CLOEXEC | O_NOFOLLOW))); in hash_secondary_dex_file()
2327 PLOG(ERROR) << "Failed to open secondary dex " << dex_path; in hash_secondary_dex_file()
2340 PLOG(ERROR) << "Failed to read secondary dex " << dex_path; in hash_secondary_dex_file()