Building from source

Important

We only officially support the 3 major kernels (WindowsNT, Linux, Darwin/XNU), because those are the main ones with ADB binaries available. We can't guarantee UAD-NG will work on other OSes. However, if you have issues running it on POSIX systems, we'd like to know why

  1. Install build-dependencies for your target platform:
    • Linux: install a C compiler, such as Clang or GCC. Optionally, install the mold linker (and configure it), for incremental (debug/develop) builds.
    • Windows: ensure MSVC is installed
    • Mac: you might have to run brew install coreutils
  2. Install the Rust toolchain.
  3. Clone this repository however you like. If you won't contribute PRs then you should only download the contents as:
    • Latest commit
    # https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone
    git clone --filter=blob:none https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation
    
  4. cd into your local repo
  5. And finally, build the GUI or CLI for distribution:
cargo build --release -p uad-gui
cargo build --release -p uad-cli

Or install the GUI or CLI for the current machine:

cargo install --path crates/uad-gui --config 'build.rustflags="-C target-cpu=native"'
cargo install --path crates/uad-cli --config 'build.rustflags="-C target-cpu=native"'

To update, repeat from step#3. git pull is recommended if you want to update frequently (saves bandwidth).

Nix

With Nix and flakes enabled, skip the manual dependency setup. Clone the repository and enter its directory, then build the GUI or CLI:

nix build           # GUI: result/bin/uad-ng
nix build .#uad-cli  # CLI: result/bin/uad

Run directly with nix run (GUI) or nix run .#uad-cli -- --help (CLI).

For development, nix develop provides Rust, ADB, and the required libraries. Use the Cargo commands above inside that shell.

See also