mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-30 13:35:27 +00:00
Add general purpose script execution
This commit is contained in:
parent
472255924a
commit
45dbd4464b
@ -66,6 +66,14 @@ run_scripts() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
for SCRIPT in $COREDIR/${1}.d/* ; do
|
||||||
|
if [ -f "$SCRIPT" ]; then
|
||||||
|
chmod 755 $SCRIPT
|
||||||
|
chcon u:object_r:system_file:s0 $SCRIPT
|
||||||
|
log_print "${1}.d: $SCRIPT"
|
||||||
|
sh $SCRIPT
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
loopsetup() {
|
loopsetup() {
|
||||||
@ -441,7 +449,7 @@ case $1 in
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Stage 4
|
# Stage 4
|
||||||
log_print "* Stage 4: Execute module scripts"
|
log_print "* Stage 4: Execute scripts"
|
||||||
run_scripts post-fs-data
|
run_scripts post-fs-data
|
||||||
|
|
||||||
# Stage 5
|
# Stage 5
|
||||||
|
@ -11,7 +11,7 @@ log_print() {
|
|||||||
|
|
||||||
log_print "Moving and linking /sbin binaries"
|
log_print "Moving and linking /sbin binaries"
|
||||||
mount -o rw,remount rootfs /
|
mount -o rw,remount rootfs /
|
||||||
/dev/busybox/cp -afc /sbin /sbin_orig
|
cp -af /sbin /sbin_orig
|
||||||
mount -o ro,remount rootfs /
|
mount -o ro,remount rootfs /
|
||||||
|
|
||||||
log_print "Exposing su binary"
|
log_print "Exposing su binary"
|
||||||
|
Loading…
Reference in New Issue
Block a user