A method and device for repairing boot abnormality

CN114661501BActive Publication Date: 2026-09-15HUAWEI TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011535219.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-23
Publication Date
2026-09-15
Estimated Expiration
2040-12-23

AI Technical Summary

Technical Problem

[0003]因此,如果手机发生故障无法正常开机,将会给用户带来巨大的损失(比如用户数据丢失),进而将会引发舆情、投诉等,从而给手机厂商造成多维度损失

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114661501B_ABST
    Figure CN114661501B_ABST
Patent Text Reader

Abstract

A method and device for repairing booting abnormity. The method can be applied to a first electronic device which is a normally-booting electronic device. In the method, the first electronic device can establish a connection with a second electronic device which is an abnormally-booting electronic device. The first electronic device can obtain version information of the second electronic device, and obtain an upgrade package for repairing the second electronic device according to the version information of the second electronic device. Then, the first electronic device controls the second electronic device to perform repair according to the upgrade package. In this way, the normally-booting electronic device can perform proxy repair on the abnormally-booting electronic device. For example, when the abnormally-booting electronic device cannot enter a fast start mode or a recovery mode, the normally-booting electronic device can perform proxy repair on the abnormally-booting electronic device, thereby effectively repairing the abnormally-booting electronic device and improving user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a method and apparatus for repairing abnormal power-on. Background Technology

[0002] With the rapid development of society, mobile terminals such as mobile phones are becoming increasingly popular. Mobile phones not only have communication functions, but also powerful processing capabilities, storage capacity, and camera functions. Therefore, mobile phones can serve not only as a communication tool, but also as a user's mobile file library, storing various personal information, photos, videos, etc., and can also be linked to the user's social media accounts, online banking, mobile payment accounts, and other information.

[0003] Therefore, if a mobile phone malfunctions and cannot be turned on normally, it will cause huge losses to users (such as loss of user data), which will in turn trigger public opinion, complaints, etc., thus causing multi-dimensional losses to mobile phone manufacturers. Summary of the Invention

[0004] The purpose of this application is to provide a method and apparatus for repairing power-on malfunctions, which can effectively repair electronic devices with power-on malfunctions and improve user experience.

[0005] In a first aspect, embodiments of this application provide a method for repairing a power-on malfunction. This method can be applied to a first electronic device, which is an electronic device that powers on normally. The method includes: establishing a connection with a second electronic device, which is an electronic device with a power-on malfunction; obtaining version information of the second electronic device; obtaining an upgrade package for repairing the second electronic device based on the version information of the second electronic device; and controlling the second electronic device to perform repair based on the upgrade package.

[0006] Using the above method, a normally functioning electronic device can be used to perform proxy repair on an electronic device that is not functioning properly. For example, when an electronic device that is not functioning properly cannot enter fast startup mode or recovery mode, a normally functioning electronic device can perform proxy repair on the electronic device that is not functioning properly, thereby effectively repairing the electronic device that is not functioning properly and improving the user experience.

[0007] In one possible design, before obtaining the version information of the second electronic device, the method further includes: receiving a first operation command from a user, the first operation command being used to trigger the first electronic device to repair the second electronic device; and in response to the first operation command, obtaining an authorization file from a first server, the authorization file being used to indicate that the first electronic device has permission to repair the second electronic device.

[0008] Using the above method, the first electronic device needs to obtain an authorization file before it can perform proxy repair on the second electronic device, thereby ensuring the security of the repair process.

[0009] In one possible design, obtaining the authorization file from the first server includes: obtaining device information of the second electronic device; sending an authorization request to the first server, the authorization request including the device information of the first electronic device and the device information of the second electronic device; and receiving an authorization response from the first server, the authorization response including the authorization file.

[0010] In one possible design, the authorization request may further include at least one of the following: account information of the first electronic device; product information of the first electronic device; and status information of the first electronic device.

[0011] Using the above method, the first electronic device needs to send various possible information about itself to the first server so that the first server can evaluate from multiple dimensions whether to allow the first electronic device to repair the second electronic device, thereby avoiding some illegal repair behaviors of electronic devices.

[0012] In one possible design, obtaining an upgrade package for repairing the second electronic device based on the version information of the second electronic device includes: sending a packet search request to a second server, the packet search request including the authorization file and the version information of the second electronic device; receiving a packet search response from the second server, the packet search response including information about the upgrade package; and downloading the upgrade package from a third server based on the upgrade package information.

[0013] In one possible design, controlling the second electronic device to repair according to the upgrade package includes: determining the health information of the second electronic device, the health information of the second electronic device being used to indicate whether the second electronic device can enter recovery mode; and controlling the second electronic device to repair according to the upgrade package based on the health information of the second electronic device.

[0014] In one possible design, when the health check information of the second electronic device is used to indicate that the second electronic device can enter recovery mode, the second electronic device is controlled to repair according to the upgrade package based on the health check information of the second electronic device, including: sending an upgrade start command to the second electronic device so that the second electronic device parses the upgrade package according to the upgrade start command and repairs according to the parsed upgrade package data.

[0015] In one possible design, when the health check information of the second electronic device is used to indicate that the second electronic device cannot enter recovery mode, the second electronic device is controlled to repair according to the upgrade package based on the health check information of the second electronic device, including: parsing the upgrade package to obtain a minimum system image file; sending the minimum system image file and a forced start command to the second electronic device so that the second electronic device runs the minimum system image file to repair.

[0016] Using the above method, the first electronic device can adopt different repair methods according to different situations based on the health check information of the second electronic device, thereby more effectively repairing the second electronic device.

[0017] In one possible design, the method further includes: receiving user input information, the input information including attribute information of a second electronic device; comparing the attribute information of the second electronic device with pre-stored attribute information of an electronic device that supports repair; if the pre-stored attribute information of an electronic device that supports repair includes the attribute information of the second electronic device, then issuing a prompt message, the prompt message being used to prompt the user that the first electronic device supports repairing the second electronic device.

[0018] Using the above method, users can know in advance whether the first electronic device supports repairing the second electronic device, thereby avoiding subsequent repair failures due to the first electronic device not supporting the second electronic device, which would affect the user experience.

[0019] Secondly, embodiments of this application provide a method for repairing a power-on malfunction. This method can be applied to a second electronic device, which is an electronic device with a power-on malfunction. The method includes: establishing a connection with a first electronic device, which is an electronic device that powers on normally; sending version information of the second electronic device to the first electronic device, so that the first electronic device can obtain an upgrade package for repairing the second electronic device based on the version information of the second electronic device; and performing repair according to the upgrade package under the control of the first electronic device.

[0020] In one possible design, under the control of the first electronic device, repair is performed according to the upgrade package, including: receiving an upgrade start command from the first electronic device; after receiving the upgrade start command, parsing the upgrade package, and performing repair based on the parsed upgrade package data.

[0021] In one possible design, under the control of the first electronic device, repair is performed according to the upgrade package, including: receiving a minimum system image file from the first electronic device, the minimum system image file being obtained by the first electronic device parsing the upgrade package; and running the minimum system image file to perform repair.

[0022] It should be noted that the repair method provided in the second aspect corresponds to the first aspect. Therefore, the beneficial effects of the relevant technical features of the second aspect can be referred to the description in the first aspect, and will not be repeated here.

[0023] Thirdly, embodiments of this application provide an electronic device, which is a normally powered-on electronic device, comprising: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, the computer program including instructions, which, when executed by the processor, cause the processor, in conjunction with the communication interface, to perform the following steps: establishing a connection with a second electronic device, which is an electronic device with an abnormal power-on state; obtaining version information of the second electronic device; obtaining an upgrade package for repairing the second electronic device based on the version information of the second electronic device; and controlling the second electronic device to perform repair based on the upgrade package.

[0024] In one possible design, the processor is further configured to: receive a first operation command from a user via the communication interface, the first operation command being used to trigger the first electronic device to repair the second electronic device; and in response to the first operation command, obtain an authorization file from a first server via the communication interface, the authorization file being used to indicate that the first electronic device has permission to repair the second electronic device.

[0025] In one possible design, the processor is specifically configured to: acquire device information of the second electronic device; send an authorization request to the first server via the communication interface, the authorization request including device information of the first electronic device and device information of the second electronic device; and receive an authorization response from the first server via the communication interface, the authorization response including the authorization file.

[0026] In one possible design, the authorization request may further include at least one of the following: account information of the first electronic device; product information of the first electronic device; and status information of the first electronic device.

[0027] In one possible design, the processor is specifically configured to: send a packet search request to a second server via the communication interface, the packet search request including the authorization file and version information of the second electronic device; receive a packet search response from the second server via the communication interface, the packet search response including information about the upgrade package; and download the upgrade package from a third server based on the upgrade package information.

[0028] In one possible design, the processor is specifically configured to: determine the health check information of the second electronic device, the health check information of the second electronic device being used to indicate whether the second electronic device can enter recovery mode; and, based on the health check information of the second electronic device, control the second electronic device to perform repair according to the upgrade package.

[0029] In one possible design, when the health check information of the second electronic device is used to indicate that the second electronic device can enter recovery mode, the processor is specifically used to: send a start upgrade command to the second electronic device through the communication interface, so that the second electronic device parses the upgrade package according to the start upgrade command and performs repair according to the parsed upgrade package data.

[0030] In one possible design, when the health check information of the second electronic device is used to indicate that the second electronic device cannot enter recovery mode, the processor is specifically used to: parse the upgrade package to obtain a minimum system image file; and send the minimum system image file and a forced boot command to the second electronic device through the communication interface, so that the second electronic device runs the minimum system image file for repair.

[0031] In one possible design, the processor is further configured to: receive user input information via the communication interface, the input information including attribute information of the second electronic device; compare the attribute information of the second electronic device with attribute information of a pre-stored electronic device that supports repair; if the attribute information of the pre-stored electronic device that supports repair includes the attribute information of the second electronic device, then issue a prompt message, the prompt message being used to prompt the user that the first electronic device supports repairing the second electronic device.

[0032] Fourthly, this application provides an electronic device that is malfunctioning upon startup. The electronic device includes a processor, a memory, and a communication interface. The memory stores a computer program, which includes instructions. When the processor executes the instructions, it causes the processor, in conjunction with the communication interface, to perform the following steps: establishing a connection with a first electronic device, which is a normally powered-on electronic device; sending version information of a second electronic device to the first electronic device, so that the first electronic device obtains an upgrade package for repairing the second electronic device based on the version information; and performing repair according to the upgrade package under the control of the first electronic device.

[0033] In one possible design, the processor includes a first processor and a second processor, and the communication interface includes a first communication interface and a second communication interface; the second processor is specifically used to: receive a startup upgrade command from the first electronic device through the first communication interface, and send the startup upgrade command to the first processor through the second communication interface; the first processor is specifically used to: parse the upgrade package according to the startup upgrade command, and perform repair based on the parsed upgrade package data.

[0034] In one possible design, the processor includes a first processor and a second processor, and the communication interface includes a first communication interface and a second communication interface; the second processor is specifically used to: receive a minimum system image file from the first electronic device through the first communication interface, the minimum system image file being obtained by the first electronic device parsing the upgrade package; and send a forced boot command to the first processor through the second communication interface; the first processor is specifically used to: run the minimum system image file for repair according to the forced boot command.

[0035] Fifthly, embodiments of this application also provide an electronic device, the electronic device including a module / unit for performing the method of the first aspect or any possible design of the first aspect; or, the electronic device including a module / unit for performing the method of the second aspect or any possible design of the second aspect; these modules / units can be implemented in hardware or can be implemented by hardware executing corresponding software.

[0036] In a sixth aspect, embodiments of this application also provide a chip, which is coupled to a memory in an electronic device, for calling a computer program stored in the memory and executing the first aspect of the embodiments of this application and any possible design of the first aspect or the second aspect of the embodiments of this application and any possible design of the second aspect. In the embodiments of this application, "coupling" means that two components are directly or indirectly combined with each other.

[0037] In a seventh aspect, embodiments of this application also provide a system that may include the electronic device described in any possible design of the third aspect above, as well as the electronic device described in any possible design of the fourth aspect above. In one possible design, the system may further include an authorization server, a packet search server, and an OTA server.

[0038] Eighthly, embodiments of this application also provide a computer-readable storage medium comprising a computer program that, when run on a computer, causes the computer to perform the method steps provided in the first or second aspect above.

[0039] In a ninth aspect, a program product is also provided, including instructions that, when executed on a computer, cause the computer to perform the method steps provided in the first or second aspect above.

[0040] These or other aspects of this application will become more apparent from the description of the following embodiments. Attached Figure Description

[0041] Figure 1 A possible hardware structure diagram of an electronic device provided in an embodiment of this application; Figure 2 A schematic diagram of the hardware structure of a mobile phone provided in an embodiment of this application; Figure 3 A schematic diagram of another possible hardware structure of the electronic device provided in the embodiments of this application; Figure 4 A software structure block diagram of an electronic device provided in an embodiment of this application; Figure 5 A schematic diagram illustrating the application scenarios provided in the embodiments of this application; Figure 6 A flowchart illustrating the repair method for abnormal power-on of electronic devices provided in this application embodiment; Figure 7 Example diagram of the interface displayed by the first electronic device provided in the embodiments of this application; Figure 8 This is a schematic diagram showing the connection between the first electronic device and the second electronic device provided in an embodiment of this application; Figure 9 Example diagram of the interface displayed by the first electronic device provided in the embodiments of this application; Figure 10 Example diagram of the interface displayed by the first electronic device provided in the embodiments of this application; Figure 11 Example diagram of the interface displayed by the first electronic device provided in the embodiments of this application; Figure 12 A schematic diagram illustrating the process of the first processor of the second electronic device provided in this application embodiment repairing itself according to an upgrade package; Figure 13 A schematic diagram illustrating the process of a first electronic device performing proxy repair on a second electronic device; Figure 14 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0042] First, some terms used in the embodiments of this application will be explained to facilitate understanding by those skilled in the art.

[0043] (1) Electronic devices: such as mobile phones, tablets, wearable devices (e.g., watches, bracelets, helmets, headphones, necklaces, etc.), in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. This application does not limit the specific types of electronic devices.

[0044] (2) Operating System (OS): This is the most basic system software running on electronic devices, such as Windows, Android, and iOS. Taking a smartphone as an example, the operating system can be either Android or iOS. This application mainly uses Android as an example for illustration. Those skilled in the art will understand that similar algorithms can be used in other operating systems.

[0045] (3) Flashing: This refers to changing or replacing some of the original languages, software, or operating systems in an electronic device through certain methods. Flashing is essentially reinstalling the operating system on an electronic device, which can make the electronic device more functional or restore it to its original state.

[0046] (4) Operating system mode

[0047] Taking the Android operating system as an example, because Android is relatively open source, it allows users to modify the operating system of electronic devices (i.e., flashing the firmware). Therefore, depending on different functions and permissions, the operating system can have the following possible modes: ① Normal mode: This mode is used to start the electronic device normally. For example, you can enter this mode by pressing the power button to start the electronic device when it is turned off.

[0048] ② Recovery mode: This mode offers relatively high modification privileges, allowing functions such as opening a command interpreter (shell), flashing an image file, and performing backups. In recovery mode, electronic devices can modify their system data based on the system data stored in their internal memory, thus completing the flashing process.

[0049] ③ Fastboot mode is a lower-level flashing mode than recovery mode. In fastboot mode, the electronic device can communicate with the computer via a universal serial bus (USB) data cable. After receiving system data sent by the computer, the electronic device updates the specified partition of the electronic device with the system data (for example, the command fastboot flash boot boot.img writes the contents of boot.img to the boot partition), thus completing the flashing process.

[0050] It should be noted that, in addition to the possible modes mentioned above, the operating system may also have other modes, such as safe mode and diagnostic mode, etc., without any specific limitations.

[0051] (5) Partitioning of electronic devices

[0052] Electronic devices may include a storage area (similar to a computer's hard drive), which can contain multiple partitions, each with a different function. For example, the storage area of ​​an electronic device may include the following possible partitions: ① Boot partition: This partition ensures the normal startup of electronic devices. It contains the kernel and virtual memory disk (a technology that uses software to simulate a portion of memory as a hard drive, which can greatly improve the speed of file access). Without this partition, electronic devices usually cannot start normally.

[0053] ② The system partition stores system-related configurations other than the kernel and virtual memory disk. It includes the user interface, pre-installed software on electronic devices, etc. Erasing this partition will delete the entire operating system, but it will not prevent booting. For example, you can install a new operating system by entering recovery mode.

[0054] ③ Data partition: This partition contains user data such as contacts, text messages, settings, and installed programs. Erasing this partition is equivalent to restoring the electronic device to factory settings. You can select "data / factory reset" in recovery mode to erase this partition.

[0055] ④ Recovery partition: When an electronic device cannot start normally, this partition can be loaded to enter recovery mode. It is equivalent to a simplified operating system, through which backup, maintenance and recovery can be performed.

[0056] For example, the partitions relied upon by the normal mode may include the boot partition, the partitions relied upon by the recovery mode may include the recovery partition, and the partitions relied upon by the fast boot mode may include a portion of the boot partition (or, in other words, the partitions relied upon by the fast boot mode are sub-partitions or subsets of the boot partition). Therefore, when the boot partition has a problem, the electronic device will be unable to enter normal mode; when the recovery partition has a problem, the electronic device will be unable to enter recovery mode; and when the partitions relied upon by the fast boot mode in the boot partition have a problem, the electronic device will be unable to enter fast boot mode.

[0057] It should be noted that, in addition to the above-mentioned possible partitions, electronic devices may also have other partitions in their storage area, such as cache partitions, without any specific limitation.

[0058] The above content is an explanation of the names related to this application. The technical solutions provided by the embodiments of this application are described below with reference to the accompanying drawings.

[0059] As described in the background section, abnormal startup of electronic devices (such as mobile phones) can cause significant losses to users and multi-dimensional losses to mobile phone manufacturers. There are several possible reasons for abnormal startup of electronic devices. One possible reason is a software problem, such as a user making a mistake during a software upgrade, leading to upgrade failure, or the user accidentally deleting some critical files.

[0060] In this embodiment, an abnormal power-on of an electronic device can refer to the inability of the electronic device to enter normal mode (or safe mode). Furthermore, when an electronic device experiences an abnormal power-on, it can correspond to several possible scenarios, such as: Scenario 1: The electronic device cannot enter fast startup mode and cannot enter recovery mode; Scenario 2: The electronic device can enter fast startup mode but cannot enter recovery mode; Scenario 3: The electronic device can enter fast startup mode and can enter recovery mode. Understandably, an abnormal power-on of an electronic device can also correspond to other possible scenarios, which will not be elaborated upon here.

[0061] For issues such as abnormal power-on of electronic devices, the usual solution is to download an upgrade package to fix the problem, such as Solution 1, Solution 2, and Solution 3, which are described in detail below.

[0062] (1) Solution 1

[0063] When an electronic device fails to boot into normal mode, it can enter Enhanced Recovery Mode. This Recovery Mode is provided by some device manufacturers and relies on partitions that can include the boot partition and specific partitions corresponding to the Recovery Mode. Recovery Mode includes the following functions: 1. Download the upgrade package to fix the problem, which involves downloading the upgrade package from the internet and then using the upgrade package to fix the problem.

[0064] 2. Emergency data backup, which means backing up user data while ensuring the data partition is not damaged.

[0065] 3. Restore factory settings, which means clearing user data and restoring the operating system to its initial state.

[0066] However, this solution may not be able to effectively repair electronic devices, meaning it has certain limitations and drawbacks. For example, if the partition on which entering Erecovery mode depends is damaged (such as damage to the boot partition caused by an interrupted upgrade (e.g., a critical image was only partially upgraded), or data jumps in the storage area causing boot verification failure), it will be impossible to enter Erecovery mode. Also, if an unknown error occurs in the boot process on which entering Erecovery mode depends (e.g., the software freezes abnormally during boot, or the process crashes), it will be impossible to enter Erecovery mode. Furthermore, if the upgrade process is interrupted by a long press of a key, causing a mismatch between the old and new images at startup, the electronic device will be unable to boot into normal mode or enter Erecovery mode.

[0067] (2) Solution Two

[0068] When an electronic device fails to boot into normal mode, users can try to repair it using Android package (APK) tools (such as hisuit). The specific steps are as follows: 1. When an electronic device enters fast startup mode, the hisuit tool obtains the version number of the electronic device in this mode, then searches for the upgrade package from the server and downloads it to the local computer.

[0069] 2. Once the electronic device enters recovery mode, the Hisiut tool sends the local upgrade package to the electronic device. The electronic device then receives the upgrade package and executes the upgrade to update to the latest version, thus completing the repair.

[0070] However, this solution may not be able to effectively repair electronic devices, meaning it has certain limitations and drawbacks. For example, if the partition on which fast startup mode and recovery mode depend is damaged, making it impossible to enter fast startup mode or recovery mode, then the HiSuite tool cannot be used to repair it.

[0071] (3) Solution Three

[0072] When an electronic device fails to boot into normal mode, users can take it to a repair shop for repair using tools. Because repair shops have higher privileges, they can unlock the device and force an upgrade if it boots abnormally (but can enter fast boot mode). However, if the device cannot enter fast boot mode, it may be impossible to repair effectively. In this case, the repair shop may have to resort to forced repairs such as disassembly or motherboard replacement, potentially causing financial loss and reducing the user experience.

[0073] In view of this, this application provides a method for repairing abnormal boot-up devices. In this method, a normally bootable electronic device can perform proxy repair on an abnormal boot-up electronic device. For example, when an abnormal boot-up electronic device cannot enter enhanced recovery mode, fast startup mode, or recovery mode, a normally bootable electronic device can perform proxy repair on the abnormal boot-up electronic device, thereby effectively repairing the abnormal boot-up electronic device and improving the user experience.

[0074] The hardware and software structures of the electronic devices involved in the embodiments of this application are described below.

[0075] Figure 1 This is a schematic diagram of a possible hardware structure of an electronic device provided in an embodiment of this application. For example... Figure 1 As shown, the electronic device 100 may include a first processor, a first port, a first memory, a wireless communication module, and may also include other peripheral modules.

[0076] The first processor may include one or more processing units, such as an application processor (AP), and may also include at least one of the following: a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), memory, a video codec, a digital signal processor (DSP), a baseband processor, a neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors. The first processor may also include memory for storing instructions and data. In some embodiments, the memory in the first processor is a cache memory. This memory can store instructions or data that the first processor has just used or that is used repeatedly. If the first processor needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of the first processor, and thus improves the efficiency of the system.

[0077] The first port can be a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. The first port can be used to connect a charger to charge electronic device 100, or to transfer data between electronic device 100 and other devices.

[0078] The first memory can be used to store computer programs, which include instructions. The first processor executes various functions of the electronic device 100 and performs data processing by running the instructions stored in the first memory. The first memory may include various partitions as described above, such as a boot partition, a system partition, a data partition, etc. Furthermore, the first memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0079] Wireless communication modules can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. A wireless communication module can be one or more devices integrating at least one communication processing module.

[0080] Other peripheral modules may include displays, sensor modules, cameras, etc., and there are no specific limitations.

[0081] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0082] The following is based on Figure 1 The illustrated electronic device 100 is a mobile phone, taken as an example. Figure 2 Provide a detailed description of the phone's hardware structure.

[0083] Figure 2 This is a schematic diagram of the hardware structure of a mobile phone provided in an embodiment of this application. Figure 2 As shown, the mobile phone 200 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 151, a wireless communication module 152, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0084] Among them, processor 110 can be the above Figure 1 The first processor in the system.

[0085] USB interface 130 can be used for the above Figure 1 The first port in the circuit. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.

[0086] The wireless communication function of mobile phone 200 can be achieved through antenna 1, antenna 2, mobile communication module 150, and wireless communication module 160 (which can be one of the above). Figure 1 The wireless communication module, modem processor, and baseband processor are used in the mobile phone 200. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 200 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0087] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on the mobile phone 200. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0088] The wireless communication module 160 can receive electromagnetic waves via antenna 2, frequency modulate and filter the electromagnetic wave signals, and send the processed signals to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, frequency modulate and amplify them, and then convert them into electromagnetic waves for radiation via antenna 2.

[0089] In some embodiments, antenna 1 of mobile phone 200 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling mobile phone 200 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), BeiDou Navigation Satellite System (BDS), Quasi-Zenith Satellite System (QZSS), and / or Satellite Based Augmentation Systems (SBAS).

[0090] The display screen 194 is used to display the application's interface, etc. The display screen 194 includes a display panel, which may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 200 may include one or N displays 194, where N is a positive integer greater than 1.

[0091] Camera 193 is used to capture still images, moving images, or videos. In this embodiment, the number of cameras 193 in the mobile phone 200 can be at least two. Taking two as an example, one is a front-facing camera and the other is a rear-facing camera; taking three as an example, one is a front-facing camera and the other two are rear-facing cameras.

[0092] Internal memory 121 can be as described above Figure 1 The first memory in the system.

[0093] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the mobile phone 200. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external storage card.

[0094] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0095] Additionally, mobile phone 200 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor. Buttons 190 include a power button and volume buttons. Buttons 190 can be mechanical buttons or touch buttons. Mobile phone 200 can receive button input and generate key signal inputs related to user settings and function control. Mobile phone 200 can receive button input and generate key signal inputs related to user settings and function control. Mobile phone 200 can use motor 191 to generate vibration alerts (such as vibration alerts for incoming calls). The indicator 192 in mobile phone 200 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. The SIM card interface 195 in mobile phone 200 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the mobile phone 200.

[0096] It is understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the mobile phone 200. In other embodiments of this application, the mobile phone 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0097] Figure 3 This is a schematic diagram of another possible hardware structure of the electronic device provided in an embodiment of this application. For example... Figure 3 As shown, compared to Figure 1 The electronic devices 100 and 300 shown herein, in addition to including a first processor, a first port, a first memory, a wireless communication module, and other peripheral modules, may also include a second processor, a second port, a third port, a second memory, a controller, etc. For relevant descriptions of the first processor, the first port, the first memory, the wireless communication module, and other peripheral modules, please refer to [link to relevant documentation]. Figure 1 Introduction.

[0098] (1) Describe the second processor.

[0099] For example, the second processor can be a microcontroller, such as a microcontroller unit (MCU), also known as a single-chip microcomputer or microcontroller. The second processor can be mainly responsible for the relevant implementation under abnormal scenarios (such as the 300 power-on failure of electronic devices), as described in detail below.

[0100] (2) Describe the relationship between the first processor and the second processor.

[0101] The first processor can be understood as the main processor of the electronic device 300, and the second processor can be understood as a slave processor of the electronic device 300. The processing power of the second processor may be less than that of the first processor; for example, the second processor may have some of the processing power of the first processor.

[0102] The first processor and the second processor can share some modules, such as sharing a first port and a wireless communication module. It should be noted that the first processor and the second processor can also share other possible peripheral modules, without specific limitations. Since the first processor is the main processor of the electronic device 300, under normal circumstances, when the first processor is running normally, it manages the aforementioned shared modules (such as the first port and the wireless communication module). In this case, the second processor is in standby mode and does not manage the shared modules. However, when the first processor malfunctions or is in an abnormal operating state (such as being unable to enter normal mode), the second processor can take over the shared modules. Taking the first processor and the second processor sharing the first port as an example, the first processor and the second processor can connect to (or manage) the first port at different times, rather than simultaneously. For example, when the first processor connects to the first port, the second processor is disconnected from the first port, and vice versa.

[0103] As one possible implementation, the electronic device 300 can preset an attribute (referred to as the first attribute for ease of description). When the first processor is in normal operation, the value of the first attribute can be true. In this case, the first processor can manage the aforementioned shared module. When the first processor is in abnormal operation, the value of the first attribute can be false. In this case, the second processor can be triggered to take over the aforementioned shared module.

[0104] As another possible implementation, a second processor can be triggered by another device to take over the shared module. Specifically, electronic device 300 can establish a connection with another device through a first port. In this case, if the first processor manages the first port and responds to the handshake signal of the other device through the first port, when the other device determines that it needs to perform proxy repair on electronic device 300 (for example, the other device receives the user's first operation command, the details of which can be found later) or other possible operations, it can send a switching instruction to the first processor through the first port. This switching instruction is used to instruct the second processor to take over the shared module. After receiving the switching instruction, the first processor can send control information to the second processor through the second port (or the third port). Accordingly, after receiving the control information, the second processor can take over the shared module.

[0105] (3) Describe the second port and the third port.

[0106] The second port can be understood as a bus for general information or data exchange between the first and second processors. The second port depends on the processing power of the first processor. For example, when the first processor is running normally, the first and second processors can communicate through the second port; however, when the first processor malfunctions, its processing power is limited, and in this case, communication between the first and second processors may not be possible through the second port. In one example, the second port can be a Secure Digital Input / Output (SDIO) port, a General Purpose Input / Output (GPIO) port, an Integrated Interchip Sound (I2S) interface, or an Inter Integrated Circuit (I2C) interface; the specific type is not limited.

[0107] The third port can refer to a port at a lower level than the second port. For example, when the first processor malfunctions, even if the first and second processors cannot communicate through the second port, they can still communicate through the third port. In one example, the third port can be a universal synchronous / asynchronous serial receiver / transmitter (USART), without any specific limitation.

[0108] (4) Describe the first memory and the second memory.

[0109] The first memory can be the main memory of the electronic device 300, and the second memory can be the slave memory of the electronic device 300. The storage capacity of the first memory can be greater than the storage capacity of the second memory, or in other words, the storage space of the first memory can be greater than the storage space of the second memory.

[0110] The first processor can access both the first and second memories. For example, the first processor can write device information, version information, etc., of the electronic device 300 into the first and second memories. Exemplarily, the first processor can preferentially access the first memory and then access the second memory. The second processor can also access both the first and second memories. For example, the second processor can write a minimal system image file into the first memory, or it can read device information, version information, etc., of the electronic device 300 from the second memory. Exemplarily, the second processor can preferentially access the second memory and then access the first memory.

[0111] Regarding the second processor accessing the first memory, it should be noted that: (1) When the second processor determines that it needs to access the first memory, it can first determine whether the first memory is in a locked state (for example, when the first processor is accessing the first memory, the first processor can set the first memory to be in a locked state). If it is in a locked state, the second processor cannot access the first memory. If the first memory is not in a locked state, the second processor can access the first memory. In other possible situations, if the second processor determines that the first memory is in an unknown state (i.e., it is uncertain whether it is locked), the second processor can also access the first memory at this time. (2) The second processor accessing the first memory can refer to the second processor accessing a reserved partition in the first memory, such as the second processor writing or reading data in the partition. For example, the reserved partition can be located at the end of the data block device, that is, the data block device can include a data partition and the reserved partition; furthermore, user data can be stored in the data partition first, and the reserved partition should not be occupied as much as possible.

[0112] As one possible implementation, the second processor can be connected to the first memory via a controller. When the second processor can access the first memory, the controller can assist the second processor in accessing the first memory, such as assisting the second processor in parsing data structures. The controller can be a hardware component or a software module, without specific limitations; furthermore, the controller can exist independently or can be integrated into the second processor, without specific limitations.

[0113] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 300. In other embodiments of this application, the electronic device 300 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0114] The above Figures 1 to 3 The hardware structure of electronic devices has been described. The following section uses the Android operating system as an example to introduce the software structure of electronic devices.

[0115] Figure 4 This is a software structure block diagram of an electronic device provided in an embodiment of this application. For example... Figure 4 As shown, the software architecture of an electronic device can be a layered architecture. For example, the software can be divided into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces.

[0116] In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer (FWK), the Android runtime and system libraries, and the kernel layer. Each layer is described in detail below.

[0117] (1) The application layer may include a series of application packages. For example... Figure 4 As shown, the application layer can include system applications (referred to as system apps) and third-party applications (referred to as third-party apps). System applications can include camera, settings, skin modules, user interface (UI), phone manager, call, SMS, etc., while third-party applications can include maps, navigation, music, video, etc.

[0118] (2) The application framework layer provides the application programming interface (API) and programming framework for the applications in the application layer. The application framework layer may include some predefined functions. For example... Figure 4 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0119] The window manager manages window programs. It can obtain screen size, determine the presence of a status bar, lock the screen, and capture screenshots. The content provider stores and retrieves data, making it accessible to applications. This data can include videos, images, audio, made and received calls, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text and controls for displaying images. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon can include views for displaying text and views for displaying images. The phone manager provides communication functionality for electronic devices, such as managing call status (including connection and disconnection). The resource manager provides applications with various resources, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows applications to display notifications in the status bar, conveying informational messages that disappear automatically after a short pause without user interaction. For example, the notification manager is used to notify of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, causing electronic devices to vibrate, and flashing indicator lights.

[0120] (3) The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (e.g., OpenGL ES), 2D graphics engine (e.g., SGL), etc. The surface manager is used to manage the display subsystem and provides fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of various commonly used audio and video formats, as well as still image files, etc. The media library can support various audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. 3D graphics processing libraries are used to implement 3D graphics drawing, image rendering, compositing, and layer processing. 2D graphics engines are drawing engines for 2D graphics.

[0121] (4) The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0122] In addition, the electronic device may also include a hardware layer, which may include various sensors, such as the accelerometer, gyroscope, and touch sensor involved in the embodiments of this application.

[0123] Based on the above description of the hardware and software structure of the electronic device, a possible application scenario of the present application embodiment is described below.

[0124] Figure 5 This is a schematic diagram of an application scenario provided in an embodiment of this application. The application scenario includes a first device, a second device, and may also include at least one server (such as a first server, a second server, and a third server).

[0125] In this embodiment, both the first device and the second device can be electronic devices. In this case, the first device can be referred to as the first electronic device, and the second device can be referred to as the second electronic device. This application will primarily describe the scenario where both the first device and the second device can be electronic devices.

[0126] The hardware structure of the first electronic device and the hardware structure of the second electronic device can both be found in [reference needed]. Figure 3 The illustrated hardware structure of the electronic device 300. In this scenario, when the first electronic device powers on normally and the second electronic device powers on abnormally, the first electronic device can repair the second electronic device using the repair method provided in this embodiment; conversely, when the first electronic device powers on abnormally and the second electronic device powers on normally, the second electronic device can repair the first electronic device using the repair method provided in this embodiment. In other words, the first and second electronic devices can mutually repair each other. Alternatively, the hardware structure of the first electronic device can be found in [reference needed]. Figure 1 The hardware structure of the electronic device 100 shown is illustrated below. The hardware structure of the second electronic device can be found in [reference needed]. Figure 3 The illustrated hardware structure of the electronic device 300. In this scenario, when the first electronic device powers on normally and the second electronic device powers on abnormally, the first electronic device can repair the second electronic device using the repair method provided in this embodiment. However, when the first electronic device powers on abnormally and the second electronic device powers on normally, since the first electronic device does not include a second processor, the second electronic device may not be able to repair the first electronic device using the repair method provided in this embodiment. In other words, in this embodiment, the hardware structure of the repaired electronic device can be... Figure 3The hardware structure shown is as indicated, and the hardware structure of the electronic device performing the repair can be... Figure 1 The hardware structure shown, or, could also be Figure 3 The hardware structure is shown. The software structure of both the first and second electronic devices can be found in [reference needed]. Figure 4 The software structure of the illustrated electronic device.

[0127] For example, the first electronic device and the second electronic device can be electronic devices of the same type, such as both being mobile phones or tablets; or, the first electronic device and the second electronic device can be electronic devices of different types, such as the first electronic device being a tablet and the second electronic device being a mobile phone, or the first electronic device being a mobile phone and the second electronic device being a watch.

[0128] Taking a scenario where a first electronic device repairs a second electronic device using the repair method provided in this application embodiment as an example, the first server can be called an authorization server, used to authorize the first electronic device to perform proxy repair on the second electronic device. The second server can be called a packet search server, used to, upon receiving a packet search request from the first electronic device, search for information on an upgrade package for repairing the second electronic device according to the packet search request, and send a packet search response back to the first electronic device, the packet search response including information on the searched upgrade package. The third server can be called an upgrade server (such as an over-the-air (OTA) server, cloud server, etc.), and the third server can be a third-party device capable of storing application software upgrade packages and providing upgrade package download services for electronic devices. For example, the third server can be used to, upon receiving a download request from the first electronic device (the download request includes information on the upgrade package to be downloaded), return a download response according to the download request, the download response including the upgrade package to be downloaded. The following embodiments of this application will describe in detail the communication interaction between the first electronic device and the first, second, and third servers.

[0129] It should be noted that the above application scenario is only one possible example. In specific implementations, this application scenario may also include other possible devices, and no specific limitation is made. In addition, in other possible situations, the first device and the second device may be a relay node device and a child node device in the Internet of Things scenario, respectively. That is to say, the relay node device can repair and upgrade the child node device through the repair method in the embodiments of this application, and no specific limitation is made.

[0130] Based on the above description, the following scenario describes a first electronic device repairing a second electronic device (where the hardware structures of the first and second electronic devices are the same). Figure 3Taking the hardware structure of the illustrated electronic device 300 as an example, the repair method provided in this application embodiment will be described in detail. That is, the first electronic device is an electronic device that powers on normally, and the second device is an electronic device that powers on abnormally.

[0131] Figure 6 This is a flowchart illustrating the repair method for abnormal power-on of electronic devices provided in the embodiments of this application, as shown below. Figure 6 As shown, the process may include: S601, the first electronic device receives input information from the user, which includes attribute information of the second electronic device.

[0132] S602, the first electronic device issues a prompt message based on the user's input information. This prompt message is used to ask the user whether the first electronic device supports repairing the second electronic device.

[0133] As one possible implementation, the first electronic device can pre-store attribute information of the repairable electronic device. For example, the first memory of the first electronic device can store the attribute information of the repairable electronic device. Thus, after receiving user input information (i.e., attribute information of the second electronic device), the first electronic device (specifically, its first processor) can determine whether the pre-stored attribute information of the repairable electronic device includes the attribute information of the second electronic device. If the pre-stored attribute information of the repairable electronic device includes the attribute information of the second electronic device, the first electronic device can determine that it supports repairing the second electronic device. In this case, the prompt message issued by the first electronic device is used to inform the user that the first electronic device supports repairing the second electronic device. If the pre-stored attribute information of the repairable electronic device does not include the attribute information of the second electronic device, the first electronic device can determine that it does not support repairing the second electronic device. In this case, the prompt message issued by the first electronic device is used to inform the user that the first electronic device does not support repairing the second electronic device.

[0134] The attribute information of an electronic device may include at least one of the following: device information and product information. For example, device information may include the serial number (SN) and device type; product information may include brand information (e.g., Huawei) and series information (e.g., Mate series, P series).

[0135] Furthermore, the first electronic device can receive user input information in various ways; one possible implementation is described below. For example, an application for proxy repair (referred to as application A for ease of description) can be pre-installed in the first electronic device. That is, application A can be included in the application layer of the first electronic device, and application A can be a system application. When the second electronic device malfunctions during startup, and the user wants to repair the second electronic device through the first electronic device, application A can be launched on the first electronic device (for example, the user clicks the icon of application A, see...). Figure 7 As shown in (a) above), the display screen of the first electronic device can then display, as shown in (a). Figure 7 The interface shown in (b) may include one or more options (such as the "Support Repairable Electronic Devices" option). The user can trigger the "Support Repairable Electronic Devices" option, and the display screen of the first electronic device will then display something like... Figure 7 The interface shown in (c) may include an input box (used by the user to input attribute information of the second electronic device). The user can enter the attribute information of the second electronic device (e.g., brand "Huawei", series "P series") in the input box and click the "OK" button. Correspondingly, the first electronic device can receive the attribute information of the second electronic device and perform the judgment process described above. If it is determined that repair of the second electronic device is supported, a prompt message can be issued (e.g., "Repair Supported" is displayed on the screen of the first electronic device). See [link to relevant documentation]. Figure 7 As shown in (d) in the diagram; if it is determined that repair of the second electronic device is supported, a prompt message can be issued (e.g., "Repair not supported" is displayed on the screen of the first electronic device), see [reference]. Figure 7 As shown in (e) in the diagram.

[0136] In this embodiment, if the prompt message is used to inform the user that the first electronic device supports repairing the second electronic device, then the repair of the second electronic device by the first electronic device can be achieved through steps S603 to S609 below; if the prompt message is used to inform the user that the first electronic device does not support repairing the second electronic device, then steps S603 to S609 need not be executed. Thus, steps S601 and S602 allow the user to know in advance whether the first electronic device supports repairing the second electronic device, thereby avoiding subsequent repair failures due to the first electronic device not supporting the second electronic device, which would negatively impact the user experience.

[0137] It should be noted that S601 and S602 are optional steps. In other words, in specific implementations, it is also possible to choose not to execute S601 and S602, but to directly execute subsequent steps such as S603.

[0138] S603, the first electronic device establishes a connection with the second electronic device.

[0139] There are several ways to establish a connection between the first electronic device and the second electronic device. Two possible implementation methods are introduced below.

[0140] Implementation Method 1: The first electronic device can establish a wired connection with the second electronic device. For example, the first and second electronic devices can establish a wired connection via a data cable, with one end of the data cable connected to the first port of the first electronic device and the other end connected to the first port of the second electronic device. Due to a power-on error in the second electronic device, i.e., a malfunction in its first processor, the value of the first attribute in the second electronic device becomes false, and the second processor then manages the shared module (see above for details). Figure 3 (as described in the relevant description), that is, a connection can be established between the first port and the second processor; therefore, the first processor of the first electronic device is connected to the second processor of the second electronic device via a wired connection, see [link to relevant description]. Figure 8 As shown in (a) above. If the first port described above is a USB Type-C port, then the data cable can be called a CC cable.

[0141] Implementation Method 2: The first electronic device can establish a wireless connection with the second electronic device. Due to a power-on malfunction in the second electronic device (i.e., a problem with its first processor), the value of the first attribute in the second electronic device becomes false, and the second processor then manages the shared module (see above for details). Figure 3 (See the relevant description in [reference]), that is, a connection can be established between the wireless communication module and the second processor, and the second processor can then establish a connection with the first electronic device through the wireless communication module; in other words, the first processor of the first electronic device is connected to the second processor of the second electronic device via a wireless connection, see [reference] Figure 8 As shown in (b) of the diagram.

[0142] S604, the first electronic device receives a first operation command from the user, the first operation command being used to trigger the first electronic device to repair the second electronic device.

[0143] Here, there are multiple ways to implement the first electronic device receiving the first operation command. Three possible implementation methods are described below.

[0144] Implementation Method 1: The first electronic device can pre-install an application for proxy repair (such as application A mentioned above). After the first electronic device establishes a connection with the second electronic device, the user can launch application A (for example, the user clicks the icon of application A, see...). Figure 7 As shown in (a) above), the display screen of the first electronic device can then display, as shown in (a). Figure 7The interface shown in (b) may include one or more options (such as the "Authorization Check" option). If the user triggers the "Authorization Check" (which is equivalent to triggering the first operation command), the first electronic device can receive the first operation command.

[0145] Implementation Method 2: An option (such as "Authorization Check" option, see [link]) can be added in advance in the settings application of the first electronic device. Figure 9 As shown), if the user launches the settings application (for example, the user clicks the settings application icon), which triggers an "authorization check" (which is equivalent to triggering the first operation command), then the first electronic device can receive the first operation command.

[0146] Implementation method 3: The first electronic device can be pre-set with a password corresponding to the authorization check function. When the user opens the dial pad of the first electronic device and enters the password (which is equivalent to triggering the first operation command), the first electronic device can receive the first operation command.

[0147] S605, in response to the first operation command, the first electronic device obtains an authorization file from the first server, the authorization file indicating that the first electronic device has the authority to repair the second electronic device.

[0148] Here, as one possible implementation, after receiving the first operation command, the first electronic device can display on the screen as follows: Figure 10 The interface shown in (a) includes two options: "Trust relationship established" and "Trust relationship not established".

[0149] (1) If the user selects "Trust relationship established" (for example, if the user clicks the "Trust relationship established" option, see Figure 10 As shown in (a) above, the first electronic device (specifically, its first processor) can send relevant information to the second electronic device. Upon receiving this information, the second processor can match it with information stored in memory from other electronic devices with which it has a trusted relationship. If a match is found, it can send an authorization instruction to the first electronic device. This authorization instruction may include an encrypted file that can be decrypted by the first server but not by the first electronic device. This encrypted file instructs the second electronic device to authorize the first electronic device to perform repairs. Subsequently, the first electronic device can display "Authorization Passed" on its interface. See [link to relevant documentation]. Figure 10 As shown in (b) above. When a match fails, an "Unauthorized Pass" command can be sent to the first electronic device; subsequently, the first electronic device can display "Unauthorized Pass" on the interface, see [link to documentation]. Figure 10 As shown in (c) above. For example, if the first electronic device displays "Unauthorized Access," the user can trigger the first electronic device to return to... Figure 9 The interface shown triggers the first electronic device to obtain proxy repair permissions by selecting "no trust relationship established," as described below.

[0150] The specific implementation of establishing a trust relationship between the first and second electronic devices can be varied. One possible implementation is that when the second electronic device is powered on normally, the first and second electronic devices can establish a connection (e.g., a wired or wireless connection between the first processor of the first electronic device and the second processor of the second electronic device). The second electronic device receives a second operation command from the user and, based on the second operation command, sends a request message to the first electronic device to request the establishment of a trust relationship. This request message may include relevant information about the second electronic device. Correspondingly, after receiving the request message, the first electronic device can establish a trust relationship with the second electronic device and store the relevant information about the second electronic device (e.g., in its secondary memory). Optionally, the first electronic device can also issue a notification message to inform the user that the trust relationship has been successfully established. Furthermore, the first electronic device sends a response message to the second electronic device, which includes relevant information about the second electronic device. After receiving the response message, the second electronic device can establish a trust relationship with the first electronic device and store the relevant information about the first electronic device (e.g., in its secondary memory). Optionally, the second electronic device can also issue a notification message to inform the user that the trust relationship has been successfully established. For example, the relevant information of an electronic device may include device information, account information, etc.

[0151] There are several ways to enable the second electronic device to receive the second operation command. For example, the settings application of the first electronic device can pre-add an option (such as the "Device Assistance" option). Then, if the user launches the settings application (for example, the user clicks the icon of the settings application), thus triggering "Device Assistance" (which is equivalent to triggering the second operation command), the first electronic device can receive the second operation command.

[0152] (2) If the user selects not to establish a trust relationship (for example, if the user clicks the "not to establish a trust relationship" option, see Figure 11 As shown in (a) above, the display screen of the first electronic device can display as follows: Figure 11The interface shown in (b) includes multiple possible ways to obtain proxy repair permissions, such as "obtain proxy repair permissions via authorization code" or "obtain proxy repair permissions via power-on password (such as numeric password or fingerprint)". Other possible methods are also included, without any specific limitations.

[0153] Furthermore, if the user selects "Obtain proxy repair permission via authorization code" (for example, for clicking the "Obtain proxy repair permission via authorization code" option, see...), Figure 11 As shown in (b) above, the first electronic device can then display an input box for entering the authorization code. See also... Figure 11 As shown in (c) above. After the first electronic device receives the authorization code input by the user, it can transmit the authorization code to the second electronic device. The second electronic device, upon receiving the authorization code, can compare it with the authorization code stored in its memory. If they match, the authorization is successful, and it sends an authorization success instruction to the first electronic device. This authorization success instruction may include an encrypted file that can be decrypted by the first server but not by the first electronic device. This encrypted file is used to instruct the second electronic device to authorize the first electronic device to perform repairs. Subsequently, the first electronic device can display "Authorization Successful" on its interface. See [link to documentation]. Figure 11 As shown in (d) in the diagram; if there is a discrepancy, it can be determined that the authorization was unauthorized and an unauthorized authorization instruction can be sent to the first electronic device; subsequently, the first electronic device can display "Unauthorized Access" on the interface, see [link to documentation]. Figure 11 As shown in (e) in the diagram. For example, if the first electronic device displays "Unauthorized access," the user can access the interface of the first electronic device (e.g., ...) Figure 11 Trigger "Temporary Authorization" on the interface shown in (e) in the diagram. Figure 11 (e) in the text does not yet indicate "temporary authorization"), thus the first electronic device can apply to the first server for proxy repair permission, as described below.

[0154] In this embodiment of the application, the first electronic device uses... Figure 10 or Figure 11After authorization is granted, an authorization request can be sent to the first server. This request includes device information for the second electronic device, device information for the first electronic device, and an encrypted file. Upon receiving the authorization request, the first server decrypts the encrypted file to determine that the second electronic device is authorized to perform repairs through the first electronic device. The server can then verify the device information of both the second and first electronic devices (e.g., using Public Key Infrastructure (PKI) verification) and authenticate the legitimacy of the proxy authorization request. Once authentication is successful, an authorization file can be issued to the first electronic device. This authorization file may contain device information for both the first and second electronic devices and is used by the first electronic device to perform proxy repairs on the second electronic device.

[0155] If the first electronic device passes Figure 11 If the authorization method fails, the first electronic device can request proxy repair permissions from the server after the user triggers "temporary authorization." Specifically, the first electronic device can send an authorization request to the first server, which includes device information of the second electronic device and the first electronic device itself. Furthermore, the authorization request may also include other possible information about the first electronic device, such as its account information, product information, and status information. The product information may include brand information, series information, etc., and the status information indicates the current state of the first electronic device, such as user status or superuser status (e.g., root status). Upon receiving the authorization request, the first server can assess whether to allow the first electronic device to obtain proxy repair permissions. If allowed, it can send an authorization file to the first electronic device; if not allowed (e.g., the first electronic device is in superuser status), it can send an authorization failure command to the first electronic device.

[0156] S606, the first electronic device performs a physical examination on the second electronic device and then determines the physical examination information of the second electronic device. The physical examination information of the second electronic device is used to indicate whether the second electronic device can enter the recovery mode; or, to determine the situation corresponding to the abnormal power-on of the second electronic device (such as situation 1, situation 2 or situation 3 mentioned above).

[0157] Here, the first electronic device can perform a physical examination on the second electronic device in several ways. For example, the first electronic device can do so through a connection between the first and second electronic devices (see...). Figure 8As shown, the device sends a health check command to the second processor in the second electronic device to obtain the health check information of the second electronic device; correspondingly, after receiving the health check command, the second processor of the second electronic device can return the health check results to the first electronic device, and the health check results include the health check information of the second electronic device.

[0158] For example, the second electronic device may have one or more preset attributes (such as a second attribute and a third attribute). When the first processor of the second electronic device can load the corresponding partition and enter fast boot mode, the value of the second attribute can be true; when the first processor of the second electronic device cannot successfully load the corresponding partition and enter fast boot mode, the value of the second attribute can be false. When the first processor of the second electronic device can load the corresponding partition and enter recovery mode, the value of the third attribute can be true; when the first processor of the second electronic device cannot successfully load the corresponding partition and enter recovery mode, the value of the third attribute can be false. Thus, after receiving a health check command, the second processor can obtain the health check information of the second electronic device by querying the values ​​of the corresponding attributes (such as the second and third attributes).

[0159] Optionally, if the second electronic device does not have the aforementioned attributes (such as the second attribute and the third attribute) preset, the second processor can send a health check command to the first processor (for example, the second processor can send a health check command to the first processor first through the second port; if the first processor does not respond, the second processor can send a health check command to the first processor through the third port), thereby obtaining the health check information of the second electronic device.

[0160] S607, the first electronic device obtains information from the second server regarding an upgrade package for repairing the second electronic device.

[0161] For example, the first electronic device can obtain the version information of the second electronic device. The version information of the second electronic device may include the system version model of the second electronic device, such as the model number of the second electronic device or the version number of the operating system in the second electronic device. The first electronic device can obtain the version information of the second electronic device in various ways; for example, as described above, the version information of the second electronic device can be stored in a second memory. Thus, the first electronic device can send a query command to the second processor of the second electronic device to query the version information of the second electronic device; correspondingly, after receiving the query command, the second processor of the second electronic device can obtain the version information of the second electronic device by accessing the second memory and then send it to the first electronic device.

[0162] Furthermore, the first electronic device can send a packet search request to the second server. This request includes an authorization file and the version information of the second electronic device. Upon receiving the request, the second server can determine that the first electronic device is in proxy mode based on the authorization file, and determine the information of the upgrade package matching the version of the second electronic device based on its version information. Then, the second server sends a packet search response to the first electronic device. This response includes information about the matching upgrade package, and may also include an authentication file and file list information (e.g., filelist.xml). The upgrade package information may include the download address of the upgrade package, and optionally, other possible information, such as the upgrade package identifier, is not specifically limited. The authentication file includes a description of the upgrade package (e.g., a hash value) used to authenticate the upgrade package and ensure its legitimacy. The file list information includes the hash values ​​of each file included in the upgrade package to ensure its integrity.

[0163] S608, the first electronic device downloads the upgrade package from the third server based on the information in the upgrade package.

[0164] Here, the first electronic device can send a download request to the third server, the download request including the upgrade package information obtained in S607; accordingly, after receiving the download request, the third server searches for the corresponding upgrade package based on the upgrade package information and sends a download response to the first electronic device, the download response including the upgrade package.

[0165] For example, after receiving the upgrade package from the third server, the first electronic device can determine whether the files included in the upgrade package are complete based on the file list information. Once the first electronic device determines that the files included in the upgrade package are complete, as one possible implementation, the first electronic device can send the upgrade package and authentication file to the second processor of the second electronic device via the connection between the first and second electronic devices. Correspondingly, after receiving the upgrade package and authentication file, the second processor of the second electronic device can access the first memory of the second electronic device. If it is determined that a reserved partition in the first memory can store the upgrade package and authentication file (e.g., the remaining space in the reserved partition is sufficient to store the upgrade package and authentication file), the upgrade package and authentication file can be stored in the reserved partition. For example, the reserved partition can be located at the end of the data block device (i.e., after the data partition) to ensure the effective storage of the upgrade package and authentication file in the event of data partition corruption. Furthermore, after successful storage, the second processor of the second electronic device can send a storage success response to the first electronic device. If the second processor of the second electronic device determines that the reserved partition cannot store the upgrade package and authentication file (for example, the remaining space of the reserved partition is insufficient to store the upgrade package and authentication file), it can send a storage failure response to the first electronic device. After receiving the response, the first electronic device can store the upgrade package and authentication file in its own data partition.

[0166] As another possible implementation, the first electronic device could also directly store the upgrade package and authentication file in its own memory.

[0167] As another possible implementation, the first electronic device can send an upgrade package to the second processor of the second electronic device via a connection between the first and second electronic devices. The second processor can then store the upgrade package in a reserved partition of the second electronic device's first memory, while the first electronic device can store the authentication file in its own memory. Alternatively, the first electronic device can send the authentication file to the second processor of the second electronic device via a connection between the first and second electronic devices. The second processor can then store the authentication file in a reserved partition of the second electronic device's first memory, while the first electronic device can store the upgrade package in its own memory. Using this method, since the upgrade package and authentication file can be stored on different devices, it is possible to prevent the upgrade package and authentication file from being replaced simultaneously, effectively ensuring the security of both.

[0168] S609, the first electronic device controls the second electronic device to perform repairs according to the upgrade package.

[0169] Considering that the abnormal power-on of the second electronic device may correspond to different situations, this section will describe the implementation of the first electronic device controlling the second electronic device to repair according to the upgrade package for different situations corresponding to the second electronic device.

[0170] (1) The second electronic device is able to enter recovery mode (i.e., the situation corresponding to the second electronic device is situation 3 above).

[0171] If the first electronic device determines that the second electronic device can enter recovery mode, it can send a boot upgrade command to the second electronic device. Upon receiving the boot upgrade command, the second processor of the second electronic device can transmit it to the first processor of the second electronic device via a second port (or a third port). Correspondingly, upon receiving the boot upgrade command, the first processor of the second electronic device can enter recovery mode and search the data partitions of both the first and second electronic devices for an upgrade package. If found, it can perform repairs based on the upgrade package. Here, if the upgrade package and authentication file are stored in the second electronic device, the first processor of the second electronic device can read them from the second electronic device. If the upgrade package and authentication file are stored in the first electronic device, the first processor of the second electronic device can read them from the first electronic device; in this case, the data partition of the first electronic device is equivalent to the external storage area of ​​the second electronic device.

[0172] As one possible implementation, the process of repairing the first processor of the second electronic device according to the upgrade package (such as upgrading the operating system version in the second electronic device from V1 to V2) can be found in [reference needed]. Figure 12 ,like Figure 12 As shown, the process may include: S1201, the first processor of the second electronic device authenticates the upgrade package according to the authentication file. If the authentication is successful, S1202 can be executed. If the authentication fails, the upgrade is determined to have failed.

[0173] In step S1202, the first processor verifies the signature of the upgrade package. If the verification passes, step S1203 can be executed. If the verification fails, the upgrade is considered to have failed.

[0174] S1203, the first processor performs a version check on the upgrade package, such as checking whether the upgrade package is the upgrade package corresponding to the current version of the first electronic device. If the check passes, S1204 can be executed; if the check fails, the upgrade can be determined to have failed.

[0175] S1204, the first processor performs partition table processing.

[0176] S1205, the first processor initiates a binary upgrade.

[0177] S1206, the first processor parses the data in the upgrade package.

[0178] S1207, the first processor writes the partition image sequentially.

[0179] S1208, the first processor performs partition mirror verification.

[0180] S1209, the first processor updates the version information of the first electronic device, that is, updates the operating system version from V1 to V2, and completes the upgrade.

[0181] It should be noted that, Figure 12 The description represents one possible upgrade process. Figure 12 For details on the implementation of the relevant steps, please refer to the existing technology.

[0182] (2) The second electronic device cannot enter recovery mode (i.e., the situation corresponding to the second electronic device is situation 1 or situation 2 above).

[0183] If the first electronic device determines that the second electronic device cannot enter recovery mode, then as a possible implementation, the process of the first electronic device performing proxy repair on the second electronic device can be found in [reference needed]. Figure 13 .like Figure 13 As shown, the process may include: S1301, the first electronic device enters the agent recovery mode and parses the upgrade package to obtain the minimum system image file.

[0184] S1302, the first electronic device connects to the second electronic device via a connection (e.g., Figure 8 As shown, a minimum system image file is sent to the second processor of the second electronic device.

[0185] S1303, after receiving the minimum system image file, the second processor of the second electronic device stores the minimum system image file in the first memory (or second memory) of the second electronic device.

[0186] S1304, the first electronic device sends a forced start command to the second processor of the second electronic device.

[0187] S1305, after receiving the forced start command, the second processor of the second electronic device transmits the forced start command to the first processor of the second electronic device through the third port.

[0188] It should be noted that S1304 above is an optional step. That is to say, the first electronic device may not send a forced boot command to the second processor of the second electronic device. In this case, the second processor of the second electronic device, upon receiving the minimum system image file, can actively send a forced boot command to the first processor of the second processor through the third port.

[0189] S1306: After receiving a forced boot command, the first processor of the second electronic device can run the minimum system image file to enter recovery mode.

[0190] For example, the authentication file obtained in S607 may also include description information of the minimum system image file. Therefore, before running the minimum system image file, the first processor can authenticate the minimum system image file according to the description information of the minimum system image file in the authentication file. If the authentication is successful, the minimum system image file can be run to enter the recovery mode.

[0191] S1307, the first processor of the second electronic device repairs itself based on the upgrade package and authentication file in the first electronic device and / or the second electronic device.

[0192] Regarding the above, it should be noted that the step numbers in the flowcharts are merely examples of the execution flow and do not constitute a restriction on the order of execution. In this embodiment, there is no strict execution order between steps that do not have temporal dependencies. Furthermore, not all steps shown in the flowcharts are mandatory; steps can be added or removed as needed. For example, step S606 can be executed before, after, or simultaneously with steps S607 and S608.

[0193] Using the above Figure 6 The method described herein can be used to perform proxy repair on electronic devices that fail to boot, even when the electronic device fails to boot into fast startup mode or recovery mode. This allows the normally booting electronic device to perform proxy repair, thereby effectively repairing the electronic device that fails to boot and improving the user experience.

[0194] Based on the above embodiments, this application also provides an electronic device, which is used to implement the following: Figure 6 The following are the troubleshooting methods for the boot error. See also: Figure 14 As shown, the electronic device 1400 includes: a processor 1401, a memory 1402, and a communication interface 1403.

[0195] (1) Figure 14 The electronic device shown can be Figure 6 The first electronic device in the process. In this case, processor 1401 may include Figure 1 or Figure 3 The first processor shown may optionally also include Figure 3 The second processor is shown in the diagram. It should be noted that since the first electronic device is a normally powered-on electronic device, when the first electronic device includes both a first processor and a second processor, the first processor is in normal operating condition, while the second processor can be in standby condition. The memory 1402 may include... Figure 1 or Figure 3 The first memory shown may optionally also include Figure 3 The second memory shown. Communication interface 1403 may include... Figure 1 or Figure 3 The first port and / or wireless communication module shown may optionally also include Figure 3 The second and / or third ports shown are illustrated. It is understood that the electronic device may also have... Figure 2 The various peripheral or internal hardware components shown.

[0196] The memory 1402 can be used to store computer programs, user data, upgrade packages for repairing the second electronic device, and other information. Specifically, the computer program may include program code, which includes instructions for computer operation. The processor 1401 (for example, a first processor) executes the program stored in the memory 1402 and, through the aforementioned components, realizes the above functions, thereby ultimately implementing the method executed by the first electronic device in the above embodiments.

[0197] Specifically, in one embodiment, the processor 1401, in conjunction with the communication interface 1403, performs the following steps: establishing a connection with a second electronic device, which is an electronic device with a power-on malfunction; obtaining the version information of the second electronic device; obtaining an upgrade package for repairing the second electronic device based on the version information of the second electronic device; and controlling the second electronic device to perform repair based on the upgrade package.

[0198] In one possible design, the processor 1401 is further configured to: receive a first operation command from a user via the communication interface 1403, the first operation command being used to trigger the first electronic device to repair the second electronic device; and in response to the first operation command, obtain an authorization file from a first server via the communication interface 1403, the authorization file being used to indicate that the first electronic device has permission to repair the second electronic device.

[0199] In one possible design, the processor 1401 is specifically configured to: acquire device information of the second electronic device; send an authorization request to the first server via the communication interface 1403, the authorization request including device information of the first electronic device and device information of the second electronic device; and receive an authorization response from the first server via the communication interface 1403, the authorization response including the authorization file.

[0200] In one possible design, the authorization request may further include at least one of the following: account information of the first electronic device; product information of the first electronic device; and status information of the first electronic device.

[0201] In one possible design, the processor 1401 is specifically configured to: send a packet search request to a second server via the communication interface 1403, the packet search request including the authorization file and version information of the second electronic device; receive a packet search response from the second server via the communication interface 1403, the packet search response including information of the upgrade package; and download the upgrade package from a third server based on the upgrade package information.

[0202] In one possible design, the processor 1401 is specifically configured to: determine the health check information of the second electronic device, the health check information of the second electronic device being used to indicate whether the second electronic device can enter recovery mode; and control the second electronic device to perform repair according to the upgrade package based on the health check information of the second electronic device.

[0203] In one possible design, when the health check information of the second electronic device is used to indicate that the second electronic device can enter recovery mode, the processor 1401 is specifically used to: send a start upgrade command to the second electronic device through the communication interface 1403, so that the second electronic device parses the upgrade package according to the start upgrade command and performs repair according to the parsed upgrade package data.

[0204] In one possible design, when the health check information of the second electronic device is used to indicate that the second electronic device cannot enter recovery mode, the processor 1401 is specifically used to: parse the upgrade package to obtain a minimum system image file; and send the minimum system image file and a forced start command to the second electronic device through the communication interface 1403, so that the second electronic device runs the minimum system image file for repair.

[0205] In one possible design, the processor 1401 is further configured to: receive user input information via the communication interface 1403, the input information including attribute information of the second electronic device; compare the attribute information of the second electronic device with attribute information of a pre-stored electronic device that supports repair; if the attribute information of the pre-stored electronic device that supports repair includes the attribute information of the second electronic device, then issue a prompt message, the prompt message being used to prompt the user that the first electronic device supports repairing the second electronic device.

[0206] (2) Figure 14 The electronic device shown can be Figure 6 The second electronic device in the process. In this case, the processor 1401 may include... Figure 1 or Figure 3 The first processor shown also includes Figure 3 The second processor shown is illustrated; it should be noted that, since the second electronic device is an electronic device with a power-on malfunction, the first processor in the second electronic device is in an abnormal operating state, and the second processor can take over some of the functions of the first processor. The memory 1402 may include... Figure 1 or Figure 3 The first memory shown also includes Figure 3 The second memory shown is illustrated. Communication interface 1403 may include a first communication interface and a second communication interface, wherein the first communication interface can be used for communication between the second electronic device and other devices, for example, the first communication interface may include... Figure 1 or Figure 3 The first port and / or wireless communication module shown are illustrated; the second communication interface can be used for communication between the first processor and the second processor, for example, the second communication interface may include... Figure 3 The second and / or third ports shown are illustrated. It is understood that the electronic device may also have... Figure 2 The various peripheral or internal hardware components shown.

[0207] The memory 1402 can be used to store computer programs, as well as user data, upgrade packages, and other information. Specifically, the computer program may include program code, which includes instructions for computer operation. The processor 1401 (for example, a first processor and a second processor) executes the program stored in the memory 1402 and, through the aforementioned components, realizes the above functions, thereby ultimately implementing the method executed by the second electronic device in the above embodiments.

[0208] Specifically, in one embodiment, when the instruction is executed by the processor 1401, the processor 1401, in conjunction with the communication interface 1403, performs the following steps: establishing a connection with a first electronic device, which is a normally powered-on electronic device; sending version information of the second electronic device to the first electronic device, so that the first electronic device obtains an upgrade package for repairing the second electronic device based on the version information of the second electronic device; and performing repair according to the upgrade package under the control of the first electronic device.

[0209] In one possible design, the second processor is specifically used to: receive a startup upgrade command from the first electronic device through the first communication interface, and send the startup upgrade command to the first processor through the second communication interface; the first processor is specifically used to: parse the upgrade package according to the startup upgrade command, and perform repair based on the parsed upgrade package data.

[0210] In one possible design, the second processor is specifically configured to: receive a minimum system image file from the first electronic device via the first communication interface, the minimum system image file being obtained by the first electronic device parsing the upgrade package; send a forced boot command to the first processor via the second communication interface; and the first processor is specifically configured to: run the minimum system image file for repair according to the forced boot command.

[0211] Based on the above embodiments, this application also provides a repair system, including the first electronic device and the second electronic device described in the above embodiments. Optionally, it may also include the first server, the second server, and the third server described in the above embodiments.

[0212] Based on the above embodiments, this application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute the repair method provided in the above embodiments.

[0213] The storage medium can be any available medium that a computer can access. For example, but not limited to, a computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.

[0214] Based on the above embodiments, this application also provides a program product, which includes instructions that, when executed on a computer, cause the computer to perform the repair method provided in the above embodiments.

[0215] In the above embodiments, depending on the context, the terms "when..." or "after..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrases "when..." or "if (the stated condition or event) is detected" can be interpreted as meaning "if...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)". Furthermore, in the above embodiments, relational terms such as "first" and "second" are used to distinguish one entity from another, without limiting any actual relationship or order between these entities.

[0216] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0217] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)). Where there is no conflict, the solutions in the above embodiments can be combined.

[0218] It should be noted that a portion of this patent application contains copyrighted material. The copyright holder retains all rights except for making copies of the contents of patent documents or records from the patent office.

Claims

1. A method for repairing abnormal startup, characterized in that, The method is applicable to a first electronic device, which is a normally powered-on electronic device. The method includes: Establish a connection with a second electronic device, which is an electronic device that is malfunctioning when powered on; Obtain the version information of the second electronic device; Based on the version information of the second electronic device, obtain the upgrade package for repairing the second electronic device; Control the second electronic device to repair according to the upgrade package; The process of controlling the second electronic device to repair itself according to the upgrade package includes: The upgrade package is parsed to obtain a minimum system image file, and the minimum system image file and a forced boot command are sent to the second electronic device to enable the second electronic device to run the minimum system image file for repair.

2. The method according to claim 1, characterized in that, Before obtaining the version information of the second electronic device, the process also includes: Receive a first operation command from the user, the first operation command being used to trigger the first electronic device to repair the second electronic device; In response to the first operation command, an authorization file is obtained from the first server, the authorization file indicating that the first electronic device has the authority to repair the second electronic device.

3. The method according to claim 2, characterized in that, Obtain the authorization file from the first server, including: Obtain the device information of the second electronic device; Send an authorization request to the first server, the authorization request including device information of the first electronic device and device information of the second electronic device; Receive an authorization response from the first server, the authorization response including the authorization file.

4. The method according to claim 3, characterized in that, The authorization request also includes at least one of the following: Account information of the first electronic device; Product information of the first electronic device; The status information of the first electronic device.

5. The method according to claim 2, characterized in that, Based on the version information of the second electronic device, obtain an upgrade package for repairing the second electronic device, including: Send a packet search request to the second server, the packet search request including the authorization file and the version information of the second electronic device; Receive a packet search response from the second server, the packet search response including information about the upgrade package; Based on the information in the upgrade package, the upgrade package is downloaded from the third server.

6. The method according to claim 1, characterized in that, The upgrade package is parsed to obtain a minimum system image file, and the minimum system image file and a forced boot command are sent to the second electronic device, including: When the second electronic device cannot enter recovery mode, the upgrade package is parsed to obtain a minimum system image file, and the minimum system image file and the forced boot command are sent to the second electronic device.

7. The method according to claim 6, characterized in that, Controlling the second electronic device to repair according to the upgrade package also includes: When the second electronic device is able to enter recovery mode, a start upgrade command is sent to the second electronic device so that the second electronic device can parse the upgrade package according to the start upgrade command and perform repair based on the parsed upgrade package data.

8. The method according to claim 6 or 7, characterized in that, The method further includes: The health check information of the second electronic device is determined, and the health check information of the second electronic device is used to indicate whether the second electronic device can enter recovery mode.

9. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Receive user input information, the input information including attribute information of the second electronic device; The attribute information of the second electronic device is compared with the attribute information of the pre-stored electronic devices that support repair. If the attribute information of the pre-stored electronic devices that support repair includes the attribute information of the second electronic device, a prompt message is issued. The prompt message is used to prompt the user that the first electronic device supports repairing the second electronic device.

10. A method for repairing abnormal startup, characterized in that, The method is applicable to a second electronic device, which is an electronic device with a power-on malfunction. The method includes: Establish a connection with a first electronic device, which is a normally powered-on electronic device; Send the version information of the second electronic device to the first electronic device so that the first electronic device can obtain an upgrade package for repairing the second electronic device based on the version information of the second electronic device; Under the control of the first electronic device, repair is performed according to the upgrade package; The repair, performed under the control of the first electronic device according to the upgrade package, includes: The system receives a minimum system image file and a forced boot command from the first electronic device, wherein the minimum system image file is obtained by the first electronic device parsing the upgrade package; and runs the minimum system image file to perform repair.

11. The method according to claim 10, characterized in that, Receive a minimal system image file and a forced boot command from the first electronic device, including: When the second electronic device cannot enter recovery mode, it receives the minimum system image file and the forced boot command from the first electronic device.

12. The method according to claim 10, characterized in that, Under the control of the first electronic device, repair is performed according to the upgrade package, which also includes: When the second electronic device is able to enter recovery mode, it receives a start upgrade command from the first electronic device, parses the upgrade package according to the start upgrade command, and performs repair based on the parsed upgrade package data.

13. An electronic device, characterized in that, The electronic device is a first electronic device that is normally powered on. The first electronic device includes: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, the computer program including instructions, and when the instructions are executed by the processor, the processor, in conjunction with the communication interface, performs the following steps: Establish a connection with a second electronic device, which is an electronic device that is malfunctioning when powered on; Obtain the version information of the second electronic device; Based on the version information of the second electronic device, obtain the upgrade package for repairing the second electronic device; Control the second electronic device to repair according to the upgrade package; The process of controlling the second electronic device to repair itself according to the upgrade package includes: The upgrade package is parsed to obtain a minimum system image file. The minimum system image file and a forced boot command are sent to the second electronic device through the communication interface so that the second electronic device runs the minimum system image file to perform repair.

14. The electronic device according to claim 13, characterized in that, The processor is also used for: The first operation command from the user is received through the communication interface. The first operation command is used to trigger the first electronic device to repair the second electronic device. In response to the first operation command, an authorization file is obtained from the first server through the communication interface. The authorization file is used to indicate that the first electronic device has the authority to repair the second electronic device.

15. The electronic device according to claim 14, characterized in that, The processor is specifically used for: Obtain the device information of the second electronic device; An authorization request is sent to the first server through the communication interface. The authorization request includes device information of the first electronic device and device information of the second electronic device. In addition, the system receives an authorization response from the first server via the communication interface, the authorization response including the authorization file.

16. The electronic device according to claim 15, characterized in that, The authorization request also includes at least one of the following: Account information of the first electronic device; Product information of the first electronic device; The status information of the first electronic device.

17. The electronic device according to claim 14, characterized in that, The processor is specifically used for: The communication interface is used to send a packet search request to the second server, the packet search request including the authorization file and the version information of the second electronic device; and the communication interface is used to receive a packet search response from the second server, the packet search response including information about the upgrade package; Based on the information in the upgrade package, the upgrade package is downloaded from the third server.

18. The electronic device according to claim 13, characterized in that, Parsing the upgrade package yields a minimal system image file, and the minimal system image file and a forced boot command are sent to the second electronic device via the communication interface, including: When the second electronic device cannot enter recovery mode, the upgrade package is parsed to obtain a minimum system image file, and the minimum system image file and the forced boot command are sent to the second electronic device through the communication interface.

19. The electronic device according to claim 18, characterized in that, Controlling the second electronic device to repair according to the upgrade package also includes: When the second electronic device is able to enter recovery mode, a start upgrade command is sent to the second electronic device through the communication interface, so that the second electronic device can parse the upgrade package according to the start upgrade command and perform repair based on the parsed upgrade package data.

20. The electronic device according to claim 18 or 19, characterized in that, The processor is also used for: The health check information of the second electronic device is determined, and the health check information of the second electronic device is used to indicate whether the second electronic device can enter recovery mode.

21. The electronic device according to any one of claims 13 to 19, characterized in that, The processor is also used for: The user's input information is received through the communication interface, and the input information includes attribute information of the second electronic device; The attribute information of the second electronic device is compared with the attribute information of the pre-stored electronic devices that support repair. If the attribute information of the pre-stored electronic devices that support repair includes the attribute information of the second electronic device, a prompt message is issued. The prompt message is used to prompt the user that the first electronic device supports repairing the second electronic device.

22. An electronic device, characterized in that, The electronic device is a second electronic device that malfunctions upon power-on. The second electronic device includes a processor, a memory, and a communication interface. The memory stores a computer program, which includes instructions. When these instructions are executed by the processor, the processor, in conjunction with the communication interface, performs the following steps: Establish a connection with a first electronic device, which is a normally powered-on electronic device; Send the version information of the second electronic device to the first electronic device so that the first electronic device can obtain an upgrade package for repairing the second electronic device based on the version information of the second electronic device; Under the control of the first electronic device, repair is performed according to the upgrade package; The processor includes a first processor and a second processor, and the communication interface includes a first communication interface and a second communication interface. Under the control of the first electronic device, repair is performed according to the upgrade package, including: the second processor is used to: receive a minimum system image file from the first electronic device through the first communication interface, the minimum system image file being obtained by the first electronic device parsing the upgrade package; and send a forced boot command to the first processor through the second communication interface; the first processor is used to: run the minimum system image file to perform repair according to the forced boot command.

23. The electronic device according to claim 22, characterized in that, When the second electronic device cannot enter recovery mode, the second processor is configured to: receive a minimum system image file from the first electronic device through the first communication interface, wherein the minimum system image file is obtained by the first electronic device parsing the upgrade package; A forced startup command is sent to the first processor via the second communication interface; The first processor is configured to: run the minimum system image file for repair according to the forced boot command.

24. The electronic device according to claim 23, characterized in that, When the second electronic device is able to enter recovery mode, the second processor is configured to: receive a startup upgrade command from the first electronic device through the first communication interface, and send the startup upgrade command to the first processor through the second communication interface; the first processor is configured to: parse the upgrade package according to the startup upgrade command, and perform repair according to the parsed upgrade package data.

25. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 12.

26. A program product, characterized in that, Includes instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Terminal and flash failure recovery method

    CN107168818A

  • System recovery method and related product

    CN109992453A

  • Electronic equipment upgrading method and electronic equipment

    CN110727444A

  • Equipment repair method and device, electronic equipment and storage medium

    CN111813427A