# How to Build Universal Android Debloater Next Generation from Source

> Build Universal Android Debloater Next Generation from source easily. Follow our guide to compile the GUI or CLI versions using Cargo for a cleaner Android experience.

- 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

---

**To build Universal Android Debloater Next Generation from source, clone the repository and run `cargo build --release -p uad-gui --no-default-features --features wgpu,self-update,img` for the GUI, or `cargo build --release -p uad-cli` for the command-line interface.**

The **Universal Android Debloater Next Generation (UAD-NG)** is a Rust workspace maintained by the Universal-Debloater-Alliance organization. Building it from source requires the Rust toolchain and produces two binaries: `uad-ng` for the graphical interface and `uad` for scripting. This guide walks through the exact build process used in the CI pipeline defined in [`/.github/workflows/build_artifacts.yml`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main//.github/workflows/build_artifacts.yml).

## Prerequisites

Before compiling, ensure your system meets these requirements:

- **Rust toolchain** (stable) – Install via `rustup` (e.g., `curl https://sh.rustup.rs -sSf | sh`)
- **Cargo** – Bundled with Rust for package management
- **ADB** (Android Debug Bridge) – Must be on your system `$PATH` for runtime device communication
- **Platform build tools** – Linux: `make`, `gcc`, `libssl-dev`; macOS: Xcode command-line tools; Windows: Visual Studio Build Tools

## Step-by-Step Build Instructions

### Clone the Repository

Start by cloning the source code and entering the project directory:

```bash
git clone https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
cd universal-android-debloater-next-generation

```

### Verify the Rust Toolchain

Confirm you have a stable Rust edition (2024) installed:

```bash
rustup show

```

This should report the active toolchain compatible with the workspace [`Cargo.toml`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/Cargo.toml).

### Building the GUI Binary

The GUI crate (`uad-gui`) depends on the **Iced** UI toolkit and requires specific feature flags to enable graphics and self-update capabilities:

```bash
cargo build --release -p uad-gui \
    --no-default-features \
    --features wgpu,self-update,img

```

This command produces `target/release/uad-ng` (Linux/macOS) or `target/release/uad-ng.exe` (Windows). The **`wgpu`** feature enables the WebGPU backend for headless or modern environments, while **`self-update`** embeds the update logic from [`uad-core/src/update.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/uad-core/src/update.rs).

### Building the CLI Binary

The CLI crate (`uad-cli`) is a thin wrapper around `uad-core` that exposes scriptable commands. Build it without additional features:

```bash
cargo build --release -p uad-cli

```

This generates `target/release/uad` (or `uad.exe` on Windows), providing REPL and sub-command functionality defined in [`crates/uad-cli/src/commands.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/crates/uad-cli/src/commands.rs).

### Verifying the Build

Confirm both binaries execute correctly:

```bash
./target/release/uad-ng --help
./target/release/uad --help

```

Each should display usage information without requiring network access or a connected device.

## Understanding the Workspace Architecture

UAD-NG is organized as a Cargo workspace with three interconnected crates.

### Directory Structure

The workspace root contains the master [`Cargo.toml`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/Cargo.toml) declaring these members:

- **`crates/uad-core`** – Houses core logic including [`src/adb.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/src/adb.rs) for ADB command construction, [`src/uad_lists.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/src/uad_lists.rs) for JSON package list handling, and [`src/sync.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/src/sync.rs) for bulk operation generation
- **`crates/uad-gui`** – Implements the graphical interface using `iced = "0.14.0"`; entry point is [`src/main.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/src/main.rs)
- **`crates/uad-cli`** – Provides the command-line interface with argument parsing via `clap` and async runtime via `tokio`

### Feature Flags Explained

The build system uses feature flags to customize the output:

- **`wgpu`** – Required for the GUI on platforms lacking native OpenGL drivers
- **`self-update` / `no-self-update`** – Controls whether the binary includes the auto-update mechanism from `uad-core::update`
- **`img`** – Enables image support (icons and screenshots) in the GUI

These flags are defined in the respective [`Cargo.toml`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/Cargo.toml) files and toggled via the `--features` argument.

## Build Automation Reference

The repository's CI pipeline in [`.github/workflows/build_artifacts.yml`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/.github/workflows/build_artifacts.yml) automates this process across Linux, macOS (Intel and Apple Silicon), and Windows. It caches the Cargo registry, compiles both crates with the feature flags described above, creates platform-specific tarballs, and generates SHA256 checksums. You can replicate this locally by running the cargo commands shown in the previous sections, then archiving the binaries manually.

## Running Your Binaries

After building, you can immediately use the tools to manage Android devices.

**Launch the GUI:**

```bash
./target/release/uad-ng

```

**Use the CLI to list devices:**

```bash
./target/release/uad devices

```

**Filter packages by removal category:**

```bash
./target/release/uad list --removal recommended

```

## Summary

- **Universal Android Debloater Next Generation** is a Rust workspace producing two binaries: `uad-ng` (GUI) and `uad` (CLI)
- **Build commands**: Use `cargo build --release -p uad-gui` with `--features wgpu,self-update,img` for the graphical version, or `cargo build --release -p uad-cli` for the command-line version
- **Key files**: Workspace defined in [`Cargo.toml`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/Cargo.toml), core logic in `crates/uad-core/src/`, GUI entry in [`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), CLI entry in [`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)
- **Requirements**: Rust toolchain, Cargo, and ADB on system path
- **Customization**: Toggle `self-update` and `wgpu` features via cargo flags to match your deployment needs

## Frequently Asked Questions

### Do I need to build both the GUI and CLI binaries?

No, you can build only the component you need. The GUI (`uad-gui`) provides a graphical interface built with Iced, while the CLI (`uad-cli`) offers a scriptable command-line interface. Both rely on the same `uad-core` library for ADB communication and package management.

### What are the `wgpu` and `self-update` feature flags for?

The **`wgpu`** flag enables the WebGPU graphics backend for the Iced UI, which is necessary on headless servers or modern Linux/macOS systems without native OpenGL. The **`self-update`** flag embeds logic from [`uad-core/src/update.rs`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/uad-core/src/update.rs) that allows the binary to check GitHub for newer releases and update itself automatically. You can omit `self-update` if you want a static binary that never phones home.

### Can I build this on Windows, macOS, and Linux?

Yes, the source code is cross-platform. The CI workflow in [`.github/workflows/build_artifacts.yml`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/.github/workflows/build_artifacts.yml) demonstrates builds for all three platforms. Ensure you have the appropriate build tools installed: Visual Studio Build Tools for Windows, Xcode command-line tools for macOS, or `gcc` and `libssl-dev` for Linux.

### Where does the package list data come from?

The application downloads the [`uad_lists.json`](https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation/blob/main/uad_lists.json) file from the repository's `resources/assets/` directory, as handled by [`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). When you run `uad update`, it fetches the latest version of this JSON file containing package descriptions and removal recommendations.