CN112214353A - Firmware recovery method and device, computer equipment and storage medium - Google Patents

Firmware recovery method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112214353A
CN112214353A CN202011111452.9A CN202011111452A CN112214353A CN 112214353 A CN112214353 A CN 112214353A CN 202011111452 A CN202011111452 A CN 202011111452A CN 112214353 A CN112214353 A CN 112214353A
Authority
CN
China
Prior art keywords
firmware
identification information
terminal
information corresponding
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011111452.9A
Other languages
Chinese (zh)
Inventor
杨惠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fibocom Wireless Inc
Original Assignee
Fibocom Wireless Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fibocom Wireless Inc filed Critical Fibocom Wireless Inc
Priority to CN202011111452.9A priority Critical patent/CN112214353A/en
Publication of CN112214353A publication Critical patent/CN112214353A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a firmware recovery method, a firmware recovery device, computer equipment and a storage medium. The method comprises the following steps: when an abnormal state is detected, starting timing; when the timing reaches a preset time length, acquiring identification information in version number rule information corresponding to the firmware; and restoring the firmware to a firmware version corresponding to the identification information according to the identification information. By adopting the method, the firmware can be directly restored to the version used by the current user, the complicated conversion process is avoided, the processing time is effectively saved, the firmware restoration efficiency is improved, and meanwhile, the firmware restoration accuracy can be effectively improved.

Description

Firmware recovery method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a firmware recovery method and apparatus, a computer device, and a storage medium.
Background
With the development of computer technology and the coming of the 5G era, the appearance of the Internet brings great convenience to modern life, and more users can handle various services on line by using terminal equipment. When the firmware of the conventional terminal device is upgraded, the module may be interfered by external factors in the upgrading process, so that the upgrading fails, for example, the system is powered off unexpectedly in the upgrading process, and enters an abnormal state, so that the firmware needs to be recovered.
However, in the current firmware upgrading method, when the firmware is automatically restored, the firmware package is finally restored to the general version, so that a firmware conversion process is required to switch to the correct firmware version currently used by the user, which easily results in low accuracy of firmware restoration.
Disclosure of Invention
In view of the above, it is necessary to provide a firmware recovery method, apparatus, computer device and storage medium capable of improving firmware recovery accuracy.
A method of firmware recovery, the method comprising:
when an abnormal state is detected, starting timing;
when the timing reaches a preset time length, acquiring identification information in version number rule information corresponding to the firmware;
and restoring the firmware to a firmware version corresponding to the identification information according to the identification information.
In one embodiment, before the detecting the abnormal state, the method further comprises:
acquiring identification information corresponding to the current running firmware;
performing nonvolatile storage on the identification information;
the acquiring the identification information in the version number rule information corresponding to the firmware includes:
and acquiring identification information in the version number rule information corresponding to the firmware from the nonvolatile storage.
In one embodiment, the method further comprises:
when the SIM card is changed to cause the switching of the firmware package, acquiring identification information corresponding to the switched firmware package;
and synchronously updating the identification information to the nonvolatile storage, wherein the nonvolatile storage is used for recording the changed identification information.
In one embodiment, before the detecting the abnormal state, the method further comprises:
acquiring identification information corresponding to the current running firmware;
storing the identification information into a built-in data folder;
the acquiring the identification information in the version number rule information corresponding to the firmware includes:
and acquiring identification information in the version number rule information corresponding to the firmware from the built-in data folder.
In one embodiment, the method further comprises:
when the SIM card is changed to cause the switching of the firmware package, acquiring identification information corresponding to the switched firmware package;
and synchronously updating the identification information to the built-in data folder, wherein the built-in data folder is used for recording the changed identification information.
In one embodiment, detecting the abnormal state includes:
after starting up, when only the OACC port is detected, the system is indicated to enter an abnormal state.
A firmware recovery apparatus, the apparatus comprising:
the detection module is used for starting timing when the abnormal state is detected;
the acquisition module is used for acquiring identification information in version number rule information corresponding to the firmware when the timing reaches a preset duration;
and the restoring module is used for restoring the firmware to the firmware version corresponding to the identification information according to the identification information.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
when an abnormal state is detected, starting timing;
when the timing reaches a preset time length, acquiring identification information in version number rule information corresponding to the firmware;
and restoring the firmware to a firmware version corresponding to the identification information according to the identification information.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
when an abnormal state is detected, starting timing;
when the timing reaches a preset time length, acquiring identification information in version number rule information corresponding to the firmware;
and restoring the firmware to a firmware version corresponding to the identification information according to the identification information.
According to the firmware recovery method, the firmware recovery device, the computer equipment and the storage medium, when the abnormal state is detected, timing is started. And when the timing reaches the preset duration, acquiring the identification information in the version number rule information corresponding to the firmware, and restoring the firmware to the firmware version corresponding to the identification information according to the identification information. Therefore, the firmware can be directly restored to the version used by the current user, a complex conversion process is avoided, the processing time is effectively saved, the firmware restoration efficiency is improved, and meanwhile, the firmware restoration accuracy can also be effectively improved.
Drawings
FIG. 1 is a flowchart illustrating a firmware recovery method according to an embodiment;
FIG. 2 is a flowchart illustrating steps in one embodiment when a change to a SIM card results in a firmware package switch;
FIG. 3 is a flowchart illustrating steps in another embodiment when a change to the SIM card results in a firmware package switch;
FIG. 4 is a flowchart illustrating a firmware recovery method according to another embodiment;
FIG. 5 is a block diagram showing the structure of a firmware recovery apparatus according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a firmware recovery method is provided, and this embodiment is illustrated by applying the method to a terminal, and it is to be understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step 102, when an abnormal state is detected, timing is started.
The terminal is a kind of embedded computer system equipment, and the software structure can be divided into system software and application software. In the software structure of the terminal, system software mainly includes an operating system and middleware, and common terminal operating systems include IOS, Android, WebOS, open source MeeGo, Windows, and the like. The user terminals using different operating systems can acquire the new firmware package from the server to perform firmware upgrade, for example, the user can download the latest firmware package from the server using a smart phone to perform upgrade. The Firmware (Firmware) refers to a program written in EROM (erasable read only memory) or EEPROM (electrically erasable programmable read only memory). The firmware acts as the software for the system's most basic and bottom-most layer of work. In a hardware device, some hardware devices have no other software components except for firmware, so the firmware determines the functions and performance of the hardware device. The firmware is typically stored in an electrically Erasable read only memory (eeprom) or FLASH chip in the device, and is typically a program that can be upgraded by the user by a specific refresh program. Generally, the software that serves as the most Basic and bottom layer of a digital product can be referred to as firmware, such as Basic Input/output System (BIOS) on a computer motherboard. Typically, the programs stored in these hardware are not directly readable or modifiable by the user. With the continuous development of technology, it is an urgent requirement of users to modify firmware to adapt to the continuously updated hardware environment, and therefore, rewritable Programmable read only memory eprom (erasable Programmable rom) and flash chips are available, which are repeatedly erasable and writable, so that the firmware can be modified and upgraded. The terminal in the present application may include various types such as a mobile terminal and a PC terminal (personal computer). In the application software of the terminal, developers can create applications with different business functions around business field components, and the applications can be independently developed, managed and updated, so that the deployment, management and service function delivery can be simpler. The embedded terminal product is a common acquisition and data transmission device, and the product function is realized by executing firmware stored in a memory chip. Firmware can be programmed into the chip and then the chip is fixed in the product, the more common way is to fix the chip on the circuit board.
As the firmware in the terminal product needs to be upgraded in the using process of the terminal product, the product is perfected. Firmware upgrading can be performed by burning firmware on a chip. For example, iap (in Application programming) applies field programming technology, which is widely used for firmware upgrade without special equipment and chip detachment, saving labor. The IAP is an acronym of In Application Programming, and the IAP is a method for Programming a partial area of a User Flash chip In the running process of a program of a User, so that a firmware program In a product can be updated and upgraded conveniently through a reserved communication port after the product is released. However, if the terminal is powered off or the files are wrongly updated in the process of upgrading the application field by the remote IAP technology, the terminal cannot normally work. For example, when the firmware is updated, the firmware of the new version is not completely written into the chip, and then power failure occurs, so that the product cannot normally work, and further the terminal cannot normally work. Specifically, in the firmware upgrading process, when the terminal detects an abnormal state, a timer is started to start timing. The abnormal state is a state in which the firmware may be interfered by external factors in the upgrading process, so that the upgrading of the firmware fails, and the terminal cannot work normally, that is, the abnormal state. For example, the system is powered off accidentally during the upgrade process, thereby causing the terminal to be in a state of incapable of working normally.
And step 104, when the timing reaches the preset time length, acquiring the identification information in the version number rule information corresponding to the firmware.
And when the terminal detects the abnormal state, starting timing. When the terminal detects that the timing reaches the preset duration, the terminal can acquire the identification information in the version number rule information corresponding to the firmware. The preset duration refers to a preset waiting duration in the system, and for example, the preset duration may be set to 2 min. The version number rule information refers to preset version rules corresponding to different firmware. For example, the firmware version number rule information may be custom set to abcdd.zzzz.hh.kk.nn.ss, where HH represents operator ID, i.e., vendor identification or firmware identification; KK denotes the major version number. For example, when the operator ID value is 01, the firmware package corresponds to AT & T (AT & T is a U.S. carrier); when the operator ID value is 09, the firmware package corresponds to DT (DT is a japanese operator); when the operator ID value is 00, the firmware package corresponds to the universal version. Specifically, when the terminal detects that the timing reaches the preset time, the terminal may obtain the identification information in the version number rule information corresponding to the firmware from a default folder, or the terminal may also obtain the identification information in the version number rule information corresponding to the firmware from an NV value, where the NV is an NVRAM, which is a non-volatile Random Access Memory. Once the data is written into the NV value, the data cannot be lost even if the power is lost, and the original setting can still be kept when the power is restarted next time. Typically, NV is a proprietary file system that stores basic configuration and radio frequency parameters for the handset. When the mobile phone is powered off, the data stored in the NV cannot be lost. Therefore, the NV can be used for saving important parameters of the mobile phone terminal.
And 106, restoring the firmware to the firmware version corresponding to the identification information according to the identification information.
After the terminal acquires the identification information in the version number rule information corresponding to the firmware, the terminal can restore the firmware to the firmware version corresponding to the identification information according to the identification information. The identification information refers to an operator identifier or a firmware identifier, for example, when the identification information corresponding to a certain firmware is 00, the identification firmware package corresponds to the universal version. Specifically, when the terminal detection timing reaches a preset duration, the terminal may obtain the identification information in the version number rule information corresponding to the firmware from the NV value or a preset default folder, for example, when the identification information in the version number rule information corresponding to the firmware obtained by the terminal from the NV value is 01, that is, the operator ID value is 01, the terminal restores the firmware to the firmware version corresponding to the identification information according to the identification information 01, that is, the firmware version corresponding to the firmware package is an AT & T package (AT & T is a U.S. operator). When the terminal acquires that the identification information in the version number rule information corresponding to the firmware is 09 from the preset default folder, that is, the identifier ID value is 09, the terminal restores the firmware to the firmware version corresponding to the identification information according to the identification information 09, that is, the firmware version corresponding to the firmware package is a DT package (DT is a japanese operator). The firmware package is a firmware for a certain operator, different operators can produce and manufacture different firmware, and each firmware carries corresponding firmware identification information.
In a traditional firmware recovery mode, when the firmware is automatically recovered, no matter which version the firmware operated before is, the firmware is finally recovered to a general version, so that a firmware conversion process needs to be performed again for different user terminals, the correct firmware version used by a user at present can be switched to, the accuracy of the firmware recovery is poor, and targeted quick and convenient firmware recovery cannot be provided for the user. In this embodiment, when the terminal detects an abnormal state, the terminal starts a timer to start timing. When the terminal detects that the timing reaches the preset duration, the terminal can acquire the identification information in the version number rule information corresponding to the firmware, and the terminal restores the firmware to the firmware version corresponding to the identification information according to the acquired identification information. Therefore, the firmware can be directly restored to the version used by the current user, a complex conversion process is avoided, the processing time is effectively saved, the firmware restoration efficiency is improved, and meanwhile, the firmware restoration accuracy can also be effectively improved.
In one embodiment, before the abnormal state is detected, the method further includes a step of acquiring identification information corresponding to the currently running firmware, and specifically includes:
and acquiring identification information corresponding to the currently running firmware.
The identification information is stored in a nonvolatile manner.
Before the terminal detects the abnormal state, that is, the terminal is in the normal working state, or before the firmware is upgraded, the terminal may acquire the identification information corresponding to the currently running firmware, that is, the terminal acquires the firmware identification information corresponding to the normally working state, and performs the nonvolatile storage of the identification information corresponding to the currently running firmware. For example, after the terminal acquires the identification information corresponding to the currently running firmware, the terminal may write the acquired identification information into the NV value, and when the firmware is recovered, the terminal may directly read the identification information corresponding to the firmware in the NV value. Once the data is written into the NV value, the data cannot be lost even if the power is lost, and the original setting can still be kept when the power is restarted next time. Typically, NV is a proprietary file system that stores basic configuration and radio frequency parameters for the handset. When the mobile phone is powered off, the data stored in the NV cannot be lost. Therefore, the NV can be used for saving important parameters of the mobile phone terminal. Therefore, even if unexpected power failure and other unpredictable conditions occur in the upgrading process, the terminal can acquire the firmware identification information matched with the user terminal from the nonvolatile memory after being started and when firmware recovery is needed, so that the firmware recovery is automatically performed, and the accuracy of the firmware recovery is effectively improved.
In an embodiment, as shown in fig. 2, the method further includes a step when the firmware package is switched due to the SIM card being changed, specifically including:
step 202, when the firmware package is switched due to the change of the SIM card, acquiring the identification information corresponding to the switched firmware package.
And step 204, synchronously updating the identification information to a nonvolatile memory, wherein the nonvolatile memory is used for recording the changed identification information.
When a user changes the SIM card, namely when the terminal detects that the firmware package is switched due to the operation of changing the SIM card, the terminal can acquire the identification information corresponding to the switched firmware package. Further, the terminal synchronously updates the acquired identification information to a nonvolatile memory, and the nonvolatile memory is used for recording the changed identification information. For example, the terminal detects that the identification information corresponding to the currently running firmware is 01, and when the subscriber changes the SIM card, that is, when the terminal detects that the firmware package is switched due to the operation of changing the SIM card, the terminal may obtain the identification information corresponding to the firmware package after the switching is 09. Further, the terminal synchronously updates the acquired identification information 09 into a nonvolatile memory, and the nonvolatile memory is used for recording the changed identification information, that is, the terminal can synchronously update the identification information corresponding to the original firmware in the NV value as 01 to the identification information 09 corresponding to the switched firmware packet. In addition, a customized firmware version number rule may be preset, for example, the firmware version number rule information may be customized to abcdd.zzzz.hh.kk.nn.ss, where HH represents operator ID, i.e., vendor identifier or firmware identifier; KK denotes the major version number. That is, the third byte in the version number rule information may be set to represent the operator ID, and the initial value is 00, that is, the operator ID of 00 represents that the firmware package corresponds to the universal version. When the user changes the SIM card operation to cause the firmware package switching, the terminal can synchronously update the firmware package identification information which is dynamically changed into the nonvolatile storage, and the nonvolatile storage is used for recording the changed identification information. Therefore, the firmware can be directly restored to the version used by the current user terminal, a complex conversion process is avoided, the processing time is effectively saved, the firmware restoration efficiency is improved, and meanwhile, the firmware restoration accuracy can be effectively improved.
In one embodiment, before the abnormal state is detected, the method further includes a step of acquiring identification information corresponding to the currently running firmware, and specifically includes:
and acquiring identification information corresponding to the currently running firmware.
And storing the identification information into a built-in data folder.
Before the terminal detects an abnormal state, that is, the terminal is in a normal working state, or before the terminal upgrades the firmware, the terminal can acquire the identification information corresponding to the currently running firmware, that is, the terminal acquires the firmware identification information corresponding to the normally working state, and stores the identification information corresponding to the currently running firmware into the built-in data folder. For example, after the terminal acquires the identification information corresponding to the currently running firmware, the terminal may store the acquired identification information into the built-in data folder, and when the firmware is recovered, the terminal may directly read the identification information corresponding to the firmware in the built-in data folder. Therefore, when the OACC state appears due to unexpected power failure in the upgrading process, the terminal automatically executes the firmware recovery process after the preset time, the data in the built-in data folder is read first, and after the operator ID value corresponding to the current terminal equipment is obtained, the firmware can be directly recovered to the firmware version matched with the current user terminal, so that the fussy conversion process is avoided, the processing time is effectively saved, the firmware recovery efficiency is improved, and meanwhile, the firmware recovery accuracy can also be effectively improved.
In an embodiment, as shown in fig. 3, the method further includes a step when the firmware package is switched due to the SIM card being changed, specifically including:
step 302, when the firmware package is switched due to the change of the SIM card, acquiring the identification information corresponding to the switched firmware package.
And step 304, synchronously updating the identification information into a built-in data folder, wherein the built-in data folder is used for recording the changed identification information.
When a user changes the SIM card, namely when the terminal detects that the firmware package is switched due to the operation of changing the SIM card, the terminal can acquire the identification information corresponding to the switched firmware package. And the terminal synchronously updates the acquired identification information into a built-in data folder, wherein the built-in data folder is used for recording the changed identification information. For example, the terminal detects that the identification information corresponding to the currently running firmware is 01, and after the subscriber changes the SIM card, that is, when the terminal detects that the firmware package is switched, the terminal may obtain the identification information corresponding to the switched firmware package, that is, the terminal obtains the identification information corresponding to the switched firmware package as 09. Further, the terminal synchronously updates the acquired identification information 09 into a built-in data folder, where the built-in data folder is used to record the changed identification information, that is, the terminal can synchronously update the identification information corresponding to the original firmware in the built-in data folder, which is 01, into the identification information 09 corresponding to the switched firmware package. Therefore, when an abnormal state occurs in the upgrading process due to unexpected power failure, when the terminal automatically executes the firmware recovery process after the preset time length, the data in the built-in data folder is read first, and after the operator ID value corresponding to the updated terminal equipment is 09, the firmware can be directly recovered to the firmware version matched with the current user terminal, namely the terminal recovers the firmware to the DT (DT represents Japanese operator) firmware version corresponding to the identification information 09, so that a complex conversion process is avoided, the processing time is effectively saved, the firmware recovery efficiency is improved, and meanwhile, the firmware recovery accuracy is effectively improved.
In one embodiment, after power-on, when only the OACC port is detected, it indicates that the system enters an abnormal state.
In the firmware upgrading process, the firmware upgrading process may be disturbed by external factors, so that the firmware upgrading process fails, and a terminal cannot normally work, for example, a system is unexpectedly powered off in the upgrading process, so that the terminal cannot normally work. When the terminal is restarted after the system is powered off accidentally in the upgrading process, and the terminal detects that only the OACC port exists, the system is indicated to enter an abnormal state. For example, when the terminal encounters a situation such as power failure or forced shutdown during the upgrade process, and is rebooted and started, the user may open the device manager interface by triggering operation, and it can be seen from the device manager interface that only the OACC port remains in the port related to the system, that is, the terminal enters the OACC state, which indicates that the system enters an abnormal state and needs to perform firmware recovery. In the firmware upgrading process, multiple external factors may cause firmware upgrading failure, so that the terminal enters an abnormal state, when a user cannot judge whether the current terminal equipment is in the abnormal state and needs firmware recovery, the user can check whether only an OACC port exists by checking a port running in a background in an equipment manager, and if the user judges that the current terminal equipment completes firmware upgrading and does not need firmware recovery, the user can cancel firmware upgrading by triggering operation when a system timer does not reach a preset time length. Fig. 4 is a schematic flow chart of a process of recovering firmware corresponding to a certain mobile terminal device. When the terminal detects that only an OACC port exists currently, namely the terminal enters an OACC state, the terminal starts a timer to start timing, when the timing reaches a preset duration, the terminal triggers and activates a firmware recovery flow, the terminal reads data from a preset built-in data folder, and identification information corresponding to the firmware, namely an operator ID value, is acquired. And the terminal restores the firmware to the firmware version corresponding to the operator ID value according to the acquired identification information, namely the operator ID value. Therefore, a user can quickly and conveniently judge whether the terminal equipment needs to recover the firmware according to the port parameters in the equipment manager, some complicated processes are avoided, the efficiency of recovering the firmware is effectively improved, and convenience is brought to the user.
In one embodiment, after the terminal is powered off unexpectedly during the upgrade process and rebooted, when the terminal detects that only the OACC port is available, it indicates that the system enters an abnormal state. For example, when the terminal encounters a situation such as power failure or forced shutdown during the upgrade process, and is rebooted and started, the user may open the device manager interface by triggering operation, and it can be seen from the device manager interface that only the OACC port remains in the port related to the system, that is, the terminal enters the OACC state, which indicates that the system enters an abnormal state and needs to perform firmware recovery. In the firmware upgrading process, multiple external factors may cause firmware upgrading failure, so that the terminal enters an abnormal state, when a user cannot judge whether the current terminal equipment is in the abnormal state and needs firmware recovery, the user can check whether only an OACC port exists by checking a port running in a background in an equipment manager, and if the user judges that the current terminal equipment completes firmware upgrading and does not need firmware recovery, the user can cancel firmware upgrading by triggering operation when a system timer does not reach a preset time length. When the terminal detects that only an OACC port exists currently, namely the terminal detects an abnormal state, the terminal starts a timer to start timing, when the timing reaches a preset duration, the terminal triggers and activates a firmware recovery process, the terminal reads data from a preset built-in data folder or NV value, and identification information corresponding to the firmware, namely an operator ID value, is acquired. And the terminal restores the firmware to the firmware version corresponding to the operator ID value according to the acquired identification information, namely the operator ID value. Therefore, the firmware can be directly restored to the version used by the current user, a complex conversion process is avoided, the processing time is effectively saved, the firmware restoration efficiency is improved, and meanwhile, the firmware restoration accuracy can also be effectively improved.
It should be understood that although the various steps in the flow charts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 5, there is provided a firmware recovery apparatus including: a detection module 502, an acquisition module 504, and a recovery module 506, wherein:
the detecting module 502 is configured to start timing when an abnormal state is detected.
The obtaining module 504 is configured to obtain, when the timing reaches a preset duration, identification information in the version number rule information corresponding to the firmware.
And a restoring module 506, configured to restore the firmware to the firmware version corresponding to the identification information according to the identification information.
In one embodiment, the apparatus further comprises: and a storage module.
The storage module is used for acquiring the identification information corresponding to the current running firmware and carrying out nonvolatile storage on the identification information.
In one embodiment, the apparatus further comprises: and updating the module.
The updating module is used for acquiring identification information corresponding to the firmware package after switching when the SIM card is changed to cause the switching of the firmware package, and synchronously updating the identification information into the nonvolatile storage, wherein the nonvolatile storage is used for recording the changed identification information.
In one embodiment, the storage module is further configured to obtain identification information corresponding to the currently running firmware, and store the identification information in the built-in data folder.
In an embodiment, the updating module is further configured to, when the firmware package is switched due to a change of the SIM card, acquire identification information corresponding to the switched firmware package, and synchronously update the identification information to a built-in data folder, where the built-in data folder is used to record the changed identification information.
In one embodiment, the detection module is further configured to indicate that the system enters an abnormal state when detecting that only the OACC port is present after the system is powered on.
For specific limitations of the firmware recovery apparatus, reference may be made to the above limitations of the firmware recovery method, which are not described herein again. The various modules in the firmware recovery apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a firmware recovery method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the steps of the above-described method embodiments being implemented when the computer program is executed by the processor.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of firmware recovery, the method comprising:
when an abnormal state is detected, starting timing;
when the timing reaches a preset time length, acquiring identification information in version number rule information corresponding to the firmware;
and restoring the firmware to a firmware version corresponding to the identification information according to the identification information.
2. The method of claim 1, wherein prior to detecting an abnormal condition, the method further comprises:
acquiring identification information corresponding to the current running firmware;
performing nonvolatile storage on the identification information;
the acquiring the identification information in the version number rule information corresponding to the firmware includes:
and acquiring identification information in the version number rule information corresponding to the firmware from the nonvolatile storage.
3. The method of claim 2, further comprising:
when the SIM card is changed to cause the switching of the firmware package, acquiring identification information corresponding to the switched firmware package;
and synchronously updating the identification information to the nonvolatile storage, wherein the nonvolatile storage is used for recording the changed identification information.
4. The method of claim 1, wherein prior to detecting an abnormal condition, the method further comprises:
acquiring identification information corresponding to the current running firmware;
storing the identification information into a built-in data folder;
the acquiring the identification information in the version number rule information corresponding to the firmware includes:
and acquiring identification information in the version number rule information corresponding to the firmware from the built-in data folder.
5. The method of claim 4, further comprising:
when the SIM card is changed to cause the switching of the firmware package, acquiring identification information corresponding to the switched firmware package;
and synchronously updating the identification information to the built-in data folder, wherein the built-in data folder is used for recording the changed identification information.
6. The method of claim 1, wherein detecting an abnormal condition comprises:
after starting up, when only the OACC port is detected, the system is indicated to enter an abnormal state.
7. An apparatus for firmware recovery, the apparatus comprising:
the detection module is used for starting timing when the abnormal state is detected;
the acquisition module is used for acquiring identification information in version number rule information corresponding to the firmware when the timing reaches a preset duration;
and the restoring module is used for restoring the firmware to the firmware version corresponding to the identification information according to the identification information.
8. The firmware recovery apparatus of claim 7, wherein the apparatus further comprises:
the updating module is used for acquiring identification information corresponding to the switched firmware package when the firmware package is switched due to the change of the SIM card; and synchronously updating the identification information to the built-in data folder, wherein the built-in data folder is used for recording the changed identification information.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202011111452.9A 2020-10-16 2020-10-16 Firmware recovery method and device, computer equipment and storage medium Pending CN112214353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011111452.9A CN112214353A (en) 2020-10-16 2020-10-16 Firmware recovery method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011111452.9A CN112214353A (en) 2020-10-16 2020-10-16 Firmware recovery method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112214353A true CN112214353A (en) 2021-01-12

Family

ID=74055532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011111452.9A Pending CN112214353A (en) 2020-10-16 2020-10-16 Firmware recovery method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112214353A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127883A (en) * 2021-04-26 2021-07-16 山东英信计算机技术有限公司 Locking method, device, equipment and medium for platform firmware protection recovery
CN113157309A (en) * 2021-01-26 2021-07-23 上海商米科技集团股份有限公司 Software design method for saving active file by NVRAM

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060131096A (en) * 2005-06-15 2006-12-20 엘지엔시스(주) Automatic firmware recovering method through version comparing and recording media that saves program which uses the method
CN102136934A (en) * 2010-10-21 2011-07-27 华为技术有限公司 Method, device and network system for realizing remote upgrading of Zigbee equipment
CN104834575A (en) * 2015-05-07 2015-08-12 杭州昆海信息技术有限公司 Firmware recovery method and device
CN105653299A (en) * 2014-11-12 2016-06-08 杭州华三通信技术有限公司 Firmware upgrade method device
CN109634631A (en) * 2018-11-01 2019-04-16 北京锦鸿希电信息技术股份有限公司 Firmware restoration method, apparatus, electronic equipment and firmware restoration system
CN109814908A (en) * 2019-01-17 2019-05-28 深圳忆联信息系统有限公司 Firmware stablizes method, apparatus, computer equipment and the storage medium of upgrading
CN110119280A (en) * 2018-02-06 2019-08-13 深圳市帝迈生物技术有限公司 The method and device of more firmware upgrades
CN111510909A (en) * 2020-03-10 2020-08-07 深圳市广和通无线股份有限公司 Communication module configuration processing method and device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060131096A (en) * 2005-06-15 2006-12-20 엘지엔시스(주) Automatic firmware recovering method through version comparing and recording media that saves program which uses the method
CN102136934A (en) * 2010-10-21 2011-07-27 华为技术有限公司 Method, device and network system for realizing remote upgrading of Zigbee equipment
CN105653299A (en) * 2014-11-12 2016-06-08 杭州华三通信技术有限公司 Firmware upgrade method device
CN104834575A (en) * 2015-05-07 2015-08-12 杭州昆海信息技术有限公司 Firmware recovery method and device
CN110119280A (en) * 2018-02-06 2019-08-13 深圳市帝迈生物技术有限公司 The method and device of more firmware upgrades
CN109634631A (en) * 2018-11-01 2019-04-16 北京锦鸿希电信息技术股份有限公司 Firmware restoration method, apparatus, electronic equipment and firmware restoration system
CN109814908A (en) * 2019-01-17 2019-05-28 深圳忆联信息系统有限公司 Firmware stablizes method, apparatus, computer equipment and the storage medium of upgrading
CN111510909A (en) * 2020-03-10 2020-08-07 深圳市广和通无线股份有限公司 Communication module configuration processing method and device, computer equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113157309A (en) * 2021-01-26 2021-07-23 上海商米科技集团股份有限公司 Software design method for saving active file by NVRAM
CN113157309B (en) * 2021-01-26 2024-02-13 上海商米科技集团股份有限公司 Software design method for storing activation files by utilizing NVRAM
CN113127883A (en) * 2021-04-26 2021-07-16 山东英信计算机技术有限公司 Locking method, device, equipment and medium for platform firmware protection recovery
CN113127883B (en) * 2021-04-26 2022-05-24 山东英信计算机技术有限公司 Locking method, device, equipment and medium for platform firmware protection recovery

Similar Documents

Publication Publication Date Title
US8539471B2 (en) Updating firmware of an electronic device
CN109634645B (en) Firmware upgrading method and terminal
US9301164B2 (en) Method, system, and terminal for performing system update between mobile communication terminals
US20050132351A1 (en) Updating electronic device software employing rollback
WO2019062635A1 (en) Update method and device
CN110333891A (en) The method of enhanced OTA upgrading based on Internet of Things
CN108874459B (en) Rapid starting method and device based on virtualization technology
CN110647333A (en) Firmware upgrading method and equipment configured to upgrade firmware therein
CN110825563A (en) System recovery method and device and electronic equipment
CN111813428A (en) Method and device for upgrading terminal firmware, electronic equipment and storage medium
CN112214353A (en) Firmware recovery method and device, computer equipment and storage medium
CN108153548A (en) A kind of EMMC firmware upgrade methods and device
CN113138791A (en) Upgrade processing method and device based on embedded system and electronic equipment
US20050010914A1 (en) Method for upgrading firmware
CN112433739B (en) Firmware upgrading method
CN118051277A (en) Method and device for starting server, storage medium and electronic equipment
KR100832269B1 (en) Program update method and system for wireless communication terminal
CN112153676A (en) Radio frequency parameter configuration method and device, computer equipment and storage medium
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium
CN114995852A (en) Equipment upgrading method, equipment and computer readable storage medium
CN113721959A (en) Information processing method and device and electronic equipment
CN114020308A (en) Camera equipment upgrading method, device, equipment and medium
CN110673868B (en) System data processing method, device and storage medium
CN112118280A (en) Recovery method after OTA upgrade failure of WI-FI equipment
CN112667444A (en) System upgrading method, storage medium and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination