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
c07775f5
Unverified
Commit
c07775f5
authored
Mar 12, 2020
by
Fox2Code
Committed by
GitHub
Mar 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing ro.vendor(.boot).warranty_bit props
Co-authored-by:
John Wu
<
topjohnwu@gmail.com
>
parent
e261579e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
hide_policy.cpp
native/jni/magiskhide/hide_policy.cpp
+13
-2
No files found.
native/jni/magiskhide/hide_policy.cpp
View file @
c07775f5
...
@@ -12,12 +12,14 @@ using namespace std;
...
@@ -12,12 +12,14 @@ using namespace std;
static
const
char
*
prop_key
[]
=
static
const
char
*
prop_key
[]
=
{
"ro.boot.vbmeta.device_state"
,
"ro.boot.verifiedbootstate"
,
"ro.boot.flash.locked"
,
{
"ro.boot.vbmeta.device_state"
,
"ro.boot.verifiedbootstate"
,
"ro.boot.flash.locked"
,
"ro.boot.veritymode"
,
"ro.boot.warranty_bit"
,
"ro.warranty_bit"
,
"ro.debuggable"
,
"ro.boot.veritymode"
,
"ro.boot.warranty_bit"
,
"ro.warranty_bit"
,
"ro.debuggable"
,
"ro.secure"
,
"ro.build.type"
,
"ro.build.tags"
,
"ro.build.selinux"
,
nullptr
};
"ro.secure"
,
"ro.build.type"
,
"ro.build.tags"
,
"ro.build.selinux"
,
"ro.vendor.boot.warranty_bit"
,
"ro.vendor.warranty_bit"
,
nullptr
};
static
const
char
*
prop_value
[]
=
static
const
char
*
prop_value
[]
=
{
"locked"
,
"green"
,
"1"
,
{
"locked"
,
"green"
,
"1"
,
"enforcing"
,
"0"
,
"0"
,
"0"
,
"enforcing"
,
"0"
,
"0"
,
"0"
,
"1"
,
"user"
,
"release-keys"
,
"0"
,
nullptr
};
"1"
,
"user"
,
"release-keys"
,
"0"
,
"0"
,
"0"
,
nullptr
};
void
hide_sensitive_props
()
{
void
hide_sensitive_props
()
{
LOGI
(
"hide_policy: Hiding sensitive props
\n
"
);
LOGI
(
"hide_policy: Hiding sensitive props
\n
"
);
...
@@ -29,6 +31,15 @@ void hide_sensitive_props() {
...
@@ -29,6 +31,15 @@ void hide_sensitive_props() {
setprop
(
prop_key
[
i
],
prop_value
[
i
],
false
);
setprop
(
prop_key
[
i
],
prop_value
[
i
],
false
);
}
}
// Hide that we booted from recovery when magisk is in recovery mode
auto
bootmode
=
getprop
(
"ro.bootmode"
);
if
(
!
bootmode
.
empty
()
&&
bootmode
.
find
(
"recovery"
)
!=
string
::
npos
)
{
setprop
(
"ro.bootmode"
,
"unknown"
,
false
);
}
bootmode
=
getprop
(
"ro.boot.mode"
);
if
(
!
bootmode
.
empty
()
&&
bootmode
.
find
(
"recovery"
)
!=
string
::
npos
)
{
setprop
(
"ro.boot.mode"
,
"unknown"
,
false
);
// Xiaomi cross region flash
// Xiaomi cross region flash
auto
hwc
=
getprop
(
"ro.boot.hwc"
);
auto
hwc
=
getprop
(
"ro.boot.hwc"
);
if
(
!
hwc
.
empty
()
&&
hwc
.
find
(
"CN"
)
!=
string
::
npos
)
{
if
(
!
hwc
.
empty
()
&&
hwc
.
find
(
"CN"
)
!=
string
::
npos
)
{
...
...
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