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
d9bce45d
Commit
d9bce45d
authored
Feb 04, 2017
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix props not loading correctly
parent
5e92b4fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
32 deletions
+15
-32
flash_script.sh
scripts/flash_script.sh
+2
-6
init.magisk.rc
scripts/init.magisk.rc
+1
-11
magic_mask.sh
scripts/magic_mask.sh
+12
-15
No files found.
scripts/flash_script.sh
View file @
d9bce45d
...
@@ -503,11 +503,7 @@ else
...
@@ -503,11 +503,7 @@ else
[
!
-f
.backup/
$RC
]
&&
cp
-af
$RC
.backup
[
!
-f
.backup/
$RC
]
&&
cp
-af
$RC
.backup
sed
-i
"/import
\/
init
\.
environ
\.
rc/iimport /init.magisk.rc"
$RC
sed
-i
"/import
\/
init
\.
environ
\.
rc/iimport /init.magisk.rc"
$RC
fi
fi
if
file_contain
"trigger load_persist_props_action"
$RC
&&
!
file_contain
"trigger load_magisk_props_action"
$RC
;
then
if
file_contain
"selinux.reload_policy"
$RC
;
then
[
!
-f
.backup/
$RC
]
&&
cp
-af
$RC
.backup
sed
-i
"/trigger load_persist_props_action/a
\ \ \ \
trigger load_magisk_props_action"
$RC
fi
if
file_contain
"selinux.reload_policy"
;
then
[
!
-f
.backup/
$RC
]
&&
cp
-af
$RC
.backup
[
!
-f
.backup/
$RC
]
&&
cp
-af
$RC
.backup
sed
-i
"/selinux.reload_policy/d"
$RC
sed
-i
"/selinux.reload_policy/d"
$RC
fi
fi
...
@@ -517,7 +513,7 @@ else
...
@@ -517,7 +513,7 @@ else
[
-L
$FSTAB
]
&&
continue
[
-L
$FSTAB
]
&&
continue
if
(!
$KEEPVERITY
)
;
then
if
(!
$KEEPVERITY
)
;
then
sed
-i
"s/,support_scfs//g"
$FSTAB
sed
-i
"s/,support_scfs//g"
$FSTAB
sed
-i
's
;,\{0,1\}verify\(=[^,]*\)\{0,1\};;
g'
$FSTAB
sed
-i
's
/,\{0,1\}verify\(=[^,]*\)\{0,1\}//
g'
$FSTAB
fi
fi
if
(!
$KEEPFORCEENCRYPT
)
;
then
if
(!
$KEEPFORCEENCRYPT
)
;
then
sed
-i
"s/forceencrypt/encryptable/g"
$FSTAB
sed
-i
"s/forceencrypt/encryptable/g"
$FSTAB
...
...
scripts/init.magisk.rc
View file @
d9bce45d
...
@@ -6,15 +6,11 @@ on post-fs
...
@@ -6,15 +6,11 @@ on post-fs
rm /dev/.magisk.unblock
rm /dev/.magisk.unblock
on post-fs-data
on post-fs-data
load_persist_props
start magisk_pfsd
start magisk_pfsd
wait /dev/.magisk.unblock 60
wait /dev/.magisk.unblock 60
rm /dev/.magisk.unblock
rm /dev/.magisk.unblock
on load_magisk_props_action
start magisk_props
wait /dev/.magisk.unblock 5
rm /dev/.magisk.unblock
on property:magisk.restart_pfsd=1
on property:magisk.restart_pfsd=1
trigger post-fs-data
trigger post-fs-data
...
@@ -32,12 +28,6 @@ service magisk_pfsd /sbin/magic_mask.sh post-fs-data
...
@@ -32,12 +28,6 @@ service magisk_pfsd /sbin/magic_mask.sh post-fs-data
seclabel u:r:su:s0
seclabel u:r:su:s0
oneshot
oneshot
# Load module props
service magisk_props /sbin/magic_mask.sh load_magisk_props
user root
seclabel u:r:su:s0
oneshot
# launch late_start script
# launch late_start script
service magisk_service /sbin/magic_mask.sh service
service magisk_service /sbin/magic_mask.sh service
class late_start
class late_start
...
...
scripts/magic_mask.sh
View file @
d9bce45d
...
@@ -49,6 +49,7 @@ in_list() {
...
@@ -49,6 +49,7 @@ in_list() {
unblock
()
{
unblock
()
{
touch
/dev/.magisk.unblock
touch
/dev/.magisk.unblock
chcon
u:object_r:device:s0 /dev/.magisk.unblock
exit
exit
}
}
...
@@ -465,6 +466,17 @@ case $1 in
...
@@ -465,6 +466,17 @@ case $1 in
rm
-f
/data/magisk.apk 2>/dev/null
rm
-f
/data/magisk.apk 2>/dev/null
fi
fi
for
MOD
in
$MOUNTPOINT
/
*
;
do
# Read in defined system props
if
[
-f
$MOD
/system.prop
]
;
then
log_print
"* Reading props from
$MOD
/system.prop"
/data/magisk/resetprop
--file
$MOD
/system.prop
fi
done
# Expose busybox
[
"
`
getprop persist.magisk.busybox
`
"
=
"1"
]
&&
sh /sbin/magic_mask.sh mount_busybox
# Restart post-fs-data if necessary (multirom)
# Restart post-fs-data if necessary (multirom)
$MULTIROM
&&
setprop magisk.restart_pfsd 1
$MULTIROM
&&
setprop magisk.restart_pfsd 1
...
@@ -472,21 +484,6 @@ case $1 in
...
@@ -472,21 +484,6 @@ case $1 in
unblock
unblock
;;
;;
load_magisk_props
)
for
MOD
in
$MOUNTPOINT
/
*
;
do
# Read in defined system props
if
[
-f
$MOD
/system.prop
]
;
then
log_print
"* Reading props from
$MOD
/system.prop"
/data/magisk/resetprop
--file
$MOD
/system.prop
fi
done
# Expose busybox
[
"
`
getprop persist.magisk.busybox
`
"
=
"1"
]
&&
sh /sbin/magic_mask.sh mount_busybox
unblock
;;
mount_busybox
)
mount_busybox
)
log_print
"* Enabling BusyBox"
log_print
"* Enabling BusyBox"
cp
-afc
/system/xbin/.
$TOOLPATH
cp
-afc
/system/xbin/.
$TOOLPATH
...
...
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