Application program recovery method and electronic equipment
By reusing the charging interface in smart wearable devices to communicate with external terminal devices and using the charging management unit to control the pin conduction, the problem of application recovery caused by the lack of physical buttons is solved, achieving rapid repair and cost savings.
Patent Information
- Application Number
- CN202510978958.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-11-14
AI Technical Summary
Existing smart wearable devices lack physical buttons due to the potting process, making it impossible to restore the application. Furthermore, application download failures require destructive disassembly, resulting in the scrapping of the finished product.
Communication with external terminal devices is achieved by reusing the charging interface. The charging management unit controls the VIN and TRX pins to establish a communication channel, receive application information, and perform recovery operations.
No additional physical pins are required, maintaining device sealing, quickly fixing application anomalies, reducing disassembly costs, and avoiding scrapping.
Smart Images

Figure CN120950283A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to electronic device program recovery technology, and more specifically, to an application recovery method and an electronic device. Background Technology
[0002] Existing smart wearable devices use a potting process to achieve sealing (e.g., waterproofing), resulting in the absence of physical buttons and making it impossible to trigger application recovery via buttons. Furthermore, when the application download function of a smart wearable device malfunctions, the only way to perform the download operation is through destructive disassembly of the device, which may render the entire product unusable. Summary of the Invention
[0003] One objective of this invention is to provide a new technical solution for an application recovery method.
[0004] According to a first aspect of the present invention, an application recovery method is provided, applied to an electronic device, the electronic device including a control unit, a charging management unit, and a battery, the method comprising:
[0005] When the electronic device is started, the applications stored in the application storage area are verified, and the verification results are obtained.
[0006] If the verification result indicates that the application is abnormal, the application download function of the electronic device is triggered, and the application is downloaded to obtain the download result.
[0007] In the case of download failure, the charging management unit of the electronic device receives the instruction sent by the terminal device through the charging interface, and controls the charging management unit to switch the VIN pin and VCC pin to be turned on and the VIN pin and TRX pin to be turned on according to the received instruction. The TRX pin is connected to the TX pin and RX pin of the control unit of the electronic device.
[0008] Based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit, application information is received, and an application recovery operation is performed based on the application information.
[0009] Optionally, the charging management unit of the electronic device receives instructions sent by the terminal device through the charging interface, and controls the charging management unit to switch the VIN pin and VCC pin to be on and off as the VIN pin and TRX pin according to the received instructions, including:
[0010] When the charging management unit receives a restart command from the terminal device through the charging interface, the charging management unit disconnects the channel through which the battery supplies power to the control unit;
[0011] When the channel through which the battery supplies power to the control unit is disconnected, and the charging management unit receives a first channel switching command sent by the terminal device, the charging management unit switches the VIN pin and VCC pin to be on, and the VIN pin and TRX pin are on.
[0012] Optionally, receiving application information and performing application recovery operations based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit includes:
[0013] When the channel through which the battery powers the control unit is turned on, the status of the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit is detected;
[0014] When the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit is in the ON state, application information is received based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit.
[0015] The bootloader layer is used to perform an application recovery operation based on the application information.
[0016] Optionally, the charging interface of the charging management unit is externally connected to a private protocol conversion device, which is connected to the terminal device. The format of the instructions sent by the terminal device is converted into a format that the charging management unit can recognize by the private protocol conversion device.
[0017] Optionally, the method further includes:
[0018] When the charging management unit receives a second channel switching command sent by the terminal device, the charging management unit switches the VIN pin and TRX pin to be connected, and the VIN pin and VCC pin are connected.
[0019] Optionally, the method further includes:
[0020] When the charging management unit is connected to an external charging power source through the charging interface, the charging management unit switches the VIN pin and TRX pin to be connected to the VIN pin and VCC pin.
[0021] Optionally, the step of verifying the applications stored in the application storage area and obtaining the verification result includes:
[0022] The first hash value is obtained by calculating the application stored in the application storage area;
[0023] Obtain the pre-stored second hash value;
[0024] The first hash value and the second hash value are compared to obtain the comparison result;
[0025] If the comparison result shows that the first hash value and the second hash value are inconsistent, the verification result is determined to indicate that the application has an anomaly.
[0026] According to a second aspect of the present invention, an electronic device is provided, comprising a control unit, a charging management unit, and a battery, wherein,
[0027] The control unit is used to verify the applications stored in the application storage area when the electronic device is started, and obtain the verification result; if the verification result indicates that the application is abnormal, in response to the application download function of the electronic device being triggered, the control unit performs a download operation on the application and obtains the download result.
[0028] The charging management unit is used to receive instructions sent by the terminal device through the charging interface when the download result is a download failure. According to the received instructions, the charging management unit controls the VIN pin and VCC pin to switch the VIN pin and TRX pin to be turned on. The TRX pin is connected to the TX pin and RX pin of the control unit of the electronic device.
[0029] The control unit is also used to receive application information based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit, and to perform an application recovery operation based on the application information.
[0030] Optionally, the charging interface of the charging management unit is externally connected to a proprietary protocol conversion device, which is connected to the terminal device.
[0031] The proprietary protocol conversion device is used to convert the format of the instructions sent by the terminal device into a format that the charging management unit can recognize.
[0032] Optionally, the charging management unit is used to disconnect the channel through which the battery supplies power to the control unit when a restart command is received from the terminal device via the charging interface;
[0033] When the channel through which the battery supplies power to the control unit is disconnected, and a first channel switching command is received from the terminal device, the VIN pin and VCC pin are switched to be connected to the VIN pin and TRX pin.
[0034] The application recovery method disclosed herein enables communication with an external terminal device by reusing the charging interface when the application and application download function of an electronic device are abnormal. This allows the application information to be obtained. On the one hand, it eliminates the need to set additional physical pins on the electronic device, thus maintaining the device's airtightness. On the other hand, it can quickly repair application abnormality problems, reduce disassembly costs, and avoid scrapping.
[0035] The features and advantages of the embodiments of this specification will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0036] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of this specification and, together with their description, serve to explain the principles of these embodiments.
[0037] Figure 1 This is a flowchart illustrating an application recovery method according to an embodiment of the present invention.
[0038] Figure 2 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention.
[0039] Figure 3 This is a connection diagram of an electronic device, a proprietary protocol conversion device, and a terminal device according to an embodiment of the present invention.
[0040] Figure 4 This is a flowchart illustrating an application recovery method according to an embodiment of the present invention. Detailed Implementation
[0041] Various exemplary embodiments of this specification will now be described in detail with reference to the accompanying drawings.
[0042] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the embodiments of this specification or their application or use.
[0043] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0044] To address the aforementioned technical issues, this disclosure provides an application recovery method. When an electronic device's application malfunctions and its download function is abnormal, communication with an external terminal device is achieved by reusing the charging interface, thereby obtaining application information. On the one hand, this eliminates the need for additional physical pins on the electronic device, maintaining its airtightness; on the other hand, it can quickly repair application malfunctions, reduce disassembly costs, and prevent the device from becoming unusable.
[0045] according to Figure 1 As shown, the application recovery method in this embodiment includes the following steps S110 to S140.
[0046] Step S110: When the electronic device is started, the application stored in the application storage area is verified to obtain the verification result.
[0047] In some embodiments, step S110 includes the following steps S111 to S114.
[0048] Step S111: Calculate the first hash value for the application stored in the application storage area.
[0049] Step S112: Obtain the pre-stored second hash value.
[0050] The second hash value is the information carried in the downloaded application information obtained by the electronic device.
[0051] Step S113: Compare the first hash value and the second hash value to obtain the comparison result.
[0052] Step S114: If the comparison result shows that the first hash value and the second hash value are inconsistent, the verification result is determined to be that the application has an anomaly. If the comparison result shows that the first hash value and the second hash value are consistent, the verification result is determined to be that the application is normal.
[0053] Step S120: If the verification result indicates that the application has an error, in response to the application download function of the electronic device being triggered, the application is downloaded to obtain the download result.
[0054] The user triggers a download command within the corresponding app, which is installed on another electronic device. This download command is then sent to the electronic device. Upon receiving the download command, the electronic device performs the download operation based on its own application's download function. If the application's download function malfunctions, such as an OTA (Over-The-Air) error or a communication failure, the application download will fail.
[0055] In step S130, if the download result is a download failure, the charging management unit of the electronic device receives the instruction sent by the terminal device through the charging interface. According to the received instruction, the charging management unit is controlled to switch the VIN pin and VCC pin to be turned on and the VIN pin and TRX pin to be turned on. The TRX pin is connected to the TX pin and RX pin of the control unit of the electronic device.
[0056] In some embodiments, step S130 specifically includes: when the charging management unit receives a restart command sent by the terminal device through the charging interface, the charging management unit disconnects the channel through which the battery supplies power to the control unit; when the channel through which the battery supplies power to the control unit is disconnected and the charging management unit receives a first channel switching command sent by the terminal device, the charging management unit switches the VIN pin and VCC pin to be connected to the VIN pin and TRX pin.
[0057] This restart command is used to instruct the control unit to restart, that is, to first control the battery to stop supplying power to the control unit, and then control the battery to supply power to the control unit.
[0058] according to Figure 2 As shown, when the charging management unit receives a restart command from the terminal device through the charging interface, the charging management unit disconnects the connection between the battery and the Vsys pin, so that the battery no longer supplies power to the control unit before the electronic device restarts.
[0059] according to Figure 2 As shown, the channel between the VIN and VCC pins of the charging management unit is the charging channel for the battery. When the charging management unit does not receive the first channel switching command from the terminal device, the channel between the VIN and VCC pins is in an on state. When the charging management unit receives the first channel switching command from the terminal device, the channel between the VIN and VCC pins is disconnected, and the channel between the VIN and TRX pins is on. The TRX pins are connected to the TX and RX pins of the control unit, thus establishing a communication link between the control unit and the external terminal device.
[0060] The channel between the VIN and VCC pins is mutually exclusive with the channel between the VIN and TRX pins, so only one of the channels can be turned on.
[0061] It should be noted that the control unit sends register values to the charging management unit via the I2C communication interface, enabling the charging management unit to configure itself based on these register values. The register values include charging parameters, including the charging current. Thus, in the event of a fault, such as a power outage or static electricity, the charging management unit can configure itself based on the received register values.
[0062] The control unit cannot control the charging management unit through the communication interface to switch the charging management unit from turning on the VIN pin and VCC pin to turning on the VIN pin and TRX pin.
[0063] In some embodiments, the control unit time-multiplexes the same pin as the RX pin and the TX pin, and configures the pin as an input pin or an output pin through a switching algorithm to achieve data interaction and save hardware resources.
[0064] In step S140, application information is received based on the communication channel between the VIN pin, TRX pin, and RX pin of the control unit, and an application recovery operation is performed based on the application information.
[0065] In some embodiments, step S140 specifically includes: when the channel for powering the control unit by the battery is turned on, detecting the state of the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit; when the state of the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit is turned on, receiving application information based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit; and using the bootloader layer to perform an application recovery operation based on the application information.
[0066] A communication link has been established between the control unit and the external terminal device, allowing the external terminal device to send application information to the control unit through this communication link.
[0067] The battery-powered control unit channel is activated, confirming that the electronic device has successfully repowered. Upon successful repowering, if the communication channel between the VIN pin, TRX pin, and the control unit's RX pin is detected to be active, application information is received via this channel. The system then enters the bootloader layer and performs application recovery operations based on the application information. The bootloader layer stores programs that guide application installation or upgrades.
[0068] In some embodiments, the method further includes: upon receiving a second channel switching command from the terminal device, the charging management unit switches the VIN pin and TRX pin to be connected together, or vice versa. This allows the opening and closing of the channel between the TRX pin and VIN pin in the charging management unit to be accomplished via an external terminal device.
[0069] When the terminal device completes the transmission of application information through the channel between the VIN pin and the TRX pin and the channel between the TRX pin and the RX pin of the control unit, the charging management unit receives the second channel switching command sent by the terminal device and, according to... Figure 2 As shown, the channel between the VIN pin and the TRX pin is open, while the channel between the VIN pin and the VCC pin is open.
[0070] In some embodiments, the method further includes: when the charging management unit is connected to an external charging power supply through the charging interface, the charging management unit switches the VIN pin and TRX pin to be connected to the VIN pin and VCC pin. This allows the channel between the TRX pin and VIN pin in the charging management unit to be disconnected via an external charging power supply, without the need for the intervention of other devices.
[0071] according to Figure 2 As shown, the VBUS pin of the charging interface of the electronic device is connected to the VIN pin of the charging management unit, and the GND pin of the charging interface is connected to the GND pin of the charging management unit. When an external charging power supply is connected to the VBUS pin and GND pin of the charging interface of the electronic device, the charging management unit switches the VIN pin and TRX pin to be on, and the VIN pin and VCC pin to be on.
[0072] In some embodiments, the charging interface of the charging management unit is externally connected to a proprietary protocol conversion device, which is connected to the terminal device. The proprietary protocol conversion device is used to convert the format of the instructions sent by the terminal device into a format that the charging management unit can recognize.
[0073] according to Figure 3 As shown, the VBUS and GND pins of the charging interface of the electronic device are connected to a proprietary protocol conversion device. The proprietary protocol conversion device is connected to the terminal device.
[0074] Specifically, the terminal device sends the first channel switching command to the proprietary protocol conversion device. The proprietary protocol conversion device is used to convert the format of the first channel switching command into a format that the charging management unit can recognize, and then sends the format-converted first channel switching command to the charging management unit, so that the charging management unit switches the VIN pin and VCC pin to VIN pin and TRX pin.
[0075] The first channel switching command received by the proprietary protocol conversion device is a USB signal. The proprietary protocol conversion device is used to convert the USB signal corresponding to the first target command into a TTL signal, and then convert the TTL signal into a signal corresponding to a format recognizable by the charging management unit.
[0076] When the terminal device completes the transmission of application information through the channel between the VIN and TRX pins and the channel between the TRX pin and the RX pin of the control unit, it sends a second channel switching command to the proprietary protocol conversion device. The proprietary protocol conversion device converts the format of the second channel switching command into a format recognizable by the charging management unit (CMU), and then sends the converted second channel switching command to the CMU, causing the CMU to switch the conduction of the VIN and TRX pins to the VIN and VCC pins.
[0077] The proprietary protocol conversion device receives a USB signal as the second channel switching command. The proprietary protocol conversion device converts the USB signal corresponding to the second channel switching command into a TTL signal, and then converts the TTL signal into a signal in a format recognizable by the charging management unit.
[0078] The application recovery method provided in this disclosure is described below with reference to a specific embodiment. Figure 4 As shown, the application recovery method in this embodiment includes the following steps S401 to S406.
[0079] In step S401, when the electronic device is started, the application stored in the application storage area is calculated to obtain a first hash value and a pre-stored second hash value.
[0080] Step S402: Compare whether the first hash value and the second hash value are consistent.
[0081] If the first hash value and the second hash value are consistent, proceed to step S403 to start the application.
[0082] If the first hash value and the second hash value are inconsistent, step S404 is executed, which is performed in response to the application download function of the electronic device being triggered, to download the application and determine whether the download was successful.
[0083] If the download is confirmed to be successful, proceed to step S403 to launch the application.
[0084] If the download fails, step S405 is executed. The charging management unit of the electronic device receives the instruction sent by the terminal device through the charging interface. According to the received instruction, the charging management unit is controlled to switch the VIN pin and VCC pin to VIN pin and TRX pin. The TRX pin is connected to the TX pin and RX pin of the control unit of the electronic device.
[0085] Step S406: Based on the communication channel between the VIN pin, TRX pin, and the RX pin of the control unit, application information is received, and an application recovery operation is performed based on the application information. The application recovery operation involved here includes installation and startup based on the application information.
[0086] One embodiment of the present invention provides an electronic device, according to Figure 2 As shown, the electronic device includes a control unit, a charging management unit, and a battery.
[0087] The control unit is the computational control unit of the electronic device. The control unit can be an MCU (Microcontroller Unit). The control unit transmits commands to the charging management unit via the I2C communication interface. Other types of interfaces are also possible.
[0088] The charging management unit is a charging management chip, such as the SY5501. The charging management unit is used to manage the charging process of the battery in an electronic device. Figure 1 As shown, the charging management unit is connected to the battery. The charging management unit is connected to the control unit's VDD pin through the channel between the Vsys pin and the control unit, and controls the battery to supply power to the control unit.
[0089] The control unit is used to verify the applications stored in the application storage area when the electronic device is started, and obtain the verification result; if the verification result indicates that the application is abnormal, the control unit responds to the application download function of the electronic device being triggered, performs the application download operation, and obtains the download result.
[0090] The charging management unit is used to receive instructions sent by the terminal device through the charging interface when the download result is a download failure. According to the received instructions, the charging management unit controls the switching of the VIN pin and VCC pin to the VIN pin and TRX pin. The TRX pin is connected to the TX pin and RX pin of the control unit of the electronic device.
[0091] The control unit is also used to receive application information and perform application recovery operations based on the communication channel between the VIN pin, TRX pin, and the RX pin of the control unit.
[0092] In some embodiments, the charging management unit is configured to disconnect the battery power supply channel for the control unit when it receives a restart command sent by the terminal device through the charging interface; and when the battery power supply channel for the control unit is disconnected and the charging management unit receives a first channel switching command sent by the terminal device, switch the VIN pin and VCC pin to be connected to the VIN pin and TRX pin.
[0093] In some embodiments, the control unit is configured to detect the state of the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit when the channel for powering the control unit by the battery is turned on; when the state of the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit is turned on, receive application information based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit; and perform an application recovery operation based on the application information using the bootloader layer.
[0094] In some embodiments, the charging interface of the charging management unit is externally connected to a private protocol conversion device, which is connected to the terminal device. The format of the instructions sent by the terminal device is converted into a format that the charging management unit can recognize by the private protocol conversion device.
[0095] In some embodiments, the charging management unit is configured to switch the VIN pin and TRX pin to VIN pin and VCC pin to be on when the charging management unit receives a second channel switching instruction sent by the terminal device.
[0096] In some embodiments, the charging management unit is used to switch the VIN pin and TRX pin to be connected to the VIN pin and VCC pin when the charging management unit is connected to an external charging power supply through the charging interface.
[0097] In some embodiments, the control unit is further configured to calculate the application stored in the application storage area to obtain a first hash value; obtain a pre-stored second hash value; compare the first hash value and the second hash value to obtain a comparison result; and if the comparison result shows that the first hash value and the second hash value are inconsistent, determine that the verification result indicates that the application has an anomaly.
[0098] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0099] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0100] Embodiments of this specification may be systems, methods, and / or computer program products. A computer program product may include a computer-readable storage medium having computer instructions stored thereon for causing a processor to implement various aspects of the embodiments of this specification.
[0101] Computer-readable storage media can be tangible devices capable of holding and storing computer instructions for use by computer instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing computer instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0102] The computer instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.
[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this specification. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of computer instructions, which contains one or more executable computer instructions for implementing a specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation using a combination of software and hardware are equivalent.
[0104] Various embodiments of this specification have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. An application recovery method, characterized in that, include: When the electronic device is started, the applications stored in the application storage area are verified, and the verification results are obtained. If the verification result indicates that the application is abnormal, the application download function of the electronic device is triggered, and the application is downloaded to obtain the download result. In the case of download failure, the charging management unit of the electronic device receives the instruction sent by the terminal device through the charging interface, and controls the charging management unit to switch the VIN pin and VCC pin to be turned on and the VIN pin and TRX pin to be turned on according to the received instruction. The TRX pin is connected to the TX pin and RX pin of the control unit of the electronic device. Based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit, application information is received, and an application recovery operation is performed based on the application information.
2. The method according to claim 1, characterized in that, The charging management unit of the electronic device receives instructions sent by the terminal device through the charging interface, and controls the charging management unit to switch the VIN pin and VCC pin to be on and off as the VIN pin and TRX pin according to the received instructions, including: When the charging management unit receives a restart command from the terminal device through the charging interface, the charging management unit disconnects the channel through which the battery supplies power to the control unit; When the channel through which the battery supplies power to the control unit is disconnected, and the charging management unit receives a first channel switching command sent by the terminal device, the charging management unit switches the VIN pin and VCC pin to be on, and the VIN pin and TRX pin are on.
3. The method according to claim 2, characterized in that, The communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit receives application information and performs an application recovery operation based on the application information, including: When the channel through which the battery powers the control unit is turned on, the status of the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit is detected; When the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit is in the ON state, application information is received based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit. The bootloader layer is used to perform an application recovery operation based on the application information.
4. The method according to claim 2, characterized in that, The charging management unit has an external private protocol conversion device connected to its charging interface. The private protocol conversion device is connected to the terminal device, wherein the format of the instructions sent by the terminal device is converted into a format that the charging management unit can recognize by the private protocol conversion device.
5. The method according to claim 2, characterized in that, The method further includes: When the charging management unit receives a second channel switching command sent by the terminal device, the charging management unit switches the VIN pin and TRX pin to be connected, and the VIN pin and VCC pin are connected.
6. The method according to claim 2, characterized in that, The method further includes: When the charging management unit is connected to an external charging power source through the charging interface, the charging management unit switches the VIN pin and TRX pin to be connected to the VIN pin and the VCC pin.
7. The method according to any one of claims 1-6, characterized in that, The verification of applications stored in the application storage area, and the resulting verification results, include: The first hash value is obtained by calculating the application stored in the application storage area; Obtain the pre-stored second hash value; The first hash value and the second hash value are compared to obtain the comparison result; If the comparison result shows that the first hash value and the second hash value are inconsistent, the verification result is determined to indicate that the application has an anomaly.
8. An electronic device, characterized in that, It includes a control unit, a charging management unit, and a battery, among which, The control unit is used to verify the applications stored in the application storage area when the electronic device is started, and obtain the verification result; if the verification result indicates that the application is abnormal, in response to the application download function of the electronic device being triggered, the control unit performs a download operation on the application and obtains the download result. The charging management unit is used to receive instructions sent by the terminal device through the charging interface when the download result is a download failure. According to the received instructions, the charging management unit controls the VIN pin and VCC pin to switch the VIN pin and TRX pin to be turned on. The TRX pin is connected to the TX pin and RX pin of the control unit of the electronic device. The control unit is also used to receive application information based on the communication channel between the VIN pin, the TRX pin, and the RX pin of the control unit, and to perform an application recovery operation based on the application information.
9. The electronic device according to claim 8, characterized in that, The charging management unit has an external private protocol conversion device connected to its charging interface. This private protocol conversion device is connected to the terminal device. The proprietary protocol conversion device is used to convert the format of the instructions sent by the terminal device into a format that the charging management unit can recognize.
10. The electronic device according to claim 8, characterized in that, The charging management unit is used to disconnect the battery's power supply channel to the control unit when a restart command is received from the terminal device via the charging interface. When the channel through which the battery supplies power to the control unit is disconnected, and a first channel switching command is received from the terminal device, the VIN pin and VCC pin are switched to be connected to the VIN pin and TRX pin.