Method for upgrading firmware in recovery mode, electronic device and storage medium

CN123011267APending Publication Date: 2026-10-30NANNING FUGUI PRECISION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510571464.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,若所述韧体升级包的档案大小大于所述移动终端设备的储存空间,可能造成升级失败

Benefits of technology

[0007]本发明实施例的在恢复模式下升级韧体的方法、电子装置及存储介质降低OTA升级对内存空间的要求,降低成本,同时保证升级的可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123011267A_ABST
    Figure CN123011267A_ABST
Patent Text Reader

Abstract

A method for upgrading firmware in a recovery mode, comprising: receiving a header of an over the air (OTA) image file of an electronic device to obtain at least a first type of partition and a second type of partition to be upgraded and corresponding first and second OTA image files when an instruction triggering OTA upgrade of the electronic device is received; obtaining the first OTA image file from a remote server; upgrading the first type of partition according to the first OTA image file; deleting the first OTA image file after successful upgrade and obtaining the second OTA image file from the remote server; restarting the electronic device and entering a recovery mode; and upgrading firmware of the electronic device according to the second OTA image file. The present application also provides an electronic device and a storage medium for implementing the method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a firmware upgrade method, and more particularly to a method, electronic device, and storage medium for upgrading firmware in Recovery mode. Background Technology

[0002] When a mobile device undergoes a firmware upgrade in Recovery mode, the firmware upgrade package must be downloaded to the mobile device before the upgrade can proceed. However, if the firmware upgrade package file size exceeds the storage space of the mobile device, the upgrade may fail. Summary of the Invention

[0003] In view of the above, it is necessary to provide a method, electronic device, and storage medium for upgrading firmware in recovery mode, so that when the file size of the firmware upgrade package is larger than the storage space of the mobile terminal device, the mobile terminal device can perform firmware upgrade in recovery mode.

[0004] This invention provides a method for upgrading firmware in recovery mode, applied to an electronic device, comprising: upon receiving an instruction to trigger an Over-The-Air (OTA) upgrade of the electronic device, receiving the header of the OTA image file of the electronic device to obtain at least a first type partition and a second type partition to be upgraded, and corresponding first OTA image files and second OTA image files; obtaining the first OTA image file from a remote server; upgrading the first type partition according to the first OTA image file; after a successful upgrade, deleting the first OTA image file and obtaining the second OTA image file from the remote server; restarting the electronic device and entering recovery mode; and performing a firmware upgrade of the electronic device according to the second OTA image file.

[0005] This invention also provides an electronic device, which includes a memory, a processor, and a firmware upgrade program stored in the memory and executable on the processor in recovery mode. The electronic device further includes an upgrade module and a data acquisition module. When the firmware upgrade program in recovery mode is executed by the processor, it performs the following steps: upon receiving an instruction to trigger an over-the-air (OTA) upgrade of the electronic device, it receives the header of the OTA image file of the electronic device to obtain at least a first type of partition and a second type of partition to be upgraded, and corresponding first and second OTA image files; it obtains the first OTA image file from a remote server; it upgrades the first type of partition according to the first OTA image file; after a successful upgrade, it deletes the first OTA image file and obtains the second OTA image file from the remote server; it restarts the electronic device and enters recovery mode; and it performs a firmware upgrade of the electronic device according to the second OTA image file.

[0006] This invention also provides a storage medium storing a computer program that, when executed, implements the steps of the method for upgrading firmware in recovery mode as described above.

[0007] The method, electronic device, and storage medium for upgrading firmware in recovery mode according to embodiments of the present invention reduce the memory space requirements of OTA upgrades, reduce costs, and ensure the reliability of upgrades. Attached Figure Description

[0008] Figure 1 This is a schematic diagram of an over-the-air image file for a method of upgrading firmware in recovery mode according to an embodiment of the present invention.

[0009] Figure 2 This is a flowchart illustrating the steps of a method for upgrading firmware in recovery mode according to an embodiment of the present invention.

[0010] Figure 3 This is a schematic diagram of the hardware architecture of the electronic device according to an embodiment of the present invention.

[0011] Figure 4 This is a functional block diagram of an electronic device according to an embodiment of the present invention.

[0012] Explanation of main component symbols Electronic devices 200 Processor 210 Memory 220 System 230 upgrading firmware in recovery mode Upgrade Module 310 Data Acquisition Module 320 Steps S1 to S7 Header Arrow ① The first type of partition data ends with arrow ② The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0013] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0014] Numerous specific details are set forth in the following description to provide a thorough understanding of the invention. The described embodiments are merely some, not all, of the embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0015] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0016] It should be noted that the descriptions involving "first," "second," etc., in this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of the stated features. Furthermore, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0017] Figure 1 This is a schematic diagram of an over-the-air (OTA) image file of the method for upgrading firmware in recovery mode according to an embodiment of the present invention.

[0018] Partitions running on Double Data Rate (DDR) memory or not used during operation are classified as Category 1 partitions, while other partitions are classified as Category 2 partitions. When an OTA upgrade is triggered, the received header (arrow ①) indicates which partitions are Category 1 and their corresponding data. After receiving data from the Category 1 partitions (arrow ②), the Category 1 partitions are upgraded. After a successful upgrade, the image of the Category 1 partitions is deleted, and then data from the Category 2 partitions is received. After completion, the system reboots into normal recovery mode for the upgrade.

[0019] Figure 2 This is a flowchart illustrating the steps of a method for upgrading firmware in recovery mode according to an embodiment of the present invention, applied to an electronic device, specifically a mobile terminal device. The order of the steps in the flowchart can be changed, and some steps can be omitted, depending on different requirements.

[0020] Step S1, refer to Figure 1 When an instruction to trigger an OTA upgrade of the mobile terminal device is received, the header of the OTA image file of the mobile terminal device is received to obtain at least the first type partition and the second type partition to be upgraded, and the corresponding first OTA image file and second OTA image file.

[0021] Step S2: Obtain a portion of the OTA image file from the remote server, for example, the first OTA image file.

[0022] Step S3: Upgrade the first type of partition according to the first OTA image file.

[0023] Step S4: Determine if the upgrade was successful. If the upgrade was unsuccessful, return to step S3 to continue the upgrade process.

[0024] Step S5: If the upgrade is successful, delete the first OTA image file and obtain the remaining OTA image file from the remote server, such as the second OTA image file.

[0025] Step S6: Restart the mobile terminal device and enter Recovery mode.

[0026] Step S7: Upgrade the firmware of the mobile terminal device according to the second OTA image file.

[0027] Figure 3 This is a schematic diagram of the hardware architecture of an electronic device according to an embodiment of the present invention. The electronic device 200, such as, but not limited to, a mobile terminal device, can communicate with and be connected to a processor 210, a memory 220, and a system 230 for firmware upgrades in recovery mode via a system bus. Figure 3Only the electronic device 200 with components 210-230 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0028] The memory 220 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 220 may be an internal storage unit of the electronic device 200, such as the hard disk or memory of the electronic device 200. In other embodiments, the memory may also be an external storage device of the electronic device 200, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 200. Of course, the memory 220 may also include both internal storage units and external storage devices of the electronic device 200. In this embodiment, the memory 220 is typically used to store the operating system and various application software installed on the electronic device 200, such as the program code of the system 230 that upgrades firmware in recovery mode. Furthermore, the memory 220 can also be used to temporarily store various types of data that have been output or will be output.

[0029] In some embodiments, the processor 210 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 210 is typically used to control the overall operation of the electronic device 200. In this embodiment, the processor 210 is used to run program code stored in the memory 220 or process data, for example, to run the system 230 that is upgrading firmware in recovery mode.

[0030] It should be noted that, Figure 3 The electronic device 200 is merely an example. In other embodiments, the electronic device 200 may also include more or fewer components, or have different component configurations.

[0031] If the modules / units integrated in the electronic device 200 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, disks, optical discs, computer memory, read-only memory, random access memory, electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0032] Figure 4 This is a functional block diagram of an electronic device according to an embodiment of the present invention, which is used to execute a method for upgrading firmware in recovery mode. The method for upgrading firmware in recovery mode according to an embodiment of the present invention can be implemented by a computer program stored in a storage medium, such as memory 220 in the electronic device 200. When the computer program implementing the method of the present invention is loaded into memory 220 by processor 210, it drives processor 210 of the electronic device 200 to execute the method for upgrading firmware in recovery mode according to an embodiment of the present invention.

[0033] The electronic device 200 of this embodiment includes an upgrade module 310 and a data acquisition module 320.

[0034] refer to Figure 1 When the upgrade module 310 receives an instruction to trigger an OTA upgrade of the mobile terminal device, it receives the header of the OTA image file of the electronic device 200 (e.g., the mobile terminal device) to obtain at least the first type partition and the second type partition to be upgraded and the corresponding first OTA image file and second OTA image file.

[0035] The data acquisition module 320 obtains a portion of the OTA image file from a remote server, for example, the first OTA image file.

[0036] The upgrade module 310 upgrades the first type of partition based on the first OTA image file, and deletes the first OTA image file after the upgrade is successful.

[0037] The data acquisition module 320 obtains the remaining OTA image file from the remote server, for example, the second OTA image file.

[0038] The upgrade module 310 restarts the mobile terminal device and enters Recovery mode, and performs a firmware upgrade on the mobile terminal device according to the second OTA image file.

[0039] It is understood that the module division described above is merely a logical functional division, and other division methods may be used in actual implementation. Furthermore, the functional modules in the various embodiments of this application can be integrated into the same processing unit, or each module can exist physically separately, or two or more modules can be integrated into the same unit. The integrated modules described above can be implemented in hardware or in a combination of hardware and software functional modules.

[0040] For those skilled in the art, other corresponding changes or adjustments can be made to the technical solutions and concepts provided in the embodiments of the present invention in combination with actual needs, and all such changes and adjustments should fall within the protection scope of the claims of the present invention.

Claims

1. A method for upgrading firmware in recovery mode, applied in an electronic device, characterized in that, The method includes: When an instruction to trigger an over-the-air (OTA) upgrade of the electronic device is received, the header of the over-the-air image file of the electronic device is received to obtain at least the first type partition and the second type partition to be upgraded, and the corresponding first over-the-air image file and the second over-the-air image file; Obtain the first over-the-air download image file from the remote server; The first type of partition is upgraded based on the first over-the-air downloaded image file; After a successful upgrade, delete the first over-the-air image file and obtain the second over-the-air image file from the remote server. Restart the electronic device and enter recovery mode; and The electronic device is firmware upgraded based on the second over-the-air image file.

2. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a program for upgrading firmware in recovery mode, stored in the memory and executable on the processor. The electronic device also includes an upgrade module and a data acquisition module. When the firmware upgrade program in recovery mode is executed by the processor, it performs the following steps: When an instruction to trigger an over-the-air (OTA) upgrade of the electronic device is received, the header of the OTA image file of the electronic device is received to obtain at least the first type partition and the second type partition to be upgraded, and the corresponding first OTA image file and second OTA image file; Obtain the first over-the-air download image file from the remote server; The first type of partition is upgraded based on the first over-the-air downloaded image file; After a successful upgrade, delete the first over-the-air image file and obtain the second over-the-air image file from the remote server. Restart the electronic device and enter recovery mode; and The electronic device is firmware upgraded based on the second over-the-air image file.

3. A storage medium storing at least one computer instruction thereon, characterized in that, The instructions are loaded and executed by the processor as described in claim 1, which describes the method for upgrading firmware in recovery mode.