بطاقة mksdcard
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
استخدِم أداة mksdcard
لإنشاء نسخة على القرص متوافقة مع نظام FAT32 يمكنك تحميلها إليه.
أجهزة محاكاة تعمل بأجهزة Android افتراضية مختلفة لمحاكاة حضور الفعالية
بطاقة SD نفسها في أجهزة متعددة.
أداة mksdcard
المتوفّرة في حزمة "أدوات حزمة تطوير البرامج (SDK) لنظام التشغيل Android"
تَوَقَّفْ فِي android-sdk/emulator/mksdcard
.
إذا لم تكن بحاجة إلى نسخة من القرص يمكن مشاركتها
بين أجهزة افتراضية متعدّدة، لن تحتاج إلى استخدام الأمر mksdcard
.
بشكل افتراضي، يستخدم المحاكي الصورة الافتراضية التي يتم إنشاؤها وتخزينها باستخدام
متوسّط مدة المشاهدة النشطة بدلاً من ذلك
الاستخدام
لاستخدام أداة mksdcard
، استخدِم الأمر التالي:
mksdcard -l label size file
الخيارات
يوضّح الجدول التالي خيارات سطر الأوامر في mksdcard
:
Option |
الوصف |
-l label |
تصنيف وحدة التخزين لصورة القرص المراد إنشاؤها |
size |
عدد صحيح يحدّد حجم صورة القرص المطلوب إنشاؤها.
إذا كان size عددًا صحيحًا بسيطًا، فإنّه يحدّد الحجم بالبايت. يمكنك أيضًا
تحديد الحجم بالكيلوبايت أو ميغابايت أو الغيغابايت من خلال إلحاق K أو M أو G
إلى size. على سبيل المثال، 1048576K أو 1024M . تشير رسالة الأشكال البيانية
والحد الأدنى للحجم هو 9 ميغاهرتز. لا يمكن لمحاكي Android استخدام صور أصغر حجمًا. الحد الأقصى للحجم هو
1099511627264 بايت، أي ما يعادل 1023 غيغابايت.
|
file |
المسار/اسم الملف لصورة القرص المطلوب إنشاؤه بالنسبة إلى دليل العمل الحالي.
|
مثال
إنشاء نسخة من القرص بتنسيق mySdCardFile.img
:
mksdcard -l mySdCard 1024M mySdCardFile.img
شغِّل محاكيَين بمتوسّط مدة مشاهدة مختلفة. استخدِم العلامة -sdcard
لتحديد الاسم
ومسار صورة القرص التي أنشأتها:
emulator -avd Pixel_API_25 -sdcard mySdCardFile.img
emulator -avd NEXUS_6_API_25 -sdcard mySdCardFile.img
لمزيد من المعلومات عن
emulator
وخياراته،
راجِع
بدء المحاكي من سطر الأوامر.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# mksdcard\n\nUse the `mksdcard` tool to create a FAT32 disk image that you can load into\nemulators running different Android Virtual Devices (AVDs) to simulate the presence\nof the same SD card in multiple devices.\n\n\nThe `mksdcard` tool provided in the Android SDK Tools package\nis located in \u003cvar translate=\"no\"\u003eandroid-sdk\u003c/var\u003e`/emulator/`\u003cvar translate=\"no\"\u003emksdcard\u003c/var\u003e.\n\n\nIf you don't need a disk image that can be shared\namong multiple virtual devices, you don't need to use the `mksdcard` command.\nBy default, the emulator uses the default image that is generated by and stored with the\nactive AVD instead.\n\n### Usage\n\n\nTo use the `mksdcard` tool, use the following command:\n\n```\nmksdcard -l label size file\n```\n\n### Options\n\nThe following table describes the command-line options of `mksdcard`:\n\n| Option | Description |\n|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `-l `\u003cvar translate=\"no\"\u003elabel\u003c/var\u003e | A volume label for the disk image to create |\n| \u003cvar translate=\"no\"\u003esize\u003c/var\u003e | An integer that specifies the size of the disk image to create. If \u003cvar translate=\"no\"\u003esize\u003c/var\u003e is a simple integer, it specifies the size in bytes. You can also specify the size in kilobytes, megabytes, or gigabytes by appending K, M, or G to \u003cvar translate=\"no\"\u003esize\u003c/var\u003e. For example, `1048576K` or `1024M`. The minimum size is 9M. The Android emulator cannot use smaller images. The maximum size is 1099511627264 bytes, which equates to 1023 GB. |\n| \u003cvar translate=\"no\"\u003efile\u003c/var\u003e | The path/filename of the disk image to create relative to the current working directory. |\n\n### Example\n\n\nCreate the `mySdCardFile.img` disk image: \n\n```\nmksdcard -l mySdCard 1024M mySdCardFile.img\n```\n\n\nStart two emulators with different AVDs. Use the `-sdcard` flag to specify the name\nand path of the disk image you created: \n\n```\nemulator -avd Pixel_API_25 -sdcard mySdCardFile.img\nemulator -avd NEXUS_6_API_25 -sdcard mySdCardFile.img\n```\nFor more information about the `emulator` command and its options, see [Start the emulator from the command line](/studio/run/emulator-commandline)."]]