跳到主要内容
KernelSU 模块

ClearBox

不可变 Release 已同步

A Magisk module dedicated to automatic cleaning and optimization of Android

介绍

ClearBox

ClearBox

License Downloads

Telegram QQ YHChat

🌍 ?

| English | 简体中文 | 正體中文 | Русский | 한국어 | 日本語 |

What is ClearBox?

ClearBox is a multi-functional, deep, and fast cleaning tool that can quickly free up space on your device, organize storage, lock, clear software caches, installation packages, compressed files, junk files, empty folders, suppress cache, classify files, clear data, and prevent software updates/installs all in one go. It also supports automatic optimization/cleaning, file categorization features, and allows you to add custom cleaning rules, file cleaning/organization categorization, whitelists, and other rules. Additionally, it supports adding custom tasks via an automation system using modules.

The execution time is much faster than regular cleaning software on the market, comparable to ✈️ speed. The automation function is only handled by a very low-usage Timed, so the overhead is negligible. No software background process is required, no forced app binding, and it supports full functionality through a terminal TUI.

image

Compatible with Magisk, APatch, KernelSU, and their various forks

Installation?

Release Version

CI Build

How to use:

:Install and use the module ClearBox app (asked during module installation

:Enable the terminal UI feature by typing ClearBox in any terminal

Brief functions:

One-click optimization & cleanup

Perform fast one-click optimization/cleanup, the effect is equivalent to periodic optimization. Including cache cleanup, junk cleanup, fast disk GC, etc. According to module settings, file cleanup/organization can also be run

Clean/Kill custom directories

This function is rule-based cleanup. You can add cleanup rules yourself in the /data/adb/wipe_cache/CleanConfigs directory.

Configuration method:

Rules use text format. Optionally fill in @/xxx (starting from the root directory) on the first line of the rule file to specify the initial directory. Different rule files are independent.

One file/directory path per line. If you have specified the initial path, you can fill in only the relative (initial directory) path instead of the full path.

Clear junk files & empty folders

Clean internal/external storage empty folders, multimedia cache, software cache, etc.

Clear all software cache

Clears third-party application caches, excluding system application caches. If you have enabled external storage cache cleaning, it will also clean external storage.

Deep File Cleaning

File cleaning function, comes with some built-in cleaning configurations, supports custom file format configurations, and supports external storage.

Configuration Method:

Configuration Directory: /data/adb/wipe_cache/FileConfigs

Configuration Approach: Create a .conf document file in the configuration file directory. The file name (without extension) will be displayed as the corresponding cleaning item name on the cleaning page. Fill in custom file extensions into this file, separated by spaces or line breaks. Lines beginning with # are comments.

Add @MAX or MIN = < size / B or BYTE / K or KB / M or MB / G or GB > within the file to specify the target file size range. Parsing is overwritable — later declarations override previous ones, so you can leverage this to craft your own rules.

Example:

# I am a comment

# This declaration specifies to only organize zip and 7z files with a max of 1G and min of 10MB
# but iso and img have no maximum size limit

@MAX=1/G @MIN=10/M

zip 7z

# max -1 means unlimited (max no longer applies until the next declaration), but min still applies

@max=-1
iso img

# Also supports KB, MB, GB &

@MIN=10/KB exe
@MIN=1/MB apk

Note:MIN cannot be greater than MAX, otherwise MIN is automatically invalidated. Please reset MAX before setting a larger MIN. MAX, MIN, and size units are case‑insensitive (you may have noticed :⁠-⁠)),Floating point numbers (decimals) are currently not supported.

The software/terminal cleaning page will be dynamically built based on the configuration files.

Scope: File cleaning, file organization.

Software rule cleanup

One of the rule cleanup functions, used to clean the internal private directory of software according to rules

Configuration method:

Configuration directory: /data/adb/wipe_cache/AppCleanRules

Configuration way:Create a conf file in the configuration directory. The file name is arbitrary but must not contain special symbols, spaces, etc. Fill in @<package_name>/<app_name> at the beginning of the first line to specify the software corresponding to this rule; After that, one folder path or file path per line. The initial directory is the App data directory.

The module will automatically find the data directory corresponding to the package name. The software name will be displayed in the cleanup interface

The software/terminal cleanup page will be dynamically built according to the configuration file

Please do not hard-code cleanup rules with root directory /xxx in the rules, otherwise cleanup will report an error and skip this rule file.

The module will automatically check some configuration errors

Clear system cache

Clear system software cache, system cache, and also clear MTP host data (can solve MTP file transfer file list display abnormality)

[Beta] Storage Analysis (NCDU)

Analyze storage directory usage – who ate my storage space?

Auto Cleanup

Feature automation, driven by the Timed component (ultra-low overhead).

• Did you know?

You can use the Timed module to run custom tasks! Follow the configuration below:

Config Directory: /data/adb/wipe_cache/TimedConfigs

Create a custom-named .conf file in this directory, fill in and modify the following lines (some are optional):

time=interval/time unit (currently supports M/minutes, H/hours, D/days)
date=last run time (timestamp number). This is an optional parameter. If not filled, the program will automatically set it to the current time. Set to -1 to execute immediately.
run=program and parameters to execute, supports Shell syntax (parsed by Shell)
in=start time/end time (only run between hour X and hour Y. This is an optional parameter)
post=notification title/notification content (send notification. This is an optional parameter; not recommended for minute-level tasks)

Among them, time and run are required fields, all KEYs are case-insensitive. Example:

time=1/D
date=0
run=sync
in=0/5
post=Test Run/Executed Sync

The above configuration will run the /system/bin/sync command once between 0:00 and 5:00 AM daily and send a notification.

image

Block All Software Update Installations

As the name implies, file system-level forced blocking of software installations, does not handle expanded storage, therefore if the software is installed on external storage, this item is invalid

Internal Storage Fix Function

As the name implies, locks the internal storage root directory layout to prevent various applications from randomly creating files/folders, does not handle expanded storage

Block cache function

This is an important function of the module, used to dynamically block foreground software from generating cache.

After turning on this function and restarting to activate, it will automatically cache the latest 5 foreground software and block cache. You can customize and add a whitelist.

Whitelist location: /data/adb/wipe_cache/WhiteLists/StopCache.conf or add it in the module ClearBox app.

Other:The module adopts a dynamic wait update method (10s & 30s), on the one hand to avoid continuous resource occupation, on the other hand, some software will be abnormal when launched under the cache block state. Delayed activation of cache blocking after entering the software is the optimal solution.

Blocking cache will not clear the software cache, so the software cache will not be 0, but will grow slowly. This avoids continuous small file erasure and only limits large cache generation

Extremely low overhead, automatically delays execution when the screen is off

If some software is abnormal, please add it to the whitelist yourself!

Magnet (one-click file classification)

One-click organization of internal/external storage files, shares rules with file cleaning, supports custom organization directory

Rule Directory Binding (Redirect)

Configuration Directory:/data/adb/wipe_cache/BindConfigs

Create a custom name .conf file in this directory and fill in custom mount rules:

<Bind Directory> <Target Directory>

Note: Please do not enter absolute paths, but rather relative internal storage paths, otherwise mounting will fail

When writing/creating directories/files into , they will be redirected to

This feature cannot currently run on devices using sdcardfs, but don't worry, Android 12+ devices have basically stopped using sdcardfs

Disk & software optimization

This is an optimization function set, including disk optimization ( f2fs-GC ) and Dexoat (software pre-compilation) functions

F2fs disk GC, this function belongs to emergency GC, so it does not need to be used frequently, just run it regularly. The solution comes from the big guy Coolapk@Amktiao, and has been agreed, thanks to the big guy!

image

Dexoat software pre-compilation, that is, pre-compile software to accelerate runtime speed, the disadvantage is that it takes up storage space, which belongs to the space-electricity-for-smooth operation () The module provides three modes in advance: system default Dexoat, custom compilation mode, RESET:

System default Dexoat: Android system (especially newer systems) will also automatically compile some hotspot functions when idle to improve overall running speed, so the module provides system Dexoat mode, this mode is equivalent to manually triggering system Dexoat, the mode and compilation items are determined by the system.

Custom compilation mode:This mode supports manually specifying the compilation mode, currently supports Speed, Speed-profile, Everything three modes

RESET:Restore compilation

Welcome to contribute and participate in development in any form!

Welcome everyone to share your feedback & suggestions on the module features. Thank you.

👉 Development Guide

The module ClearBox App is made using the Kr-Script project. Thanks to the project.

Star History

Star History

历史版本

V5.2.2

最新 Version 5.2.2

版本代码 102 102-V5.2.2

下载
English

ADD

  • The automatic cleaning settings page now shows the last run time; if never run/configured, it displays as empty
  • Added app cleaning rule preset: WeChat (com.tencent.mm)

UPDATE

  • App splash screen reworked to follow relevant guidelines; no longer displays a custom splash on startup
  • File organization no longer shows items with a count of 0
  • Timed language auto-refresh interval changed to 5 minutes, fixing delayed language updates
  • App code optimization: removed dead code, updated some legacy code
  • Removed the useless Tab bar at the bottom of the App to improve the full-screen experience
  • App storage cache cleaning no longer reports errors on failure, since most failures are simply due to the cache directory not existing
  • Directory reorganization: whitelist files are no longer scattered in the config directory but placed in a dedicated directory
  • The whitelist now applies to app private directories in internal storage, preventing junk and empty folders from being cleaned within them
  • Custom rule cleaning now displays the total cleaned size

FIX

  • [Test] Tested fix for disappearing downloaded themes in Xiaomi Themes and abnormal image loading in TIM
  • Fixed a bug where the search box in the App chooser interface merged into the status bar
简体中文

ADD

  • 自动清理设置页面现在会显示上次运行时间,如果从未运行/设置过则显示为空
  • 新增软件清理规则预设: 微信/WeChat (com.tencent.mm)

UPDATE

  • App 启动屏改造,遵循相关规范,启动时不再显示自定义 Splash
  • 现在文件归类不再显示归类数量为 0 的项
  • Timed 语言自动更新时间改为 5 分钟,修复语言更新不及时问题
  • App 代码优化,删除无效代码,修改部分老旧代码
  • 删除 App 底部无用 Tab 栏,提高全面屏体验
  • 现在 App 储存缓存清理失败不再报错,因为其中大多数仅因缓存目录不存在
  • 目录整理:白名单文件现在不再散落于配置目录而是专有目录内
  • 现在白名单对内部储存 App 私有目录生效,不会再清理其内垃圾、空文件夹
  • 现在自定义规则清理会显示总清理大小

FIX

  • [Test] 测试修复 小米主题 下载主题消失及 TIM 图片加载异常问题
  • 修复 App 选择界面搜索框融进状态栏的 Bug
正體中文

ADD

  • 自動清理設定頁面現在會顯示上次執行時間,如果從未執行/設定過則顯示為空
  • 新增軟體清理規則預設: 微信/WeChat (com.tencent.mm)

UPDATE

  • App 啟動畫面改造,遵循相關規範,啟動時不再顯示自訂 Splash
  • 現在檔案歸類不再顯示歸類數量為 0 的項目
  • Timed 語言自動更新時間改為 5 分鐘,修復語言更新不及時問題
  • App 程式碼最佳化,刪除無效程式碼,修改部分老舊程式碼
  • 刪除 App 底部無用 Tab 欄,提高全螢幕體驗
  • 現在 App 儲存快取清理失敗不再報錯,因為其中大多數僅因快取目錄不存在
  • 目錄整理:白名單檔案現在不再散落於設定目錄而是專有目錄內
  • 現在白名單對內部儲存 App 私有目錄生效,不會再清理其內垃圾、空資料夾
  • 現在自訂規則清理會顯示總清理大小

FIX

  • [Test] 測試修復 小米主題 下載主題消失及 TIM 圖片載入異常問題
  • 修復 App 選擇介面搜尋框融入狀態列的 Bug
Русский

ADD

  • На странице настроек автоматической очистки теперь отображается время последнего запуска; если очистка никогда не запускалась/не настраивалась, поле остаётся пустым
  • Добавлен предустановленный набор правил очистки приложений: WeChat (com.tencent.mm)

UPDATE

  • Переработан экран запуска App в соответствии с рекомендациями; при запуске больше не отображается пользовательский Splash
  • Классификация файлов больше не показывает элементы с количеством 0
  • Интервал автоматического обновления языка в Timed изменён на 5 минут, исправлена задержка обновления языка
  • Оптимизация кода App: удалён неиспользуемый код, обновлён некоторый устаревший код
  • Удалена бесполезная нижняя панель Tab в App для улучшения полноэкранного опыта
  • Очистка кэша хранилища App больше не сообщает об ошибке при неудаче, поскольку в большинстве случаев причина — отсутствие каталога кэша
  • Реорганизация каталогов: файлы белого списка больше не разбросаны по каталогу конфигурации, а находятся в отдельном каталоге
  • Белый список теперь применяется к приватным каталогам приложений во внутреннем хранилище — мусор и пустые папки внутри них больше не очищаются
  • Очистка по пользовательским правилам теперь отображает общий размер очистки

FIX

  • [Test] Протестировано исправление исчезновения загруженных тем в Xiaomi Themes и аномальной загрузки изображений в TIM
  • Исправлена ошибка, из-за которой строка поиска в интерфейсе выбора App сливалась со строкой состояния
한국어

ADD

  • 자동 정리 설정 페이지에 마지막 실행 시간이 표시됩니다. 한 번도 실행/설정하지 않은 경우 비어 있음으로 표시됩니다
  • 앱 정리 규칙 사전 설정 추가: WeChat (com.tencent.mm)

UPDATE

  • App 시작 화면 개편, 관련 가이드라인 준수, 시작 시 커스텀 Splash를 더 이상 표시하지 않음
  • 파일 분류에서 개수가 0인 항목을 더 이상 표시하지 않음
  • Timed 언어 자동 업데이트 간격을 5분으로 변경, 언어 업데이트 지연 문제 수정
  • App 코드 최적화: 불필요한 코드 삭제, 일부 오래된 코드 수정
  • App 하단의 불필요한 Tab 바를 삭제하여 전체 화면 경험 개선
  • App 저장소 캐시 정리 실패 시 더 이상 오류를 보고하지 않음. 실패의 대부분은 캐시 디렉터리가 존재하지 않기 때문임
  • 디렉터리 정리: 화이트리스트 파일이 더 이상 구성 디렉터리에 흩어져 있지 않고 전용 디렉터리에 위치함
  • 화이트리스트가 내부 저장소의 앱 개인 디렉터리에 적용되어, 그 안의 쓰레기 및 빈 폴더를 더 이상 정리하지 않음
  • 커스텀 규칙 정리 시 총 정리 크기가 표시됨

FIX

  • [Test] 小米 테마에서 다운로드한 테마가 사라지는 문제 및 TIM 이미지 로딩 이상 문제 수정 테스트
  • App 선택 인터페이스의 검색창이 상태 표시줄에 겹치는 버그 수정
日本語

ADD

  • 自動クリーン設定ページに前回実行時間が表示されるようになりました。一度も実行/設定されていない場合は空で表示されます
  • アプリクリーンルールプリセットを追加: WeChat (com.tencent.mm)

UPDATE

  • App 起動画面を刷新し、関連ガイドラインに準拠。起動時にカスタム Splash を表示しなくなりました
  • ファイル分類で件数が 0 の項目を表示しなくなりました
  • Timed の言語自動更新間隔を 5 分に変更し、言語更新の遅延問題を修正
  • App コード最適化:無効なコードを削除し、一部の古いコードを更新
  • App 下部の不要な Tab バーを削除し、全画面表示の体験を向上
  • App のストレージキャッシュクリーン失敗時にエラーを報告しなくなりました。失敗のほとんどはキャッシュディレクトリが存在しないことが原因のためです
  • ディレクトリ整理:ホワイトリストファイルは設定ディレクトリに散在せず、専用ディレクトリに配置されるようになりました
  • ホワイトリストが内部ストレージのアプリプライベートディレクトリに適用され、その中のゴミや空フォルダがクリーンされなくなりました
  • カスタムルールクリーンで合計クリーンサイズが表示されるようになりました

FIX

  • [Test] 小米テーマ でダウンロードしたテーマが消える問題と、TIM の画像読み込み異常の修正をテスト
  • App 選択画面の検索ボックスがステータスバーに重なるバグを修正

文件 1

ClearBox-V5.2.2-102.zip 3.1 MiB

SHA-256 f13ff3e567c36f76c4181444deb56a182b43252bbf0cbe84e38a791bbb62fdc2 · Attestation

透明度

Tag
102-V5.2.2 不可变 Release
Tag commit
8691f941648c
内容 commit
a8de1f7f6d70
SHA-256
f13ff3e567c36f76c4181444deb56a182b43252bbf0cbe84e38a791bbb62fdc2
最近同步到变更

自行复核

KernelSU 模块不对模块签名,也不审计模块代码。SHA-256 只证明下载内容与本索引一致。可使用 GitHub CLI 自行复核:

gh release verify 102-V5.2.2 -R FLYCOM-E/ClearBox
gh release verify-asset 102-V5.2.2 ClearBox-V5.2.2-102.zip -R FLYCOM-E/ClearBox