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
750872cc
Commit
750872cc
authored
Aug 12, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add boot actions
parent
29895ff4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
build.py
build.py
+1
-1
flash_script.sh
scripts/flash_script.sh
+7
-4
util_functions.sh
scripts/util_functions.sh
+9
-0
No files found.
build.py
View file @
750872cc
...
...
@@ -108,7 +108,7 @@ def build_apk(args):
proc
=
subprocess
.
run
([
os
.
path
.
join
(
os
.
environ
[
'ANDROID_HOME'
],
'build-tools'
,
build_tool
,
'zipalign'
),
'-v'
,
'-p'
,
'4'
,
unsigned
,
aligned
])
'-v'
,
'-p'
,
'4'
,
unsigned
,
aligned
]
,
stdout
=
subprocess
.
DEVNULL
)
if
proc
.
returncode
!=
0
:
error
(
'Zipalign Magisk Manager failed!'
)
...
...
scripts/flash_script.sh
View file @
750872cc
...
...
@@ -83,6 +83,12 @@ ui_print "- Constructing environment"
is_mounted /data
&&
MAGISKBIN
=
/data/magisk
||
MAGISKBIN
=
/cache/data_bin
if
$BOOTMODE
;
then
# Cleanup binary mirrors
umount
-l
/dev/magisk/mirror/bin 2>/dev/null
rm
-rf
/dev/magisk/mirror/bin 2>/dev/null
fi
# Copy required files
rm
-rf
$MAGISKBIN
2>/dev/null
mkdir
-p
$MAGISKBIN
...
...
@@ -103,10 +109,7 @@ fi
# Magisk Image
##########################################################################################
$BOOTMODE
||
recovery_actions
# Fix SuperSU.....
$BOOTMODE
&&
$MAGISKBIN
/magisk magiskpolicy
--live
"allow fsck * * *"
$BOOTMODE
&&
boot_actions
||
recovery_actions
if
(
is_mounted /data
)
;
then
IMG
=
/data/magisk.img
...
...
scripts/util_functions.sh
View file @
750872cc
...
...
@@ -121,6 +121,15 @@ api_level_arch_detect() {
if
[
"
$ABILONG
"
=
"x86_64"
]
;
then
ARCH
=
x64
;
IS64BIT
=
true
;
fi
;
}
boot_actions
()
{
if
[
!
-d
/dev/magisk/mirror/bin
]
;
then
mkdir
-p
/dev/magisk/mirror/bin
mount
-o
bind
$MAGISKBIN
/dev/magisk/mirror/bin
fi
MAGISKBIN
=
/dev/magisk/mirror/bin
$MAGISKBIN
/magisk magiskpolicy
--live
"allow fsck * * *"
}
recovery_actions
()
{
# TWRP bug fix
mount
-o
bind
/dev/urandom /dev/random
...
...
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