/mountify

Globally mounted modules via OverlayFS.

Primary LanguageShellThe UnlicenseUnlicense

Mountify

Globally mounted modules and whiteouts via OverlayFS.

  • mostly meant for MKSU .nomount
  • tries to mimic an OEM mount, like /mnt/vendor/my_bigball
  • susfs is recommended for hiding mounts
  • requires CONFIG_OVERLAY_FS=y and CONFIG_TMPFS_XATTR=y
  • globally mounting huge modules is discouraged

Methodology

module mount

  1. copies contents of /data/adb/modules/module_id to /debug_ramdisk/mountify/module_id
  2. mirrors SELinux context of every file from /data/adb/modules/module_id to /debug_ramdisk/mountify/module_id
  3. bind mounts /debug_ramdisk/mountify/module_id to /mnt/vendor/fake_folder_name
  4. overlays /mnt/vendor/fake_folder_name/system/bin to /system/bin

whiteouts

  1. generate whiteouts on /debug_ramdisk/mountify/wo
  2. bind mounts /debug_ramdisk/mountify/wo to /mnt/vendor/my_super
  3. overlays /mnt/vendor/my_super/system/bin to /system/bin

Usage

  • edit config.sh, mountify_mounts=1 then modify modules.txt to list modules you want mounted.
module_id fake_folder_name
  • edit config.sh, mountify_whiteouts=1 then modify whiteouts.txt for files you want whited out.
/system/bin/find

Limitations

  • For whiteouts they have to be two folders deep, e.g. /system/bin/find works but not /system/addon.d
  • Another is that whiteouts tend to fail on most setups.
  • I still do NOT know why. <insert we just dont know gif>

Support / Warranty

  • None, none at all. I am handing you a sharp knife, it is not on me if you stab yourself with it.

Links

Download