From d08b1a6639d3569eb1533e85cbe958743eedef97 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 27 Mar 2019 21:33:04 -0400 Subject: [PATCH] Remove com.google.android.gms from default list It seems that even adding this to the list doesn't 100% works on all devices out there, and some even reported crashes on several Google services. Disable it for now and do further investigations in the future. --- .../com/topjohnwu/magisk/adapters/ApplicationAdapter.java | 7 +++---- native/jni/magiskhide/hide_utils.cpp | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java b/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java index 59b0b0f0d..8c6363e3f 100644 --- a/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java @@ -30,7 +30,6 @@ import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.internal.UiThreadHandler; -import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -38,6 +37,7 @@ import java.util.Set; import butterknife.BindView; import java9.util.Comparators; +import java9.util.Lists; import java9.util.Objects; import java9.util.Sets; import java9.util.stream.Collectors; @@ -52,7 +52,7 @@ public class ApplicationAdapter extends SectionedAdapter private static boolean old_hide = false; /* A list of apps that should not be shown as hide-able */ - private static final List HIDE_BLACKLIST = Arrays.asList( + private static final List HIDE_BLACKLIST = Lists.of( App.self.getPackageName(), "android", "com.android.chrome", @@ -62,8 +62,7 @@ public class ApplicationAdapter extends SectionedAdapter "com.android.webview", "com.google.android.webview" ); - private static final List DEFAULT_HIDELIST = Arrays.asList( - GMS_PACKAGE, + private static final List DEFAULT_HIDELIST = Lists.of( SAFETYNET_PROCESS ); diff --git a/native/jni/magiskhide/hide_utils.cpp b/native/jni/magiskhide/hide_utils.cpp index 97dbfde97..4166847c8 100644 --- a/native/jni/magiskhide/hide_utils.cpp +++ b/native/jni/magiskhide/hide_utils.cpp @@ -232,7 +232,6 @@ bool init_list() { // Add SafetyNet by default rm_list(SAFETYNET_COMPONENT); rm_list(SAFETYNET_PROCESS); - init_list(SAFETYNET_PKG, SAFETYNET_PKG); init_list(SAFETYNET_PKG, SAFETYNET_PROCESS); init_list(MICROG_SAFETYNET, SAFETYNET_PROCESS);