Fix props not loading correctly
This commit is contained in:
parent
5e92b4faa9
commit
d9bce45db4
@ -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
|
|||||||
[ -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
|
||||||
|
@ -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
|
|||||||
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
|
||||||
|
@ -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
|
|||||||
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
|
|||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user