summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbig biff <bigbiff@teamw.in>2019-01-12 00:23:03 +0100
committerGerrit Code Review <gerrit2@gerrit.omnirom.org>2019-01-12 00:23:03 +0100
commit4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81 (patch)
treef6e913a2e1cf2a17aef7e756dced9ad3cde917f4
parentMerge "Include weaver library in 9.0 trees" into android-9.0 (diff)
parentvold_decrypt: use ANDROID_ROOT for additional compatibility (diff)
downloadandroid_bootable_recovery-4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81.tar
android_bootable_recovery-4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81.tar.gz
android_bootable_recovery-4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81.tar.bz2
android_bootable_recovery-4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81.tar.lz
android_bootable_recovery-4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81.tar.xz
android_bootable_recovery-4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81.tar.zst
android_bootable_recovery-4d7b0e035050543b28ce1c3d584c4e8d9d9f9a81.zip
-rw-r--r--crypto/vold_decrypt/vold_decrypt.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/vold_decrypt/vold_decrypt.cpp b/crypto/vold_decrypt/vold_decrypt.cpp
index ded4e7b67..707466e4c 100644
--- a/crypto/vold_decrypt/vold_decrypt.cpp
+++ b/crypto/vold_decrypt/vold_decrypt.cpp
@@ -1013,14 +1013,14 @@ int Vold_Decrypt_Core(const string& Password) {
return VD_ERR_PASSWORD_EMPTY;
}
- // Mount system and check for vold and vdc
- if (!PartitionManager.Mount_By_Path("/system", true)) {
+ // Mount ANDROID_ROOT and check for vold and vdc
+ if (!PartitionManager.Mount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) {
return VD_ERR_UNABLE_TO_MOUNT_SYSTEM;
- } else if (!TWFunc::Path_Exists("/system/bin/vold")) {
- LOGINFO("ERROR: /system/bin/vold not found, aborting.\n");
+ } else if ((!TWFunc::Path_Exists("/system/bin/vold")) && (!TWFunc::Path_Exists(PartitionManager.Get_Android_Root_Path() + "/system/bin/vold"))) {
+ LOGINFO("ERROR: vold not found, aborting.\n");
return VD_ERR_MISSING_VOLD;
- } else if (!TWFunc::Path_Exists("/system/bin/vdc")) {
- LOGINFO("ERROR: /system/bin/vdc not found, aborting.\n");
+ } else if ((!TWFunc::Path_Exists("/system/bin/vdc")) && (!TWFunc::Path_Exists(PartitionManager.Get_Android_Root_Path() + "/system/bin/vdc"))) {
+ LOGINFO("ERROR: vdc not found, aborting.\n");
return VD_ERR_MISSING_VDC;
}
@@ -1109,11 +1109,11 @@ int Vold_Decrypt_Core(const string& Password) {
if (is_fstab_symlinked)
Restore_Recovery_Fstab();
- if (!PartitionManager.UnMount_By_Path("/system", true)) {
- // PartitionManager failed to unmount /system, this should not happen,
+ if (!PartitionManager.UnMount_By_Path(PartitionManager.Get_Android_Root_Path(), true)) {
+ // PartitionManager failed to unmount ANDROID_ROOT, this should not happen,
// but in case it does, do a lazy unmount
- LOGINFO("WARNING: system could not be unmounted normally!\n");
- umount2("/system", MNT_DETACH);
+ LOGINFO("WARNING: '%s' could not be unmounted normally!\n", PartitionManager.Get_Android_Root_Path().c_str());
+ umount2(PartitionManager.Get_Android_Root_Path().c_str(), MNT_DETACH);
}
LOGINFO("Finished.\n");