diff options
author | Captain Throwback <captainthrowback@gmail.com> | 2018-06-21 16:57:12 +0200 |
---|---|---|
committer | Captain Throwback <captainthrowback@hotmail.com> | 2018-12-25 17:57:47 +0100 |
commit | 6ac30afd698be67d422e6c0daff6e4488578a0b4 (patch) | |
tree | 71c52f801ffa16e8822ef0e3c612675219ef3b28 | |
parent | Merge "twrp: use ANDROID_ROOT environment variable" into android-9.0 (diff) | |
download | android_bootable_recovery-6ac30afd698be67d422e6c0daff6e4488578a0b4.tar android_bootable_recovery-6ac30afd698be67d422e6c0daff6e4488578a0b4.tar.gz android_bootable_recovery-6ac30afd698be67d422e6c0daff6e4488578a0b4.tar.bz2 android_bootable_recovery-6ac30afd698be67d422e6c0daff6e4488578a0b4.tar.lz android_bootable_recovery-6ac30afd698be67d422e6c0daff6e4488578a0b4.tar.xz android_bootable_recovery-6ac30afd698be67d422e6c0daff6e4488578a0b4.tar.zst android_bootable_recovery-6ac30afd698be67d422e6c0daff6e4488578a0b4.zip |
-rw-r--r-- | crypto/vold_decrypt/vold_decrypt.cpp | 20 |
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"); |