This Magisk module mounts one or more filesystems (e.g. CIFS/SMB, NFS, etc.) at boot.
The module's description in Magisk Manager will dynamically update to show successfully mounted targets.
- Magisk v20.4+
- Kernel support for filesystem(s) to be mounted (hint:
grep cifs /proc/filesystems)
-
Create a directory named
.multi-mountinside your internal storage (/sdcard/). -
Inside
/sdcard/.multi-mount, create one or more config files with filenames ending in.conf. Each config file corresponds to a distinct mount configuration. -
Populate each config file according to the following example:
mount_options="-t cifs -o vers=2.0,username=user,password=pass" mount_source="//host/share" mount_target="/mnt/cifs-share" mount_max_retries=20 mount_retry_interval=15s -
Install the module via Magisk Manager, then reboot.
- Every distinct mount requires its own config file (e.g.
cifs-1.conf,cifs-2.conf, etc.). - Config files are read at boot and during a manual trigger.
- For a network share to be mounted, the network must be reachable within the timeframe defined by
mount_max_retriesandmount_retry_interval. - If mounting a CIFS share fails, try specifying a different CIFS version (e.g.,
vers=1.0,vers=3.0).
这是一个 Magisk 模块,用于在开机时挂载一个或多个文件系统(如 CIFS/SMB, NFS 等)。
模块在 Magisk Manager 中的描述会自动更新,以显示成功挂载的路径。
- Magisk v20.4+
- 内核支持您需要挂载的文件系统 (提示: 可用
grep cifs /proc/filesystems命令检查内核是否支持 cifs)
-
在你的内置存储空间 (
/sdcard/) 中创建一个名为.multi-mount的文件夹。 -
在
/sdcard/.multi-mount文件夹中,创建一个或多个以.conf结尾的配置文件。每个文件对应一个独立的挂载配置。 -
根据以下示例格式填写每个配置文件:
mount_options="-t cifs -o vers=2.0,username=user,password=pass" mount_source="//host/share" mount_target="/mnt/cifs-share" mount_max_retries=20 mount_retry_interval=15s -
通过 Magisk Manager 安装此模块,然后重启设备。
- 每个独立的挂载点都需要一个独立的配置文件 (例如
cifs-1.conf,cifs-2.conf等)。 - 模块会在开机时和手动触发时读取配置文件。
- 要想成功挂载网络共享,必须在
mount_max_retries和mount_retry_interval定义的时间范围内连接到网络。 - 如果 CIFS 挂载失败,可以尝试指定一个不同的 CIFS 版本 (例如
vers=1.0,vers=3.0)。