How to Use Universal Android Debloater Next Generation to Remove Bloatware

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, 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, which loads 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 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 at 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).

  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).

  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).

  4. Filtering – CLI flags convert into StateFilter, RemovalFilter, and ListFilter enums (defined in 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

uad devices

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

Browse Packages with Filters

uad list --removal recommended

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

Search Functionality

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:

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

Then execute:

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

uad disable com.sonyericsson.camera

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

Re-enable Disabled Apps

uad enable com.sonyericsson.camera

Restores a previously disabled package to active status.

Update Debloat Definitions

uad update

Triggers load_debloat_lists(true) to pull the latest uad_lists.json from GitHub and cache it locally.

Interactive REPL Mode

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:

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. The GUI connects to uad-core through the same logic path as the CLI, ensuring consistent behavior across interfaces.

Key Source Files

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 map directly to standard adb commands, ensuring predictable behavior across Android versions.
  • The debloat list in 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, 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.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →