# How to Use Universal Android Debloater Next Generation to Remove Bloatware

> Safely remove Android bloatware with Universal Android Debloater Next Generation. This Rust-based tool offers CLI and GUI options for easy system cleanup.

- Repository: [Universal-Debloater-Alliance/universal-android-debloater-next-generation](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation)
- Tags: how-to-guide
- Published: 2026-06-18

---

**Universal Android Debloater Next Generation (UAD-NG) is a Rust-based tool that wraps ADB commands to safely identify, filter, and remove system bloatware from Android devices through both CLI and GUI interfaces.**

UAD-NG provides a curated JSON database of system packages annotated with removal severity levels, allowing you to uninstall or disable unnecessary apps without rooting your device. The project is split into three specialized crates that separate device communication, command-line interfaces, and graphical rendering. Understanding how these components interact ensures you can confidently remove bloatware while maintaining system stability.

## Architecture Overview

The codebase follows a modular architecture where core logic remains isolated from user interfaces.

### uad-core

The `uad-core` crate handles all low-level ADB operations and data parsing. Located in [`crates/uad-core/src/adb.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-core/src/adb.rs), it defines the `ACommand` builder that creates one-to-one mappings with native `adb` CLI commands. This crate also manages the debloat list parser in [`crates/uad-core/src/uad_lists.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-core/src/uad_lists.rs), which loads [`resources/assets/uad_lists.json`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/resources/assets/uad_lists.json) into a `HashMap<String, Package>` structure.

### uad-cli

The `uad-cli` crate provides the terminal interface built with *clap*. The entry point at [`crates/uad-cli/src/main.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-cli/src/main.rs) parses flags like `--state`, `--removal`, `--list`, and `--search`, then forwards operations to `uad-core`. It supports sub-commands including `devices`, `list`, `uninstall`, `enable`, `disable`, `info`, `update`, and an interactive `repl`.

### uad-gui

The `uad-gui` crate renders a graphical interface using the *iced* UI library. The [`main.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/main.rs) at [`crates/uad-gui/src/main.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-gui/src/main.rs) bootstraps the windowed environment and connects the same core filters and package data to interactive widgets.

## Step-by-Step Debloating Process

UAD-NG executes device modifications through a predictable sequence defined in the source code:

1. **Device Detection** – `ACommand::devices()` runs `adb devices` and returns serial numbers with connection status (see lines 111-114 of [`crates/uad-core/src/adb.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-core/src/adb.rs)).

2. **Package Enumeration** – `PmCommand::list_packages_sys` builds `adb shell pm list packages -s` with optional filters (`-e` for enabled, `-d` for disabled, `-u` for uninstalled) and parses output into plain package names (lines 48-74 of [`adb.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/adb.rs)).

3. **List Loading** – `load_debloat_lists(true)` attempts a remote GET from the repository to fetch the latest definitions, falling back to the bundled `DATA` constant if offline (lines 7-22 of [`crates/uad-core/src/uad_lists.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-core/src/uad_lists.rs)).

4. **Filtering** – CLI flags convert into `StateFilter`, `RemovalFilter`, and `ListFilter` enums (defined in [`filters.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/filters.rs)), pruning the package set to match your criteria.

5. **State Modification** – `commands::change_package_state` wraps `adb shell pm uninstall -k --user <uid> <pkg>` for removal or `pm enable/disable` for toggling, supporting a `dry_run` flag to preview commands.

6. **List Updates** – `commands::update_lists` triggers remote refresh and caches the fresh JSON locally.

## CLI Commands and Examples

After installing the `uad` binary and ensuring `adb` is available on your host system, use these commands to manage bloatware:

### List Connected Devices

```bash
uad devices

```

This executes `ACommand::devices()` to display attached Android devices with their serial numbers.

### Browse Packages with Filters

```bash
uad list --removal recommended

```

Shows only packages marked as **Recommended** for removal. Other severity levels include **Advanced**, **Expert**, and **Unsafe**.

### Search Functionality

```bash
uad list -q browser

```

Searches package names and descriptions for "browser", leveraging the search functionality implemented in the CLI parser.

### Remove Packages Safely

Always perform a dry-run first:

```bash
uad uninstall com.android.providers.partnerbrowsercustomizations --dry-run

```

Then execute:

```bash
uad uninstall com.android.providers.partnerbrowsercustomizations

```

This invokes `pm uninstall -k --user <uid>` via the `change_package_state` function, preserving user data while removing the package.

### Disable Without Uninstalling

```bash
uad disable com.sonyericsson.camera

```

Blocks execution while keeping the package data intact, useful for apps you might need later.

### Re-enable Disabled Apps

```bash
uad enable com.sonyericsson.camera

```

Restores a previously disabled package to active status.

### Update Debloat Definitions

```bash
uad update

```

Triggers `load_debloat_lists(true)` to pull the latest [`uad_lists.json`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/uad_lists.json) from GitHub and cache it locally.

### Interactive REPL Mode

```bash
uad repl

```

Drops into an interactive shell for ad-hoc ADB exploration without typing full commands repeatedly.

## GUI Mode

For a visual workflow, launch the graphical interface:

```bash
uad-gui

```

The UI presents a sidebar with the same filters (`State`, `Removal`, `List`) found in the CLI, displaying icons, descriptions, and dependency information pulled from [`uad_lists.json`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/uad_lists.json). The GUI connects to `uad-core` through the same logic path as the CLI, ensuring consistent behavior across interfaces.

## Key Source Files

- **[`crates/uad-core/src/adb.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-core/src/adb.rs)** – Core ADB command builder maintaining one-to-one mapping with `adb` CLI commands.
- **[`crates/uad-core/src/uad_lists.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-core/src/uad_lists.rs)** – JSON parser and remote refresh handler for debloat lists.
- **[`crates/uad-cli/src/main.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-cli/src/main.rs)** – CLI entry point with *clap* argument parsing and sub-command routing.
- **[`crates/uad-gui/src/main.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-gui/src/main.rs)** – GUI bootstrap and *iced* event loop setup.
- **[`resources/assets/uad_lists.json`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/resources/assets/uad_lists.json)** – Curated database of system packages with removal annotations and dependency data.

## Summary

- **Universal Android Debloater Next Generation** separates concerns into `uad-core`, `uad-cli`, and `uad-gui` crates for maintainability.
- All ADB interactions in [`crates/uad-core/src/adb.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-core/src/adb.rs) map directly to standard `adb` commands, ensuring predictable behavior across Android versions.
- The debloat list in [`uad_lists.json`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/uad_lists.json) categorizes packages by severity: **Recommended**, **Advanced**, **Expert**, and **Unsafe**.
- Use `--dry-run` before uninstalling to preview commands without executing them.
- Both CLI and GUI share the same core logic and filters, providing identical functionality through different interfaces.

## Frequently Asked Questions

### Can UAD-NG remove bloatware without root access?

Yes. UAD-NG utilizes Android Debug Bridge (ADB) to execute `pm uninstall` commands with the `--user` flag, which removes packages for the current user profile without requiring root privileges. This works because Android's package manager supports per-user uninstallation while keeping the system partition intact.

### How does UAD-NG determine which apps are safe to remove?

The tool references [`resources/assets/uad_lists.json`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/resources/assets/uad_lists.json), a curated database where each package entry includes a `removal` field indicating severity levels. **Recommended** packages are generally safe to remove, while **Unsafe** packages may break critical functionality. The list is maintained by the Universal Debloater Alliance community and can be updated remotely via the `uad update` command.

### What happens if I accidentally remove a system package?

If you used the `uninstall` command, you can typically restore the package by reinstalling it via `adb install` or performing a factory reset, since `pm uninstall -k --user` preserves the APK in the system partition. If you used `disable` instead of `uninstall`, simply run `uad enable <package_name>` to restore functionality immediately.

### Is the CLI or GUI better for batch operations?

The CLI (`uad-cli`) is more efficient for batch operations because it supports shell scripting and chained commands with filters like `--removal recommended`. The GUI (`uad-gui`) provides better visual verification for individual packages but requires manual interaction for each selection. Both interfaces use the same underlying `uad-core` logic, so results are identical.