The 4-Tree Safety Model
AI-Phone-Debloater classifies every removable package into one of four safety tiers. Higher tiers carry more risk. Critical packages are permanently hard-blocked.
| Tier | Name | Risk | What it covers | Reversible |
|------|------|------|----------------|------------|
| Tier 1 | Safe Bloat | Low | Carrier junk, ad daemons, telemetry | Yes |
| Tier 2 | Advanced Debloat | Medium | Secondary assistants, OEM cloud sync | Yes |
| Tier 3 | Extreme Debloat | High | Replaceable stock apps (keyboards, dialers) | Yes |
| Tier 4 | Critical Core | Blocked | Core system packages — never touched | N/A |
Tier 4: Critical Core Blacklist
Tier 4 packages are permanently hard-blocked under **any** flag or prompt:
- RuleSet.load seeds the critical set from HARDCRITICAL_PACKAGES (89 packages) unioned with critical-do-not-touch.json (89 packages) = **89 unique inviolable packages**.
- Critical packages cannot be disabled or uninstalled under any flag.
- validate_rules.py enforces zero collisions between other rule databases and critical-do-not-touch.json.
Examples of blocked packages: SystemUI, Phone, Settings, and core Android framework components.
User 0 Preservation
All mutations target user 0 only:
- `pm disable-user --user 0 <pkg>` — freeze
- `pm uninstall -k --user 0 <pkg>` — uninstall keeping app data via `-k`
- `pm enable --user 0 <pkg>` — re-enable
- `cmd package install-existing --user 0 <pkg>` — restore uninstalled app
This preserves Knox 0x0 warranty status and app private directories.
Validation
Run the rule validation suite to confirm tier integrity:
python cli/tests/validate_rules.py
---
*Last updated: 2026-11-01*