magisk-files

Magisk Delta Internal Documentation

Early-init mount

Early-init mount only support simple mount, which means it can replace files but cannot add new files, folders or replace folders

init.rc inject

# Use ${MAGISKTMP} to refer to Magisk's tmpfs directory

on early-init
    setprop sys.example.foo bar
    insmod ${MAGISKTMP}/.magisk/early-mount.d/libfoo.ko
    start myservice

service myservice ${MAGISKTMP}/.magisk/early-mount.d/myscript.sh
    oneshot

Remove files and folders

It is complicated to actually remove a file (possible, not worth the effort). Replacing it with a dummy file should be good enough

It is complicated to actually remove a folder (possible, not worth the effort). Replacing it with an empty folder should be good enough. Add the folder to the replace list in “config.sh” in the module template, it will replace the folder with an empty one

ln -s "/xxxxx" /data/adb/modules/mymodule_id/system/vendor/etc/thermal-engine-normal.conf