Magisk Delta Internal Documentation

This document explains some of the advanced features of Magisk Delta, a systemless root solution for Android devices. Magisk Delta allows you to modify your device without altering the original boot image, and provides a unified interface for managing modules, root access, and more.

Early mount

Some files need to be mounted as early as possible in the boot process, before the init process is executed. Magisk Delta provides a way to mount files in the pre-init stage, using the early-mount.d directory.

if grep "$(magisk --path)/.magisk/early-mount.d" /proc/mounts | grep -q '^early-mount.d/v2'; then
$(magisk --path)/.magisk/early-mount.d


(*) Be careful when using persist or metadata for early-mount, as these partitions have very limited size. Filling them up might cause the device to fail to boot.


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

init.rc inject


If you want to inject custom *.rc scripts into your device without repacking the boot image, Magisk Delta provides a way to do that systemlessly. You can use the initrc.d directory to store your custom scripts, and Magisk Delta will inject them into init.rc every boot.

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

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

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


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 “” 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