Support systemlessly deleting files or folders

After we refactor the magic mount and always mount folder as tmpfs,
we can easily support deleting files or folders now. We recognize
dummy devices with major number 0 and minor number 0 as an indicator
for removing files and folders. This indicator is borrowed from
overlayfs.
This commit is contained in:
LoveSy
2023-03-13 11:27:36 +08:00
committed by John Wu
parent a6c2ba7c1e
commit d2768357da
4 changed files with 36 additions and 4 deletions

View File

@ -702,6 +702,11 @@ install_module() {
mktouch $MODPATH$TARGET/.replace
done
for TARGET in $REMOVE; do
ui_print "- Remove target: $TARGET"
mknod $MODPATH$TARGET c 0 0
done
if $BOOTMODE; then
# Update info for Magisk app
mktouch /data/adb/modules/$MODID/update