27 মার্চ, 2025 থেকে, আমরা AOSP তৈরি করতে এবং অবদান রাখতে aosp-main এর পরিবর্তে android-latest-release ব্যবহার করার পরামর্শ দিচ্ছি। আরও তথ্যের জন্য, AOSP-তে পরিবর্তনগুলি দেখুন।
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
ওভার-দ্য-এয়ার (OTA) আপডেটগুলি বাস্তবায়ন করতে, বুটলোডারকে অবশ্যই বুট করার সময় একটি পুনরুদ্ধার RAM ডিস্ক অ্যাক্সেস করতে সক্ষম হতে হবে। যদি ডিভাইসটি একটি অপরিবর্তিত AOSP রিকভারি ইমেজ ব্যবহার করে, বুটলোডার misc পার্টিশনের প্রথম 32 বাইট পড়ে; যদি সেখানে ডেটা boot-recovery সাথে মেলে, বুটলোডার recovery চিত্রে বুট করে। এই পদ্ধতিটি যেকোন মুলতুবি পুনরুদ্ধারের কাজকে সক্ষম করে (উদাহরণস্বরূপ, একটি OTA প্রয়োগ করা বা ডেটা অপসারণ) সম্পূর্ণ করা চালিয়ে যেতে।
A/B আপডেট ব্যবহার করে এমন ডিভাইসে OTA আপডেট সমর্থন করতে, ডিভাইস বুটলোডার নিম্নলিখিত মানদণ্ড পূরণ করে তা নিশ্চিত করুন।
সাধারণ মানদণ্ড
একটি OTA এর মাধ্যমে আপডেট করা সমস্ত পার্টিশন আপডেট করা উচিত যখন মূল সিস্টেম বুট করা হয় (এবং পুনরুদ্ধারের সময় আপডেট করা হয় না)।
system পার্টিশন বুট করার জন্য, বুটলোডার কার্নেল কমান্ড লাইনে নিম্নলিখিত মান পাস করে: ro root=/dev/[node] rootwait init=/init ।
HAL থেকে markBootSuccessful কল করার দায়িত্ব Android ফ্রেমওয়ার্কের। বুটলোডার কখনোই কোনো পার্টিশনকে সফলভাবে বুট হয়েছে বলে চিহ্নিত করা উচিত নয়।
বুট কন্ট্রোল HAL এর জন্য সমর্থন
বুটলোডারকে অবশ্যই boot_control HAL সমর্থন করতে হবে যা hardware/libhardware/include/hardware/boot_control.h এ সংজ্ঞায়িত করা হয়েছে। আপডেটার বুট কন্ট্রোল HAL-কে জিজ্ঞাসা করে, ব্যবহার না করা বুট স্লট আপডেট করে, HAL ব্যবহার করে সক্রিয় স্লট পরিবর্তন করে এবং আপডেট করা অপারেটিং সিস্টেমে রিবুট করে। বিস্তারিত জানার জন্য, বুট কন্ট্রোল HAL বাস্তবায়ন দেখুন।
স্লট জন্য সমর্থন
বুটলোডার অবশ্যই পার্টিশন এবং স্লটের সাথে সম্পর্কিত কার্যকারিতা সমর্থন করবে, যার মধ্যে রয়েছে:
পার্টিশনের নামগুলির মধ্যে একটি প্রত্যয় অন্তর্ভুক্ত করা আবশ্যক যা বুটলোডারের একটি নির্দিষ্ট স্লটের কোন পার্টিশনগুলিকে চিহ্নিত করে। এই ধরনের প্রতিটি পার্টিশনের জন্য, একটি সংশ্লিষ্ট ভেরিয়েবল has-slot: yes এর মান সহ has-slot: partition base name । _a , _b , _c , ইত্যাদি প্রত্যয় যুক্ত পার্টিশনের সাথে সঙ্গতিপূর্ণ a, b, c, ইত্যাদি বর্ণানুক্রমিকভাবে স্লটগুলির নামকরণ করা হয়। বুটলোডারকে অপারেটিং সিস্টেমকে জানাতে হবে কোন স্লটটি কমান্ড লাইন প্রপার্টি androidboot.slot_suffix ব্যবহার করে বুট করা হয়েছে। অ্যান্ড্রয়েড 12 বা উচ্চতর সংস্করণের সাথে লঞ্চ হওয়া ডিভাইসগুলির জন্য বুট কনফিগারেশনের মাধ্যমে এই বৈশিষ্ট্যটি সেট করা হয়েছে।
slot-retry-count মানটিকে একটি ধনাত্মক মান (সাধারণত 3 ) এ রিসেট করা হয়, হয় বুট কন্ট্রোল HAL দ্বারা setActiveBootSlot কলব্যাকের মাধ্যমে অথবা fastboot set_active কমান্ডের মাধ্যমে। একটি স্লটের অংশ একটি পার্টিশন পরিবর্তন করার সময়, বুটলোডার "সফলভাবে বুট করা" সাফ করে এবং স্লটের জন্য পুনরায় চেষ্টা গণনা পুনরায় সেট করে।
বুটলোডারকে কোন স্লট লোড করতে হবে তাও নির্ধারণ করা উচিত। চিত্রটি একটি উদাহরণ সিদ্ধান্ত প্রক্রিয়া দেখায়।
চিত্র 1. বুটলোডার স্লটিং প্রবাহ
কোন স্লট চেষ্টা করতে হবে তা নির্ধারণ করুন। slot-unbootable চিহ্নিত স্লট লোড করার চেষ্টা করবেন না। এই স্লটটি fastboot দ্বারা প্রত্যাবর্তিত মানগুলির সাথে সামঞ্জস্যপূর্ণ হওয়া উচিত এবং এটিকে বর্তমান স্লট হিসাবে উল্লেখ করা হয়৷
যদি বর্তমান স্লটটিকে slot-successful হিসাবে চিহ্নিত না করা হয় এবং একটি slot-retry-count = 0 থাকে, তাহলে বর্তমান স্লটটিকে slot-unbootable হিসাবে চিহ্নিত করুন। তারপরে একটি ভিন্ন স্লট নির্বাচন করুন যা unbootable নয় এবং slot-successful হিসাবে চিহ্নিত করা হয়েছে; এই স্লটটি এখন নির্বাচিত স্লট। কোনো বর্তমান স্লট উপলব্ধ না হলে, পুনরুদ্ধারের জন্য বুট করুন বা ব্যবহারকারীকে একটি অর্থপূর্ণ ত্রুটি বার্তা প্রদর্শন করুন।
উপযুক্ত boot.img নির্বাচন করুন এবং কার্নেল কমান্ড লাইনে সিস্টেম পার্টিশন সংশোধন করার পাথ অন্তর্ভুক্ত করুন।
বুট। slot-successful চিহ্নিত না হলে, slot-retry-count হ্রাস করুন।
fastboot ইউটিলিটি নির্ধারণ করে যে কোন ফ্ল্যাশ কমান্ড চালানোর সময় কোন পার্টিশনটি ফ্ল্যাশ করতে হবে। উদাহরণ স্বরূপ, fastboot flash system system.img কমান্ড চালালে প্রথমে current-slot ভেরিয়েবলকে প্রশ্ন করা হয় তারপর ফ্ল্যাশ করা পার্টিশনের নাম তৈরি করতে ফলাফলটিকে সিস্টেমের সাথে সংযুক্ত করে ( system_a , system_b , ইত্যাদি)।
fastboot set_active কমান্ড বা বুট কন্ট্রোল HAL setActiveBootSlot কমান্ড ব্যবহার করে বর্তমান স্লট সেট করার সময়, বুটলোডারকে বর্তমান স্লট আপডেট করতে হবে, ক্লিয়ার slot-unbootable এবং slot-successful , এবং পুনরায় চেষ্টা গণনা রিসেট করতে হবে (এটি slot-unbootable সাফ করার একমাত্র উপায়)।
A/B আপডেট ছাড়া ডিভাইস
A/B আপডেটগুলি ব্যবহার করে না এমন ডিভাইসগুলিতে OTA আপডেটগুলিকে সমর্থন করতে ( নন-A/B আপডেটযোগ্য ডিভাইসগুলি দেখুন), নিশ্চিত করুন যে ডিভাইস বুটলোডার নিম্নলিখিত মানদণ্ডগুলি পূরণ করে৷
recovery পার্টিশনে এমন একটি ইমেজ থাকা উচিত যা কিছু সমর্থিত পার্টিশন ( cache , userdata ) থেকে একটি সিস্টেম ইমেজ পড়তে এবং system পার্টিশনে লিখতে সক্ষম।
বুটলোডারের উচিত সরাসরি রিকভারি মোডে বুট করা।
রেডিও ইমেজ আপডেট সমর্থিত হলে, recovery পার্টিশন রেডিও ফ্ল্যাশ করতে সক্ষম হওয়া উচিত। এটি দুটি উপায়ের একটিতে সম্পন্ন করা যেতে পারে:
বুটলোডার রেডিও ফ্ল্যাশ করে। এই ক্ষেত্রে, আপডেটটি সম্পূর্ণ করতে পুনরুদ্ধার পার্টিশন থেকে বুটলোডারে পুনরায় বুট করা সম্ভব হবে।
পুনরুদ্ধারের চিত্রটি রেডিও ফ্ল্যাশ করে। এই কার্যকারিতা একটি বাইনারি লাইব্রেরি বা ইউটিলিটি হিসাবে প্রদান করা যেতে পারে.
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 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-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Implement OTA updates\n\nTo implement the [over-the-air (OTA) updates](/docs/core/ota), the\nbootloader must be able to access a recovery RAM disk during boot. If the device\nuses an unmodified AOSP recovery image, the bootloader reads the first 32 bytes\non the `misc` partition; if the data there matches `boot-recovery`, the\nbootloader boots into the `recovery` image. This method enables any pending\nrecovery work (for example, applying an OTA or removing data) to continue to\ncompletion.\n\nFor details on the content of a block in flash used for communications by\nrecovery and the bootloader, refer to\n[bootable/recovery/bootloader_message/bootloader_message.h](https://android.googlesource.com/platform/bootable/recovery/+/android16-release/bootloader_message/include/bootloader_message/bootloader_message.h#64).\n\nDevices with A/B updates\n------------------------\n\nTo support OTA updates on devices that use [A/B\nupdates](/docs/core/ota/ab), ensure that the device bootloader meets\nthe following criteria.\n\n### General criteria\n\n- All partitions updated through an OTA should be updatable while the main\n system is booted (and not updated in recovery).\n\n- To boot the `system` partition, the bootloader passes the following value on\n kernel command line: `ro root=/dev/[node] rootwait init=/init`.\n\n- It's the responsibility of the Android framework to call `markBootSuccessful`\n from the HAL. The bootloader should never mark a partition as successfully\n booted.\n\n### Support for boot control HAL\n\nThe bootloader must support the `boot_control` HAL as defined in\n`hardware/libhardware/include/hardware/boot_control.h`. The updater queries the\n[boot control\nHAL](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/boot/1.0/IBootControl.hal),\nupdates the boot slot not in use, changes the active slot using the\nHAL, and reboots into the updated operating system. For details, see\n[Implementing the boot control\nHAL](/docs/core/ota/ab/ab_implement#bootcontrol).\n\n### Support for slots\n\nThe bootloader must support functionality related to partitions and slots,\nincluding:\n\n- Partition names must include a suffix that identifies which partitions\n belong to a particular slot in the bootloader. For each such partition,\n there's a corresponding variable\n `has-slot:`\u003cvar translate=\"no\"\u003epartition base name\u003c/var\u003e with a value of\n `yes`. Slots are named alphabetically as a, b, c, etc. corresponding to\n partitions with the suffix `_a`, `_b`, `_c`, etc. The bootloader should inform\n the operating system which slot was booted using the command line property\n `androidboot.slot_suffix`. This property is set through bootconfig for devices\n launching with Android 12 or higher.\n\n- The `slot-retry-count` value is reset to a positive value (usually `3`),\n either by the boot control HAL through the `setActiveBootSlot` callback or\n through the `fastboot set_active` command. When modifying a partition that's\n part of a slot, the bootloader clears \"successfully booted\" and resets the\n retry count for the slot.\n\nThe bootloader should also determine which slot to load. The figure shows an\nexample decision process.\n**Figure 1.** Bootloader slotting flow\n\n1. Determine which slot to attempt. Don't attempt to load a slot marked\n `slot-unbootable`. This slot should be consistent with the values returned by\n fastboot, and is referred to as the current slot.\n\n2. If the current slot isn't marked as `slot-successful` and has a\n `slot-retry-count = 0`, mark the current slot as `slot-unbootable`. Then\n select a different slot that is not marked `unbootable` and is marked as\n `slot-successful`; this slot is now the selected slot. If no current slot is\n available, boot to recovery or display a meaningful error message to the\n user.\n\n3. Select the appropriate `boot.img` and include the path to correct system\n partition on the kernel command line.\n\n4. Populate the kernel command line `slot_suffix` parameter.\n\n5. Boot. If not marked `slot-successful`, decrement `slot-retry-count`.\n\nThe `fastboot` utility determines which partition to flash when running any\nflash commands. For example, running the `fastboot flash system system.img`\ncommand first queries the `current-slot` variable then concatenates the result\nto system to generate the name of the partition that should be flashed\n(`system_a`, `system_b`, etc.).\n\nWhen setting the current slot using the fastboot `set_active` command or the\nboot control HAL `setActiveBootSlot` command, the bootloader should update\nthe current slot, clear `slot-unbootable` and `slot-successful`, and reset the\nretry count (this is the only way to clear `slot-unbootable`).\n\nDevices without A/B updates\n---------------------------\n\nTo support OTA updates on devices that don't use A/B updates (see [Non-A/B\nupdatable devices](/docs/core/ota/nonab)), ensure that the device\nbootloader meets the following criteria.\n\n- The `recovery` partition should contain an image that is capable of reading a\n system image from some supported partition (`cache`, `userdata`) and writing\n it to the `system` partition.\n\n- The bootloader should support booting directly into recovery mode.\n\n- If radio image updates are supported, the `recovery` partition should also be\n able to flash the radio. This can be accomplished in one of two ways:\n\n - The bootloader flashes the radio. In this case, it should be possible to\n reboot from the recovery partition back into the bootloader to complete the\n update.\n\n - The recovery image flashes the radio. This functionality can be provided as\n a binary library or utility."]]