NoMount v2.0.0 is here!馃帀
This is a big update from previous release, and is needed to update both the kernel and the module, because both are not compatible with previous version.
Small Changelog:
There are too many changes made in this release, so I will only highlight the most relevant and important ones here.
-
kernel/:
- Remove all in-kernel hooks in favor of hijacking of i_op / f_op / s_op structures of rules injected.
- Added official support to LKM mode. Added a Kconfig and a Makefile and also its respective workflow to compile LKM's into the module.
- Implement the NM_FLAG_WHITEOUT bitmask to explicitly hide existing physical files from the VFS.
- Replace hashtable lookups for structure hijacking lookups for O(1) lookups in hot-paths.
- Remove
nomount_inodes_htandnomount_inode_node. Addednm_inode_infoto O(1) inode operations. - Replace directory child arrays to directory child arrays, to improve management of directory childs and also to optimize
iterate_diroperations. - Replace UID exclusion lists/hashtables to a IDR tree for O(1) checks.
- Replace Generic Netlink API to a Keyring-based Payload API. Now kernel-userspace communication is managed sending a payload via
add_key()syscall to the kernel instead of Generic Netlink API. - Added an automatic
setup.shscript to integrate NoMount into the kernel. Removed kernel patches. - Simplifying and removing dead code. Fixed a lot of weird bugs.
-
userspace/:
- Replace Generic Netlink API to a Keyring-based Payload API. Now kernel-userspace communication is managed sending a payload via
add_key()syscall to the kernel instead of Generic Netlink API. - Refactor nm binary commands, expanding it to a more ordenated and intuitive commands, while keeping support to legacy commands.
- Extend payload struct to pack NM_FLAG_WHITEOUT instructions via the new w (whiteout) command argument in the nm CLI tool.
- Adapt the JSON and raw nm list parsers to properly identify and print whiteout entries natively. Also add a UID list command to manage UID's excluded in a better form.
- Implement UID-based rules operations. Now can add, o hide files / folders for some UID's
- Example:
nm add /system/etc/hosts /data/adb/modules/hosts/system/etc/hosts --uid 10100nm whiteout /system/etc/lineage.prop --uid 10240
- Replace .bss buffers for a stack-based buffers, to avoid strange bugs in some devices when .bss is ignored.
- Solved some little bugs.
- Replace Generic Netlink API to a Keyring-based Payload API. Now kernel-userspace communication is managed sending a payload via
-
module/:
- Add support for traditional OverlayFS character device (mknod) and Magisk .replace syntax detection during the boot phase inside metamount.sh. In response of the issue #16
- Added official support to LKM mode. Refactor the module to support the LKM mode.
- Added a banner in WebUI status to show if using NoMount built-in or LKM.
- Add a symlink from /data/adb/modules/nomount/bin/nm to /data/adb/ksu/bin in case of KSU or to /data/adb/ap/bin in case of APatch.
- Refactor xargs batching pipelines in metamount.sh and index.js to process up to the maximum ARG_MAX limit dynamically via null-byte (\0) streams.
- Remove JSON parsing overhead from hot-unloading routines in the WebUI, opting for a direct unified file/symlink/char device file-system scan targeting
nm d. - Implement UID exclusion list directly from kernel, to verify what's UID's are really blocked in kernel.
- Remove the alias engine.
and a lot of other misc changes :)
Full Changelog: v1.1.1...v2.0.0
NOTE: With this release, if you have a GKI kernel, you don't need to have NoMount integrated in your kernel, you can use it in LKM mode. For more information of this, please read the README.md#do-i-need-a-custom-kernel :)