اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تقدّم هذه الصفحة تفاصيل حول تحديث أجهزة Android باستخدام أداتَي fastboot وadb. يتيح لك Adb ربط
محطة العمل المخصّصة للتطوير مباشرةً بجهاز Android و
تنفيذ مجموعة متنوعة من العمليات. يتيح لك Fastboot تثبيت (فلاش) نظام Android
والتفاعل مع برنامج تشغيل الجهاز حتى تتمكّن من اختبار التغييرات في نظام التشغيل والتطبيقات. للحصول على معلومات إضافية حول آلية عمل adb، مع التركيز على تطوير التطبيقات، يُرجى الاطّلاع على
صفحة Android Debug Bridge (adb) في "استوديو Android".
للحصول على تفاصيل حول رمز adb، اطّلِع على ملف adb
README.
التأكّد من توفُّر أداة fastboot وadb
عند إنشاء نظام التشغيل Android، يتم إنشاء adb وfastboot تلقائيًا. لتأكيد
توفّر adb وfastboot، شغِّل الأوامر التالية:
قبل تشغيل نظام Android على جهاز، عليك تفعيل اتصال USB:
فعِّل خيارَي "فتح قفل المصنّع الأصلي للجهاز" و"تصحيح أخطاء الجهاز عبر USB" في خيارات المطوّرين:
في تطبيق "الإعدادات"، انقر على لمحة عن الهاتف.
انقر على رقم الإصدار سبع مرات.
عندما تظهر لك الرسالة لقد أصبحت الآن مطوّرًا، انقر على <-.
انقر على النظام، ثم انقر على خيارات المطوّرين.
فعِّل ميزة فتح قفل المصنّع الأصلي للجهاز وميزة تصحيح أخطاء الجهاز عبر USB. إذا كان خيار
فتح قفل الجهاز من قِبل الشركة المصنّعة غير متاح، يُرجى الاتصال بالإنترنت كي يتمكّن الجهاز من تسجيل الدخول. إذا لم تنجح هذه الطريقة، يمكنك فرض عملية تسجيل
دخول: في تطبيق "المخطّط الداعم"، أدخِل *#*#CHECKIN#*#* (*#*#2432546#*#*)
(لا يلزم توفُّر شريحة SIM). بعد إدخال الرقم (بدون الحاجة إلى الضغط على زر الاتصال)،
يختفي النص ويظهر إشعار يفيد بنجاح العملية.
إذا ظلت ميزة "فتح الجهاز من قِبل المصنّع الأصلي" غير متاحة، قد يكون جهازك مقفلًا برمز شريحة SIM من قِبل
مشغّل شبكة الجوّال ولا يمكن فتح قفل برنامج الإقلاع.
وصِّل جهازك بمنفذ USB على محطة العمل.
تشغيل الجهاز في وضع Fastboot
قبل تثبيت نظام التشغيل Android على جهاز، يجب أن يكون الجهاز في وضع Fastboot.
هناك طريقتان لتشغيل جهاز في وضع Fastboot:
استخدام الأمر adb: من سطر الأوامر، اكتب adb reboot bootloader.
استخدِم مجموعة مفاتيح:
حدِّد مجموعة المفاتيح لجهازك. للاطّلاع على جدول مجموعات مفاتيح Fastboot، يُرجى الاطّلاع على مجموعات مفاتيح Fastboot.
أوقِف تشغيل الجهاز.
شغِّل الجهاز واضغط مع الاستمرار على تركيبة المفاتيح الخاصة
بجهازك (التي تم تحديدها في الخطوة 1).
إلغاء قفل برنامج الإقلاع
بعد التمهيد إلى وضع Fastboot، عليك فتح قفل برنامج الإقلاع.
لإلغاء قفل برنامج الإقلاع، اتّبِع الخطوات التالية:
(اختياري) احتفِظ بنسخة احتياطية من أي ملفات مهمة على الجهاز.
نفِّذ الأمر "فتح قفل الجهاز":
إذا كنت بصدد تحديث جهاز Nexus أو Pixel تم تصنيعه في عام 2015 أو
بعد ذلك، يمكنك تشغيل fastboot flashing unlock.
بالنسبة إلى هاتف Pixel 2: لفلاش أداة تحميل البرامج، تأكَّد من أنّ أداة تحميل البرامج في هاتف Pixel 2
تم تحديثها إلى الإصدار Oreo MR1 على الأقل. لتحديث هاتف Pixel 2 إلى هذا
الإصدار، يمكنك تطبيق التحديث عبر شبكة غير سلكية (OTA) أو تثبيت تحديث OTA كامل من مصدر غير معروف.
بالنسبة إلى هواتف Pixel 2 XL فقط التي تعمل بالإصدار الأقدم من أداة التحميل TMZ20a: قد يكون من الضروري فتح قفل القسم
المهم قبل إعادة التثبيت. لإلغاء قفل
الأقسام المهمة على هاتف Pixel 2 XL فقط، شغِّل
fastboot flashing unlock_critical.
إذا كنت بصدد فتح قفل جهاز أقدم من عام 2015، شغِّل fastboot oem unlock.
يعرض الجهاز المستهدَف شاشة تأكيد.
أكِّد أنّك تريد محو جميع بيانات المستخدم وفتح قفل الجهاز.
فلاش جهاز
يمكنك فلاش نظام Android بالكامل باستخدام أمر واحد. يؤدي فلاشَة برمجية لنظامٍ كامل باستخدام أمر واحد إلى التأكّد من أنّ النظام الذي يتم فلاشه متوافق مع مشغّل الإقلاع ووحدة البث المُثبَّتَين، ويُنشئ أقسام التشغيل والاسترداد والنظام معًا، ويعيد تشغيل النظام.
لفلاش جهاز، اتّبِع الخطوات التالية:
ضَع الجهاز في وضع Fastboot عن طريق الضغط مع الاستمرار على تركيبة المفاتيح المناسبة عند التشغيل أو باستخدام الأمر التالي:
adbrebootbootloader
بعد أن يصبح الجهاز في وضع Fastboot، شغِّل:
fastbootflashall-w
يؤدي خيار -w إلى محو قسم /data على الجهاز، وهو أمر مفيد
عند إعادة تحميل ذاكرة جهاز معيّن لأول مرة.
إعادة قفل برنامج الإقلاع
لإعادة قفل برنامج الإقلاع:
بالنسبة إلى الأجهزة التي تم تصنيعها في العام 2015 أو الإصدارات الأحدث، شغِّل الأمر fastboot flashing lock.
بالنسبة إلى الأجهزة التي تم إصدارها في عام 2014 أو قبله، نفِّذ الأمر fastboot oem lock.
إعادة ضبط الجهاز على الإعدادات الأصلية
تتوفّر صور المصنع لأجهزة Google من
صور المصنع لأجهزة Nexus وPixel.
توزّع شركة Motorola مباشرةً صور المصنع لجهاز Motorola Xoom.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Flash with Fastboot\n\nThis page provides details for flashing Android builds onto devices using the\n*fastboot* and *adb* tools. Adb lets you connect your\ndevelopment workstation directly to your Android-powered device and\nperform a variety of operations. Fastboot lets you install (flash) Android\nand interact with the device's bootloader so you can test your OS and app\nchanges. For additional information on how adb works, with emphasis on app\ndevelopment, see\n[Android Studio's Android Debug Bridge (adb) page](https://developer.android.com/studio/command-line/adb).\nIf you want details on the code for adb, see the adb\n[README](https://cs.android.com/android/platform/superproject/+/android-latest-release:packages/modules/adb/README.md).\n| **Note:** Google provides an additional flash tool, called [*Android Flash Tool*](/docs/setup/test/flash), that is intended for use only with prebuilt builds.\n| **Note:** Fastboot is also the name of a bootloader module and mode.\n\nVerify that you have fastboot and adb\n-------------------------------------\n\nWhen you build Android, adb and fastboot is built by default. To confirm\nthe availability of adb and fastboot, run the following commands: \n\n adb --version\n fastboot --version\n\nIf you see version numbers, you have fastboot and adb installed. If you\ndon't see version numbers, ensure you\n[built Android](/docs/setup/build/building).\nsuccessfully. Continue to\n[Enable your USB connection](#enable-usb).\n\nEnable your USB connection\n--------------------------\n\nBefore running Android on a device, you must enable your USB connection:\n\n1. Enable OEM unlocking and USB debugging in the developer options:\n\n 1. In the Settings app, tap **About phone**.\n 2. Tap **Build number** seven times.\n 3. When you see the message **You are now a developer!** , tap **\\\u003c-**.\n 4. Tap **System** , then tap **Developer options**.\n 5. Enable **OEM unlocking** and **USB debugging** . If OEM unlocking is unavailable, connect to the internet so the device can check in. If that still doesn't work, you can force a check in: In the Dialer app, enter **\\*#\\*#CHECKIN#\\*#\\*** (\\*#\\*#2432546#\\*#\\*) (no SIM required). After entering the number (no need to press call), the text disappears and a success notification appears.\n\n If OEM unlocking remains unavailable, your device might be SIM locked by\n your carrier and the bootloader can't be unlocked.\n2. Connect your device to a USB port on your workstation.\n\nBoot into Fastboot mode\n-----------------------\n\nBefore Android can be flashed to a device, a device must be in Fastboot mode.\nThere are two ways to boot a device into Fastboot mode:\n\n- Use the `adb` command: From the command-line, type `adb reboot bootloader`.\n- Use a key combination:\n 1. Determine the key combination for your device. For a table of Fastboot key combinations, see [Fastboot key combinations](/docs/setup/reference/fastboot-keys).\n 2. Turn the device off.\n 3. Turn the device on and immediately hold down the key combination for your device (determined in step 1).\n\nUnlock the bootloader\n---------------------\n\nAfter booting into fastboot mode, you must unlock the bootloader.\n| **Warning:** For privacy reasons, unlocking the bootloader deletes user data. After unlocking, all data on the device is erased, including both private app data and shared data accessible over USB (including photos and movies).\n\nTo unlock the bootloader:\n\n1. (Optional) Back up any important files on the device.\n2. Run the unlock command for your device:\n\n - If you're updating a Nexus or Pixel device that is manufactured in 2015 or later, run `fastboot flashing unlock`.\n - For Pixel 2: To flash the bootloader, verify that the Pixel 2's bootloader is updated to at least Oreo MR1's version. To update to a Pixel 2 to this version, apply the over-the-air (OTA) update or sideload a [full OTA](https://developers.google.com/android/ota).\n - For Pixel 2 XL only with loader version prior to TMZ20a: The critical partitions might need to be unlocked before flashing. To unlock the critical partitions on Pixel 2 XL only, run `fastboot flashing unlock_critical`.\n - If you're unlocking a pre-2015 device, run `fastboot oem unlock`.\n\n The target device displays a confirmation screen.\n3. Confirm that you want to erase all user data and unlock the device.\n\n | **Tip:** If your device is shown in the output before reboot, but Fastboot or the flash script are misbehaving, it might be an issue with your USB cable. Try a different port or switching connectors. For example, if you're using a USB C port on your workstation try a USB A port instead.\n\n| **Note:** On Nexus 10, after unlocking the bootloader, the internal storage remains unformatted. You can format the device using `fastboot format cache` followed by `fastboot format userdata`.\n\nFlash a device\n--------------\n\nYou can flash an entire Android system in a single command. Flashing an entire\nsystem with a single command verifies that the system being flashed is\ncompatible with the installed bootloader and radio, writes the boot, recovery,\nand system partitions together, and reboots the system.\n\nTo flash a device:\n\n1. Place the device in fastboot mode by holding the appropriate\n key combination at boot or using the following command:\n\n adb reboot bootloader\n\n2. After the device is in fastboot mode, run:\n\n fastboot flashall -w\n\nThe `-w` option wipes the `/data` partition on the device, which is useful\nfor your first time flashing a particular device.\n| **Note:** File systems created with `fastboot` on Motorola Xoom don't function optimally. Google recommends that you recreate file systems through recovery using `adb reboot recovery`. While in recovery, open the menu (press **Power + Volume Up**), wipe the cache partition, then wipe the data.\n\n### Re-locking the bootloader\n\nTo re-lock the bootloader:\n\n- For 2015 or later devices, run the command `fastboot flashing lock`\n- For 2014 or earlier devices, run the command `fastboot oem lock`\n\nRestore device to factory state\n-------------------------------\n\nFactory images for Google devices are available from\n[Factory Images for Nexus and Pixel Devices](https://developers.google.com/android/nexus/images).\nFactory images for the Motorola Xoom are distributed directly by Motorola."]]