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.
This commit is contained in:
Peter Cai 2023-08-21 04:30:08 -04:00
parent 3c0173bcc1
commit c935edd3d8
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ optional<pair<string, string>> 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() {