Adjust the validation code for secondary dex paths
Do not validate the package path when reconciling secondary dex files. If
the file does not exist we cannot resolve the system sym links (e.g.
/data/user/0 -> /data/data) and the validation will fail leaving oat files
behind.
Bug: 64460009
Test: adb shell cmd package reconcile-secondary-dex-files
com.google.android.googlequicksearchbox (after removing some files)
adb shell cmd package compile -m speed --secondary-dex
com.google.android.googlequicksearchbox
adb shell /data/nativetest64/installd_utils_test/installd_utils_test
Change-Id: I9734ad18a579d44088180326661d8cf8288e90be
diff --git a/cmds/installd/utils.h b/cmds/installd/utils.h
index da3a293..e938042 100644
--- a/cmds/installd/utils.h
+++ b/cmds/installd/utils.h
@@ -125,7 +125,7 @@
int validate_system_app_path(const char* path);
bool validate_secondary_dex_path(const std::string& pkgname, const std::string& dex_path,
- const char* volume_uuid, int uid, int storage_flag);
+ const char* volume_uuid, int uid, int storage_flag, bool validate_package_path = true);
int get_path_from_env(dir_rec_t* rec, const char* var);