avd_manager 1.0.0 copy "avd_manager: ^1.0.0" to clipboard
avd_manager: ^1.0.0 copied to clipboard

A lightweight CLI tool to create, patch, launch, delete, list, sort, and filter Android Virtual Devices (AVDs). Like Android Studio's AVD Manager, but in your terminal.

AVD Manager CLI Version License Downloads Last Update CI pub package Buy Me a Coffee GitHub Sponsors

πŸ“± avdm - AVD Manager CLI Tool #

avdm is a simple and efficient command-line tool that helps you manage Android Virtual Devices (AVDs) right from your terminal.

Built for developers who want a faster, scriptable, and more minimal alternative to Android Studio’s GUI-based AVD Manager.


πŸš€ Features #

  • ✨ Create and manage Android Virtual Devices with ease
  • πŸ” List all available AVDs and their configurations
  • πŸ”§ Launch AVDs with custom options
  • πŸ“‹ Delete and clean up unused or outdated AVDs
  • πŸ“¦ Show disk usage per AVD
  • πŸ“Š Sort AVDs by name or size
  • πŸ“ Filter AVDs by minimum size (e.g. --min-size 2GB)
  • ⚑ Lightweight & fast (written in Dart)
  • No GUI required

πŸ“¦ Installation #

Option 1: Via Pub.dev (requires Dart SDK)

Prerequisites #

Ensure you have the Dart SDK installed. If not, install it from https://dart.dev/get-dart

dart pub global activate avd_manager
avdm --help

1. Clone the repo #

git clone https://github.com/Tdebo21/avd_manager.git
cd avd_manager

2. Activate the CLI #

dart pub global activate --source path .

This makes avdm available globally as a command.

If you previously installed avdm, refresh the global install with:

dart pub global deactivate avdm
dart pub global activate --source path .

Option 2: Download Binary (no Dart Required)

Optionally, you can install AVD Manager CLI Tool by downloading the binary from the releases page.

πŸ›  Usage #

avdm <command> [options]

πŸ“‹ Available Commands #

Command Description
list List all AVDs with optional sort/filter
create Create a new AVD from a system image
patch Patch an existing AVD (config changes)
launch Launch a specific AVD
delete Delete a specific AVD
help Show help

πŸ”§ Options for list #

Flag Description Example
--sort Sort AVDs by name or size --sort size
--min-size Only show AVDs larger than given size --min-size 1GB

Usage Examples #

List all AVDs #

avdm list

Note: avdm list reports the size of each AVD's local .avd directory. Newly created AVDs often start very small (around 1MB) and grow after the emulator is launched and the AVD image files are created.

Sort AVDs by size #

avdm list --sort size

Filter AVDs larger than 2GB #

avdm list --min-size 2GB

Sort AVDs by name and filter by minimum size #

avdm list --sort name --min-size 1GB

Create a new AVD #

avdm create <avd_name> --device "Pixel 2" --api 30

Examples: #

avdm create Slim_API30 --api=30
avdm create TestDevice --device="Nexus 4" --api=29
avdm create miniTestPhone --device "pixel" --api 30 --abi arm64-v8a

On Apple Silicon, the tool now defaults --abi to arm64-v8a when not provided. Use --abi x86 or --abi x86_64 only if you have Intel system images installed.

Launch AVD with prompt-based selection: #

avdm launch

Launch specific AVD with defaults: #

avdm launch TestDevice

Launch with performance flags: #

avdm launch TestDevice --cold-boot --no-boot-anim --no-snapshot-load
avdm launch TestDevice --no-snapshot-save

Use "avdm --help" for more information about a command.

Delete an AVD #

avdm delete Slim_API30

🧩 How It Works #

avdm looks for AVDs in your $ANDROID_AVD_HOME environment variable.

If not set, it defaults to ~/.android/avd/.

It reads each AVD’s directory and calculates its total disk usage.

Outputs the AVD name and its formatted size (e.g. 1.94 GB).


Troubleshooting #

AVD Not Found #

Ensure your ANDROID_SDK_ROOT environment variable is set:

# macOS/Linux
export ANDROID_SDK_ROOT=~/Library/Android/sdk  # macOS
export ANDROID_SDK_ROOT=~/Android/sdk  # Linux

# Windows (PowerShell)
$env:ANDROID_SDK_ROOT="C:\Users\YourName\AppData\Local\Android\sdk"

Permission Denied (Linux/macOS) #

Ensure the tool has execute permissions:

chmod +x ~/.pub-cache/bin/avdm

Emulator Won't Launch #

  • Check that your system supports virtualization (KVM on Linux, Hypervisor Framework on macOS)
  • Increase available RAM
  • Disable VT-x/AMD-V in BIOS if conflicts exist

🀝 Contributing #

Contributions, suggestions, and bug reports are welcome!

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -am 'Add awesome feature'
  4. Push to the branch: git push origin feature/your-feature
  5. Open a Pull Request

πŸ“ License #

This project is licensed under the MIT License β€” see the LICENSE file for details.


Changelog #

See CHANGELOG.md for version history and release notes.


❀️ Support & Sponsorship #

If you found this project useful, consider sponsoring it to support further development!

πŸ’– Sponsor on GitHub https://github.com/sponsors/Tdebo21

Or buy me a coffee: https://www.buymeacoffee.com/guimbobabag

✨ Author #

Rabi Iya GitHub @Tdebo21

0
likes
160
points
71
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight CLI tool to create, patch, launch, delete, list, sort, and filter Android Virtual Devices (AVDs). Like Android Studio's AVD Manager, but in your terminal.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, path, process_run, yaml

More

Packages that depend on avd_manager