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
87de0e7a
Commit
87de0e7a
authored
May 05, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force remove AVB for 2SI since it may bootloop some devices
parent
85755e30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Android.mk
native/jni/Android.mk
+2
-1
twostage.cpp
native/jni/init/twostage.cpp
+7
-0
No files found.
native/jni/Android.mk
View file @
87de0e7a
...
...
@@ -68,7 +68,8 @@ LOCAL_SRC_FILES := \
magiskpolicy/rules.cpp \
magiskpolicy/policydb.cpp \
magiskpolicy/statement.cpp \
magiskpolicy/sepolicy.c
magiskpolicy/sepolicy.c \
magiskboot/pattern.cpp
LOCAL_LDFLAGS := -static
include $(BUILD_EXECUTABLE)
...
...
native/jni/init/twostage.cpp
View file @
87de0e7a
...
...
@@ -18,6 +18,8 @@ entry.val = &line[val##0];
#define FSR "/first_stage_ramdisk"
extern
uint32_t
patch_verity
(
void
*
buf
,
uint32_t
size
);
void
FirstStageInit
::
prepare
()
{
if
(
cmd
->
force_normal_boot
)
{
xmkdirs
(
FSR
"/system/bin"
,
0755
);
...
...
@@ -124,6 +126,11 @@ void FirstStageInit::prepare() {
// Redirect system mnt_point so init won't switch root in first stage init
if
(
entry
.
mnt_point
==
"/system"
)
entry
.
mnt_point
=
"/system_root"
;
// Force remove AVB for 2SI since it may bootloop some devices
auto
len
=
patch_verity
(
entry
.
fsmgr_flags
.
data
(),
entry
.
fsmgr_flags
.
length
());
entry
.
fsmgr_flags
.
resize
(
len
);
entry
.
to_file
(
fp
.
get
());
}
}
...
...
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