https://github.com/KernelSU-Modules-Repo/meta-overlayfs
OverlayFS MetaModule
https://github.com/KernelSU-Modules-Repo/meta-overlayfs
kernelsu
Last synced: 13 days ago
JSON representation
OverlayFS MetaModule
- Host: GitHub
- URL: https://github.com/KernelSU-Modules-Repo/meta-overlayfs
- Owner: KernelSU-Modules-Repo
- Created: 2025-11-21T04:35:16.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-11-30T04:53:00.000Z (about 1 month ago)
- Last Synced: 2025-12-02T09:42:47.225Z (about 1 month ago)
- Topics: kernelsu
- Language: Rust
- Homepage: https://github.com/KernelSU-Modules-Repo/meta-overlayfs
- Size: 38.1 KB
- Stars: 137
- Watchers: 0
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-android-root - ⭐ Meta-overlayfs - Official reference implementation using OverlayFS for most users and standard setup. `FOSS` `[K]` (Root Management / Module Managers)
README
# meta-overlayfs
A reference implementation of the overlayfs mount handler for KernelSU metamodules. This is not intended to be a state-of-the-art implementation, but rather a starting point for developers to understand and build upon.
## Installation
```bash
adb push meta-overlayfs-v1.0.0.zip /sdcard/
adb shell su -c 'ksud module install /sdcard/meta-overlayfs-v1.0.0.zip'
adb reboot
```
Or install via KernelSU Manager → Modules.
**Note**: The metamodule is now installed as a regular module to `/data/adb/modules/meta-overlay/`, with a symlink created at `/data/adb/metamodule` pointing to it.
## How It Works
Uses dual-directory architecture for ext4 image support:
- **Metadata**: `/data/adb/modules/` - Contains `module.prop`, `disable`, `skip_mount` markers
- **Content**: `/data/adb/metamodule/mnt/` - Contains `system/`, `vendor/` etc. directories from ext4 images
Scans metadata directory for enabled modules, then mounts their content directories as overlayfs layers.
### Supported Partitions
system, vendor, product, system_ext, odm, oem
### Read-Write Layer
Optional upperdir/workdir support via `/data/adb/modules/.rw/`:
```bash
mkdir -p /data/adb/modules/.rw/system/{upperdir,workdir}
```
## Environment Variables
- `MODULE_METADATA_DIR` - Metadata location (default: `/data/adb/modules/`)
- `MODULE_CONTENT_DIR` - Content location (default: `/data/adb/metamodule/mnt/`)
- `RUST_LOG` - Log level (debug, info, warn, error)
## Architecture
Automatically selects aarch64 or x86_64 binary during installation (~500KB).
## Building
```bash
./build.sh
```
Output: `target/meta-overlayfs-v1.0.0.zip`
## License
GPL-3.0