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

View file

@ -50,7 +50,9 @@ optional<pair<string, string>> try_get_spl() {
class MtkTkQuirk : DeviceQuirk { class MtkTkQuirk : DeviceQuirk {
public: public:
bool ShouldRun() { 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() { void Run() {