Home | History | Annotate | Download | only in installd

Lines Matching refs:dex_path

1002 static bool validate_dex_path_size(const std::string& dex_path) {
1003 if (dex_path.size() >= (PKG_PATH_MAX - 8)) {
1004 LOG(ERROR) << "dex_path too long: " << dex_path;
1219 const std::string& dex_path, bool profile_guided, bool is_public, int uid,
1228 const std::string location = is_secondary_dex ? dex_path : pkgname;
1412 static bool prepare_secondary_dex_oat_dir(const std::string& dex_path, int uid,
1414 unsigned long dirIndex = dex_path.rfind('/');
1416 LOG(ERROR ) << "Unexpected dir structure for secondary dex " << dex_path;
1419 std::string dex_dir = dex_path.substr(0, dirIndex);
1424 LOG(ERROR) << "Could not prepare oat dir for secondary dex: " << dex_path;
1434 LOG(ERROR) << "Could not prepare oat/isa dir for secondary dex: " << dex_path;
1446 static bool process_dexoptanalyzer_result(const std::string& dex_path, int result,
1464 << " Expected odex file status for secondary dex " << dex_path
1468 LOG(ERROR) << "Unexpected result for dexoptanalyzer " << dex_path
1474 // Processes the dex_path as a secondary dex files and return true if the path dex file should
1514 const std::string& dex_path = *dex_path_out;
1515 if (!validate_dex_path_size(dex_path)) {
1518 if (!validate_secondary_dex_path(pkgname, dex_path, volume_uuid, uid, storage_flag)) {
1519 LOG(ERROR) << "Could not validate secondary dex path " << dex_path;
1525 if (stat(dex_path.c_str(), &dex_path_stat) != 0) {
1529 ALOGV("Secondary dex does not exist %s", dex_path.c_str());
1532 PLOG(ERROR) << "Could not access secondary dex " << dex_path;
1542 if (!prepare_secondary_dex_oat_dir(dex_path, uid, instruction_set, oat_dir_out)) {
1547 bool profile_was_updated = analyze_profiles(uid, dex_path, /*is_secondary_dex*/true);
1554 exec_dexoptanalyzer(dex_path, instruction_set, compiler_filter, profile_was_updated,
1563 LOG(ERROR) << "dexoptanalyzer failed for path " << dex_path << ": " << result;
1567 bool success = process_dexoptanalyzer_result(dex_path, result, dexopt_needed_out);
1580 int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* instruction_set,
1590 if (!validate_dex_path_size(dex_path)) {
1609 if (process_secondary_dex_dexopt(dex_path, pkgname, dexopt_flags, volume_uuid, uid,
1614 dex_path = dex_real_path.c_str();
1629 unique_fd input_fd(open(dex_path, O_RDONLY, 0));
1631 ALOGE("installd cannot open '%s' for input during dexopt\n", dex_path);
1637 Dex2oatFileWrapper out_oat_fd = open_oat_out_file(dex_path, oat_dir, is_public, uid,
1646 if (!open_vdex_files(dex_path, out_oat_path, dexopt_needed, instruction_set, is_public, uid,
1673 pkgname, dex_path, profile_guided, is_public, uid, is_secondary_dex);
1675 ALOGV("DexInv: --- BEGIN '%s' ---\n", dex_path);
1693 dex_path,
1706 ALOGV("DexInv: --- END '%s' (success) ---\n", dex_path);
1708 ALOGE("DexInv: --- END '%s' --- status=0x%04x, process failed\n", dex_path, res);
1713 update_out_oat_access_times(dex_path, out_oat_path);
1751 // Create the oat file structure for the secondary dex 'dex_path' and assign
1753 static bool create_secondary_dex_oat_layout(const std::string& dex_path, const std::string& isa,
1755 size_t dirIndex = dex_path.rfind('/');
1757 LOG(ERROR) << "Unexpected dir structure for dex file " << dex_path;
1763 std::string apk_dir = dex_path.substr(0, dirIndex);
1767 if (!create_oat_out_path(dex_path.c_str(), isa.c_str(), out_oat_dir,
1769 LOG(ERROR) << "Could not create oat path for secondary dex " << dex_path;
1775 // Reconcile the secondary dex 'dex_path' and its generated oat files.
1777 // processed successfully (i.e. the dex_path either exists, or if not, its corresponding
1783 bool reconcile_secondary_dex_file(const std::string& dex_path,
1789 if (!validate_dex_path_size(dex_path)) {
1805 if (!validate_secondary_dex_path(pkgname.c_str(), dex_path.c_str(), volume_uuid_cstr,
1807 LOG(ERROR) << "Could not validate secondary dex path " << dex_path;
1811 if (access(dex_path.c_str(), F_OK) == 0) {
1816 PLOG(ERROR) << "Failed to check access to secondary dex " << dex_path;
1832 if (!create_secondary_dex_oat_layout(dex_path,
1838 << dex_path;
1850 multiuser_get_user_id(uid), dex_path, /*is_secondary*/true);
1852 dex_path, /*is_secondary*/true);
1858 std::string old_current_profile = dex_path + ".prof";