Commit d9bce45d authored by topjohnwu's avatar topjohnwu

Fix props not loading correctly

parent 5e92b4fa
......@@ -503,11 +503,7 @@ else
[ ! -f .backup/$RC ] && cp -af $RC .backup
sed -i "/import \/init\.environ\.rc/iimport /init.magisk.rc" $RC
fi
if file_contain "trigger load_persist_props_action" $RC && ! file_contain "trigger load_magisk_props_action" $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
if file_contain "selinux.reload_policy" $RC; then
[ ! -f .backup/$RC ] && cp -af $RC .backup
sed -i "/selinux.reload_policy/d" $RC
fi
......@@ -517,7 +513,7 @@ else
[ -L $FSTAB ] && continue
if (! $KEEPVERITY); then
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
if (! $KEEPFORCEENCRYPT); then
sed -i "s/forceencrypt/encryptable/g" $FSTAB
......
......@@ -6,15 +6,11 @@ on post-fs
rm /dev/.magisk.unblock
on post-fs-data
load_persist_props
start magisk_pfsd
wait /dev/.magisk.unblock 60
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
trigger post-fs-data
......@@ -32,12 +28,6 @@ service magisk_pfsd /sbin/magic_mask.sh post-fs-data
seclabel u:r:su:s0
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
service magisk_service /sbin/magic_mask.sh service
class late_start
......
......@@ -49,6 +49,7 @@ in_list() {
unblock() {
touch /dev/.magisk.unblock
chcon u:object_r:device:s0 /dev/.magisk.unblock
exit
}
......@@ -465,14 +466,6 @@ case $1 in
rm -f /data/magisk.apk 2>/dev/null
fi
# Restart post-fs-data if necessary (multirom)
$MULTIROM && setprop magisk.restart_pfsd 1
fi
unblock
;;
load_magisk_props )
for MOD in $MOUNTPOINT/* ; do
# Read in defined system props
if [ -f $MOD/system.prop ]; then
......@@ -484,6 +477,10 @@ case $1 in
# Expose busybox
[ "`getprop persist.magisk.busybox`" = "1" ] && sh /sbin/magic_mask.sh mount_busybox
# Restart post-fs-data if necessary (multirom)
$MULTIROM && setprop magisk.restart_pfsd 1
fi
unblock
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment