mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 18:47:38 +00:00
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
|
||||
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,6 +466,17 @@ case $1 in
|
||||
rm -f /data/magisk.apk 2>/dev/null
|
||||
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)
|
||||
$MULTIROM && setprop magisk.restart_pfsd 1
|
||||
|
||||
@ -472,21 +484,6 @@ case $1 in
|
||||
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 )
|
||||
log_print "* Enabling BusyBox"
|
||||
cp -afc /system/xbin/. $TOOLPATH
|
||||
|
Loading…
x
Reference in New Issue
Block a user