Deep Android cleaning via ADB — a gorgeous, modular TUI
Clean ALL the caches. Keep ALL your data. Watch it happen live.
- 📱 Device management — pair devices over USB (serial) or Wi-Fi (
IP:port), persisted in a config file (~/.config/genacleaner/devices.jsonor%APPDATA%\genacleaner\devices.json). Live connection status every 2 s:● connected/○ disconnected. Add (a), remove (d), save detected devices (g), connect Wi-Fi (c) and refresh (r). - 🧹 Deep cleaning that never touches user data
- Cache of every installed app with
pm clear --cache-only(only each app's cache directory — never app data). - Residual & shared caches swept with
cmd package trim-caches. - System logs (
logcat -c) and temp files (/data/local/tmp). - With root (emulator, userdebug build, or Magisk/KernelSU): crash
residue (tombstones / ANR / dropbox) plus regenerable system caches
(
package_cache,/cache,/data/cache).
- Cache of every installed app with
- 🎨 Spectacular real-time TUI
- Animated ASCII title with 3D shadow and slowly cycling colors.
- Progress bar on top with the current phase (package
n/m). - Two huge block-font indicators, updated constantly:
- Free space with a green
▲arrow and the % gained by the cleanup. - Freed this session, ticking up step by step.
- Free space with a green
- Styled log console (colors per type: step ✓ ok ⚠ warn ✗ error, items).
- ⚡ Threaded pipeline — the cleaner runs on its own thread and streams events to the UI through an mpsc channel; the UI never blocks.
Real captures rendered by the app itself (genacleaner --screenshot).
Devices view — animated title, live connection status
██████ ████ ██████ ██ ████
█ ██████ █ █ ████ █ ██ ██████ ████ █ █ ██████ ████
█ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █ █ █ █
█ ████ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █ █ █ █
█ █ ██████ █ █ ██████ █ ██ ██████ ██████ █ █ ██████ ██
█ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █
█ █ █ █ █ █ █ █ █ ██ █ █ █ █ █ █ █ █ █
██████ ██████ █ █ ████ ██████ ██████ ██████ ████ █ █ ██████ █
DEEP ANDROID CLEANER · VIA ADB
● adb available · Android Debug Bridge version 1.0.41
Connect a device or press [a] to add one
┌ DEVICE LIST ───────────────────────────────────────────────────────────────────────────────────────────────────────┐
│▸ ◉ Pixel 8 (RF8N1234567) [usb] — connected │
│ ○ Mi Phone (192.168.1.42:5555) [wifi] — disconnected │
│ ◉ sdk_gphone64_x86_64 (emulator-5554) [usb] — connected [detected · g to save] │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
↑/↓ move · [Enter] clean · [a] add · [d] remove · [g] save detected · [c] connect Wi-Fi · [r] refresh · [q] quit
Cleaning view — progress bar, big indicators, styled console
GenaCleaner — Deep Clean ◉ Pixel 8 (RF8N1234567) · no root
┌ PROGRESS ──────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│██████████████████████████████████████ Clearing app caches (132/280) ◐ — 47% │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌ FREE SPACE ─────────────────────────────────────────────┐┌ FREED THIS SESSION ─────────────────────────────────────┐
│Current free space ││Space freed by GenaCleaner │
│ █ █ █████ ███ ████ ████ ││ █ ███ ███ ████ ████ │
│ ██ ██ █ █ █ █ █ █ ││ ██ █ █ █ █ █ █ █ │
│ █ █ ████ █ █ █ █ █ ││ █ █ █ █ █ █ █ │
│ █ █ █ ████ █ ███ ████ ││ █ █ █ █ █ ███ ████ │
│ █ █ █ █ █ █ █ █ ││ █ █ █ █ █ █ █ █ │
│ █ █ ██ █ █ █ █ █ █ █ ││ █ ██ █ █ █ █ █ █ █ │
│ ███ ███ ██ ███ ███ ███ ████ ││ ███ ██ ███ █████ ███ ████ │
│▲ +2.1% thanks to cleanup ││cleanup in progress… │
└─────────────────────────────────────────────────────────┘└─────────────────────────────────────────────────────────┘
┌ CONSOLE ───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│[00:42] ▸ === Deep cleanup started === │
│[00:42] Initial free space: 11.90 GB │
│[00:43] ✓ Root access obtained: extended cleanup enabled │
│[00:43] ▸ App caches — 280 packages │
│[00:43] Cache of com.google.android.youtube — 1.2 GB cleared │
│[00:43] Cache of com.instagram.android — 512 MB cleared │
│[00:44] Cache of com.spotify.music — 340 MB cleared │
│[00:44] ⚠ com.example.broken: Failed │
│[00:44] ✓ Cache progress: +2.10 GB │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
[Esc] devices · [q] quit
Regenerate them anytime with
cargo run -- --screenshot.
Prerequisites
- Rust (edition 2021, MSRV ~1.85+).
- ADB (Android platform-tools) on your
PATH, or point to the binary with theGENACLEANER_ADBenvironment variable. - On the phone: enable Developer options → USB debugging (and Wireless debugging for Wi-Fi).
Build & run
# Linux / macOS-style shells
cargo build --release
./target/release/genacleaner# Windows (PowerShell)
cargo build --release
.\target\release\genacleaner.exeCross-compile from Windows to Linux:
rustup target add x86_64-unknown-linux-gnu
cargo build --release --target x86_64-unknown-linux-gnu # needs a cross linker
cargo check --target x86_64-unknown-linux-gnu # type-check only| View | Key | Action |
|---|---|---|
| Devices | ↑/↓ (or k/j) |
Move through the list |
| Devices | Enter |
Select device and start the deep clean |
| Devices | a |
Add device (USB serial or IP:port for Wi-Fi) |
| Devices | d |
Remove a saved device |
| Devices | g |
Save a detected device to the list |
| Devices | c |
Connect a saved Wi-Fi device |
| Devices | r |
Refresh connection status |
| Cleaning | Enter/s |
Start / rerun the cleanup |
| Anywhere | Esc |
Back to the device list |
| Anywhere | q / Ctrl+C |
Quit |
- On the phone: Settings → Developer options → Wireless debugging →
enable and note the
IP:port. - In GenaCleaner press
aand enterIP:port(e.g.192.168.1.42:5555). The device is saved and auto-connects on startup.
| What gets cleaned | Command | Touches user data? |
|---|---|---|
| Every app cache | pm clear --cache-only <pkg> |
❌ No — only the app's cache/ dir |
| Residual/shared caches | cmd package trim-caches |
❌ No |
| System logs | logcat -c |
❌ No |
| Shell/adb temp files | rm -rf /data/local/tmp/* |
❌ No |
| Tombstones / ANR / dropbox (root) | rm -rf /data/tombstones/* … |
❌ No |
| System caches (root) | rm -rf /data/system/package_cache/* /cache/* … |
❌ No |
🔒 Core guarantee:
pm clear --cache-onlywas designed by Android to clear only the cache. GenaCleaner never runs plainpm clear— which would wipe app data. What gets freed is regenerable: caches, logs, temp files and crash residue.
src/
├── main.rs # entry point, event loop, terminal guard
├── tui.rs # terminal setup/restore (crossterm)
├── app.rs # app state & TUI state machine
├── adb.rs # adb command wrapper
├── cleaner.rs # cleaning pipeline (own thread, progress events)
├── config.rs # saved-device persistence (JSON)
├── screenshots.rs # dev tool: real UI captures via TestBackend
└── ui/
├── mod.rs # general rendering, banner & input modals
├── banner.rs # big block-font title, animated colors + shine
├── devices.rs # device list view
├── clean.rs # cleaning view (bar, indicators, console)
└── bigtext.rs # 5×7 block font for the big indicators
assets/ # icon.png · icon.ico · github-banner.png (scripts/gen_icons.py)
packaging/ # genacleaner.desktop (Linux launcher entry)
scripts/ # gen_icons.py · install.sh
screenshots/ # real UI captures (cargo run -- --screenshot)
.github/workflows/ # release.yml (Windows .exe + Linux tarball)
