Skip to content

Globally mounted modules and whiteouts via OverlayFS.

License

Notifications You must be signed in to change notification settings

backslashxx/mountify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mountify

Globally mounted modules via OverlayFS.

  • mostly meant for MKSU .nomount
  • tries to mimic an OEM mount, like /mnt/vendor/my_bigball
  • susfs can be used to hide mounts
  • requires CONFIG_OVERLAY_FS=y and CONFIG_TMPFS_XATTR=y
  • for module devs, you can also use this standalone script

Methodology

  1. touch /data/adb/modules/module_id/skip_mount
  2. copies contents of /data/adb/modules/module_id to /mnt/vendor/fake_folder_name
  3. mirrors SELinux context of every file from /data/adb/modules/module_id to /mnt/vendor/fake_folder_name
  4. loops 2 and 3 for all modules
  5. overlays /mnt/vendor/fake_folder_name/system/bin to /system/bin and other folders

Why It’s Done This Way

  • Magic mount drastically increases mount count, making detection possible (zimperium)
  • OverlayFS mounting with ext4 image upperdir is detectable due to it creating device nodes on /proc/fs, while yes ext4 /data as overlay source is possible, who uses that nowadays?
  • F2FS /data as overlay source fails with native casefolding (ovl_dentry_weird), so only sdcardfs users can use /data as overlay source.
  • Frankly, I dont see a way to this module mounting situation, this shit is more of a shitty band-aid

Usage

by default, mountify mounts all modules with a system folder. To mount specific modules only, edit config.sh

  • mountify_mounts=1 then modify modules.txt to list modules you want mounted
module_id
Adreno_Gpu_Driver
DisplayFeatures
ViPER4Android-RE-Fork
mountify_whiteouts
  • FAKE_MOUNT_NAME="my_bigball" to set a custom fake folder name
  • mountify_use_susfs=1 to enable susfs usage (optional)
  • mountify_stop_start=1 to restart android at service (optional)

Limitations / Recommendations

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