avdmanager
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
avdmanager
は、コマンドラインから Android Virtual Device(AVD)を作成して管理できるようにするコマンドライン ツールです。AVD を使用すると、Android Emulator でシミュレートする Android ハンドセット、Wear OS スマートウォッチ、Android TV デバイスの特性を定義できます。
Android Studio を使用している場合は、このツールを使用する必要はありません。代わりに IDE から AVD を作成して管理できます。
avdmanager
ツールは、Android SDK コマンドライン ツール パッケージ(android_sdk/cmdline-tools/version/bin/avdmanager
)に含まれています。
構文
avdmanager
を使用するには、次の構文を使用します。
avdmanager [global options] command [command options]
グローバル オプション
表 1. avdmanager のグローバル オプションのリスト。
グローバル オプション
|
説明
|
-s | --silent
|
サイレント モード: エラーのみが出力されます。
|
-h | --help
|
使用方法のヘルプが出力されます。
|
-v | --verbose
|
詳細モード: エラー、警告、情報メッセージが出力されます。
|
--clear cache
|
SDK Manager のリポジトリのマニフェスト キャッシュを削除します。
|
コマンドとコマンド オプション
表 2. avdmanager のコマンドとオプションのリスト。
コマンドとオプション
|
説明
|
create avd -n name -k "sdk_id" [-c
{path|size}] [-f] [-p path]
|
新しい AVD を作成します。AVD の name を指定し、引用符で囲んだ sdk_id を使用して AVD に使用する SDK パッケージの ID を指定します。たとえば、次のコマンドは、API レベル 25 の x86 システム イメージを使用して、test という名前の AVD を作成します。
avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"
他のオプションの使用方法は次のとおりです。
<ph type="x-smartling-placeholder"></ph>
-
-c {path|size} : この AVD に使用する SD カードイメージのパス、あるいは、この AVD 用に作成する新しい SD カードイメージのサイズ(KB または MB 単位を K または M で表記)。たとえば、-c path/to/sdcard/ や -c 1000M のように指定します。
-
-f : AVD を強制作成します。既存の AVD を同じ名前の新しい AVD で上書きする必要がある場合に、このオプションを使用します。
-
-p path : この AVD のファイルのディレクトリが作成される場所のパス。パスを指定しない場合、AVD は ~/.android/avd/ に作成されます。
|
delete avd -n name
|
AVD を削除します。name を使用して AVD を指定する必要があります。
|
move avd -n name [-p path] [-r
new-name]
|
AVD の移動や名前の変更を行います。name を使用して AVD を指定する必要があります。他のオプションの使用方法は次のとおりです。
-
-p path : この AVD のファイルの移動先ディレクトリを作成する場所の絶対パス。この引数を指定しないと、AVD は移動しません。この引数を指定しないことで、AVD を移動せずに名前を変更できます。
-
-r new-name : 名前を変更する AVD の新しい名前。
|
list [target|device|avd] [-c]
|
利用可能なすべてのターゲット、デバイス定義、AVD のリストを出力します。target 、device 、avd のいずれも指定しないと、avdmanager によって 3 つすべてがリスト表示されます。-c 引数を追加すると、スクリプトに適したコンパクトな出力を取得できます。3 種類をすべて出力する場合、-c 引数は指定できません。 |
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 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. |"]]