avdmanager
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
avdmanager
es una herramienta de línea de comandos que te permite crear y administrar dispositivos virtuales de Android (AVD) desde la línea de comandos. Un AVD te permite definir las características de un teléfono celular Android, un reloj Wear OS o un dispositivo Android TV que desees simular en Android Emulator.
Si usas Android Studio, no necesitas usar esta herramienta
en su lugar,
crear y administrar AVD desde el IDE.
La herramienta avdmanager
se incluye en el paquete de herramientas de línea de comandos del SDK de Android en android_sdk/cmdline-tools/version/bin/avdmanager
.
Sintaxis
Para usar avdmanager
, usa la siguiente sintaxis:
avdmanager [global options] command [command options]
Opciones globales
Tabla 1: Lista de opciones globales para avdmanager.
Opción global |
Descripción |
-s | --silent
|
Modo silencioso: Solo se muestran los errores. |
-h | --help
|
Es la ayuda vinculada al uso. |
-v | --verbose
|
Modo detallado: Se muestran los errores, las advertencias y los mensajes informativos. |
--clear cache
|
Borra la memoria caché del manifiesto del repositorio de SDK Manager.
|
Comandos y opciones de comando
Tabla 2: Lista de comandos y opciones para avdmanager.
Comando y opciones |
Descripción |
create avd -n name -k "sdk_id" [-c
{path|size}] [-f] [-p path]
|
Crea un AVD nuevo. Debes proporcionar un name para el AVD y especificar el ID del paquete del SDK que se usará para el AVD con sdk_id entre comillas.
Por ejemplo, el siguiente comando crea un AVD llamado test con la imagen del sistema x86 para el nivel de API 25:
avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
A continuación, se describen los usos para las demás opciones:
-
-c {path|size} : Es la ruta de acceso a la imagen de la tarjeta SD para este AVD o el tamaño, en KB o MB, de una imagen nueva de tarjeta SD que se crea para este AVD, indicado con K o M . Por ejemplo, -c path/to/sdcard/ o -c 1000M .
-
-f : Fuerza la creación del AVD. Usa esta opción si necesitas sobrescribir un AVD existente con un nuevo AVD con el mismo nombre.
-
-p path : Es la ruta de acceso a la ubicación donde se creará el directorio para los archivos de este AVD. Si no especificas una ruta de acceso, el AVD se crea en ~/.android/avd/ .
|
delete avd -n name
|
Borra un AVD. Debes especificar el AVD con name. |
move avd -n name [-p path] [-r
new-name]
|
Mueve un AVD o le cambia el nombre. Debes especificar el AVD con name.
A continuación, se describen los usos para las demás opciones:
-
-p path : Es la ruta de acceso absoluta a la ubicación en la que se creará el directorio a donde se moverán los archivos de este AVD. Si no incluyes este argumento, el AVD no se moverá. Podrías optar por no incluir este argumento si deseas cambiar el nombre del AVD en cuestión.
-
-r new-name : Es el nombre nuevo del AVD al que se le cambia el nombre.
|
list [target|device|avd] [-c]
|
Permite listar la totalidad de los destinos, las definiciones de dispositivos o los AVDs. Si no especificas target , device o avd , avdmanager enumera los tres. Incluye el argumento -c a fin de recibir un resultado compacto, adecuado para secuencias de comandos. El argumento -c no se encuentra disponible cuando se listan las tres opciones juntas.
|
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-27 (UTC)"],[],[],null,["# avdmanager\n\nThe `avdmanager` is a command-line tool that lets you create and manage\nAndroid Virtual Devices (AVDs) from the command line. An AVD lets you define the\ncharacteristics of an Android handset, Wear OS watch, or Android TV device\nthat you want to simulate in the Android Emulator.\n\nIf you're using Android Studio, then you don't need to use this tool and you\ncan instead\n[create and manage AVDs from the IDE](/studio/run/managing-avds).\n\nThe `avdmanager` tool is included in the Android SDK Command-Line Tools package\nat\n\u003cvar translate=\"no\"\u003eandroid_sdk\u003c/var\u003e`/cmdline-tools/`\u003cvar translate=\"no\"\u003eversion\u003c/var\u003e`/bin/avdmanager`.\n\nSyntax\n------\n\nTo use `avdmanager`, use the following syntax: \n\n```\navdmanager [global options] command [command options]\n```\n\n### Global options\n\n**Table 1.** List of global options for\navdmanager.\n\n| Global option | Description |\n|---------------------|-------------------------------------------------------------------------|\n| `-s` \\| `--silent` | Silent mode: only errors are printed out. |\n| `-h` \\| `--help` | Usage help. |\n| `-v` \\| `--verbose` | Verbose mode: errors, warnings, and informational messages are printed. |\n| `--clear cache` | Clear the SDK Manager repository manifest cache. |\n\n### Commands and command options\n\n**Table 2.** List of commands and options\nfor avdmanager.\n\n| Command and options | Description |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `create avd -n `\u003cvar translate=\"no\"\u003ename\u003c/var\u003e` -k \"`\u003cvar translate=\"no\"\u003esdk_id\u003c/var\u003e`\" [-c {`\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`|`\u003cvar translate=\"no\"\u003esize\u003c/var\u003e`}] [-f] [-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`]` | Create a new AVD. You must provide a \u003cvar translate=\"no\"\u003ename\u003c/var\u003e for the AVD and specify the ID of the SDK package to use for the AVD using \u003cvar translate=\"no\"\u003esdk_id\u003c/var\u003e wrapped in quotes. For example, the following command creates an AVD named `test` using the x86 system image for API level 25: ``` avdmanager create avd -n test -k \"system-images;android-25;google_apis;x86\" ``` The following describes the usages for the other options: - `-c {`\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`|`\u003cvar translate=\"no\"\u003esize\u003c/var\u003e`}`: The path to the SD card image for this AVD or the size of a new SD card image to create for this AVD in KB or MB, denoted with `K` or `M`. For example, `-c path/to/sdcard/` or `-c 1000M`. - `-f`: Force creation of the AVD. Use this option if you need to overwrite an existing AVD with a new AVD using the same name. - `-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e: Path to the location where the directory for this AVD's files will be created. If you don't specify a path, the AVD is created in `~/.android/avd/`. |\n| `delete avd -n `\u003cvar translate=\"no\"\u003ename\u003c/var\u003e | Delete an AVD. You must specify the AVD with \u003cvar translate=\"no\"\u003ename\u003c/var\u003e. |\n| `move avd -n `\u003cvar translate=\"no\"\u003ename\u003c/var\u003e` [-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e`] [-r `\u003cvar translate=\"no\"\u003enew-name\u003c/var\u003e`]` | Move or rename an AVD. You must specify the AVD with \u003cvar translate=\"no\"\u003ename\u003c/var\u003e. The following describes the usages for the other options: - `-p `\u003cvar translate=\"no\"\u003epath\u003c/var\u003e: The absolute path to the location at which to create the directory where this AVD's files will be moved. If you don't include this argument, the AVD won't be moved. You might choose not to include this argument if you want to rename the AVD in place. - `-r `\u003cvar translate=\"no\"\u003enew-name\u003c/var\u003e: The new name of the AVD being renamed. |\n| `list [target|device|avd] [-c]` | List all available targets, device definitions, or AVDs. If you don't specify `target`, `device`, or `avd`, `avdmanager` lists all three. Include the `-c` argument to receive a compact output suitable for scripts. The `-c` argument is not available when listing all three options together. |"]]