avdmanager
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
avdmanager
یک ابزار خط فرمان است که به شما امکان می دهد دستگاه های مجازی اندروید (AVD) را از خط فرمان ایجاد و مدیریت کنید. یک AVD به شما امکان میدهد ویژگیهای یک گوشی Android، ساعت Wear OS یا دستگاه Android TV را که میخواهید در شبیهساز Android شبیهسازی کنید، تعریف کنید.
اگر از Android Studio استفاده میکنید، نیازی به استفاده از این ابزار ندارید و میتوانید AVDها را از IDE ایجاد و مدیریت کنید .
ابزار avdmanager
در بسته Android SDK Command-Line Tools در 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 جدید ایجاد کنید. شما باید یک name برای AVD ارائه دهید و شناسه بسته SDK را برای استفاده برای AVD با استفاده از sdk_id در گیومه مشخص کنید. به عنوان مثال، دستور زیر با استفاده از تصویر سیستم x86 برای سطح 25 API یک AVD با نام test ایجاد می کند: avdmanager create avd -n test -k "system-images;android-25;google_apis;x86" موارد زیر کاربرد سایر گزینه ها را شرح می دهد:-
-c { path | size } : مسیر تصویر کارت SD برای این AVD یا اندازه یک تصویر کارت SD جدید برای ایجاد برای این AVD در کیلوبایت یا مگابایت که با K یا M نشان داده شده است. به عنوان مثال، -c path/to/sdcard/ یا -c 1000M . -
-f : ایجاد نیروی AVD. اگر نیاز دارید یک AVD موجود را با یک AVD جدید با همان نام بازنویسی کنید، از این گزینه استفاده کنید. -
-p path : مسیری به مکانی که دایرکتوری فایلهای این AVD ایجاد میشود. اگر مسیری را مشخص نکنید، AVD در ~/.android/avd/ ایجاد می شود.
|
delete avd -n name | یک AVD را حذف کنید. شما باید AVD را با name مشخص کنید. |
move avd -n name [-p path ] [-r new-name ] | یک AVD را جابجا یا تغییر نام دهید. شما باید AVD را با name مشخص کنید. موارد زیر کاربرد سایر گزینه ها را شرح می دهد:-
-p path : مسیر مطلق به مکانی که در آن دایرکتوری ایجاد می شود که فایل های این AVD در آن جابه جا می شوند. اگر این آرگومان را وارد نکنید، AVD منتقل نمیشود. اگر می خواهید نام AVD را در جای خود تغییر دهید، ممکن است انتخاب کنید که این آرگومان را وارد نکنید. -
-r new-name : نام جدید AVD در حال تغییر نام.
|
list [target|device|avd] [-c] | تمام اهداف، تعاریف دستگاه یا AVD های موجود را فهرست کنید. اگر target ، device یا avd را مشخص نکنید، avdmanager هر سه مورد را فهرست میکند. برای دریافت خروجی فشرده مناسب برای اسکریپت ها، آرگومان -c را وارد کنید. آرگومان -c هنگام فهرست کردن هر سه گزینه با هم در دسترس نیست. |
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],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. |"]]