Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
f5f7fd91
Commit
f5f7fd91
authored
Mar 23, 2019
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add com.android.google gms to default hide list
Close #1235
parent
f9ae4ab4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
ApplicationAdapter.java
...ava/com/topjohnwu/magisk/adapters/ApplicationAdapter.java
+8
-3
hide_utils.cpp
native/jni/magiskhide/hide_utils.cpp
+1
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java
View file @
f5f7fd91
...
@@ -46,6 +46,9 @@ import java9.util.stream.StreamSupport;
...
@@ -46,6 +46,9 @@ import java9.util.stream.StreamSupport;
public
class
ApplicationAdapter
extends
SectionedAdapter
public
class
ApplicationAdapter
extends
SectionedAdapter
<
ApplicationAdapter
.
AppViewHolder
,
ApplicationAdapter
.
ProcessViewHolder
>
{
<
ApplicationAdapter
.
AppViewHolder
,
ApplicationAdapter
.
ProcessViewHolder
>
{
private
static
final
String
SAFETYNET_PROCESS
=
"com.google.android.gms.unstable"
;
private
static
final
String
GMS_PACKAGE
=
"com.google.android.gms"
;
/* A list of apps that should not be shown as hide-able */
/* A list of apps that should not be shown as hide-able */
private
static
final
List
<
String
>
HIDE_BLACKLIST
=
Arrays
.
asList
(
private
static
final
List
<
String
>
HIDE_BLACKLIST
=
Arrays
.
asList
(
App
.
self
.
getPackageName
(),
App
.
self
.
getPackageName
(),
...
@@ -57,8 +60,10 @@ public class ApplicationAdapter extends SectionedAdapter
...
@@ -57,8 +60,10 @@ public class ApplicationAdapter extends SectionedAdapter
"com.android.webview"
,
"com.android.webview"
,
"com.google.android.webview"
"com.google.android.webview"
);
);
private
static
final
String
SAFETYNET_PROCESS
=
"com.google.android.gms.unstable"
;
private
static
final
List
<
String
>
DEFAULT_HIDELIST
=
Arrays
.
asList
(
private
static
final
String
GMS_PACKAGE
=
"com.google.android.gms"
;
GMS_PACKAGE
,
SAFETYNET_PROCESS
);
private
static
int
BOTTOM_MARGIN
=
-
1
;
private
static
int
BOTTOM_MARGIN
=
-
1
;
...
@@ -197,7 +202,7 @@ public class ApplicationAdapter extends SectionedAdapter
...
@@ -197,7 +202,7 @@ public class ApplicationAdapter extends SectionedAdapter
private
void
setHide
(
boolean
add
,
HideAppInfo
app
,
HideProcessInfo
process
)
{
private
void
setHide
(
boolean
add
,
HideAppInfo
app
,
HideProcessInfo
process
)
{
// Don't remove SafetyNet
// Don't remove SafetyNet
if
(!
add
&&
process
.
name
.
equals
(
SAFETYNET_PROCESS
))
if
(!
add
&&
DEFAULT_HIDELIST
.
contains
(
process
.
name
))
return
;
return
;
Shell
.
su
(
Utils
.
fmt
(
"magiskhide --%s %s %s"
,
add
?
"add"
:
"rm"
,
Shell
.
su
(
Utils
.
fmt
(
"magiskhide --%s %s %s"
,
add
?
"add"
:
"rm"
,
app
.
info
.
packageName
,
process
.
name
)).
submit
();
app
.
info
.
packageName
,
process
.
name
)).
submit
();
...
...
native/jni/magiskhide/hide_utils.cpp
View file @
f5f7fd91
...
@@ -232,6 +232,7 @@ bool init_list() {
...
@@ -232,6 +232,7 @@ bool init_list() {
// Add SafetyNet by default
// Add SafetyNet by default
rm_list
(
SAFETYNET_COMPONENT
);
rm_list
(
SAFETYNET_COMPONENT
);
rm_list
(
SAFETYNET_PROCESS
);
rm_list
(
SAFETYNET_PROCESS
);
init_list
(
SAFETYNET_PKG
,
SAFETYNET_PKG
);
init_list
(
SAFETYNET_PKG
,
SAFETYNET_PROCESS
);
init_list
(
SAFETYNET_PKG
,
SAFETYNET_PROCESS
);
init_list
(
MICROG_SAFETYNET
,
SAFETYNET_PROCESS
);
init_list
(
MICROG_SAFETYNET
,
SAFETYNET_PROCESS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment