{"id":31194932,"url":"https://github.com/FurLC/ZRAM-Module","last_synced_at":"2025-09-20T02:05:16.990Z","repository":{"id":295264253,"uuid":"989570404","full_name":"FurLC/ZRAM-Module","owner":"FurLC","description":"为Android设备提供ZRAM压缩算法支持的Magisk/KernelSU模块","archived":false,"fork":false,"pushed_at":"2025-06-01T03:35:12.000Z","size":81,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-01T09:49:38.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FurLC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-24T11:21:03.000Z","updated_at":"2025-06-01T06:22:52.000Z","dependencies_parsed_at":"2025-05-25T05:33:25.503Z","dependency_job_id":null,"html_url":"https://github.com/FurLC/ZRAM-Module","commit_stats":null,"previous_names":["mclengchuan/zram-module","furlc/zram-module"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FurLC/ZRAM-Module","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FurLC%2FZRAM-Module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FurLC%2FZRAM-Module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FurLC%2FZRAM-Module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FurLC%2FZRAM-Module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FurLC","download_url":"https://codeload.github.com/FurLC/ZRAM-Module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FurLC%2FZRAM-Module/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276033070,"owners_count":25573474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-20T02:02:41.021Z","updated_at":"2025-09-20T02:05:16.979Z","avatar_url":"https://github.com/FurLC.png","language":"Shell","readme":"# ZRAM-Module\n\n[English](README.md) | [中文](README.zh-CN.md)\n\n## 📦 Module Overview\n\n`ZRAM-Module` is a **Magisk / KernelSU** based module designed for Android kernels with ZRAM support. It allows automatic loading of user-defined compression algorithm modules (such as `lz4kd`, `zstdn`, etc.) and configures the ZRAM size at boot.\n\nIdeal for custom kernel users, it enables kernel module loading and initialization without modifying the system partition.\n\n---\n\n## ⚙️ Module Features\n\n- ✅ Supports loading custom compression algorithms (e.g. `lz4kd`, `zstdn`)\n- ✅ Supports custom ZRAM size (in bytes)\n- ✅ Automatically loads `.ko` modules at boot\n- ✅ Fully implemented via Magisk / KernelSU, no system partition modification required\n\n---\n\n## 🚀 Usage Guide\n\n### Step 1: Prepare Your Kernel Module\n\n1. Compile the kernel source code for your device  \n2. Build the desired compression algorithm module (e.g., `crypto_zstdn.ko`)\n3. Rename the compiled module to `zram.ko` and place it in the `zram/` subdirectory of this module\n\n```bash\n# Example directory structure\nZRAM-Module/\n├── config.prop\n└── zram/\n    └── zram.ko  # Renamed kernel module\n```\n\n\n### Step 2: Edit Configuration File\n\nEdit the `config.prop` file in the module's root directory:\n\n```ini\nZRAM_ALGO=lz4kd         # Compression algorithm name (matches kernel module)\nZRAM_SIZE=12884901888   # ZRAM size in bytes (e.g., 12 GB)\n```\n\n📌 **Note:**\n\n- `ZRAM_ALGO` must match the algorithm implemented by your  `.ko` module\n- `ZRAM_SIZE` should not exceed your device’s physical RAM\n\nIf `config.prop` is not configured, the module will fail to initialize.\n\n\n### Step 3: Package and Flash the Module\n\n1. Compress the entire module directory into a ZIP file\n2. Flash the ZIP using **Magisk/KernelSU** or **TWRP**：\n\n```text\nMagisk/KernelSU → Modules → Install from storage → Select ZIP file\n```\n\n3. Reboot your device. The module will automatically load and initialize ZRAM.\n\n---\n\n## ❓ FAQ\n\n### Q: What compression algorithms are supported?\nA: Any compression algorithm module that you compile yourself, such as:\n\n- `lz4kd`\n- `zstdn`\n- `lzo-rle`  \n\nAs long as the corresponding `.ko` file is correctly placed in the `zram/` directory.\n\n\n### Q: What is the unit for `ZRAM_SIZE`?\nA: The unit is **bytes**. For example:\n\n```ini\nZRAM_SIZE=8589934592    # 8 GB\nZRAM_SIZE=12884901888   # 12 GB\nZRAM_SIZE=17179869184   # 16 GB\n```\n\n⚠️ It is **not recommended** to set `ZRAM_SIZE` larger than your device’s physical RAM, as it may cause system instability.\n\n\n### Q: Does the kernel need to have ZRAM support enabled?\nA: Yes. Please ensure that:\n\n- Your kernel is compiled with ZRAM support\n- Other system-level ZRAM features or tools (like Scene, etc.) are disabled to avoid conflicts\n\n\n### Q: What happens if the configuration is incorrect?\nA: The module will fail to initialize, and the ZRAM device will not be set up.\nYou can check the log to diagnose the issue:\n\n```text\n./ZRAM-Module/zram_module.log\n```\n","funding_links":[],"categories":["⚡ Performance and Optimization"],"sub_categories":["Memory Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFurLC%2FZRAM-Module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFurLC%2FZRAM-Module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFurLC%2FZRAM-Module/lists"}