avd_manager 1.0.0
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.
π± 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 SDK 3.0 or higher (Install Dart)
- Android SDK with emulator tools (Install Android Studio)
- Java JDK 11 or higher
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 listreports the size of each AVD's local.avddirectory. 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
--abitoarm64-v8awhen not provided. Use--abi x86or--abi x86_64only 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!
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit your changes:
git commit -am 'Add awesome feature' - Push to the branch:
git push origin feature/your-feature - 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