From c935edd3d8499b5a188572efe30d9c4cd9d28fd3 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Mon, 21 Aug 2023 04:30:08 -0400 Subject: [PATCH] init_gsi: Ignore trustkernel hack if key{master,mint} is new enough The hack is no longer required on newer MTK devices and retaining the hack may cause more problems than it solves. --- init/quirks/soc/mtk_trustkernel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init/quirks/soc/mtk_trustkernel.cpp b/init/quirks/soc/mtk_trustkernel.cpp index caff620..e80bd55 100644 --- a/init/quirks/soc/mtk_trustkernel.cpp +++ b/init/quirks/soc/mtk_trustkernel.cpp @@ -50,7 +50,9 @@ optional> try_get_spl() { class MtkTkQuirk : DeviceQuirk { public: bool ShouldRun() { - return filesystem::exists("/proc/tkcore/tkcore_log"); + return filesystem::exists("/proc/tkcore/tkcore_log") + // No longer an issue after MediaTek upgraded to KeyMint AIDL services + && !filesystem::exists("/vendor/bin/hw/android.hardware.security.keymint-service.trustkernel"); } void Run() {