Hardcode GMS unstable to MagiskHide

With the new detection method, it is impossible to check for components.

Remove additional checks for components and simply hardcode string to
proc_monitor.cpp and query cmdline to see if it's GMS unstable.

This addresses wasted resources on applying custom namespace
on all GMS processes.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
This commit is contained in:
Park Ju Hyung
2019-02-13 09:04:27 +09:00
committed by John Wu
parent 7384d2d330
commit 24da3485bd
3 changed files with 45 additions and 21 deletions
+2 -4
View File
@@ -17,9 +17,6 @@
using namespace std;
#define SAFETYNET_COMPONENT "com.google.android.gms/.droidguard.DroidGuardService"
#define SAFETYNET_PROCESS "com.google.android.gms.unstable"
vector<string> hide_list;
pthread_mutex_t list_lock;
@@ -305,7 +302,8 @@ int launch_magiskhide(int client) {
// Add SafetyNet by default
rm_list(SAFETYNET_PROCESS);
add_list(SAFETYNET_COMPONENT);
rm_list(SAFETYNET_COMPONENT);
add_list(SAFETYNET_PKG);
// Get thread reference
proc_monitor_thread = pthread_self();