fix decryption support with tama SODP roms
this patch needs to be applied to system/vold manually the patch disables support for FS_IOC_ADD_ENCRYPTION_KEY ioctl that twrp probes and uses if available, but if twrp uses this with SODP kernel 4.14 decryption fails at the end this workaround makes twrp use the older api => decryption works this patch is not needed for more common stock kernel based roms, like the official Lineage OS for Sony Xperia XZ2 / XZ2c / XZ2p / XZ3
This commit is contained in:
parent
3e3646cfcb
commit
7a67f17a75
1 changed files with 19 additions and 0 deletions
19
patches/vold-decryption-workaround-for-sodp-kernel.patch
Normal file
19
patches/vold-decryption-workaround-for-sodp-kernel.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Subject: [PATCH] system/vold: disable support for FS_IOC_ADD_ENCRYPTION_KEY
|
||||
|
||||
this workaround is needed to make decryption with SODP kernel 4.14 working in twrp
|
||||
|
||||
project system/vold/
|
||||
diff --git a/system/vold/KeyUtil.cpp b/system/vold/KeyUtil.cpp
|
||||
index 9273564..28628aa 100644
|
||||
--- a/system/vold/KeyUtil.cpp
|
||||
+++ b/system/vold/KeyUtil.cpp
|
||||
@@ -87,7 +87,8 @@ static bool isFsKeyringSupportedImpl() {
|
||||
if (errno != EFAULT) {
|
||||
PLOG(WARNING) << "Unexpected error from FS_IOC_ADD_ENCRYPTION_KEY";
|
||||
}
|
||||
- LOG(INFO) << "Detected support for FS_IOC_ADD_ENCRYPTION_KEY";
|
||||
+ LOG(INFO) << "Detected support for FS_IOC_ADD_ENCRYPTION_KEY, but returning false!";
|
||||
+ return false;
|
||||
android::base::SetProperty("ro.crypto.uses_fs_ioc_add_encryption_key", "true");
|
||||
return true;
|
||||
}
|
||||
Loading…
Reference in a new issue