-
Notifications
You must be signed in to change notification settings - Fork 368
UAD CLI
The UAD command-line interface (CLI) provides the same core debloating functionality as the graphical application in a form suited to terminals, scripts, and remote sessions.
Important
Back up your data and read the FAQ before changing system packages. Removing an essential package can make a device unbootable and require a factory reset.
- Direct command execution without graphical overhead
- Package-manager-like commands
- Filtering by package state, removal level, debloat list, or search term
- Dry runs and warnings for unsafe packages
- Enable, disable, uninstall, and restore actions
- An interactive shell that keeps device state in memory
- Shell completions for Bash, Zsh, Fish, PowerShell, and Elvish
- Multi-device and multi-user support
-
ADB installed and available in
PATH - An Android device with USB debugging enabled
- The device authorized for ADB connections
Run adb devices to confirm that the device is connected and authorized.
The CLI currently needs to be built from source. Follow the build instructions, then build only the CLI package:
cargo build --release -p uad-cliThe binary is written to target/release/uad. The Cargo package is named uad-cli, but the installed binary is named uad.
uad devicesList all packages on the first connected device:
uad list
# Short alias
uad lsFilter packages by state:
uad list --state enabled
uad list --state disabled
uad list --state uninstalledFilter by removal level:
uad list --removal recommended
uad list --removal advanced
uad list --removal expert
uad list --removal unsafeSee removal definitions before acting on packages in the Advanced, Expert, or Unsafe categories.
Filter by debloat list:
uad list --list google
uad list --list oem
uad list --list aospSearch for packages:
uad list --search "facebook"
uad list -q "chrome"Filters can be combined:
uad list --state enabled --removal recommended --search "google"uad info com.android.chrome
uad info com.facebook.katana --device SERIAL123Uninstall one or more packages:
uad uninstall com.facebook.katana
uad rm com.facebook.katana com.facebook.servicesUse a dry run to preview an operation:
uad uninstall com.facebook.katana --dry-runSelect a device and Android user:
uad uninstall com.facebook.katana --device SERIAL123 --user 0uad enable com.android.chrome
uad restore com.google.android.gmsuad disable com.facebook.katanaUpdate the locally cached UAD lists:
uad updateStart an interactive session for faster repeated operations:
uad repl
# Alias
uad shellCommands in the interactive shell use the same syntax:
uad> help
uad> list --state enabled
uad> info com.facebook.katana
uad> uninstall com.facebook.katana
uad> enable com.android.chrome
uad> device
uad> exit
The interactive shell:
- Keeps device state in memory
- Saves command history for access with the up and down arrow keys
- Loads the UAD lists once at startup
- Supports the same device and package operations as the regular CLI
Generate a completion script for your shell:
# Bash
uad completions bash > /usr/share/bash-completion/completions/uad
# Zsh
uad completions zsh > /usr/local/share/zsh/site-functions/_uad
# Fish
uad completions fish > ~/.config/fish/completions/uad.fish
# PowerShell
uad completions powershell > uad.ps1| Command | Alias | Description |
|---|---|---|
devices |
— | List connected Android devices |
list |
ls |
List packages with optional filters |
info |
— | Show detailed package information |
uninstall |
rm |
Uninstall one or more packages |
enable |
restore |
Enable or restore packages |
disable |
— | Disable packages while keeping their data |
update |
— | Update UAD package lists |
completions |
— | Generate shell completions |
repl |
shell |
Start the interactive shell |
Run uad --help or uad <command> --help for the options supported by the installed version.
uad list --search facebook
uad uninstall com.facebook.katana com.facebook.services --dry-run
# If the preview is correct:
uad uninstall com.facebook.katana com.facebook.servicesuad devices
uad list --device SERIAL123
uad uninstall com.facebook.katana --device SERIAL123- Preview changes with
--dry-run. - Read warnings for packages marked as Unsafe.
- Most operations can be reversed with
enableorrestore. - Specify
--devicewhen more than one device is connected. - Specify
--userwhen working with Android secondary users or work profiles.
Note
Without root access, system applications are not physically removed from the system partition. See the FAQ for details.
- Ensure USB debugging is enabled.
- Run
adb devicesand authorize the computer on the device. - Disconnect and reconnect the USB cable.
- Follow the connection steps in Getting started.
- The package might already be uninstalled for the selected user.
- Check its exact name with
adb shell pm list packages. - Run
uad updateto refresh the package lists.
Some system packages cannot be changed without root access, and device vendors may impose additional restrictions.
See the project's contribution guidelines. UAD-ng is licensed under GPL-3.0.