Skip to content

Commit e661366

Browse files
Add files via upload
1 parent 73a04f5 commit e661366

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# CachePurge
2+
3+
An efficient, lightweight Xposed/LSPosed module that automatically clears application caches upon launch.
4+
5+
![Android](https://img.shields.io/badge/Android-11%2B-green.svg) ![LSPosed](https://img.shields.io/badge/LSPosed-Module-blue.svg) ![Kotlin](https://img.shields.io/badge/Language-Kotlin-purple.svg)
6+
7+
## 📖 Overview
8+
9+
**CachePurge** is designed to keep your device clean and maintain storage space automatically. Instead of manually clearing caches for bloated apps, this module hooks into the application startup process and silently purges temporary files in the background.
10+
11+
It is built with a **"Steel Core" architecture**, ensuring zero impact on app startup time (Cold Start) and strict safety protocols to prevent accidental data loss.
12+
13+
## ✨ Features
14+
15+
* **🚀 Automated Cleanup:** Triggers automatically when the target application starts (`Application.onCreate`).
16+
* **🧹 Deep Cleaning:** Removes files from:
17+
* Internal Cache (`/data/user/0/.../cache`)
18+
* External Cache (`/sdcard/Android/data/.../cache`)
19+
* Code Cache (`code_cache` - JIT compiled artifacts)
20+
* **⚡ Zero-Lag Performance:**
21+
* Runs on a dedicated **Background Thread** with `MIN_PRIORITY`.
22+
* Does not block the UI thread or slow down app launch.
23+
* **🛡️ Safety First:**
24+
* **Scope Isolation:** Only runs on apps you explicitly select in LSPosed.
25+
* **Smart Deletion:** Recursively cleans files while preserving directory structures to prevent permission errors.
26+
* **Fail-Safe:** Built-in safeguards to prevent hooking into critical system processes (e.g., `android`, `com.android.systemui`).
27+
28+
## 📱 Requirements
29+
30+
* **[span_0](start_span)Android OS:** Android 11 (SDK 30) or higher[span_0](end_span).
31+
* **Root Access:** Magisk or KernelSU.
32+
* **Xposed Framework:** LSPosed (Zygisk or Riru variant recommended).
33+
34+
## 🛠️ Installation & Usage
35+
36+
1. **Install:** Download and install the `app-release.apk`.
37+
2. **Activate:** Open the **LSPosed Manager** notification.
38+
3. **Enable:** Toggle the switch to enable **CachePurge**.
39+
4. **Scope (Crucial Step):**
40+
* Select the applications you want to auto-clean (e.g., Facebook, Instagram, TikTok, Chrome).
41+
* **⚠️ WARNING:** Do NOT scope "System Framework" (android) or "System UI" unless you are a developer debugging specific issues. The module has built-in protections, but it is best practice to only scope user apps.
42+
5. **Reboot:** Restart your device (or force stop the target apps) for changes to take effect.
43+
44+
## 🔍 How It Works
45+
46+
Technically, CachePurge hooks the `onCreate` method of the `android.app.Application` class.
47+
1. It verifies the package name to ensure it matches the target scope.
48+
2. It spawns a low-priority daemon thread.
49+
3. It safely iterates through standard Android cache directories (`context.cacheDir`, `context.externalCacheDir`, `context.codeCacheDir`) and deletes the contents.
50+
51+
## 📝 Logs & Debugging
52+
53+
If you need to check if the module is working or report an issue, you can view the logs via ADB or Termux (Root):
54+
55+
```bash
56+
# Filter specifically for CachePurge logs
57+
su -c "logcat -s CachePurge"
58+
```
59+
60+
⚠️ Disclaimer
61+
This module deletes data. While it targets temporary cache files only (which are safe to delete), the developer is not responsible for any unintended data loss or app instability. Use at your own risk.
62+
📄 License
63+
This project is open source.
64+
Built with ❤️ by [thoitiettxl-cyber]

0 commit comments

Comments
 (0)