mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-30 21:37:39 +00:00
Add general purpose script execution
This commit is contained in:
parent
472255924a
commit
45dbd4464b
@ -66,6 +66,14 @@ run_scripts() {
|
||||
fi
|
||||
fi
|
||||
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() {
|
||||
@ -441,7 +449,7 @@ case $1 in
|
||||
done
|
||||
|
||||
# Stage 4
|
||||
log_print "* Stage 4: Execute module scripts"
|
||||
log_print "* Stage 4: Execute scripts"
|
||||
run_scripts post-fs-data
|
||||
|
||||
# Stage 5
|
||||
|
@ -11,7 +11,7 @@ log_print() {
|
||||
|
||||
log_print "Moving and linking /sbin binaries"
|
||||
mount -o rw,remount rootfs /
|
||||
/dev/busybox/cp -afc /sbin /sbin_orig
|
||||
cp -af /sbin /sbin_orig
|
||||
mount -o ro,remount rootfs /
|
||||
|
||||
log_print "Exposing su binary"
|
||||
|
Loading…
x
Reference in New Issue
Block a user