Skip to content

uxhzbaz/Mount-ARMDisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MountARM - RAMdisk Mounting Module

简介 (Introduction)

MountARM 是一个 Magisk/KernelSU 模块,它将您设备的一部分运行内存(RAM)挂载为一个名为 NC 的高速存储目录。这个目录可以通过多个常用路径(如 /sdcard/NC)进行访问,让拥有存储权限的应用能够利用 tmpfs 的高速读写特性。

MountARM is a Magisk/KernelSU module that mounts a portion of your device's RAM as a high-speed storage directory named NC. This directory is accessible via multiple common paths (e.g., /sdcard/NC), allowing apps with storage permissions to leverage the high-speed I/O of tmpfs.


⚠️ 重要警告 (Important Warning)

数据是易失的! 所有存储在 NC 目录中的文件将在设备重启、关机或断电永久丢失。请绝对不要用它来存储任何重要或不可替代的数据。

DATA IS VOLATILE! All files stored in the NC directory will be permanently lost upon device reboot, shutdown, or power loss. Do not use it to store any important or irreplaceable data.


✨ 特性 (Features)

  • 利用 tmpfs 在内存中操作文件,为临时文件、缓存和解包任务提供闪电般的读写速度。 | Leverages tmpfs to operate files in RAM, providing lightning-fast read/write speeds for temporary files, caches, and unpacking tasks.
  • 默认将设备 55% 的总运行内存虚拟为存储空间。 | By default, it allocates 55% of your device's total RAM as storage space.
  • 自动挂载到以下路径,方便各种应用访问 | Automatically mounts to the following paths for easy access by various applications:
    • /storage/emulated/0/NC
    • /sdcard/NC
    • /storage/NC
    • /mnt/media_rw/NC

🔧 自定义 (Customization)

调整RAMdisk 的内存大小 如果默认的 55% 对您的设备来说过高,建议适当调低。

You can easily adjust the percentage of RAM used for the RAMdisk. If the default 55% is too high for your device, it is recommended to lower it.

  1. 定位文件 (Locate the file): 在找到 MountARM 模块,编辑其安装目录下的 1.sh 文件。 Find the MountARM module in and edit the 1.sh file within its installation directory.

  2. 修改比例 (Modify the percentage): 找到第 8 行的代码: Locate line 8, which contains:

    D=$(awk '/MemTotal/{printf"%.0fK",$2*.55}' /proc/meminfo)
  3. 调整数值 (Adjust the value): 将 .55 (代表 55%) 修改为您想要的比例。例如,修改为 30%: Change .55 (representing 55%) to your desired percentage. For example, to set it to 30%:

    D=$(awk '/MemTotal/{printf"%.0fK",$2*.30}' /proc/meminfo)

致谢 (Credits)

  • 该脚本的挂载逻辑借鉴/启发自酷安用户 @Kpfc独孤白 的[帖子]
  • The mounting logic of this script is inspired by/adapted from a script shared by Coolapk user @Kpfc独孤白 in [this post]

About

RAMDisk 挂载到ROM(让有储存权限的app可以享受tmpfs的高速体验?).Mount a RAMDisk to ROM (allowing apps with storage permissions to enjoy the high-speed experience of tmpfs?).

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages