From 6597b7adc01fa8153984e4e4d3ca3a84ab81ffe1 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 6 Mar 2019 05:43:52 -0500 Subject: [PATCH] Add MicroG DroidGuardHelper as target MicroG uses a different package to handle DroidGuard service (SafetyNet), but still uses the same com.google.android.gms.unstable process name. Thanks to the changes in 4e53ebfe, we can target both official GMS and MicroG SafetyNet services at the same time. --- native/jni/magiskhide/hide_utils.cpp | 1 + native/jni/magiskhide/magiskhide.h | 1 + 2 files changed, 2 insertions(+) diff --git a/native/jni/magiskhide/hide_utils.cpp b/native/jni/magiskhide/hide_utils.cpp index 4331f26d3..598f7a152 100644 --- a/native/jni/magiskhide/hide_utils.cpp +++ b/native/jni/magiskhide/hide_utils.cpp @@ -237,6 +237,7 @@ bool init_list() { rm_list(SAFETYNET_COMPONENT); rm_list(SAFETYNET_PROCESS); init_list(SAFETYNET_PKG, SAFETYNET_PROCESS); + init_list(MICROG_SAFETYNET, SAFETYNET_PROCESS); update_uid_map(); return true; diff --git a/native/jni/magiskhide/magiskhide.h b/native/jni/magiskhide/magiskhide.h index 5d5853735..0358ffc87 100644 --- a/native/jni/magiskhide/magiskhide.h +++ b/native/jni/magiskhide/magiskhide.h @@ -18,6 +18,7 @@ #define SAFETYNET_COMPONENT "com.google.android.gms/.droidguard.DroidGuardService" #define SAFETYNET_PROCESS "com.google.android.gms.unstable" #define SAFETYNET_PKG "com.google.android.gms" +#define MICROG_SAFETYNET "org.microg.gms.droidguard" #define WEVENT(s) (((s) & 0xffff0000) >> 16)