Firmware burning method and device, electronic equipment and storage medium

By receiving burning instructions in electronic devices and automatically re-entering burning mode to deal with the problem of connection abnormalities, the success rate and efficiency of firmware burning are improved, and the need for manual recovery is reduced.

CN119512571APending Publication Date: 2025-02-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311071399.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

During the firmware burning process of electronic equipment, abnormal connections between the electronic equipment and the burning device are prone to occur, resulting in failure of burning and manual recovery, which is inefficient and cost-effective.

Method used

By receiving firmware burning instructions sent by the burning device, the electronic device is controlled to enter the burning mode and automatically re-enter the burning mode when the connection is abnormal to ensure the continuity of data transmission.

Benefits of technology

It improves the success rate of firmware burning, reduces manual recovery burning operations, improves burning efficiency and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512571A_ABST
    Figure CN119512571A_ABST
Patent Text Reader

Abstract

The invention discloses a firmware burning method and device, electronic equipment and a storage medium, the firmware burning method is applied to the electronic equipment, and the firmware burning method comprises the following steps: receiving a firmware burning instruction sent by a burning device connected with the electronic equipment; in response to the firmware burning instruction, controlling the electronic equipment to enter a burning mode; burning firmware data transmitted by the burning device on the basis of the burning mode; and if the connection between the electronic equipment and the burning device is abnormal, controlling the electronic equipment to enter the burning mode again. According to the method, the success rate of firmware burning on the electronic equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic equipment, and more specifically, to a firmware burning method, device, electronic equipment and storage medium. Background Art

[0002] With the rapid advancement of science and technology and living standards, electronic devices (such as smart phones, tablet computers, etc.) have become one of the commonly used electronic products in people's lives. In the generation process of electronic devices, firmware burning is an indispensable and important link. Firmware burning refers to the process of writing software programs into the storage medium of electronic devices. In the related art, firmware data is usually transmitted to the electronic device through a burning device, and the electronic device burns the firmware through a firmware burning program, but in the actual burning process, burning failure is prone to occur. Summary of the invention

[0003] The present application proposes a firmware burning method, device, electronic device and storage medium, which can improve the success rate of firmware burning on electronic devices.

[0004] In a first aspect, an embodiment of the present application provides a firmware burning method, which is applied to an electronic device, and the method includes: receiving a firmware burning instruction sent by a burning device connected to the electronic device; in response to the firmware burning instruction, controlling the electronic device to enter a burning mode; burning the firmware data transmitted by the burning device based on the burning mode; if an abnormality occurs in the connection between the electronic device and the burning device, controlling the electronic device to re-enter the burning mode.

[0005] In a second aspect, an embodiment of the present application provides a firmware burning device, which is applied to an electronic device, and the device includes: an instruction receiving module, an instruction response module, a data burning module and a burning reset module, wherein the instruction receiving module is used to receive a firmware burning instruction sent by a burning device connected to the electronic device; the instruction response module is used to control the electronic device to enter a burning mode in response to the firmware burning instruction; the data burning module is used to burn the firmware data transmitted by the burning device based on the burning mode; and the burning reset module is used to control the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the firmware burning method provided in the first aspect above.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the firmware burning method provided in the first aspect above.

[0008] The solution provided by the present application receives a firmware burning instruction sent by a burning device connected to an electronic device, responds to the firmware burning instruction, controls the electronic device to enter a burning mode, burns the firmware data transmitted by the burning device based on the burning mode, and controls the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device. Thus, in the process of firmware burning of the electronic device, when it is determined that an abnormality occurs in the connection between the electronic device and the burning device, the electronic device is automatically made to re-enter the burning mode, thereby improving the success rate of firmware burning, and also reducing the operation of manually restoring the burning, thereby improving the efficiency of firmware burning. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram of an application environment provided by an embodiment of the present application is shown.

[0011] Figure 2 A schematic diagram of a firmware burning method according to an embodiment of the present application is shown.

[0012] Figure 3 A schematic flow chart of a firmware burning method according to another embodiment of the present application is shown.

[0013] Figure 4 A schematic flow chart of a firmware burning method according to another embodiment of the present application is shown.

[0014] Figure 5 A schematic flow chart of a firmware burning method according to another embodiment of the present application is shown.

[0015] Figure 6 A block diagram of a firmware burning device according to an embodiment of the present application is shown.

[0016] Figure 7 It is a block diagram of an electronic device according to an embodiment of the present application for executing the firmware burning method according to an embodiment of the present application.

[0017] Figure 8It is a storage unit of an embodiment of the present application for storing or carrying program codes for implementing the firmware burning method according to an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0019] Firmware is a program stored in an erasable read-only memory (EROM) or an erasable programmable read-only memory (EPROM). It can be understood as solidified software. Firmware is the software that performs the most basic work of a system. Firmware burning refers to the process of writing firmware into the above memory.

[0020] In the related art, usually during the production process of electronic equipment, firmware burning is performed on electronic equipment. When firmware burning is performed on electronic equipment during the production process, the firmware to be burned is usually sent to the electronic equipment through the communication interface of a burning device (such as a PC, etc.), and the electronic equipment completes the firmware burning according to the received firmware to be burned. However, in the actual burning process, the connection between the electronic equipment and the burning device is prone to abnormal conditions (such as disconnection, unstable connection, etc.), which may cause burning failure, and in the case of burning failure, it is usually necessary to manually select the electronic equipment that failed to burn, and manually control the electronic equipment to re-enter the burning process to complete the firmware burning, thereby making the efficiency of firmware burning low and bringing about a large labor cost.

[0021] In view of the above problems, the inventors have proposed a firmware burning method, device, electronic device and storage medium provided in the embodiments of the present application, which can realize that in the process of firmware burning of an electronic device, when it is determined that the connection between the electronic device and the burning device is abnormal, the electronic device is automatically re-entered into the burning mode, thereby improving the success rate of firmware burning, and also reducing the operation of manually restoring the burning, thereby improving the efficiency of firmware burning. Among them, the specific firmware burning method is described in detail in the subsequent embodiments.

[0022] The following first introduces the scenarios involved in the embodiments of the present application.

[0023] like Figure 1 As shown, in Figure 1The scene shown includes a burning device 200 and at least one electronic device 100 to be burned with firmware (only two are shown in the figure). Among them, the electronic device 100 is connected to the burning device 200, and optionally, the electronic device 100 and the burning device 200 can be connected through a universal serial bus (USB); the burning device 200 can be a computer device such as a PC, a laptop, a tablet computer, and the electronic device 100 can be a smart phone, a tablet computer, a smart watch, an e-book, etc. When burning firmware, the burning device 200 can control the electronic device 100 through the connection with the electronic device 100, and after sending the firmware data to the electronic device 100, the electronic device 100 burns the firmware. In the firmware burning process, when the electronic device 100 determines that the connection with the burning device 200 is abnormal, the electronic device 100 can be controlled to re-enter the burning mode to improve the success rate of firmware burning, and reduce the operation of manually recovering the burning, thereby improving the efficiency of firmware burning.

[0024] The firmware burning method provided in the embodiment of the present application is described in detail below in conjunction with the accompanying drawings.

[0025] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of a firmware burning method provided by an embodiment of the present application. In a specific embodiment, the firmware burning method is applied to Figure 6 The firmware burning device 400 and the electronic device 100 equipped with the firmware burning device 400 are shown in FIG. Figure 7 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, an e-book, etc., which is not limited here. Figure 2 The process shown is described in detail, and the firmware burning method may specifically include the following steps:

[0026] Step S110: receiving a firmware burning instruction sent by a burning device connected to the electronic device.

[0027] In an embodiment of the present application, when firmware is burned to an electronic device, a firmware burning instruction can be sent to the electronic device through a burning device connected to the electronic device to control the electronic device to enter a burning mode; correspondingly, the electronic device can receive the firmware burning instruction sent by the burning device.

[0028] In some embodiments, the electronic device and the burning device can be connected via a USB cable, that is, the USB interface of the electronic device and the USB interface of the burning device are connected via a USB cable. The burning device can be a computer device such as a PC, a laptop, a tablet computer, etc. that can run the burning software, and the burning software is software for controlling the electronic device to burn firmware.

[0029] In some embodiments, the stage when the electronic device is performing firmware burning can be during the production process, after the electronic device is subjected to factory surface mounting technology (SMT), that is, the stage when the electronic device has not installed the operating system; or it can be after the electronic device has installed the operating system and the electronic device is re-burned with firmware.

[0030] In some embodiments, after performing SMT or burning, the electronic device can detect whether a specified command input through the Android Debug Bridge adb command is received, and when the specified command input through the Android Debug Bridge adb command is received, it can be determined that the firmware burning instruction is received. The specified command input through the Android Debug Bridge adb command can be an input adb reboot loader detected by the burning device after the electronic device is connected to the burning device.

[0031] In some implementations, the above firmware burning instructions may also be commands input through a serial port. After the electronic device is connected to the burning device, when the device is turned on and the debug serial port is connected, a command can be input through the serial port: reboot loader, which can restart the electronic device and enter the burning mode. Of course, in the embodiments of the present application, the above specific firmware burning instructions may not be limited, and only need to realize the control of the electronic device to enter the burning mode.

[0032] Step S120: In response to the firmware burning instruction, controlling the electronic device to enter a burning mode.

[0033] In the embodiment of the present application, after receiving the above firmware burning instruction, the electronic device can respond to the firmware burning instruction to control it to enter the burning mode, thereby performing the firmware burning process. Among them, the burning mode is the mode in which the electronic device burns the firmware. In the burning mode, the electronic device can burn the firmware data into the corresponding storage medium according to the received firmware data. For example, the burning mode can be a loader mode.

[0034] In some implementations, a program for firmware burning may be pre-installed in the electronic device, and the program is used to burn the received firmware data when it is run, that is, when the electronic device runs the program, it can be regarded as entering the burning mode. After receiving the above firmware burning instruction, the electronic device can run the above pre-installed program for firmware burning when responding to the firmware burning instruction to complete the firmware burning this time.

[0035] Step S130: Burn the firmware data transmitted by the burning device based on the burning mode.

[0036] In an embodiment of the present application, after the electronic device enters the burning mode, the burning device can transmit to the electronic device firmware data corresponding to the firmware that needs to be burned to the storage medium in the electronic device; correspondingly, the electronic device can receive the firmware data transmitted by the burning device, and based on the burning mode entered, can burn the received firmware data, thereby realizing the burning of the corresponding firmware into the storage medium.

[0037] In some embodiments, after the electronic device enters the burning mode, it can send first target indication information to the burning device, and the first target indication information is used to indicate that the electronic device has entered the burning mode, and the current burning device can transmit firmware data to the electronic device; correspondingly, after receiving the above first target indication information, the burning device can obtain the firmware data corresponding to the firmware that needs to be burned to the storage medium in the electronic device this time, and transmit the firmware data to the electronic device.

[0038] In some embodiments, the firmware that needs to be burned into the storage medium in the electronic device can be determined by the burning device according to the device information of the electronic device, and the device information can include the model of the electronic device, the International Mobile Equipment Identity (IMEI) and other information that can distinguish different electronic devices. The burning device can determine the firmware that matches the device information according to the device information of the electronic device, and transmit the firmware data corresponding to the determined firmware to the electronic device. It can be understood that the configuration, function and characteristics of electronic devices with different device information are different, so the firmware to be burned is also different, so the firmware corresponding to the above firmware data is determined by the burning device according to the device information of the electronic device, which can improve the accuracy and applicability of the firmware burned in the electronic device.

[0039] In a possible implementation, the above firmware data may be firmware data corresponding to the firmware matching the above device information determined by the burning device from the stored firmware burning package. The firmware burning package may include multiple firmwares corresponding to different device information. In other words, the burning device may pre-store firmware data corresponding to firmwares with different device information. When it is necessary to burn firmware to the electronic device, the burning device may determine the corresponding firmware data according to the device information of the electronic device and transmit the firmware data to the electronic device.

[0040] In a possible implementation, the above firmware data may be firmware data corresponding to the firmware matching the above device information obtained by the burning device from the server in real time. When the burning device needs to transmit firmware data to the electronic device, it may send a firmware acquisition request carrying the device information to the server according to the device information of the electronic device. After receiving the firmware acquisition request, the server may feedback firmware data corresponding to the firmware matching the device information to the burning device according to the device information in the firmware acquisition request. The burning device then transmits the received firmware data to the electronic device.

[0041] In some implementations, when the electronic device burns the received firmware data based on the burning mode, the firmware data can be written into a corresponding storage medium, such as an EROM or EPROM, thereby implementing firmware burning. The firmware data can be written into the corresponding storage medium through commands such as SCSI write buffer (0x3B).

[0042] Step S140: If the connection between the electronic device and the burning device is abnormal, control the electronic device to re-enter the burning mode.

[0043] In the embodiment of the present application, the electronic device can detect the connection between the electronic device and the burning device during the process of burning the received data based on the above burning mode. When the connection between the electronic device and the burning device is detected to be abnormal, the electronic device can be controlled to re-enter the burning mode. It can be understood that the abnormality in the connection between the electronic device and the burning device may be temporary, for example, it may be caused by the wear of the USB interface, the power supply stability and other problems. The temporary connection abnormality, if the connection is abnormal, the electronic device is kept in the current burning mode, the burning process will be interrupted and the burning will fail. Therefore, in the case of abnormal connection, by making the electronic device re-enter the burning mode, the communication control can be restored with the burning device, thereby restarting the burning process and improving the probability of successful burning.

[0044] The firmware burning method provided in the embodiment of the present application receives a firmware burning instruction sent by a burning device connected to an electronic device, responds to the firmware burning instruction, controls the electronic device to enter a burning mode, burns the firmware data transmitted by the burning device based on the burning mode, and controls the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device. Thus, in the process of firmware burning the electronic device, when it is determined that an abnormality occurs in the connection between the electronic device and the burning device, the electronic device is automatically made to re-enter the burning mode, thereby improving the success rate of firmware burning, and also reducing the operation of manually restoring the burning, thereby improving the efficiency and labor cost of firmware burning.

[0045] See also Figure 3 , Figure 3 A schematic diagram of a firmware burning method provided by another embodiment of the present application is shown. The firmware burning method is applied to the above electronic device. Figure 3 The process shown is described in detail, and the firmware burning method may specifically include the following steps:

[0046] Step S210: receiving a firmware burning instruction sent by a burning device connected to the electronic device.

[0047] Step S230: In response to the firmware burning instruction, control the electronic device to enter a burning mode.

[0048] Step S230: Burn the firmware data transmitted by the burning device based on the burning mode.

[0049] In the embodiment of the present application, steps S210 to S230 may refer to the contents of other embodiments and will not be described in detail here.

[0050] Step S240: monitoring the connection status between the electronic device and the burning device, and the transmission status of the firmware data.

[0051] In the embodiment of the present application, during the process of burning the received firmware data, the electronic device can monitor the connection status between the electronic device and the burning device, as well as the transmission status of the firmware data, to determine whether there is an abnormality in the connection between the electronic device and the burning device. The connection status includes the connection status and the disconnection status; the transmission status includes whether the firmware data transmitted by the burning device is received, etc.

[0052] In some embodiments, the electronic device and the burning device are connected via a USB. When the electronic device monitors the connection status between the electronic device and the burning device, it can monitor whether the USB port of the electronic device is disconnected. If the USB port is disconnected, it can be determined that the connection status between the electronic device and the burning device is a first connection status, and the first connection status indicates that the electronic device and the burning device are disconnected; if the USB port is not disconnected, it can be determined that the connection status between the electronic device and the burning device is a second connection status, and the second connection status indicates that the electronic device and the burning device are not disconnected.

[0053] In a possible implementation, the electronic device can monitor a USB device disconnection event through a USB PHY chip; when a USB device disconnection event is monitored, it can be determined that the USB port of the electronic device is disconnected, and the connection state between the electronic device and the burning device is determined to be the above first connection state.

[0054] Step S250: If the connection status indicates that the electronic device and the burning device are disconnected, or the transmission status indicates that the electronic device has not received the transmitted firmware data for a first duration, it is determined that the connection between the electronic device and the burning device is abnormal.

[0055] In an embodiment of the present application, when the electronic device can determine whether the connection between the electronic device and the burning device is abnormal based on the above connection state and the above transmission state monitored, it can be determined that the connection between the electronic device and the burning device is abnormal when the connection state represents that the electronic device is disconnected from the burning device, or the transmission state represents that the electronic device does not receive the firmware data transmitted by the burning device for a duration of a first duration. In other words, when the electronic device is disconnected from the burning device, or the electronic device does not receive the firmware data transmitted by the burning device within the first duration, it can be determined that the connection between the two is abnormal. Wherein, the specific value of the first duration may not be limited, for example, it may be 2 seconds, 3 seconds, 5 seconds, 10 seconds, etc. It can be understood that the disconnection between the electronic device and the burning device indicates that data cannot be transmitted between the electronic device and the burning device. Therefore, in such a case, it can be determined that there is an abnormality in the connection between the electronic device and the burning device, so as to trigger subsequent control to re-enter the burning mode; when the duration for which the electronic device does not receive the transmitted firmware data reaches a first duration, it indicates that the data transmission and reception between the electronic device and the burning device has timed out. At this time, data cannot be transmitted normally between the electronic device and the burning device, which will cause burning failure. Therefore, it can be determined that there is an abnormality in the connection between the electronic device and the burning device, so as to trigger subsequent control to re-enter the burning mode.

[0056] Step S260: If the connection between the electronic device and the burning device is abnormal, control the electronic device to re-enter the burning mode.

[0057] In the embodiment of the present application, step S260 can refer to the contents of other embodiments and will not be repeated here.

[0058] The firmware burning method provided in the embodiment of the present application can monitor the connection status between the electronic device and the burning device and the transmission status of the firmware data during the firmware burning of the electronic device. When it is determined based on the connection status and the transmission status that the connection between the electronic device and the burning device is abnormal, the electronic device is automatically re-entered into the burning mode, thereby improving the success rate of firmware burning, reducing the operation of manual recovery of burning, and improving the efficiency and labor cost of firmware burning.

[0059] See also Figure 4 , Figure 4 A schematic diagram of a firmware burning method provided by another embodiment of the present application is shown. The firmware burning method is applied to the above electronic device. Figure 4 The process shown is described in detail, and the firmware burning method may specifically include the following steps:

[0060] Step S310: receiving a firmware burning instruction sent by a burning device connected to the electronic device.

[0061] In the embodiment of the present application, step S310 can refer to the contents of other embodiments and will not be repeated here.

[0062] Step S320: In response to the firmware burning instruction, run a firmware burning program to enable the electronic device to enter a burning mode.

[0063] In the embodiment of the present application, when the electronic device is controlled to enter the burning mode in response to the received firmware burning instruction, the firmware burning program can be run to make the electronic device enter the burning mode. Among them, the firmware burning program is a program used for the electronic device to implement firmware burning, which can be understood as a driver program. When the electronic device runs the firmware burning program, it can be regarded as the electronic device entering the burning mode and starting to execute the entire burning process.

[0064] In some implementations, the above firmware burning program may be a program pre-installed in the electronic device, which may be understood as a program that the electronic device has before firmware burning, for implementing firmware burning. The firmware burning program may be pre-installed by the manufacturer of the relevant hardware modules in the electronic device to ensure that when these hardware modules are used to produce the electronic device, the firmware required by the electronic device can be burned.

[0065] Step S330: Burn the firmware data transmitted by the burning device based on the burning mode.

[0066] In the embodiment of the present application, step S330 can refer to the contents of other embodiments and will not be repeated here.

[0067] Step S340: If the connection between the electronic device and the burning device is abnormal, re-run the firmware burning program to make the electronic device re-enter the burning mode.

[0068] In an embodiment of the present application, during the process of burning received data based on the above burning mode, the electronic device can detect the connection status between the electronic device and the burning device. When an abnormality is detected in the connection between the electronic device and the burning device, the electronic device is controlled to re-enter the burning mode, and the above firmware burning program can be re-run to make the electronic device re-enter the burning mode.

[0069] Step S350: Sending a data acquisition request to the burning device, wherein the data acquisition request is used to request the burning device to resend the firmware data to the electronic device.

[0070] In an embodiment of the present application, after the electronic device re-runs the firmware burning program and re-enters the burning mode, if the abnormality in the connection between the electronic device and the burning device may be temporary, then after re-entering the burning mode, communication control with the burning device can be restored. Therefore, the electronic device can send a data acquisition request to the burning device to request the burning device to re-send firmware data to the electronic device, thereby restarting the firmware burning process and realizing firmware burning of the electronic device.

[0071] The firmware burning method provided in the embodiment of the present application can realize that during the firmware burning process of the electronic device, when it is determined that the connection between the electronic device and the burning device is abnormal, the firmware burning program can be re-run to re-enter the burning mode. If the abnormality in the connection between the electronic device and the burning device may be temporary, after re-entering the burning mode, the communication control with the burning device can be restored. Therefore, the electronic device can send a data acquisition request to the burning device to request the burning device to re-send firmware data to the electronic device, thereby restarting the firmware burning process and realizing the firmware burning of the electronic device, thereby improving the success rate of firmware burning, and also reducing the operation of manual recovery of burning, improving the efficiency and labor cost of firmware burning.

[0072] See also Figure 5 , Figure 5 A schematic diagram of a firmware burning method provided by another embodiment of the present application is shown. The firmware burning method is applied to the above electronic device. Figure 5The process shown is described in detail, and the firmware burning method may specifically include the following steps:

[0073] Step S410: receiving a firmware burning instruction sent by a burning device connected to the electronic device.

[0074] Step S420: In response to the firmware burning instruction, control the electronic device to enter a burning mode.

[0075] Step S430: Burn the firmware data transmitted by the burning device based on the burning mode.

[0076] Step S440: If the connection between the electronic device and the burning device is abnormal, control the electronic device to re-enter the burning mode.

[0077] In the embodiment of the present application, steps S410 to S440 may refer to the contents of other embodiments and will not be described in detail here.

[0078] Step S450: If it is determined again that an abnormality occurs in the connection between the electronic device and the burning device, the electronic device is controlled to re-enter the burning mode, and a first indication message is sent to the burning device, wherein the first indication message is used to instruct the burning device to output connection prompt information, and the connection prompt information is used to prompt to check the connection between the electronic device and the burning device.

[0079] In the embodiment of the present application, after the connection between the electronic device and the burning device is abnormal and the electronic device is controlled to re-enter the burning mode, the firmware burning process can be re-entered, and in the new burning process, the electronic device can still detect the connection between the electronic device and the burning device. If it is determined again that the connection between the electronic device and the burning device is abnormal, the electronic device can continue to be controlled to re-enter the burning mode, and send the first indication information to the burning device to instruct the electronic device to output the connection prompt information to prompt the user to check the connection between the electronic device and the burning device. In other words, as long as the connection between the electronic device and the burning device is determined to be abnormal for the first time and the electronic device is controlled to re-enter the burning mode, as long as the connection between the electronic device and the burning device is detected to be abnormal, the electronic device will re-enter the burning mode and send the above first indication information to the burning device, so that the burning device can output the connection prompt information according to the first indication information, so that the user can check the connection between the electronic device and the burning device according to the connection prompt information, thereby solving the problem of abnormal connection between the two, thereby improving the success rate of firmware burning.

[0080] Exemplarily, the electronic device determines for the first time that an abnormality occurs in the connection with the burning device, and controls it to re-enter the burning mode to re-enter the firmware burning process; if the connection between the electronic device and the burning device is still abnormal, or the abnormality occurs again when the firmware is re-burned, the electronic device can determine for the second time that an abnormality occurs in the connection with the burning device, and control it to re-enter the burning mode to re-enter the firmware burning process; after determining for the second time that an abnormality occurs in the connection with the burning device, and controlling it to re-enter the burning mode, if the connection between the electronic device and the burning device is still abnormal, or the abnormality occurs again when the firmware is re-burned, the electronic device can determine for the third time that an abnormality occurs in the connection with the burning device, and control it to re-enter the burning mode to re-enter the firmware burning process; and repeat this process.

[0081] In some embodiments, if it is determined again that the connection between the electronic device and the burning device is abnormal, the cumulative number of times the electronic device re-enters the burning mode is obtained; if the cumulative number is greater than or equal to the target number, the electronic device is controlled to re-enter the burning mode, and the first indication information is sent to the burning device. In this manner, as long as the connection between the electronic device and the burning device is determined to be abnormal for the first time, after the electronic device is controlled to re-enter the burning mode, as long as the connection between the electronic device and the burning device is detected to be abnormal, the electronic device will re-enter the burning mode, and if the cumulative number of times of re-entering the burning mode reaches the target number, not only will the electronic device re-enter the burning mode, but also the connection prompt information will be output. Among them, the above target number can be 2 times, 3 times, 5 times, etc., and the specific value of the target number can be unlimited. It can be understood that when the cumulative number of times of re-entering the burning mode reaches the target number of times, it means that the abnormality in the connection between the electronic device and the burning device is not temporary or accidental. In this case, it is very likely that the USB connection cable between the electronic device and the burning device is damaged, and the USB connection cable is not accurately connected to the USB port. Therefore, the above connection prompt information can be output by the burning device to ensure normal communication between the electronic device and the burning device after the electronic device enters the burning mode again, thereby completing the entire firmware burning process.

[0082] In the above implementation manner, after determining again that an abnormality occurs in the connection between the electronic device and the burning device and obtaining the cumulative number of times the electronic device re-enters the burning mode, if the electronic device determines that the cumulative number of times is less than the target number of times, the electronic device can only be controlled to re-enter the burning mode without sending the above first indication information to the burning device.

[0083] The firmware burning method provided in the embodiment of the present application can realize that during the process of firmware burning of an electronic device, when it is determined that the connection between the electronic device and the burning device is abnormal, the electronic device is automatically made to re-enter the burning mode, thereby improving the success rate of firmware burning, and also reducing the operation of manual recovery of burning, thereby improving the efficiency and labor cost of firmware burning; in addition, after re-entering the burning mode, if it is determined again that the connection between the electronic device and the burning device is abnormal, the electronic device is also controlled to re-enter the burning mode, and the first indication information is sent to the burning device, thereby further improving the success rate of firmware burning.

[0084] See also Figure 6 , which shows a structural block diagram of a firmware burning device 500 provided in an embodiment of the present application. The firmware burning device 500 applies the above-mentioned electronic device, and the firmware burning device 500 includes: an instruction receiving module 510, an instruction response module 520, a data burning module 530 and a burning reset module 540. Among them, the instruction receiving module 510 is used to receive a firmware burning instruction sent by a burning device connected to the electronic device; the instruction response module 520 is used to control the electronic device to enter a burning mode in response to the firmware burning instruction; the data burning module 530 is used to burn the firmware data transmitted by the burning device based on the burning mode; the burning reset module 540 is used to control the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device.

[0085] In some embodiments, the firmware burning device 500 may further include a state monitoring module and an abnormality determination module. The state monitoring module is used to monitor the connection state between the electronic device and the burning device and the transmission state of the firmware data before controlling the electronic device to re-enter the burning mode if the connection between the electronic device and the burning device is abnormal; the abnormality determination module is used to determine that the connection between the electronic device and the burning device is abnormal if the connection state indicates that the electronic device and the burning device are disconnected, or the transmission state indicates that the electronic device has not received the transmitted firmware data for a continuous period of time reaching a first period.

[0086] In a possible implementation, the electronic device is connected to the burning device via a universal serial bus, and the status monitoring module can be specifically used to monitor whether a port of the universal serial bus of the electronic device is disconnected; if the port is disconnected, the connection state is determined to be a first connection state, and the first connection state indicates that the electronic device is disconnected from the burning device.

[0087] In some embodiments, the instruction response module 520 can be specifically used to run a firmware burning program in response to the firmware burning instruction to enable the electronic device to enter the burning mode; the burning reset module can be specifically used to re-run the firmware burning program if an abnormality occurs in the connection between the electronic device and the burning device to enable the electronic device to re-enter the burning mode.

[0088] In some embodiments, the firmware burning device 500 may further include a request sending module, which is used to send a data acquisition request to the burning device after controlling the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device, and the data acquisition request is used to request the burning device to re-send the firmware data to the electronic device.

[0089] In some embodiments, the firmware burning device 500 may further include an information prompt module, which may be used to control the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device. If it is determined again that an abnormality occurs in the connection between the electronic device and the burning device, the information prompt module may be used to control the electronic device to re-enter the burning mode and send first indication information to the burning device, wherein the first indication information is used to instruct the burning device to output connection prompt information, and the connection prompt information is used to prompt to check the connection between the electronic device and the burning device.

[0090] In a possible implementation, the information prompt module can be specifically used to obtain the cumulative number of times the electronic device re-enters the burning mode if it is determined again that an abnormality occurs in the connection between the electronic device and the burning device; if the cumulative number is greater than or equal to the target number, control the electronic device to re-enter the burning mode and send the first indication information to the burning device; the burning reset module can also be used to control the electronic device to re-enter the burning mode if the cumulative number is less than the target number.

[0091] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0092] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0093] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0094] In summary, the solution provided by the present application receives a firmware burning instruction sent by a burning device connected to an electronic device, responds to the firmware burning instruction, controls the electronic device to enter a burning mode, burns the firmware data transmitted by the burning device based on the burning mode, and controls the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device. Thus, in the process of firmware burning of the electronic device, when it is determined that an abnormality occurs in the connection between the electronic device and the burning device, the electronic device is automatically made to re-enter the burning mode, thereby improving the success rate of firmware burning, and also reducing the operation of manually restoring the burning, thereby improving the efficiency of firmware burning.

[0095] Please refer to Figure 7 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, a smart watch, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.

[0096] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0097] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.

[0098] Please refer to Figure 8 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0099] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A firmware burning method, characterized in that: Applied to electronic equipment, the method comprises: Receiving a firmware burning instruction sent by a burning device connected to the electronic device; In response to the firmware burning instruction, controlling the electronic device to enter a burning mode; Burning the firmware data transmitted by the burning device based on the burning mode; If the connection between the electronic device and the burning device is abnormal, the electronic device is controlled to re-enter the burning mode.

2. The method according to claim 1, characterized in that Before controlling the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device, the method further includes: Monitoring the connection status between the electronic device and the burning device, and the transmission status of the firmware data; If the connection status indicates that the electronic device and the burning device are disconnected, or the transmission status indicates that the electronic device has not received the transmitted firmware data for a first period of time, it is determined that an abnormality occurs in the connection between the electronic device and the burning device.

3. The method according to claim 2, characterized in that The electronic device is connected to the burning device via a universal serial bus, and monitoring the connection status between the electronic device and the burning device includes: Monitoring whether a universal serial bus port of the electronic device is disconnected; If the port is disconnected, the connection state is determined to be a first connection state, and the first connection state indicates that the electronic device and the burning device are disconnected.

4. The method according to claim 1, characterized in that: The step of controlling the electronic device to enter a burning mode in response to the firmware burning instruction includes: In response to the firmware burning instruction, running a firmware burning program to enable the electronic device to enter a burning mode; If the connection between the electronic device and the burning device is abnormal, controlling the electronic device to re-enter the burning mode includes: If the connection between the electronic device and the burning device is abnormal, the firmware burning program is re-run to make the electronic device re-enter the burning mode.

5. The method according to any one of claims 1 to 4, characterized in that: After controlling the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device, the method further includes: A data acquisition request is sent to the burning device, where the data acquisition request is used to request the burning device to resend the firmware data to the electronic device.

6. The method according to any one of claims 1 to 4, characterized in that: After controlling the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device, the method further includes: If it is determined again that an abnormality occurs in the connection between the electronic device and the burning device, the electronic device is controlled to re-enter the burning mode, and first indication information is sent to the burning device, wherein the first indication information is used to instruct the burning device to output connection prompt information, and the connection prompt information is used to prompt to check the connection between the electronic device and the burning device.

7. The method according to claim 6, characterized in that If it is determined again that the connection between the electronic device and the burning device is abnormal, controlling the electronic device to re-enter the burning mode and sending first indication information to the burning device includes: If it is determined again that the connection between the electronic device and the burning device is abnormal, obtaining the cumulative number of times the electronic device re-enters the burning mode; If the accumulated number of times is greater than or equal to the target number of times, controlling the electronic device to re-enter the burning mode, and sending the first indication information to the burning device; The method further comprises: If the accumulated number of times is less than the target number of times, the electronic device is controlled to re-enter the burning mode.

8. A firmware burning device, characterized in that: Applied to electronic equipment, the device comprises: an instruction receiving module, an instruction response module, a data burning module and a burning reset module, wherein: The instruction receiving module is used to receive a firmware burning instruction sent by a burning device connected to the electronic device; The instruction response module is used to control the electronic device to enter a burning mode in response to the firmware burning instruction; The data burning module is used for burning the firmware data transmitted by the burning device based on the burning mode; The burning reset module is used for controlling the electronic device to re-enter the burning mode if an abnormality occurs in the connection between the electronic device and the burning device.

9. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 7.