WO2022135215A1 - Method and apparatus for repairing abnormal power-on - Google Patents

Method and apparatus for repairing abnormal power-on Download PDF

Info

Publication number
WO2022135215A1
WO2022135215A1 PCT/CN2021/137550 CN2021137550W WO2022135215A1 WO 2022135215 A1 WO2022135215 A1 WO 2022135215A1 CN 2021137550 W CN2021137550 W CN 2021137550W WO 2022135215 A1 WO2022135215 A1 WO 2022135215A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
processor
information
upgrade package
repair
Prior art date
Application number
PCT/CN2021/137550
Other languages
French (fr)
Chinese (zh)
Inventor
王艳召
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022135215A1 publication Critical patent/WO2022135215A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present application relates to the technical field of terminals, and in particular, to a method and device for repairing abnormal startup.
  • Mobile phones not only have communication functions, but also have powerful processing capabilities, storage capabilities, and camera functions. Therefore, the mobile phone can not only be used as a communication tool, but also the user's mobile file library. It stores various personal information, photos, videos, etc. of the user, and can also bind the user's social account, online banking, mobile payment account, etc. information.
  • the purpose of the embodiments of the present application is to provide a method and device for repairing abnormal startup, which are used to effectively repair an electronic device with abnormal startup and improve user experience.
  • an embodiment of the present application provides a method for repairing an abnormal startup.
  • the method can be applied to a first electronic device, where the first electronic device is an electronic device that is properly turned on.
  • the method includes: establishing a connection with the second electronic device, The second electronic device is an electronic device with abnormal startup; obtain the version information of the second electronic device; obtain an upgrade package for repairing the second electronic device according to the version information of the second electronic device; control The second electronic device is repaired according to the upgrade package.
  • the electronic device that is turned on abnormally can be repaired by proxy through the electronic device that is turned on normally. Perform proxy repair, so as to effectively repair electronic devices that are abnormally powered on, and improve user experience.
  • the method before acquiring the version information of the second electronic device, the method further includes: receiving a first operation command from a user, where the first operation command is used to trigger the first electronic device to perform an operation on the second electronic device.
  • the second electronic device performs repair; in response to the first operation command, an authorization file is obtained from the first server, where the authorization file is used to indicate that the first electronic device has the right to repair the second electronic device.
  • the first electronic device needs to obtain an authorization file before performing proxy repair on the second electronic device, so as to ensure the security of the repair process.
  • acquiring an authorization file from the first server includes: acquiring device information of the second electronic device; and sending an authorization request to the first server, where the authorization request includes the first electronic device.
  • Device information of the electronic device device information of the second electronic device; and receiving an authorization response from the first server, where the authorization response includes the authorization file.
  • the authorization request further includes at least one of the following: account information of the first electronic device; product information of the first electronic device; state information of the first electronic device.
  • the first electronic device needs to send a variety of possible information of the first electronic device 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, So as to avoid some illegal repair behavior of electronic equipment.
  • acquiring an upgrade package for repairing the second electronic device according to the version information of the second electronic device includes: sending a package search request to the second server, where the package search request includes The authorization file and the version information of the second electronic device; receiving a package search response from the second server, the package search response including the information of the upgrade package; according to the information of the upgrade package, from the first The third server downloads the upgrade package.
  • controlling the second electronic device to perform repair according to the upgrade package includes: determining medical examination information of the second electronic device, where the medical examination information of the second electronic device is used to indicate the Whether the second electronic device can enter the recovery mode; according to the medical examination information of the second electronic device, control the second electronic device to repair according to the upgrade package.
  • control the second electronic device according to the medical examination information of the second electronic device Repairing by the device according to the upgrade package includes: 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 analyzes the upgrade package according to the parsed upgrade package. data is repaired.
  • control the second electronic device according to the medical examination information of the second electronic device includes: parsing the upgrade package to obtain a minimum system image file; sending the minimum system image file and a forced startup command to the second electronic device to make the second electronic device run The minimal system image file is repaired.
  • the first electronic device can adopt different repairing methods for different situations according to the medical examination information of the second electronic device, so that the second electronic device can be repaired more effectively.
  • the method further includes: receiving input information from the user, the input information including attribute information of the second electronic device; and comparing the attribute information of the second electronic device with the pre-stored electronic device that supports repairing The attribute information of the device is compared, and if the attribute information of the pre-stored electronic device that supports repair includes the attribute information of the second electronic device, a prompt message is sent, and the prompt information is used to prompt the user that the first electronic device supports the repair. the second electronic device.
  • the user can be informed in advance whether the first electronic device supports the repair of the second electronic device, so as to avoid subsequent repair failure caused by the first electronic device not supporting the second electronic device and affecting user experience.
  • an embodiment of the present application provides a method for repairing an abnormal startup.
  • the method can be applied to a second electronic device.
  • the second electronic device is an electronic device with an abnormal startup.
  • the method includes: establishing a connection with the first electronic device, An electronic device that the first electronic device is powered on normally; sending the version information of the second electronic device to the first electronic device, so that the first electronic device obtains the version information of the second electronic device according to the version information of the second electronic device An upgrade package for repairing the second electronic device; under the control of the first electronic device, repairing is performed according to the upgrade package.
  • repairing according to the upgrade package includes: receiving a start-up upgrade command from the first electronic device; after the start-up upgrade command, The upgrade package is parsed and repaired according to the parsed upgrade package data.
  • repairing according to the upgrade package includes: receiving a minimum system image file from the first electronic device, where the minimum system image file is Obtained by the first electronic device parsing the upgrade package; and running the minimum system image file to repair.
  • an embodiment of the present application provides an electronic device, the electronic device is an electronic device that is powered on normally, and the electronic device includes: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, and the The computer program includes instructions, which, when executed by the processor, cause the processor to implement the following steps in combination with the communication interface: establishing a connection with a second electronic device, and the electronic device that the second electronic device turns on abnormally. device; obtain the version information of the second electronic device; obtain an upgrade package for repairing the second electronic device according to the version information of the second electronic device; control the second electronic device according to the upgrade package make a repair.
  • the processor is further configured to: receive a user's first operation command through the communication interface, where the first operation command is used to trigger the first electronic device to perform an operation on the second electronic device. repairing the device; in response to the first operation command, obtain an authorization file from the first server through the communication interface, where the authorization file is used to indicate that the first electronic device has the ability to repair the second electronic device permissions.
  • the processor is specifically configured to: acquire device information of the second electronic device; send an authorization request to the first server through the communication interface, where the authorization request includes the first server Device information of an electronic device, device information of the second electronic device; and receiving an authorization response from the first server through the communication interface, the authorization response including the authorization file.
  • the authorization request further includes at least one of the following: account information of the first electronic device; product information of the first electronic device; state information of the first electronic device.
  • the processor is specifically configured to: send a packet search request to the second server through the communication interface, where the packet search request includes the authorization file and version information of the second electronic device ; and receive a packet search response from the second server through the communication interface, the packet search response including the information of the upgrade package; download the upgrade package from the third server according to the information of the upgrade package.
  • the processor is specifically configured to: determine physical examination information of the second electronic device, where the physical examination information of the second electronic device is used to indicate whether the second electronic device can enter the recovery mode ; According to the medical examination information of the second electronic device, control the second electronic device to repair according to the upgrade package.
  • the processor when the medical examination information of the second electronic device is used to indicate that the second electronic device can enter the recovery mode, the processor is specifically configured to: send the information to the first electronic device through the communication interface.
  • the second electronic device sends a start-up upgrade command, so that the second electronic device parses the upgrade package according to the start-up upgrade command, and performs repair according to the parsed upgrade package data.
  • the processor when the medical examination information of the second electronic device is used to indicate that the second electronic device cannot enter the recovery mode, the processor is specifically configured to: parse the upgrade package to obtain a minimum system image file; sending the minimum system image file and a forced startup command to the second electronic device through the communication interface, so that the second electronic device runs the minimum system image file for repair.
  • the processor is further configured to: receive input information from a user through the communication interface, where the input information includes attribute information of the second electronic device; Compare with the pre-stored attribute information of the electronic device supporting repair, if the pre-stored attribute information of the electronic device supporting repair includes the attribute information of the second electronic device, send out prompt information, the prompt information is used to prompt the user
  • the first electronic device supports repair of the second electronic device.
  • an embodiment of the present application provides an electronic device, the electronic device is an electronic device with abnormal startup, and the electronic device includes: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, and the The computer program includes instructions, which, when executed by the processor, cause the processor to implement the following steps in combination with the communication interface: establishing a connection with a first electronic device, and the first electronic device is powered on normally. device; sending the version information of the second electronic device to the first electronic device, so that the first electronic device obtains the information for repairing the second electronic device according to the version information of the second electronic device An upgrade package; under the control of the first electronic device, repairing 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; the second processor is specifically configured to: The first communication interface receives a start-up upgrade command from the first electronic device, and sends the start-up upgrade command to the first processor through the second communication interface; the first processor is specifically configured to: The upgrade package is parsed according to the start-up upgrade command, and repaired according to the parsed upgrade package data.
  • 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 configured to: The first communication interface receives a minimum system image file from the first electronic device, and the minimum system image file is obtained by the first electronic device by parsing the upgrade package; The first processor sends a forced startup command; the first processor is specifically configured to: run the minimum system image file for repairing according to the forced startup command.
  • an embodiment of the present application further provides an electronic device, where the electronic device includes a module/unit for executing the method of the first aspect or any possible design of the first aspect; or, the electronic device includes Modules/units for performing the above-mentioned second aspect or any possible design method of the second aspect; these modules/units may be implemented by hardware, or by executing corresponding software in hardware.
  • an embodiment of the present application further provides a chip, which is coupled to a memory in an electronic device, and is used to call a computer program stored in the memory and execute the first aspect of the embodiment of the present application and any one of the first aspects thereof.
  • the technical solutions that may be designed or the technical solutions of the second aspect and any possible design of the second aspect of the embodiments of the present application, "coupling" in the embodiments of the present application means that two components are directly or indirectly combined with each other.
  • an embodiment of the present application further provides a system, which may include the electronic device described in any possible design of the third aspect above, and the electronic device described in any possible design of the fourth aspect above. Described electronic equipment.
  • the system may also include an authorization server, a packet search server, and an OTA server.
  • an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a computer, causes the computer to execute the first aspect or the first aspect above.
  • the method steps provided in the second aspect are provided in the eighth aspect.
  • a program product comprising instructions, which when executed on a computer, cause the computer to perform the method steps provided in the first aspect or the second aspect above.
  • FIG. 1 is a schematic diagram of a possible hardware structure of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a hardware structure of a mobile phone provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of another possible hardware structure of the electronic device provided by the embodiment of the present application.
  • FIG. 4 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart corresponding to a method for repairing abnormal startup of an electronic device according to an embodiment of the present application
  • FIG. 7 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a connection between a first electronic device and a second electronic device according to an embodiment of the present application
  • FIG. 9 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application.
  • FIG. 10 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application.
  • FIG. 11 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application.
  • FIG. 12 is a schematic flowchart of repairing according to an upgrade package by a first processor of a second electronic device according to an embodiment of the present application
  • FIG. 13 is a schematic flowchart of a first electronic device performing proxy repair on a second electronic device
  • FIG. 14 is a schematic diagram of an electronic device according to an embodiment of the present application.
  • Electronic devices such as mobile phones, tablet computers, wearable devices (eg, watches, bracelets, helmets, headphones, necklaces, etc.), in-vehicle devices, augmented reality (AR)/virtual reality (VR) ) equipment, notebook computer, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA), etc.
  • AR augmented reality
  • VR virtual reality
  • PDA personal digital assistant
  • OS Operating system
  • Flashing refers to changing or replacing some languages, software or operating systems originally existing in the electronic device through a certain method. Flashing is to reinstall the operating system of the electronic device, which can make the function of the electronic device more perfect, or restore it to its original state.
  • the Android system As the operating system as an example, because the Android system is relatively open source, it allows users to make certain modifications to the operating system of the electronic device (that is, flashing). Therefore, for different functions and permissions, the operating system can have the following possible modes :
  • 1Normal mode the function of this mode is to start the electronic device normally.
  • the way to enter this mode is, for example, when the electronic device is turned off, press the power button to start it.
  • this mode has a relatively high modification authority, can open the command interpreter (shell), refresh the image file (flash image), perform backup, etc.
  • the electronic device can modify the system data of the electronic device according to the system data stored in its own memory, thereby completing the flashing.
  • the electronic device can communicate with the computer through the universal serial bus (USB) data line.
  • USB universal serial bus
  • the electronic device After the electronic device receives the system data sent by the computer, it updates the system data to the designated partition of the electronic device (for example, the command fastboot flash boot boot.img is to flash the contents of boot.img to the boot partition), so as to complete the flashing.
  • the command fastboot flash boot boot.img is to flash the contents of boot.img to the boot partition
  • the operating system may also have other modes, such as a safe mode (safe mode), a diagnostic mode (diagnostic mode), etc., which are not specifically limited.
  • a safe mode safe mode
  • diagnostic mode diagnostic mode
  • An electronic device may include a storage area (similar to a hard disk of a computer), and the storage area may include multiple partitions, each of which has different functions.
  • the storage area of an electronic device may include the following possible partitions:
  • the boot partition which can ensure the normal startup of electronic devices, includes the kernel and the virtual memory disk (a technology used by software to simulate a part of the memory as a hard disk, which can greatly improve the speed of file access on it), without this partition, electronic devices often cannot boot properly.
  • 2system partition which is used to store system-related configurations other than the kernel and virtual memory disk, including user interface, pre-installed software of electronic devices, etc. Erasing this partition will delete the entire operating system, but it will not make it unbootable, such as by entering recovery mode to install a new operating system.
  • 3Data (data) partition this partition contains the user's data information, such as contacts, text messages, settings, user-installed programs, etc., erasing this partition is equivalent to restoring the factory settings of the electronic device, you can select "" data/factory reset" to erase this partition.
  • the partition on which the normal mode depends may include a boot partition
  • the partition on which the recovery mode depends may include a recovery partition
  • the partition on which the fast boot mode depends may include some partitions in the boot partition (or in other words, the partition on which the fast boot mode depends).
  • the dependent partition is a subpartition or subset of the boot partition). Therefore, when there is a problem with the boot partition, the electronic device will not be able to enter the normal mode; when there is a problem with the recovery partition, the electronic device will not be able to enter the recovery mode; when there is a problem with the partition that the fast boot mode relies on in the boot partition, the Causes the electronic device to fail to enter fastboot mode.
  • the storage area of the electronic device may also have other partitions, such as a cache partition, which is not specifically limited.
  • an abnormal startup of an electronic device (such as a mobile phone) will bring huge losses to users, and will also cause multi-dimensional losses to mobile phone manufacturers.
  • One possible reason is: there is a problem with the software of the electronic equipment. For example, the user makes a misoperation during the software upgrade process, which causes the software upgrade to fail. For example, the user accidentally deletes some key files. .
  • the abnormal startup of the electronic device may refer to that the electronic device cannot enter the normal mode (or the safe mode).
  • the electronic device boots abnormally it can correspond to the following possible situations, such as situation 1: the electronic device cannot enter the fast boot mode and cannot enter the recovery mode; situation 2: the electronic device can enter the fast boot mode, but cannot enter Recovery Mode; Scenario 3: The electronic device is able to enter fastboot mode and is able to enter recovery mode. It is understandable that the abnormal startup of the electronic device may also correspond to other possible situations, and details will not be repeated one by one.
  • the Erecovery mode is a mode provided by some terminal device manufacturers, and the partitions on which the Erecovery mode depends may include some partitions of the boot partition and specific partitions corresponding to the Erecovery mode.
  • Erecovery mode includes the following features:
  • this solution may not be able to effectively repair electronic devices, that is, there are certain limitations and disadvantages, for example, the partition on which Erecovery mode is entered is damaged (for example, the boot partition is damaged due to an upgrade interruption (a key image is upgraded by half).
  • the data jump in the storage area causes the startup verification failure), it will not be able to enter the Erecovery mode; for another example, when an unknown error occurs in the startup process that the Erecovery mode depends on (for example, the startup process software is abnormally stuck, the process crashes, etc.) , it will not be able to enter the Erecovery mode; for another example, when the upgrade process is interrupted by the user's long key press, so that the new and old images do not match when booting, the electronic device will not be able to boot to the normal mode, nor enter the Erecovery mode.
  • the user can use the Android package (Android package, APK) tool (such as the hissuit tool) to try to repair, the specific operation is as follows:
  • the electronic device enters the fast boot mode, and the hissuit tool obtains the version number of the electronic device in this mode, and then searches the server for the upgrade package and downloads it to the computer.
  • the electronic device enters the recovery mode, and the hisiut tool sends the local upgrade package of the computer to the electronic device. Accordingly, the electronic device receives the upgrade package and performs the upgrade to refresh to the latest version, thereby finally completing the repair.
  • this solution may not be able to effectively repair electronic devices, that is, there are certain limitations and disadvantages, such as the partition that depends on entering the fast boot mode and the recovery mode is damaged, so that when the fast boot mode or recovery mode cannot be entered, the There is no way to fix it with the hissuit tool.
  • the user can go to the maintenance outlet to use the maintenance tool to repair it. Due to the high authority of the maintenance network, when the electronic device is abnormally turned on (you can enter the fast boot mode), you can use the maintenance tool to unlock the electronic device, and then force the upgrade. However, if the electronic device cannot enter the fast boot mode, it may not be able to effectively repair the electronic device. In this case, the maintenance network can only repair the electronic device through compulsory measures such as disassembly and replacement of the motherboard, which may give the user's property. cause losses and degrade the user experience.
  • an embodiment of the present application provides a method for repairing an abnormal startup.
  • an electronic device that is turned on abnormally can be repaired by proxy through an electronic device that is turned on normally.
  • an electronic device that is turned on abnormally cannot enter the enhanced recovery mode.
  • the electronic device that is powered on normally can perform proxy repair for the electronic device that is powered on abnormally, so that the electronic device that is powered on abnormally can be effectively repaired and the user experience can be improved.
  • FIG. 1 is a schematic diagram of a possible hardware structure of an electronic device provided by an embodiment of the present application.
  • 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.
  • the first processor may include one or more processing units, for example, the first processor may include an application processor (application processor, AP), and may also include at least one of the following: a modem processor, a graphics processor ( graphics processing unit, GPU), image signal processor (ISP), memory, video codec, digital signal processor (DSP), baseband processor, neural-network processor processing unit, NPU), etc.
  • the different processing units can be stand-alone devices or integrated in one or more processors.
  • a memory may also be provided in the first processor for storing instructions and data.
  • the memory in the first processor is a cache memory. The memory may hold instructions or data that have just been used or recycled by the first processor. If the first processor needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the first processor is reduced, thereby improving the efficiency of the system.
  • the first port may be an interface conforming to the USB standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the first port can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and other devices.
  • the first memory may be used to store a computer program comprising instructions.
  • the first processor executes various functions and data processing of the electronic device 100 by executing 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, and the like.
  • the first memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the wireless communication module can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite systems
  • frequency modulation frequency modulation
  • FM near field communication technology
  • NFC near field communication technology
  • IR infrared technology
  • the wireless communication module may be one or more devices integrating at least one communication processing module.
  • peripheral modules may include a display screen, a sensor module, a camera, etc., which are not specifically limited.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • FIG. 1 Taking the electronic device 100 shown in FIG. 1 as a mobile phone as an example below, the hardware structure of the mobile phone will be described in detail with reference to FIG. 2 .
  • FIG. 2 is a schematic diagram of a hardware structure of a mobile phone according to an embodiment of the present application.
  • 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, Antenna 1, Antenna 2, Mobile Communication Module 150, Wireless Communication Module 160, Audio Module 170, Speaker 170A, Receiver 170B, Microphone 170C, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191, Indicator 192, Camera 193, Display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the processor 110 may be the first processor in FIG. 1 above.
  • the USB interface 130 may be the first port in FIG. 1 described above.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used for connecting 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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the wireless communication function of the mobile phone 200 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160 (which can be the wireless communication module in FIG. 1 above), the modulation and demodulation processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in handset 200 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied on the mobile phone 200 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the wireless communication module 160 can receive electromagnetic waves via the antenna 2 , frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the mobile phone 200 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone 200 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband 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 a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the display screen 194 is used to display the display interface of the application and the like.
  • the display screen 194 includes a display panel, and the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode.
  • Body active-matrix organic light emitting diode, AMOLED
  • flexible light emitting diode flex light-emitting diode, FLED
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • cell phone 200 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the camera 193 is used to capture still images, moving images or videos.
  • the number of cameras 193 in the mobile phone 200 may be at least two. Take two as an example, one is a front camera and the other is a rear camera; take three as an example, one of which is a front camera and the other two are rear cameras.
  • the internal memory 121 may be the above-mentioned first memory in FIG. 1 .
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 200 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. Such as saving pictures, videos and other files in an external memory card.
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the mobile phone 200 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the cell phone 200 can receive key input and generate key signal input related to user settings and function control of the cell phone 200 .
  • the mobile phone 200 can receive the key 190 input and generate the key signal input related to the user setting and function control of the mobile phone 200 .
  • the mobile phone 200 can use the motor 191 to generate vibration alerts (eg, vibration alerts for incoming calls).
  • the indicator 192 in the mobile phone 200 can be an indicator light, which can be used to indicate a charging state, a change in power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 in the mobile phone 200 is used to connect the SIM card. The SIM card can be contacted and separated from the mobile phone 200 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the mobile phone 200 .
  • the mobile phone 200 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • FIG. 3 is a schematic diagram of another possible hardware structure of the electronic device provided by the embodiment of the present application.
  • the electronic device 300 may not only include a first processor, a first port, a first memory, a wireless communication module, and other peripheral modules, but also Including a second processor, a second port, a third port, a second memory, a controller, and the like.
  • a first processor for the description of the first processor, the first port, the first memory, the wireless communication module, and other peripheral modules, reference may be made to the introduction of FIG. 1 .
  • the second processor may be a microcontroller, such as a microcontroller unit (MCU), also known as a single chip microcomputer (single chip microcomputer) or a single chip.
  • MCU microcontroller unit
  • the second processor may be mainly responsible for related implementation in an abnormal scenario (for example, the electronic device 300 is turned on abnormally), and for details, refer to the following description.
  • the first processor may be understood as a master processor of the electronic device 300
  • the second processor may be understood as a slave processor of the electronic device 300
  • the processing capability of the second processor may be smaller than the processing capability of the first processor, for example, the second processor may have part of the processing capability of the first processor.
  • the first processor and the second processor may share some modules, for example, the first processor and the second processor may share the first port, and may also share a wireless communication module and the like. It should be noted that the first processor and the second processor may also share other possible peripheral modules, which are not specifically limited. Since the first processor is the main processor of the electronic device 300, under normal circumstances, when the first processor can run normally or is in a normal running state, the first processor manages the above-mentioned shared modules (such as The first port, the wireless communication module), in this case, the second processor is in a standby state, that is, it does not manage the above-mentioned shared module for the time being; When entering the normal mode), the second processor can take over the above-mentioned shared module.
  • the first processor is the main processor of the electronic device 300, under normal circumstances, when the first processor can run normally or is in a normal running state, the first processor manages the above-mentioned shared modules (such as The first port, the wireless communication module), in this case, the second processor is
  • the first processor and the second processor may connect to (or manage) the first port at different times, but not connect to the first port at the same time; for example, When the first processor is connected to the first port, the connection between the second processor and the first port is disconnected, and when the second processor is connected to the first port, the connection between the first processor and the first port is disconnected.
  • an attribute (for convenience of description, referred to as the first attribute) may be preset in the electronic device 300, and when the first processor is in a normal running state, the value of the first attribute may be true (true). ), in this case, the above-mentioned shared module can be managed by the first processor; and when the first processor is in an abnormal operation state, the value of the first attribute can be false (false), in this case, it can trigger The second processor takes over the above-mentioned shared module.
  • another device may trigger the second process to take over the above-mentioned shared module.
  • the electronic device 300 can establish a connection with another device through the first port.
  • 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
  • a device determines that it needs to perform proxy repair on the electronic device 300 (for example, another device receives a user's first operation command, the first operation command can be referred to later) or other possible operations
  • it can send the first port to the first
  • the processor sends a switching instruction, the switching instruction is used to instruct to switch to the second processor to take over the above-mentioned shared module; and after the first processor receives the switching instruction, it can use the second port (or the third port) to process the second processor
  • the second processor sends the control information, correspondingly, after receiving the control information, the second processor can take over the above-mentioned sharing module.
  • the second port can be understood as a general information exchange or data exchange bus between the first processor and the second processor.
  • the second port needs to depend on the processing capability of the first processor. For example, when the first processor can run normally, the first processor and the second processor can communicate through the second port; When an exception occurs, the processing capability of the first processor is limited. In this case, communication between the first processor and the second processor may not be possible through the second port.
  • the second port may be a secure digital input and output (SDIO) port, a general purpose input output (general purpose input output) port, an integrated interchip sound (I2S), an inter-integrated circuit (inter integrated circuit, I2C), there is no specific limitation.
  • SDIO secure digital input and output
  • I2S integrated interchip sound
  • I2C inter-integrated circuit
  • the third port may refer to a lower-level port than the second port.
  • the third port may be a universal synchronous/asynchronous serial receiver/transmitter (universal synchronous/asynchronous receiver/transmitter, USART), which is not specifically limited.
  • the first memory may be the main memory of the electronic device 300
  • the second memory may be the slave memory of the electronic device 300 .
  • the storage capacity of the first memory may be greater than the storage capacity of the second memory, or in other words, the storage space of the first memory may be greater than the storage space of the second memory.
  • the first processor may access the first memory and the second memory, for example, the first processor may write device information, version information, etc. of the electronic device 300 into the first memory and the second memory.
  • the first processor may access the first memory first and the second memory second.
  • the second processor can access the first memory and the second memory, for example, the second processor can write the minimum system image file into the first memory, and for example, the second processor can read the device of the electronic device 300 from the second memory information, version information, etc.
  • the second processor may access the second memory first and the first memory second.
  • the second processor For the second processor to access 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 in a locked state) When 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 first memory 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 (ie, it is uncertain whether it is locked), the second processor can also access the first memory at this time.
  • a locked state for example, when the first processor is in a locked state
  • Accessing the first memory by the second processor may mean that the second processor accesses a partition reserved in the first memory, for example, the second processor writes data or reads data in the partition.
  • the reserved partition can be located at the end of the data block device (data block device), that is, the data block device can include the data partition and the reserved partition; further, user data can be preferentially stored in the data partition. , try not to occupy the reserved partition.
  • the second processor can be connected to the first memory through the controller, and when the second processor can access the first memory, the controller can be used to assist the second processor to access the first memory, such as assisting
  • the second processor parses the data structures and the like.
  • the controller may be a hardware component, or may also be a software module, which is not specifically limited; further, the controller may exist independently, or may also be integrated in the second processor, which is not specifically limited.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 300 .
  • the electronic device 300 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • FIG. 4 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application.
  • the software structure of the electronic device may be a layered architecture, for example, the software may be divided into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer (framework, FWK), an Android runtime (Android runtime) and system libraries, and a kernel layer.
  • an application layer an application framework layer (framework, FWK)
  • an Android runtime Android runtime
  • system libraries system libraries
  • the application layer can include a series of application packages. As shown in FIG. 4 , the application layer may include system applications (referred to as system applications) and third-party applications (referred to as third-party applications), wherein the system applications may include cameras, settings, skin modules, user interfaces (user interface, UI), mobile phone manager, call, SMS, etc., third-party applications can include maps, navigation, music, video, etc.
  • system applications referred to as system applications
  • third-party applications referred to as third-party applications
  • third-party applications can include maps, navigation, music, video, etc.
  • the application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer.
  • the application framework layer can include some predefined functions. As shown in Figure 4, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • the window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device.
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • Android runtime includes core library and virtual machine, and Android runtime is responsible for scheduling and management of Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (media library), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the electronic device may further include a hardware layer, and the hardware layer may include various types of sensors, such as an acceleration sensor, a gyroscope sensor, and a touch sensor involved in the embodiments of the present application.
  • sensors such as an acceleration sensor, a gyroscope sensor, and a touch sensor involved in the embodiments of the present application.
  • FIG. 5 is a schematic diagram of an application scenario provided by an embodiment of the present application.
  • the application scenario includes a first device, a second device, and may also include at least one server (eg, a first server, a second server, and a third server).
  • at least one server eg, a first server, a second server, and a third server.
  • the first device and the second device may both be electronic devices.
  • the first device may be referred to as the first electronic device
  • the second device may be referred to as the second electronic device.
  • a case where both the first device and the second device may be electronic devices will be mainly used for description as an example.
  • the hardware structure of the first electronic device and the hardware structure of the second electronic device reference may be made to the hardware structure of the electronic device 300 shown in FIG. 3 .
  • the first electronic device when the first electronic device is powered on normally and the second electronic device is powered on abnormally, the first electronic device can repair the second electronic device by using the repair method provided in the embodiment of the present application; when the first electronic device is powered on abnormally .
  • the second electronic device when the second electronic device is powered on normally, the second electronic device can repair the first electronic device by using the repair method provided in the embodiment of the present application. That is, the first electronic device and the second electronic device can repair each other.
  • the hardware structure of the first electronic device may refer to the hardware structure of the electronic device 100 shown in FIG.
  • the hardware structure of the second electronic device may refer to the hardware structure of the electronic device 300 shown in FIG. 3 .
  • the first electronic device can repair the second electronic device by using the repair method provided in the embodiment of the present application; and when the first electronic device is powered on When the second electronic device is abnormal and the second electronic device is powered on normally, since the first electronic device does not include the second processor, the second electronic device may not be able to repair the first electronic device through the repair method provided in the embodiment of the present application. That is to say, in this embodiment of the present application, the hardware structure of the electronic device to be repaired may be the hardware structure shown in FIG.
  • the hardware structure of the electronic device that performs the repair may be the hardware structure shown in FIG. 1 , or, It may be the hardware structure shown in FIG. 3 .
  • the software structure of the first electronic device and the software structure of the second electronic device reference may be made to the software structure of the electronic device shown in FIG. 4 .
  • the first electronic device and the second electronic device may be electronic devices of the same device type, for example, both the first electronic device and the second electronic device are mobile phones, or both are tablet computers;
  • the second electronic device may also be electronic devices of different device types, for example, the first electronic device is a tablet computer and the second electronic device is a mobile phone, or the first electronic device is a mobile phone and the second electronic device is a watch.
  • the first server may be called an authorization server, which is used to authorize the first electronic device to perform proxy repair on the second electronic device .
  • the second server may be referred to as a package search server, and is configured to, after receiving the package search request from the first electronic device, search for information for repairing the upgrade package of the second electronic device according to the package search request, and feed back to the first electronic device A package search response, the package search response includes the information of the searched upgrade package.
  • the third server may be called an upgrade server (such as an over-the-air (OTA) server, a cloud server, etc.), and the third server may be an upgrade package capable of storing application software, and provides an upgrade package download service for electronic devices of third-party devices.
  • the third server may be configured to return a download response according to the download request after receiving a download request from the first electronic device (the download request includes information about the upgrade package to be downloaded), where the download response includes the upgrade package to be downloaded.
  • the application scenario may also include other possible devices, which is not specifically limited.
  • the first device and the second device may also be relay node devices and sub-node devices in the Internet of Everything scenario, respectively, that is, the relay node device can pass the The repair method repairs and upgrades the sub-node device, which is not limited.
  • the first electronic device repairs the second electronic device (and the hardware structure of the first electronic device and the hardware structure of the second electronic device are both the hardware structures of the electronic device 300 shown in FIG. 3 )
  • the repair method provided by the embodiment of the present application will be described in detail. That is, the first electronic device is an electronic device that is powered on normally, and the second device is an electronic device that is powered on abnormally.
  • FIG. 6 is a schematic flowchart corresponding to a method for repairing an abnormal startup of an electronic device provided by an embodiment of the present application. As shown in FIG. 6 , the process may include:
  • the first electronic device receives input information from a user, where the input information includes attribute information of the second electronic device.
  • the first electronic device sends out prompt information according to the input information of the user, where the prompt information is used to prompt the user whether the first electronic device supports the repair of the second electronic device.
  • attribute information of the electronic device supporting repair may be pre-stored in the first electronic device, for example, attribute information of the electronic device supporting repair may be stored in the first memory of the first electronic device.
  • the first electronic device specifically, the first processor of the first electronic device
  • receives the user's input information that is, the attribute information of the second electronic device
  • the prompt information sent by the first electronic device is used for Prompt the user that the first electronic device supports the repair of the second electronic device; if the pre-stored attribute information of the electronic device supporting the repair does not include the attribute information of the second electronic device, the first electronic device may determine that the repair of the second electronic device is not supported, In this case, the prompt information sent by the first electronic device is used to prompt the user that the first electronic device does not support repairing the second electronic device.
  • the attribute information of the electronic device may include at least one of the following: device information of the electronic device and product information of the electronic device.
  • the device information of the electronic device may include the serial number (SN) of the electronic device and the device type of the electronic device;
  • the product information of the electronic device may include the brand information of the electronic device (such as Huawei), the series information of the electronic device ( Such as Mate series, P series).
  • the first electronic device may be pre-installed with an application for proxy repair (referred to as application A for ease of description), that is, the application layer of the first electronic device may include application A, and application A may be a system application.
  • application A can be started on the first electronic device (for example, the user clicks the icon of application A, see FIG. 7 . (a)), and then the display screen of the first electronic device may display an interface as shown in (b) in FIG.
  • the interface may include one or more options (for example, "electronic device that supports repair” option).
  • the user can trigger the option of "electronic equipment supporting repair", and then the display screen of the first electronic equipment can display an interface as shown in (c) in FIG. 7 , and the interface can include an input box (the input box uses for the user to input the attribute information of the second electronic device).
  • the user can input the attribute information of the second electronic device in the input box (for example, the brand is "Huawei" and the series is "P series”), and click the "OK” button, correspondingly, the first electronic device can receive the second electronic device.
  • the attribute information of the device, and the judgment process as described above is performed.
  • a prompt message can be sent (for example, "repair is supported” is displayed on the display screen of the first electronic device), see Figure 7 As shown in (d) in the above; if it is determined that the repair of the second electronic device is supported, a prompt message may be issued (for example, "repair is not supported” is displayed on the display screen of the first electronic device), see (e) in FIG. 7 . Show.
  • the first electronic device can repair the second electronic device through the following S603 to S609; If one electronic device does not support repairing the second electronic device, the following S603 to S609 may not be performed. In this way, through the above S601 and S602, the user can be informed in advance whether the first electronic device supports the repair of the second electronic device, so as to avoid subsequent repair failure caused by the first electronic device not supporting the second electronic device and affecting user experience.
  • the first electronic device establishes a connection with the second electronic device.
  • the first electronic device can establish a wired connection with the second electronic device.
  • the first electronic device and the second electronic device establish a wired connection through a data cable, and one end of the data cable is connected to the first port of the first electronic device. The other end is connected to the first port of the second electronic device. Since the second electronic device is abnormally powered on, that is, the first processor of the second electronic device is abnormal, in this case, the value of the first attribute in the second electronic device is false, and the shared module is managed by the second processor. (For details, please refer to the relevant description in FIG.
  • the first processor of the first electronic device is connected to the first processor of the second electronic device through a wired connection.
  • the two processors are connected, as shown in (a) of FIG. 8 . If the first port described above is a USB Type C port, the data line can be called a CC line.
  • the first electronic device may establish a wireless connection with the second electronic device. Since the second electronic device is abnormally powered on, that is, the first processor of the second electronic device is abnormal, in this case, the value of the first attribute in the second electronic device is false, and the shared module is managed by the second processor. (For details, please refer to the relevant description in FIG. 3 above), that is, a connection may be established between the wireless communication module and the second processor, and then the second processor may establish a connection with the first electronic device through the wireless communication module; that is, a connection may be established between the wireless communication module and the second processor; , the first processor of the first electronic device is connected to the second processor of the second electronic device through a wireless connection, as shown in (b) of FIG. 8 .
  • the first electronic device receives a first operation command from the user, where the first operation command is used to trigger the first electronic device to repair the second electronic device.
  • the first electronic device may pre-install an application program for proxy repair (such as the aforementioned application A), and after the first electronic device establishes a connection with the second electronic device, the user can start the application A (for example, the user Click the icon of application A, see (a) in FIG. 7 ), and then the display screen of the first electronic device may display an interface as shown in (b) in FIG. 7 , the interface may include one or more options (such as the "Authorization Check” option). If the user triggers the "authorization check” (ie, is equivalent to triggering the first operation command), the first electronic device may receive the first operation command.
  • an application program for proxy repair such as the aforementioned application A
  • the user can start the application A (for example, the user Click the icon of application A, see (a) in FIG. 7 ), and then the display screen of the first electronic device may display an interface as shown in (b) in FIG. 7 , the interface may include one or more options (such as the "Authorization Check” option). If the user triggers the
  • Implementation mode 2 an option (such as an "authorization check” option, as shown in FIG. 9 ) may be added in advance in the setting application of the first electronic device, and then if the user starts the setting application (for example, the user clicks the icon of the setting application), Then the "authorization check” is triggered (that is, equivalent to triggering the first operation command), and the first electronic device can receive the first operation command.
  • an option such as an "authorization check” option, as shown in FIG. 9 ) may be added in advance in the setting application of the first electronic device, and then if the user starts the setting application (for example, the user clicks the icon of the setting application), Then the "authorization check” is triggered (that is, equivalent to triggering the first operation command), and the first electronic device can receive the first operation command.
  • Implementation 3 A password corresponding to the authorization check function can be preset in the first electronic device, and then when the user can open the dial of the first electronic device and enter the password (that is, equivalent to triggering the first operation command), the first electronic device The device may receive the first operation command.
  • the first electronic device in response to the first operation command, obtains an authorization file from the first server, where the authorization file is used to indicate that the first electronic device has the right to repair the second electronic device.
  • the first electronic device may display an interface as shown in (a) in FIG. 10 on the display screen, and the interface includes two options, respectively "Reliable relationship has been established", “Reliable relationship has not been established”.
  • the first electronic device (specifically, the first electronic device
  • the first processor of the first electronic device) can send the relevant information of the first electronic device to the second electronic device, and after the second processor of the second electronic device receives the relevant information of the first electronic device, it can be stored with it from the memory.
  • the relevant information of the electronic device that has established a trust relationship with the second electronic device is matched, and when the matching is successful, an instruction for authorization can be sent to the first electronic device, and the instruction for authorization can include an encrypted file.
  • the file can be decrypted by the first server, but cannot be decrypted by the first electronic device, and the encrypted file is used to instruct the second electronic device to authorize the repair through the first electronic device; furthermore, the first electronic device can display "authorized passed” on the interface , see Fig. 10 (b).
  • an instruction of unauthorized passing may be sent to the first electronic device; further, the first electronic device may display "unauthorized passing" on the interface, as shown in (c) of FIG. 10 .
  • the user can trigger the first electronic device to return to the interface shown in FIG. 9, and trigger the first electronic device to obtain the proxy repair authority by selecting that the trust relationship is not established, See the description below for details.
  • the first electronic device and the second electronic device may establish a connection (for example, the first processor of the first electronic device and the first processor of the second electronic device establish a connection wired or wireless connection).
  • the second electronic device receives the user's second operation command, and sends a request message to the first electronic device according to the second operation command, so as to request the first electronic device to establish a trust relationship with the second electronic device.
  • the request message may include relevant information of the second electronic device.
  • the first electronic device can establish a trust relationship between the first electronic device and the second electronic device, and store relevant information of the second electronic device (such as a slave memory stored in the first electronic device). ); optionally, the first electronic device may also send out prompt information for prompting the user that the trust relationship between the first electronic device and the second electronic device has been successfully established. And, the first electronic device sends a response message to the second electronic device, the response message includes relevant information of the second electronic device, and after receiving the response message, the second electronic device can establish a relationship between the first electronic device and the second electronic device.
  • relevant information of the second electronic device such as a slave memory stored in the first electronic device.
  • the first electronic device may also send out prompt information for prompting the user that the trust relationship between the first electronic device and the second electronic device has been successfully established.
  • the first electronic device sends a response message to the second electronic device, the response message includes relevant information of the second electronic device, and after receiving the response message, the second electronic device can establish a relationship between the first electronic device and the second electronic device
  • the second electronic device can also send out prompt information to prompt the user that the first electronic device has been successfully established.
  • the trust relationship between the electronic device and the second electronic device may include device information, account information, and the like of the electronic device.
  • the second electronic device may receive the second operation command.
  • an option such as the "device mutual assistance” option
  • the user starts the setting application for example, the user clicks on the icon of the setting application
  • the "device mutual assistance” ie, the "device mutual assistance”
  • the first electronic device can receive the second operation command.
  • the display screen of the first electronic device may display the display shown in FIG. 11 .
  • the interface shown in (b), the interface includes a variety of possible ways to obtain the agent repair authority, such as "obtaining the agent repair authority through the authorization code”, "obtaining the agent repair authority through the power-on password (such as digital password or fingerprint)” ”, may also include other possible manners, which are not specifically limited.
  • the first electronic device can An input box for inputting an authorization code is displayed, as shown in (c) of FIG. 11 .
  • the first electronic device receives the authorization code input by the user, it can transmit the authorization code to the second electronic device, and after receiving the authorization code, the second electronic device can compare the authorization code with the authorization code stored in the memory Yes, if they are consistent, it can be determined that the authorization is passed, and an instruction of passing the authorization can be sent to the first electronic device.
  • the instruction of passing the authorization can include an encrypted file, and the encrypted file can be decrypted by the first server, and the first electronic device If it cannot be decrypted, the encrypted file is used to instruct the second electronic device to authorize the repair through the first electronic device; furthermore, the first electronic device may display “authorized passed” on the interface, as shown in (d) in FIG. 11 ; if If not, it can be determined to pass without authorization, and send an instruction of unauthorized pass to the first electronic device; furthermore, the first electronic device can display "unauthorized pass” on the interface, as shown in (e) of FIG. 11 .
  • the first electronic device displays “pass without authorization” the user can trigger the “temporary authorization” as shown in (e) in FIG. 11 , and then the first electronic device can apply to the first server to obtain the proxy Repair permissions, see the description below for details.
  • an authorization request may be sent to the first server, where the authorization request includes device information of the second electronic device and device information of the first electronic device and encrypted file, after the first server receives the authorization request, by decrypting the encrypted file, it can know that the second electronic device is authorized to repair through the first electronic device, and then the device information of the second electronic device and the device information of the first electronic device can be obtained.
  • the information is verified (for example, the verification method can be public key infrastructure (PKI) verification), and the legality of the proxy authorization request is verified.
  • the authorization can be issued to the first electronic device. document.
  • the authorization file may include device information of the first electronic device and device information of the second electronic device, and the authorization file is used for the first electronic device to perform proxy repair on the second electronic device.
  • the first electronic device can apply to the server for obtaining the proxy repair authority.
  • the first electronic device may send an authorization request to the first server, where the authorization request includes device information of the second electronic device and device information of the first electronic device; further, the authorization request may also include the device information of the first electronic device.
  • Other possible information such as account information of the first electronic device, product information of the first electronic device, state information of the first electronic device.
  • the product information of the first electronic device may include brand information, series information, etc. of the first electronic device, and the state information of the first electronic device is used to indicate the current state of the first electronic device, such as a user state or a super authority state.
  • the first server may, according to the authorization request, evaluate whether to allow the first electronic device to obtain the proxy repair authority, and if so, may send the authorization file to the first electronic device;
  • the state of the electronic device is the super-authorized state), an unauthorized passing instruction can be sent to the first electronic device.
  • the first electronic device performs physical examination on the second electronic device, and then determines the physical examination information of the second electronic device, and the physical examination information of the second electronic device is used to indicate whether the second electronic device can enter the recovery mode;
  • the situation corresponding to the abnormal startup of the electronic device such as the situation 1, situation 2 or situation 3 described above).
  • the first electronic device can perform physical examination on the second electronic device in various ways.
  • the first electronic device can use the connection between the first electronic device and the second electronic device (as shown in FIG.
  • the second processor in the second electronic device sends a medical examination command to obtain the medical examination information of the second electronic device; correspondingly, after receiving the medical examination command, the second processor of the second electronic device can return to the first electronic device
  • the physical examination result where the physical examination result includes physical examination information of the second electronic device.
  • one or more attributes may be preset in the second electronic device.
  • the value of the second attribute may be true, and when the first processor of the second electronic device cannot successfully load the corresponding partition to enter the fast boot mode , the value of the second attribute can be false.
  • the value of the third attribute may be true, and when the first processor of the second electronic device cannot successfully load the corresponding partition to enter the recovery mode, the first processor The value of the three attributes can be false.
  • the second processor can obtain the medical examination information of the second electronic device by querying the values of the corresponding attributes (eg, the second attribute and the third attribute).
  • the second processor may send a physical examination command to the first processor (for example, the second processor may preferentially pass the first The second port sends a physical examination command to the first processor, and if the first processor does not respond, the second processor can send a physical examination command to the first processor through the third port), and then the physical examination information of the second electronic device can be obtained.
  • the second processor may send a physical examination command to the first processor (for example, the second processor may preferentially pass the first
  • the second port sends a physical examination command to the first processor, and if the first processor does not respond, the second processor can send a physical examination command to the first processor through the third port), and then the physical examination information of the second electronic device can be obtained.
  • the first electronic device obtains from the second server information about an upgrade package for repairing the second electronic device.
  • the first electronic device may acquire version information of the second electronic device.
  • the version information of the second electronic device may include a system version model of the second electronic device, such as a model of the second electronic device and a version number of an operating system in the second electronic device.
  • the first electronic device may acquire the version information of the second electronic device in various ways. For example, referring to the above, the version information of the second electronic device may be stored in the second memory.
  • the first electronic device can send a query command to the second processor of the second electronic device, where the query command is used to query the version information of the second electronic device; correspondingly, the second processor of the second electronic device receives the query command Afterwards, the version information of the second electronic device can be obtained by accessing the second memory, and then sent to the first electronic device.
  • the first electronic device can send a packet search request to the second server, and the packet search request includes the authorization file and the version information of the second electronic device; after receiving the packet search request, the second server can determine the first packet according to the authorization file.
  • the electronic device is in the proxy mode, and according to the version information of the second electronic device, the information of the upgrade package matching the version of the second electronic device is determined.
  • the second server sends a packet search response to the first electronic device, where the packet search response includes information of the matching upgrade package, and may also include authentication file and file list information (eg filelist.xml).
  • the information of the upgrade package may include the download address of the upgrade package, and optionally, may also include other possible information, such as the identifier of the upgrade package, which is not specifically limited;
  • the authentication file includes description information of the upgrade package (such as Ha value), which is used to authenticate the upgrade package to ensure the validity of the downloaded upgrade package;
  • the file list information includes the hash value of each file included in the upgrade package, which is used to ensure the integrity of the upgrade package.
  • the first electronic device downloads the upgrade package from the third server according to the information of the upgrade package.
  • the first electronic device may send a download request to the third server, and the download request includes the information of the upgrade package obtained in S607; correspondingly, after receiving the download request, the third server searches for the corresponding upgrade package according to the information of the upgrade package package, and send a download response to the first electronic device, where the download response includes the upgrade package.
  • the first electronic device may determine whether the files included in the upgrade package are complete according to the file list information. After the first electronic device determines that the files included in the upgrade package are complete, as a possible implementation, the first electronic device can perform the second processing on the second electronic device through the connection between the first electronic device and the second electronic device.
  • the server sends the upgrade package and authentication file.
  • the second processor of the second electronic device can access the first memory of the second electronic device, and if it is determined that the reserved partition in the first memory can store the upgrade package and the authentication file file (for example, the remaining space of the reserved partition is enough 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 (ie After the data partition), in order to ensure the effective storage of the upgrade package and authentication files in the case of damage to the data partition. Further, after the storage is successful, the second processor of the second electronic device may send a response that the storage is successful to the first electronic device.
  • the reserved partition in the first memory can store the upgrade package and the authentication file file (for example, the remaining space of the reserved partition is enough 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 (ie After the data partition), in order to ensure the effective storage of the upgrade package and
  • the second processor of the second electronic device determines that the reserved partition cannot store the upgrade package and the authentication file (for example, the remaining space of the reserved partition is insufficient to store the upgrade package and the authentication file), it can send the update package and the authentication file to the first electronic device.
  • the failed response is stored, and after receiving the response, the first electronic device can store the upgrade package and the authentication file in its own data partition.
  • the first electronic device may also directly store the upgrade package and the authentication file in its own memory.
  • the first electronic device may send an upgrade package to the second processor of the second electronic device through the connection between the first electronic device and the second electronic device, and then the second electronic device of the second electronic device sends an upgrade package to the second processor of the second electronic device.
  • the processor may store the upgrade package in a reserved partition of the first memory of the second electronic device, and the first electronic device may store the authentication file in its own memory.
  • the first electronic device may send the authentication file to the second processor of the second electronic device through the connection between the first electronic device and the second electronic device, and then the second processor of the second electronic device may authenticate the authentication file.
  • the rights file is stored in a reserved partition of the first memory of the second electronic device, and the first electronic device can store the upgrade package in its own memory. In this way, since the upgrade package and the authentication file can be stored in different devices, the upgrade package and the authentication file can be prevented from being replaced at the same time, and the security of the upgrade package and the authentication file can be effectively guaranteed.
  • the first electronic device controls the second electronic device to perform repair according to the upgrade package.
  • the first electronic device controls the second electronic device to repair according to the upgrade package. accomplish.
  • the second electronic device can enter the recovery mode (that is, the situation corresponding to the second electronic device is the above-mentioned situation 3)
  • the first electronic device determines that the second electronic device can enter the recovery mode, it can send a start-up upgrade command to the second electronic device.
  • the second processor of the second electronic device The third port) transmits the start-up upgrade command to the first processor of the second electronic device.
  • the first processor of the second electronic device receives the start-up upgrade command, it can enter the recovery mode, and search the data partition of the first electronic device and the data partition of the second electronic device whether there is an upgrade package, and if so, then It can be fixed according to the upgrade package.
  • the first processor of the second electronic device can read the upgrade package and the authentication file from the second electronic device.
  • the first processor of the second electronic device can read the upgrade package and the authentication file from the first electronic device; in this case, the first electronic device The data partition is equivalent to the external storage area of the second electronic device.
  • the process of repairing the first processor of the second electronic device according to the upgrade package may refer to FIG. 12 , as shown in FIG. 12 .
  • the process can include:
  • the first processor of the second electronic device authenticates the upgrade package according to the authentication file, and if the authentication is passed, S1202 may be executed, and if the authentication fails, it is determined that the upgrade fails.
  • the first processor verifies the signature of the upgrade package, and if the verification passes, S1203 may be executed, and if the verification fails, it may be determined that the upgrade fails.
  • the first processor performs a version check on the upgrade package, such as checking whether the upgrade package is an upgrade package corresponding to the current version of the first electronic device, if the check passes, S1204 may be executed, and if the check fails, it may be determined upgrade unsuccessful.
  • the first processor starts a binary upgrade.
  • the first processor parses the data of the upgrade package.
  • the first processor writes the partition images in sequence.
  • the first processor updates the version information of the first electronic device, that is, the version of the operating system is updated from V1 to V2, and the upgrade is completed.
  • FIG. 12 describes a possible upgrade process, and the specific implementation of the relevant steps in FIG. 12 may refer to the prior art.
  • the second electronic device cannot enter the recovery mode (that is, the situation corresponding to the second electronic device is the above-mentioned situation 1 or situation 2)
  • the process of performing proxy repair on the second electronic device by the first electronic device may refer to FIG. 13 . As shown in Figure 13, the process may include:
  • the first electronic device enters a proxy recovery mode, and parses the upgrade package to obtain a minimum system image file.
  • the first electronic device sends the minimum system image file to the second processor of the second electronic device through the connection between the first electronic device and the second electronic device (as shown in FIG. 8 ).
  • 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.
  • the first electronic device sends a forced startup command to the second processor of the second electronic device.
  • the second processor of the second electronic device after receiving the forced startup command, transmits the forced startup command to the first processor of the second electronic device through the third port.
  • the above S1304 is an optional step, that is to say, the first electronic device may not send a forced start command to the second processor of the second electronic device.
  • the processor can actively send a forced startup command to the first processor of the second processor through the third port.
  • the first processor of the second electronic device may run the minimum system image file to enter the recovery mode.
  • the authentication file obtained in the above S607 may also include description information of the minimum system image file. Therefore, before running the minimum system image file, the first processor may The description information is used to authenticate the minimum system image file. If the authentication is passed, the minimum system image file can be run to enter the recovery mode.
  • the first processor of the second electronic device performs repair according to the upgrade package and the authentication file in the first electronic device and/or the second electronic device.
  • step numbers of the above flow charts are only an example of the execution flow, and do not constitute a restriction on the sequence of execution of the steps, and there is no timing dependency between each other in the embodiments of the present application There is no strict order of execution between the steps.
  • not all the steps shown in each flowchart are steps that must be executed, and some steps may be added or deleted on the basis of each flowchart according to actual needs.
  • the above S606 may be executed before S607 and S608, or may be executed after S607 and S608, or may be executed simultaneously with S607 and S608.
  • the electronic device that is powered on normally can be used to perform proxy repair on the electronic device that is powered on abnormally.
  • the electronic device that is powered on normally Proxy repair is performed on the electronic device that is abnormally turned on, so that the electronic device that is abnormally turned on can be effectively repaired, and the user experience can be improved.
  • the present application further provides an electronic device, the electronic device is used to implement the method for repairing a startup abnormality as shown in FIG. 6 .
  • the electronic device 1400 includes: a processor 1401 , a memory 1402 , and a communication interface 1403 .
  • the electronic device illustrated in FIG. 14 may be the first electronic device in FIG. 6 .
  • the processor 1401 may include the first processor shown in FIG. 1 or FIG. 3 , and optionally, further include the second processor shown in FIG. 3 ; it should be noted that because the first electronic The device is an electronic device that is normally powered on. Therefore, when the first electronic device includes the first processor and the second processor, the first processor is in a normal operation state, and the second processor may be in a standby state.
  • the memory 1402 may include the first memory shown in FIG. 1 or FIG. 3 , and optionally, further include the second memory shown in FIG. 3 .
  • the communication interface 1403 may include the first port and/or the wireless communication module shown in FIG. 1 or FIG. 3 , and optionally, may further include the second port and/or the third port shown in FIG. 3 . It can be understood that the electronic device may also have various peripheral or internal hardware shown in FIG. 2 .
  • the memory 1402 may be used to store computer programs, and may also store information such as user data, an upgrade package for repairing the second electronic device, and the like.
  • a computer program may include program code including instructions for computer operation.
  • the processor 1401 (for example, may be referred to as the first processor) executes the program stored in the memory 1402, and implements the above functions through the above components, thereby finally implementing the method executed by the first electronic device in the above embodiment.
  • the processor 1401 implements the following steps in combination with the communication interface 1403: establishing a connection with a second electronic device, the second electronic device is abnormally powered on; obtaining the second electronic device Version information of the electronic device; obtaining an upgrade package for repairing the second electronic device according to the version information of the second electronic device; controlling the second electronic device to perform repair according to the upgrade package.
  • the processor 1401 is further configured to: receive a user's first operation command through the communication interface 1403, where the first operation command is used to trigger the first electronic device to The second electronic device is repaired; in response to the first operation command, an authorization file is obtained from the first server through the communication interface 1403, and the authorization file is used to indicate that the first electronic device has access to the second electronic device. Permission to make repairs.
  • the processor 1401 is specifically configured to: acquire device information of the second electronic device; send an authorization request to the first server through the communication interface 1403, where the authorization request includes all device information of the first electronic device and device information of the second electronic device; and, through the communication interface 1403, receiving an authorization response from the first server, where the authorization response includes the authorization file.
  • the authorization request further includes at least one of the following: account information of the first electronic device; product information of the first electronic device; state information of the first electronic device.
  • the processor 1401 is specifically configured to: send a packet search request to the second server through the communication interface 1403, where the packet search request includes the authorization file and the data of the second electronic device version information; and receive a packet search response from the second server through the communication interface 1403, the packet search response includes the information of the upgrade package; download the upgrade package from the third server according to the information of the upgrade package upgrade package.
  • the processor 1401 is specifically configured to: determine physical examination information of the second electronic device, where the physical examination information of the second electronic device is used to indicate whether the second electronic device can enter recovery mode; according to the medical examination information of the second electronic device, control the second electronic device to repair according to the upgrade package.
  • the processor 1401 when the medical examination information of the second electronic device is used to indicate that the second electronic device can enter the recovery mode, the processor 1401 is specifically configured to: send the communication interface 1403 to the The second electronic device sends a start-up upgrade command, so that the second electronic device parses the upgrade package according to the start-up upgrade command, and performs repairs according to the parsed upgrade package data.
  • the processor 1401 when the medical examination information of the second electronic device is used to indicate that the second electronic device cannot enter the recovery mode, the processor 1401 is specifically configured to: parse the upgrade package to obtain the minimum system image file; send the minimum system image file and a forced startup 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.
  • the processor 1401 is further configured to: receive input information from the user through the communication interface 1403, where the input information includes attribute information of the second electronic device; The attribute information is compared with the attribute information of the pre-stored electronic device supporting repair, and if the pre-stored attribute information of the electronic device supporting repair includes the attribute information of the second electronic device, prompt information is sent, and the prompt information is used to prompt The user supports the repair of the second electronic device on the first electronic device.
  • the electronic device illustrated in FIG. 14 may be the second electronic device in FIG. 6 .
  • the processor 1401 may include the first processor shown in FIG. 1 or FIG. 3 , and also include the second processor shown in FIG. 3 ; it should be noted that because the second electronic device is abnormally powered on Therefore, the first processor in the second electronic device is in an abnormal operation state, and the second processor can take over part of the functions of the first processor.
  • the memory 1402 may include the first memory illustrated in FIG. 1 or FIG. 3 , and further include the second memory illustrated in FIG. 3 .
  • the communication interface 1403 may include a first communication interface and a second communication interface, wherein the first communication interface may be used for communication between the second electronic device and other devices, for example, the first communication interface may include the one shown in FIG. 1 or FIG. 3 .
  • the illustrated first port and/or wireless communication module, etc.; the second communication interface may be used for communication between the first processor and the second processor, for example, the second communication interface may include the second port illustrated in FIG. 3 and/or third port.
  • the electronic device may also have various peripheral or internal hardware shown in FIG. 2 .
  • the memory 1402 can be used to store computer programs, and can also store information such as user data and upgrade packages.
  • a computer program may include program code including instructions for computer operation.
  • the processor 1401 (for example, it may refer to the first processor and the second processor) executes the program stored in the memory 1402, and implements the above functions through the above components, so as to finally realize the above embodiment by the second electronic device. The method performed by the device.
  • the processor 1401 when the instructions are executed by the processor 1401, the processor 1401 is made to implement the following steps in combination with the communication interface 1403: establishing a connection with the first electronic device, the first electronic device An electronic device with an electronic device powered on normally; sending the version information of the second electronic device to the first electronic device, so that the first electronic device can obtain the version information for repairing according to the version information of the second electronic device An upgrade package of the second electronic device; under the control of the first electronic device, repairing is performed according to the upgrade package.
  • the second processor is specifically configured to: receive a start-up upgrade command from the first electronic device through the first communication interface, and send a command to the first electronic device through the second communication interface
  • a processor sends the start-up upgrade command
  • the first processor is specifically configured to: parse the upgrade package according to the start-up upgrade command, and perform repairs according to the parsed upgrade package data.
  • the second processor is specifically configured to: receive a minimum system image file from the first electronic device through the first communication interface, where the minimum system image file is the first obtained by the electronic device parsing the upgrade package; sending a forced startup command to the first processor through the second communication interface; the first processor is specifically configured to: run the minimum startup command according to the forced startup command The system image file is repaired.
  • the embodiments of the present application further provide a repair system, including the first electronic device and the second electronic device in the above embodiments.
  • a repair system including the first electronic device and the second electronic device in the above embodiments.
  • the first server, the second server and the third server in the above embodiment may also be included.
  • the embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on the computer, the computer is made to execute the repair method provided by the above embodiment. .
  • the storage medium may be any available medium that the computer can access.
  • computer readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or be capable of carrying or storing instructions or data structures in the form of desired program code and any other medium that can be accessed by a computer.
  • the embodiments of the present application further provide a program product, the program product includes instructions, when the instructions are run on a computer, the computer is made to execute the repair method provided by the above embodiments.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part 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 may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
  • magnetic media eg, floppy disks, hard disks, magnetic tapes
  • optical media eg, DVDs
  • semiconductor media eg, solid state disks (SSDs)

Abstract

Provided are a method and apparatus for repairing an abnormal power-on. The method can be applied to a first electronic device, the first electronic device being an electronic device that powers on normally; in said method, the first electronic device may establish a connection with a second electronic device, the second electronic device being an electronic device that powers on abnormally; the first electronic device can obtain version information of the second electronic device, and, according to the version information of the second electronic device, obtain an upgrade package used for repairing the second electronic device; further, the first electronic device controlling the second electronic device to perform a repair according to the upgrade package. Using such an approach, it is possible to perform proxy repair of an abnormally powered-on electronic device by means of a normally powered-on electronic device; for example, if an abnormally powered-on electronic device cannot enter quick startup mode or recovery mode, a normally powered-on electronic device can perform proxy repair of an abnormally powered-on electronic device, thus enabling effective repair of an abnormally powered-on electronic device, improving user experience.

Description

一种开机异常的修复方法及装置A method and device for repairing abnormal startup
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求在2020年12月23日提交中国专利局、申请号为202011535219.3、申请名称为“一种开机异常的修复方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 23, 2020 with the application number 202011535219.3 and the application title "A method and device for repairing abnormal startup", the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种开机异常的修复方法及装置。The present application relates to the technical field of terminals, and in particular, to a method and device for repairing abnormal startup.
背景技术Background technique
随着社会的快速发展,移动终端例如手机越来越普及。手机不但具有通信功能、还具有强大的处理能力、存储能力、照相功能等。因此,手机不仅可以作为一种通信工具,更是用户的移动的文件库,它存储着用户的各种个人信息、照片、视频等,还可以绑定用户的社交账号、网银、移动支付账号等信息。With the rapid development of society, mobile terminals such as cell phones are becoming more and more popular. Mobile phones not only have communication functions, but also have powerful processing capabilities, storage capabilities, and camera functions. Therefore, the mobile phone can not only be used as a communication tool, but also the user's mobile file library. It stores various personal information, photos, videos, etc. of the user, and can also bind the user's social account, online banking, mobile payment account, etc. information.
因此,如果手机发生故障无法正常开机,将会给用户带来巨大的损失(比如用户数据丢失),进而将会引发舆情、投诉等,从而给手机厂商造成多维度损失。Therefore, if the mobile phone fails and cannot be turned on normally, it will bring huge losses to users (such as loss of user data), which will lead to public opinion, complaints, etc., thus causing multi-dimensional losses to mobile phone manufacturers.
发明内容SUMMARY OF THE INVENTION
本申请实施例的目的在于提供了一种开机异常的修复方法及装置,用于对开机异常的电子设备进行有效修复,提高用户体验。The purpose of the embodiments of the present application is to provide a method and device for repairing abnormal startup, which are used to effectively repair an electronic device with abnormal startup and improve user experience.
第一方面,本申请实施例提供一种开机异常的修复方法,该方法可以适用于第一电子设备,第一电子设备为开机正常的电子设备,该方法包括:与第二电子设备建立连接,所述第二电子设备为开机异常的电子设备;获取所述第二电子设备的版本信息;根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;控制所述第二电子设备根据所述升级包进行修复。In a first aspect, an embodiment of the present application provides a method for repairing an abnormal startup. The method can be applied to a first electronic device, where the first electronic device is an electronic device that is properly turned on. The method includes: establishing a connection with the second electronic device, The second electronic device is an electronic device with abnormal startup; obtain the version information of the second electronic device; obtain an upgrade package for repairing the second electronic device according to the version information of the second electronic device; control The second electronic device is repaired according to the upgrade package.
采用上述方法,可以通过开机正常的电子设备对开机异常的电子设备进行代理修复,比如在开机异常的电子设备无法进入快速启动模式或恢复模式时,开机正常的电子设备可以对开机异常的电子设备进行代理修复,从而能够对开机异常的电子设备进行有效修复,提高用户体验。By using the above method, the electronic device that is turned on abnormally can be repaired by proxy through the electronic device that is turned on normally. Perform proxy repair, so as to effectively repair electronic devices that are abnormally powered on, and improve user experience.
在一种可能的设计中,获取所述第二电子设备的版本信息之前,还包括:接收用户的第一操作命令,所述第一操作命令用于触发所述第一电子设备对所述第二电子设备进行修复;响应于所述第一操作命令,从第一服务器获取授权文件,所述授权文件用于指示所述第一电子设备具有对所述第二电子设备进行修复的权限。In a possible design, before acquiring the version information of the second electronic device, the method further includes: receiving a first operation command from a user, where the first operation command is used to trigger the first electronic device to perform an operation on the second electronic device. The second electronic device performs repair; in response to the first operation command, an authorization file is obtained from the first server, where the authorization file is used to indicate that the first electronic device has the right to repair the second electronic device.
采用上述方法,第一电子设备在对第二电子设备进行代理修复之前,需要先获取授权文件,从而保证修复过程的安全性。With the above method, the first electronic device needs to obtain an authorization file before performing proxy repair on the second electronic device, so as to ensure the security of the repair process.
在一种可能的设计中,从所述第一服务器获取授权文件,包括:获取所述第二电子设备的设备信息;向所述第一服务器发送授权请求,所述授权请求包括所述第一电子设备的 设备信息、所述第二电子设备的设备信息;接收来自所述第一服务器的授权响应,所述授权响应包括所述授权文件。In a possible design, acquiring an authorization file from the first server includes: acquiring device information of the second electronic device; and sending an authorization request to the first server, where the authorization request includes the first electronic device. Device information of the electronic device, device information of the second electronic device; and receiving an authorization response from the first server, where the authorization response includes the authorization file.
在一种可能的设计中,所述授权请求还包括以下至少一项:所述第一电子设备的账户信息;所述第一电子设备的产品信息;所述第一电子设备的状态信息。In a possible design, the authorization request further includes at least one of the following: account information of the first electronic device; product information of the first electronic device; state information of the first electronic device.
采用上述方法,第一电子设备需要将第一电子设备的多种可能的信息发送给第一服务器,以便于第一服务器从多个维度评估是否允许第一电子设备对第二电子设备进行修复,从而避免一些不合法的电子设备的修复行为。With the above method, the first electronic device needs to send a variety of possible information of the first electronic device 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, So as to avoid some illegal repair behavior of electronic equipment.
在一种可能的设计中,根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包,包括:向第二服务器发送搜包请求,所述搜包请求包括所述授权文件和所述第二电子设备的版本信息;接收来自所述第二服务器的搜包响应,所述搜包响应包括所述升级包的信息;根据所述升级包的信息,从第三服务器下载所述升级包。In a possible design, acquiring an upgrade package for repairing the second electronic device according to the version information of the second electronic device includes: sending a package search request to the second server, where the package search request includes The authorization file and the version information of the second electronic device; receiving a package search response from the second server, the package search response including the information of the upgrade package; according to the information of the upgrade package, from the first The third server downloads the upgrade package.
在一种可能的设计中,控制所述第二电子设备根据所述升级包进行修复,包括:确定所述第二电子设备的体检信息,所述第二电子设备的体检信息用于指示所述第二电子设备是否能够进入恢复模式;根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复。In a possible design, controlling the second electronic device to perform repair according to the upgrade package includes: determining medical examination information of the second electronic device, where the medical examination information of the second electronic device is used to indicate the Whether the second electronic device can enter the recovery mode; according to the medical examination information of the second electronic device, control the second electronic device to repair according to the upgrade package.
在一种可能的设计中,当所述第二电子设备的体检信息用于指示所述第二电子设备能够进入恢复模式时,根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复,包括:向所述第二电子设备发送启动升级命令,以使所述第二电子设备根据所述启动升级命令解析所述升级包,并根据解析后的升级包数据进行修复。In a possible design, when the medical examination information of the second electronic device is used to indicate that the second electronic device can enter the recovery mode, control the second electronic device according to the medical examination information of the second electronic device Repairing by the device according to the upgrade package includes: 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 analyzes the upgrade package according to the parsed upgrade package. data is repaired.
在一种可能的设计中,当所述第二电子设备的体检信息用于指示所述第二电子设备不能进入恢复模式时,根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复,包括:解析所述升级包得到最小系统镜像文件;向所述第二电子设备发送所述最小系统镜像文件和强制启动命令,以使所述第二电子设备运行所述最小系统镜像文件进行修复。In a possible design, when the medical examination information of the second electronic device is used to indicate that the second electronic device cannot enter the recovery mode, control the second electronic device according to the medical examination information of the second electronic device Repairing by the device according to the upgrade package includes: parsing the upgrade package to obtain a minimum system image file; sending the minimum system image file and a forced startup command to the second electronic device to make the second electronic device run The minimal system image file is repaired.
采用上述方法,第一电子设备可以根据第二电子设备的体检信息,针对不同情形,采用不同的修复方式,从而能够更加有效地修复第二电子设备。With the above method, the first electronic device can adopt different repairing methods for different situations according to the medical examination information of the second electronic device, so that the second electronic device can be repaired more effectively.
在一种可能的设计中,所述方法还包括:接收用户的输入信息,所述输入信息包括第二电子设备的属性信息;将所述第二电子设备的属性信息与预先存储支持修复的电子设备的属性信息进行比较,若预先存储支持修复的电子设备的属性信息包括所述第二电子设备的属性信息,则发出提示信息,所述提示信息用于提示用户所述第一电子设备支持修复所述第二电子设备。In a possible design, the method further includes: receiving input information from the user, the input information including attribute information of the second electronic device; and comparing the attribute information of the second electronic device with the pre-stored electronic device that supports repairing The attribute information of the device is compared, and if the attribute information of the pre-stored electronic device that supports repair includes the attribute information of the second electronic device, a prompt message is sent, and the prompt information is used to prompt the user that the first electronic device supports the repair. the second electronic device.
采用上述方法,可以让用户提前获知第一电子设备是否支持修复第二电子设备,从而避免第一电子设备不支持第二电子设备导致后续修复失败而影响用户体验。With the above method, the user can be informed in advance whether the first electronic device supports the repair of the second electronic device, so as to avoid subsequent repair failure caused by the first electronic device not supporting the second electronic device and affecting user experience.
第二方面,本申请实施例提供一种开机异常的修复方法,该方法可以适用于第二电子设备,第二电子设备为开机异常的电子设备,该方法包括:与第一电子设备建立连接,所述第一电子设备开机正常的电子设备;向所述第一电子设备发送所述第二电子设备的版本信息,以使所述第一电子设备根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;在所述第一电子设备的控制下,根据所述升级包进行修复。In a second aspect, an embodiment of the present application provides a method for repairing an abnormal startup. The method can be applied to a second electronic device. The second electronic device is an electronic device with an abnormal startup. The method includes: establishing a connection with the first electronic device, An electronic device that the first electronic device is powered on normally; sending the version information of the second electronic device to the first electronic device, so that the first electronic device obtains the version information of the second electronic device according to the version information of the second electronic device An upgrade package for repairing the second electronic device; under the control of the first electronic device, repairing is performed according to the upgrade package.
在一种可能的设计中,在所述第一电子设备的控制下,根据所述升级包进行修复,包括:接收来自所述第一电子设备的启动升级命令;根据所述启动升级命令后,解析所述升 级包,并根据解析后的升级包数据进行修复。In a possible design, under the control of the first electronic device, repairing according to the upgrade package includes: receiving a start-up upgrade command from the first electronic device; after the start-up upgrade command, The upgrade package is parsed and repaired according to the parsed upgrade package data.
在一种可能的设计中,在所述第一电子设备的控制下,根据所述升级包进行修复,包括:接收来自所述第一电子设备的最小系统镜像文件,所述最小系统镜像文件是所述第一电子设备解析所述升级包得到的;运行所述最小系统镜像文件进行修复。In a possible design, under the control of the first electronic device, repairing according to the upgrade package includes: receiving a minimum system image file from the first electronic device, where the minimum system image file is Obtained by the first electronic device parsing the upgrade package; and running the minimum system image file to repair.
需要说明的是,上述第二方面所提供的修复方法与第一方面相对应,因此第二方面的相关技术特征的有益效果可以参照第一方面的描述,具体不再赘述。It should be noted that the repair method provided by the second aspect above corresponds to the first aspect, so the beneficial effects of the related technical features of the second aspect can be referred to the description of the first aspect, and details are not repeated here.
第三方面,本申请实施例提供一种电子设备,所述电子设备为开机正常的电子设备,所述电子设备包括:处理器、存储器、通信接口;其中,所述存储器存储有计算机程序,所述计算机程序包括指令,当所述指令被所述处理器执行时,使得所述处理器结合所述通信接口实现如下步骤:与第二电子设备建立连接,所述第二电子设备开机异常的电子设备;获取所述第二电子设备的版本信息;根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;控制所述第二电子设备根据所述升级包进行修复。In a third aspect, an embodiment of the present application provides an electronic device, the electronic device is an electronic device that is powered on normally, and the electronic device includes: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, and the The computer program includes instructions, which, when executed by the processor, cause the processor to implement the following steps in combination with the communication interface: establishing a connection with a second electronic device, and the electronic device that the second electronic device turns on abnormally. device; obtain the version information of the second electronic device; obtain an upgrade package for repairing the second electronic device according to the version information of the second electronic device; control the second electronic device according to the upgrade package make a repair.
在一种可能的设计中,所述处理器还用于:通过所述通信接口接收用户的第一操作命令,所述第一操作命令用于触发所述第一电子设备对所述第二电子设备进行修复;响应于所述第一操作命令,通过所述通信接口从第一服务器获取授权文件,所述授权文件用于指示所述第一电子设备具有对所述第二电子设备进行修复的权限。In a possible design, the processor is further configured to: receive a user's first operation command through the communication interface, where the first operation command is used to trigger the first electronic device to perform an operation on the second electronic device. repairing the device; in response to the first operation command, obtain an authorization file from the first server through the communication interface, where the authorization file is used to indicate that the first electronic device has the ability to repair the second electronic device permissions.
在一种可能的设计中,所述处理器具体用于:获取所述第二电子设备的设备信息;通过所述通信接口向所述第一服务器发送授权请求,所述授权请求包括所述第一电子设备的设备信息、所述第二电子设备的设备信息;以及,通过所述通信接口接收来自所述第一服务器的授权响应,所述授权响应包括所述授权文件。In a possible design, the processor is specifically configured to: acquire device information of the second electronic device; send an authorization request to the first server through the communication interface, where the authorization request includes the first server Device information of an electronic device, device information of the second electronic device; and receiving an authorization response from the first server through the communication interface, the authorization response including the authorization file.
在一种可能的设计中,所述授权请求还包括以下至少一项:所述第一电子设备的账户信息;所述第一电子设备的产品信息;所述第一电子设备的状态信息。In a possible design, the authorization request further includes at least one of the following: account information of the first electronic device; product information of the first electronic device; state information of the first electronic device.
在一种可能的设计中,所述处理器具体用于:通过所述通信接口向第二服务器发送搜包请求,所述搜包请求包括所述授权文件和所述第二电子设备的版本信息;以及通过所述通信接口接收来自所述第二服务器的搜包响应,所述搜包响应包括所述升级包的信息;根据所述升级包的信息,从第三服务器下载所述升级包。In a possible design, the processor is specifically configured to: send a packet search request to the second server through the communication interface, where the packet search request includes the authorization file and version information of the second electronic device ; and receive a packet search response from the second server through the communication interface, the packet search response including the information of the upgrade package; download the upgrade package from the third server according to the information of the upgrade package.
在一种可能的设计中,所述处理器具体用于:确定所述第二电子设备的体检信息,所述第二电子设备的体检信息用于指示所述第二电子设备是否能够进入恢复模式;根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复。In a possible design, the processor is specifically configured to: determine physical examination information of the second electronic device, where the physical examination information of the second electronic device is used to indicate whether the second electronic device can enter the recovery mode ; According to the medical examination information of the second electronic device, control the second electronic device to repair according to the upgrade package.
在一种可能的设计中,当所述第二电子设备的体检信息用于指示所述第二电子设备能够进入恢复模式时,所述处理器具体用于:通过所述通信接口向所述第二电子设备发送启动升级命令,以使所述第二电子设备根据所述启动升级命令解析所述升级包,并根据解析后的升级包数据进行修复。In a possible design, when the medical examination information of the second electronic device is used to indicate that the second electronic device can enter the recovery mode, the processor is specifically configured to: send the information to the first electronic device through the communication interface. The second electronic device sends a start-up upgrade command, so that the second electronic device parses the upgrade package according to the start-up upgrade command, and performs repair according to the parsed upgrade package data.
在一种可能的设计中,当所述第二电子设备的体检信息用于指示所述第二电子设备不能进入恢复模式时,所述处理器具体用于:解析所述升级包得到最小系统镜像文件;通过所述通信接口向所述第二电子设备发送所述最小系统镜像文件和强制启动命令,以使所述第二电子设备运行所述最小系统镜像文件进行修复。In a possible design, when the medical examination information of the second electronic device is used to indicate that the second electronic device cannot enter the recovery mode, the processor is specifically configured to: parse the upgrade package to obtain a minimum system image file; sending the minimum system image file and a forced startup command to the second electronic device through the communication interface, so that the second electronic device runs the minimum system image file for repair.
在一种可能的设计中,所述处理器还用于:通过所述通信接口接收用户的输入信息,所述输入信息包括第二电子设备的属性信息;将所述第二电子设备的属性信息与预先存储支持修复的电子设备的属性信息进行比较,若预先存储支持修复的电子设备的属性信息包 括所述第二电子设备的属性信息,则发出提示信息,所述提示信息用于提示用户所述第一电子设备支持修复所述第二电子设备。In a possible design, the processor is further configured to: receive input information from a user through the communication interface, where the input information includes attribute information of the second electronic device; Compare with the pre-stored attribute information of the electronic device supporting repair, if the pre-stored attribute information of the electronic device supporting repair includes the attribute information of the second electronic device, send out prompt information, the prompt information is used to prompt the user The first electronic device supports repair of the second electronic device.
第四方面,本申请实施例提供一种电子设备,所述电子设备为开机异常的电子设备,所述电子设备包括:处理器、存储器、通信接口;其中,所述存储器存储有计算机程序,所述计算机程序包括指令,当所述指令被所述处理器执行时,使得所述处理器结合所述通信接口实现如下步骤:与第一电子设备建立连接,所述第一电子设备开机正常的电子设备;向所述第一电子设备发送所述第二电子设备的版本信息,以使所述第一电子设备根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;在所述第一电子设备的控制下,根据所述升级包进行修复。In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device is an electronic device with abnormal startup, and the electronic device includes: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, and the The computer program includes instructions, which, when executed by the processor, cause the processor to implement the following steps in combination with the communication interface: establishing a connection with a first electronic device, and the first electronic device is powered on normally. device; sending the version information of the second electronic device to the first electronic device, so that the first electronic device obtains the information for repairing the second electronic device according to the version information of the second electronic device An upgrade package; under the control of the first electronic device, repairing is performed according to the upgrade package.
在一种可能的设计中,所述处理器包括第一处理器和第二处理器,所述通信接口包括第一通信接口和第二通信接口;所述第二处理器具体用于:通过所述第一通信接口接收来自所述第一电子设备的启动升级命令,并通过所述第二通信接口向所述第一处理器发送所述启动升级命令;所述第一处理器具体用于:根据所述启动升级命令,解析所述升级包,并根据解析后的升级包数据进行修复。In a 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 configured to: The first communication interface receives a start-up upgrade command from the first electronic device, and sends the start-up upgrade command to the first processor through the second communication interface; the first processor is specifically configured to: The upgrade package is parsed according to the start-up upgrade command, and repaired according to the parsed upgrade package data.
在一种可能的设计中,所述处理器包括第一处理器和第二处理器,所述通信接口包括第一通信接口和第二通信接口;所述第二处理器具体用于:通过所述第一通信接口接收来自所述第一电子设备的最小系统镜像文件,所述最小系统镜像文件是所述第一电子设备解析所述升级包得到的;通过所述第二通信接口向所述第一处理器发送强制启动命令;所述第一处理器具体用于:根据所述强制启动命令,运行所述最小系统镜像文件进行修复。In a 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 configured to: The first communication interface receives a minimum system image file from the first electronic device, and the minimum system image file is obtained by the first electronic device by parsing the upgrade package; The first processor sends a forced startup command; the first processor is specifically configured to: run the minimum system image file for repairing according to the forced startup command.
第五方面,本申请实施例还提供一种电子设备,所述电子设备包括执行上述第一方面或者第一方面的任意一种可能的设计的方法的模块/单元;或者,所述电子设备包括执行上述第二方面或者第二方面的任意一种可能的设计的方法的模块/单元;这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。In a fifth aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes a module/unit for executing the method of the first aspect or any possible design of the first aspect; or, the electronic device includes Modules/units for performing the above-mentioned second aspect or any possible design method of the second aspect; these modules/units may be implemented by hardware, or by executing corresponding software in hardware.
第六方面,本申请实施例还提供一种芯片,所述芯片与电子设备中的存储器耦合,用于调用存储器中存储的计算机程序并执行本申请实施例第一方面及其第一方面任一可能设计的技术方案或者本申请实施例第二方面及其第二方面任一可能设计的技术方案,本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。In a sixth aspect, an embodiment of the present application further provides a chip, which is coupled to a memory in an electronic device, and is used to call a computer program stored in the memory and execute the first aspect of the embodiment of the present application and any one of the first aspects thereof. The technical solutions that may be designed or the technical solutions of the second aspect and any possible design of the second aspect of the embodiments of the present application, "coupling" in the embodiments of the present application means that two components are directly or indirectly combined with each other.
第七方面,本申请实施例还提供一种系统,该系统可以包括上述第三方面的任一种可能的设计中所描述的电子设备,以及上述第四方面的任一种可能的设计中所描述的电子设备。在一种可能的设计中,该系统还可以包括授权服务器、搜包服务器和OTA服务器。In a seventh aspect, an embodiment of the present application further provides a system, which may include the electronic device described in any possible design of the third aspect above, and the electronic device described in any possible design of the fourth aspect above. Described electronic equipment. In a possible design, the system may also include an authorization server, a packet search server, and an OTA server.
第八方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在计算机上运行时,使得所述计算机执行如上述第一方面或第二方面提供的方法步骤。In an eighth aspect, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a computer, causes the computer to execute the first aspect or the first aspect above. The method steps provided in the second aspect.
第九方面,还提供一种程序产品,包括指令,当所述指令在计算机上运行时,使得所述计算机执行如上述第一方面或第二方面提供的方法步骤。In a ninth aspect, a program product is also provided, comprising instructions, which when executed on a computer, cause the computer to perform the method steps provided in the first aspect or the second aspect above.
本申请的这些方面或其它方面在以下实施例的描述中会更加简明易懂。These and other aspects of the present application will be more clearly understood in the description of the following embodiments.
附图说明Description of drawings
图1为本申请实施例提供的电子设备的一种可能的硬件结构示意图;1 is a schematic diagram of a possible hardware structure of an electronic device provided by an embodiment of the present application;
图2为本申请实施例提供的手机的硬件结构示意图;2 is a schematic diagram of a hardware structure of a mobile phone provided by an embodiment of the present application;
图3为本申请实施例提供的电子设备的另一种可能的硬件结构示意图;3 is a schematic diagram of another possible hardware structure of the electronic device provided by the embodiment of the present application;
图4为本申请实施例提供的电子设备的软件结构框图;4 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application;
图5为本申请实施例提供的应用场景的示意图;FIG. 5 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图6为本申请实施例提供的电子设备开机异常的修复方法所对应的流程示意图;6 is a schematic flowchart corresponding to a method for repairing abnormal startup of an electronic device according to an embodiment of the present application;
图7为本申请实施例提供的第一电子设备显示的界面示例图;FIG. 7 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application;
图8为本申请实施例提供的第一电子设备与第二电子设备的连接示意图;8 is a schematic diagram of a connection between a first electronic device and a second electronic device according to an embodiment of the present application;
图9为本申请实施例提供的第一电子设备显示的界面示例图;FIG. 9 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application;
图10为本申请实施例提供的第一电子设备显示的界面示例图;FIG. 10 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application;
图11为本申请实施例提供的第一电子设备显示的界面示例图;FIG. 11 is an example diagram of an interface displayed by a first electronic device according to an embodiment of the present application;
图12为本申请实施例提供的第二电子设备的第一处理器根据升级包进行修复的流程示意图;FIG. 12 is a schematic flowchart of repairing according to an upgrade package by a first processor of a second electronic device according to an embodiment of the present application;
图13为第一电子设备对第二电子设备进行代理修复的流程示意图;13 is a schematic flowchart of a first electronic device performing proxy repair on a second electronic device;
图14为本申请实施例提供的一种电子设备示意图。FIG. 14 is a schematic diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
首先对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。First, some terms in the embodiments of the present application are explained to facilitate the understanding of those skilled in the art.
(1)电子设备:诸如手机、平板电脑、可穿戴设备(例如,手表、手环、头盔、耳机、项链等)、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等,本申请实施例对电子设备的具体类型不作任何限制。(1) Electronic devices: such as mobile phones, tablet computers, wearable devices (eg, watches, bracelets, helmets, headphones, necklaces, etc.), in-vehicle devices, augmented reality (AR)/virtual reality (VR) ) equipment, notebook computer, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA), etc., the embodiments of the present application do not make any restrictions on the specific types of electronic equipment.
(2)操作系统(operating system,OS):是运行在电子设备上的最基本的系统软件,例如windows系统、Android系统、IOS系统。以智能手机为例,操作系统可以是Android系统或IOS系统。本申请实施例主要以Android系统为例进行介绍。本领域技术人员可以理解,其它操作系统中,也可以采用类似的算法实现。(2) Operating system (OS): It is the most basic system software running on electronic devices, such as windows system, Android system, IOS system. Taking a smartphone as an example, the operating system may be an Android system or an IOS system. The embodiments of the present application mainly take the Android system as an example for introduction. Those skilled in the art can understand that in other operating systems, similar algorithms can also be used to implement.
(3)刷机:是指通过一定的方法更改或替换电子设备中的原本存在的一些语言、软件或者操作系统。刷机也就是给电子设备重装操作系统,可以使电子设备的功能更加完善,或还原到原始状态。(3) Flashing: refers to changing or replacing some languages, software or operating systems originally existing in the electronic device through a certain method. Flashing is to reinstall the operating system of the electronic device, which can make the function of the electronic device more perfect, or restore it to its original state.
(4)操作系统的模式(4) Mode of the operating system
以操作系统为Android系统为例,由于Android系统相对开源,允许用户对电子设备的操作系统进行一定修改(即刷机),因此,针对不同的功能以及权限,操作系统可以具备如下几种可能的模式:Taking the Android system as the operating system as an example, because the Android system is relatively open source, it allows users to make certain modifications to the operating system of the electronic device (that is, flashing). Therefore, for different functions and permissions, the operating system can have the following possible modes :
①正常模式(normal mode),该模式的功能是正常启动电子设备,该模式的进入方式比如为在电子设备处于关机状态下时,按电源键启动。①Normal mode, the function of this mode is to start the electronic device normally. The way to enter this mode is, for example, when the electronic device is turned off, press the power button to start it.
②恢复模式(recovery mode),该模式具有相对较高的修改权限,可进行打开命令解释程序(shell)、刷新映像文件(flash image)、执行备份等。在恢复模式下,电子设备可以根据存储在自身存储器内部的系统数据对电子设备的系统数据进行修改,从而完成刷机。② recovery mode (recovery mode), this mode has a relatively high modification authority, can open the command interpreter (shell), refresh the image file (flash image), perform backup, etc. In the recovery mode, the electronic device can modify the system data of the electronic device according to the system data stored in its own memory, thereby completing the flashing.
③快速启动模式(fastboot mode),该模式是一种比恢复模式更底层的刷机模式。在快速启动模式下,电子设备可以通过通用串行总线(universal serial bus,USB)数据线与计算机通信,当电子设备接收到计算机发送的系统数据后,将该系统数据更新到电子设备的 指定分区中(比如fastboot flash boot boot.img这一命令是把boot.img的内容刷写到boot分区中),从而完成刷机。③ Fastboot mode, which is a lower-level flashing mode than recovery mode. In the fast boot mode, the electronic device can communicate with the computer through the universal serial bus (USB) data line. After the electronic device receives the system data sent by the computer, it updates the system data to the designated partition of the electronic device (for example, the command fastboot flash boot boot.img is to flash the contents of boot.img to the boot partition), so as to complete the flashing.
需要说明的是,操作系统除上述几种可能的模式外,还可以具有其它模式,比如安全模式(safe mode)、诊断模式(diagnostic mode)等,具体不做限定。It should be noted that, in addition to the above-mentioned possible modes, the operating system may also have other modes, such as a safe mode (safe mode), a diagnostic mode (diagnostic mode), etc., which are not specifically limited.
(5)电子设备的分区(5) Partitioning of electronic equipment
电子设备中可以包括存储区(类似于计算机的硬盘),该存储区中可以包括多个分区,每个分区的功能各不相同。比如,电子设备的存储区可以包括如下几种可能的分区:An electronic device may include a storage area (similar to a hard disk of a computer), and the storage area may include multiple partitions, each of which has different functions. For example, the storage area of an electronic device may include the following possible partitions:
①启动(boot)分区,该分区可以保证电子设备的正常启动,它包含了内核(kernel)和虚拟内存盘(通过软件将一部分内存模拟为硬盘来使用的一种技术,可以极大的提高在其上进行文件访问的速度),如果没有该分区,电子设备通常不能正常启动。① The boot partition, which can ensure the normal startup of electronic devices, includes the kernel and the virtual memory disk (a technology used by software to simulate a part of the memory as a hard disk, which can greatly improve the speed of file access on it), without this partition, electronic devices often cannot boot properly.
②系统(system)分区,该分区用来存放除内核和虚拟内存盘以外的系统相关配置,它包括用户界面、电子设备预先安装的软件等。擦除这个分区将会删除整个操作系统,但不会导致不能启动,比如可以通过进入恢复模式安装一个新操作系统。②system partition, which is used to store system-related configurations other than the kernel and virtual memory disk, including user interface, pre-installed software of electronic devices, etc. Erasing this partition will delete the entire operating system, but it will not make it unbootable, such as by entering recovery mode to install a new operating system.
③数据(data)分区,该分区包含了用户的数据信息,比如联系人、短信、设置、用户安装的程序等,擦除此分区,相当于电子设备恢复出厂设置,可以在恢复模式中选择“data/factory reset”来擦除此分区。③Data (data) partition, this partition contains the user's data information, such as contacts, text messages, settings, user-installed programs, etc., erasing this partition is equivalent to restoring the factory settings of the electronic device, you can select "" data/factory reset" to erase this partition.
④恢复(recovery)分区,在电子设备不能正常启动时,可以通过加载此分区进行恢复模式,它相当于一个简易的操作系统,通过它可以进行备份维护和恢复。④Recovery partition, when the electronic device cannot be started normally, you can load this partition to perform recovery mode, which is equivalent to a simple operating system, through which backup maintenance and recovery can be performed.
示例性地,上述正常模式所依赖的分区可以包括启动分区,恢复模式所依赖的分区可以包括恢复分区,快速启动模式所依赖的分区可以包括启动分区中的部分分区(或者说,快速启动模式所依赖的分区为启动分区的子分区或子集)。因此,当启动分区出现问题时,将导致电子设备无法进入正常模式;当恢复分区出现问题时,将导致电子设备无法进入恢复模式;当启动分区中快速启动模式所依赖的分区出现问题时,将导致电子设备无法进入快速启动模式。Exemplarily, the partition on which the normal mode depends may include a boot partition, the partition on which the recovery mode depends may include a recovery partition, and the partition on which the fast boot mode depends may include some partitions in the boot partition (or in other words, the partition on which the fast boot mode depends). The dependent partition is a subpartition or subset of the boot partition). Therefore, when there is a problem with the boot partition, the electronic device will not be able to enter the normal mode; when there is a problem with the recovery partition, the electronic device will not be able to enter the recovery mode; when there is a problem with the partition that the fast boot mode relies on in the boot partition, the Causes the electronic device to fail to enter fastboot mode.
需要说明的是,电子设备的存储区除包括上述几种可能的分区外,还可以具有其它分区,比如缓存(cache)分区,具体不做限定。It should be noted that, in addition to the above several possible partitions, the storage area of the electronic device may also have other partitions, such as a cache partition, which is not specifically limited.
以上内容是与本申请相关的名称解释。下面结合附图介绍本申请实施例提供的技术方案。The above content is the name explanation related to this application. The technical solutions provided by the embodiments of the present application are described below with reference to the accompanying drawings.
如背景技术所述,电子设备(比如手机)开机异常,将会给用户带来巨大的损失,也将会给手机厂商造成多维度损失。电子设备开机异常的原因可能有多种,一种可能的原因为:电子设备的软件出现问题,比如用户在软件升级过程中出现误操作导致软件升级失败,又比如用户不小心删除了一些关键文件。As described in the background art, an abnormal startup of an electronic device (such as a mobile phone) will bring huge losses to users, and will also cause multi-dimensional losses to mobile phone manufacturers. There may be various reasons for the abnormal startup of electronic equipment. One possible reason is: there is a problem with the software of the electronic equipment. For example, the user makes a misoperation during the software upgrade process, which causes the software upgrade to fail. For example, the user accidentally deletes some key files. .
本申请实施例中,电子设备开机异常可以是指电子设备无法进入正常模式(或安全模式)。此外,当电子设备开机异常时,可以对应如下几种可能的情形,比如情形1:电子设备无法进入快速启动模式,且无法进入恢复模式;情形2:电子设备能够进入快速启动模式,但无法进入恢复模式;情形3:电子设备能够进入快速启动模式,且能够进入恢复模式。可以理解地,电子设备开机异常还可以对应其它可能的情形,具体不再一一赘述。In this embodiment of the present application, the abnormal startup of the electronic device may refer to that the electronic device cannot enter the normal mode (or the safe mode). In addition, when the electronic device boots abnormally, it can correspond to the following possible situations, such as situation 1: the electronic device cannot enter the fast boot mode and cannot enter the recovery mode; situation 2: the electronic device can enter the fast boot mode, but cannot enter Recovery Mode; Scenario 3: The electronic device is able to enter fastboot mode and is able to enter recovery mode. It is understandable that the abnormal startup of the electronic device may also correspond to other possible situations, and details will not be repeated one by one.
针对于电子设备开机异常的问题,通常的解决方案是下载升级包进行修复,比如解决方案一、解决方案二和解决方案三,下面进行详细描述。For the problem of abnormal startup of electronic equipment, the usual solution is to download an upgrade package to repair, such as solution 1, solution 2 and solution 3, which are described in detail below.
(1)解决方案一(1) Solution 1
当电子设备在开机阶段无法进入到正常模式时,可以进入增强修复(Erecovery)模式。其中,Erecovery模式为部分终端设备厂商所提供的模式,Erecovery模式所依赖的分区可以包括启动分区的部分分区以及Erecovery模式对应的特定分区。Erecovery模式包括如下功能:When the electronic device cannot enter the normal mode during the booting phase, it can enter the enhanced recovery (Erecovery) mode. The Erecovery mode is a mode provided by some terminal device manufacturers, and the partitions on which the Erecovery mode depends may include some partitions of the boot partition and specific partitions corresponding to the Erecovery mode. Erecovery mode includes the following features:
1、下载升级包修复,即通过网络下载升级包,进而根据升级包进行修复。1. Download the upgrade package to repair, that is, download the upgrade package through the network, and then repair it according to the upgrade package.
2、紧急数据备份,即在数据分区未损坏的前提下进行用户数据的备份。2. Emergency data backup, that is, backup user data on the premise that the data partition is not damaged.
3、恢复出厂设置,即清除用户数据,操作系统恢复到版本的初始状态。3. Restore the factory settings, that is, clear the user data, and restore the operating system to the original state of the version.
然而,该种解决方案可能无法对电子设备进行有效修复,即存在一定的局限性和缺点,比如,进入Erecovery模式所依赖的分区损坏(比如升级中断导致的启动分区损坏(某关键镜像升级了一半)、存储区数据跳变导致启动校验失败)时,将无法进入Erecovery模式;又比如,当进入Erecovery模式所依赖的启动流程发生未知错误(比如启动过程软件异常卡死、进程崩溃等)时,将无法进入Erecovery模式;又比如,当升级过程被用户长按键打断,使得开机时新旧镜像不匹配时,电子设备将无法启动到正常模式,也无法进入Erecovery模式。However, this solution may not be able to effectively repair electronic devices, that is, there are certain limitations and disadvantages, for example, the partition on which Erecovery mode is entered is damaged (for example, the boot partition is damaged due to an upgrade interruption (a key image is upgraded by half). ), the data jump in the storage area causes the startup verification failure), it will not be able to enter the Erecovery mode; for another example, when an unknown error occurs in the startup process that the Erecovery mode depends on (for example, the startup process software is abnormally stuck, the process crashes, etc.) , it will not be able to enter the Erecovery mode; for another example, when the upgrade process is interrupted by the user's long key press, so that the new and old images do not match when booting, the electronic device will not be able to boot to the normal mode, nor enter the Erecovery mode.
(2)解决方案二(2) Solution 2
当电子设备在开机阶段无法进入到正常模式时,用户可以使用安卓安装包(Android package,APK)工具(比如hisuit工具)尝试修复,具体操作为:When the electronic device cannot enter the normal mode during the boot phase, the user can use the Android package (Android package, APK) tool (such as the hissuit tool) to try to repair, the specific operation is as follows:
1、电子设备进入快速启动模式,hisuit工具在该模式下获取电子设备的版本号,然后向服务器搜索升级包并下载到计算机本地。1. The electronic device enters the fast boot mode, and the hissuit tool obtains the version number of the electronic device in this mode, and then searches the server for the upgrade package and downloads it to the computer.
2、电子设备进入恢复模式,hisiut工具将计算机本地的升级包发送给电子设备,相应地,电子设备接收升级包并执行升级,以刷新到最新版本,从而最终完成修复。2. The electronic device enters the recovery mode, and the hisiut tool sends the local upgrade package of the computer to the electronic device. Accordingly, the electronic device receives the upgrade package and performs the upgrade to refresh to the latest version, thereby finally completing the repair.
然而,该种解决方案可能无法对电子设备进行有效修复,即存在一定的局限性和缺点,比如进入快速启动模式和恢复模式所依赖的分区损坏,进而无法进入快速启动模式或恢复模式时,将无法通过hisuit工具进行修复。However, this solution may not be able to effectively repair electronic devices, that is, there are certain limitations and disadvantages, such as the partition that depends on entering the fast boot mode and the recovery mode is damaged, so that when the fast boot mode or recovery mode cannot be entered, the There is no way to fix it with the hissuit tool.
(3)解决方案三(3) Solution three
当电子设备在开机阶段无法进入到正常模式时,用户可以到维修网点使用维修工具进行修复。由于维修网点的权限较高,因此当电子设备开机异常时(可以进入快速启动模式),可以使用维修工具解锁电子设备,进而强制升级。然而,若电子设备无法进入快速启动模式,则可能无法对电子设备进行有效修复,此种情形下,维修网点只能通过拆机、换主板等强制措施来修复电子设备,从而可能给用户的财产造成损失,降低用户体验。When the electronic device cannot enter the normal mode during the booting phase, the user can go to the maintenance outlet to use the maintenance tool to repair it. Due to the high authority of the maintenance network, when the electronic device is abnormally turned on (you can enter the fast boot mode), you can use the maintenance tool to unlock the electronic device, and then force the upgrade. However, if the electronic device cannot enter the fast boot mode, it may not be able to effectively repair the electronic device. In this case, the maintenance network can only repair the electronic device through compulsory measures such as disassembly and replacement of the motherboard, which may give the user's property. cause losses and degrade the user experience.
鉴于此,本申请实施例提供一种开机异常的修复方法,在该方法中,可以通过开机正常的电子设备对开机异常的电子设备进行代理修复,比如在开机异常的电子设备无法进入增强恢复模式或快速启动模式或恢复模式时,开机正常的电子设备可以对开机异常的电子设备进行代理修复,从而能够对开机异常的电子设备进行有效修复,提高用户体验。In view of this, an embodiment of the present application provides a method for repairing an abnormal startup. In this method, an electronic device that is turned on abnormally can be repaired by proxy through an electronic device that is turned on normally. For example, an electronic device that is turned on abnormally cannot enter the enhanced recovery mode. In the fast boot mode or the recovery mode, the electronic device that is powered on normally can perform proxy repair for the electronic device that is powered on abnormally, so that the electronic device that is powered on abnormally can be effectively repaired and the user experience can be improved.
下面对本申请实施例所涉及的电子设备的硬件结构和软件结构进行描述。The hardware structure and software structure of the electronic device involved in the embodiments of the present application are described below.
图1为本申请实施例提供的电子设备的一种可能的硬件结构示意图。如图1所示,电子设备100可以包括第一处理器、第一端口、第一存储器、无线通信模块,还可以包括其它外设模块。FIG. 1 is a schematic diagram of a possible hardware structure of an electronic device provided by an embodiment of the present application. As shown in FIG. 1 , 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.
其中,第一处理器可以包括一个或多个处理单元,例如第一处理器可以包括应用处理器(application processor,AP),还可以包括以下至少一项:调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,神经网络处理器(neural-network processing unit,NPU)等。不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,第一处理器中还可以设置存储器,用于存储指令和数据。在一些实施例中,第一处理器中的存储器为高速缓冲存储器。该存储器可以保存第一处理器刚用过或循环使用的指令或数据。如果第一处理器需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了第一处理器的等待时间,因而提高了系统的效率。The first processor may include one or more processing units, for example, the first processor may include an application processor (application processor, AP), and may also include at least one of the following: a modem processor, a graphics processor ( graphics processing unit, GPU), image signal processor (ISP), memory, video codec, digital signal processor (DSP), baseband processor, neural-network processor processing unit, NPU), etc. The different processing units can be stand-alone devices or integrated in one or more processors. Wherein, a memory may also be provided in the first processor for storing instructions and data. In some embodiments, the memory in the first processor is a cache memory. The memory may hold instructions or data that have just been used or recycled by the first processor. If the first processor needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the first processor is reduced, thereby improving the efficiency of the system.
第一端口可以是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。第一端口可以用于连接充电器为电子设备100充电,也可以用于电子设备100与其它设备之间传输数据。The first port may be an interface conforming to the USB standard specification, specifically a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The first port can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and other devices.
第一存储器可以用于存储计算机程序,所述计算机程序包括指令。第一处理器通过运行存储在第一存储器的指令,从而执行电子设备100的各种功能以及数据处理。第一存储器可以包括如上所描述的各个分区,比如启动分区、系统分区、数据分区等。此外,第一存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The first memory may be used to store a computer program comprising instructions. The first processor executes various functions and data processing of the electronic device 100 by executing 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, and the like. In addition, the first memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
无线通信模块可以提供应用在电子设备上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(blue tooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块可以是集成至少一个通信处理模块的一个或多个器件。The wireless communication module can provide applications on electronic devices including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module may be one or more devices integrating at least one communication processing module.
其它外设模块可以包括显示屏、传感器模块、摄像头等,具体不做限定。Other peripheral modules may include a display screen, a sensor module, a camera, etc., which are not specifically limited.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be 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 the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
下面以图1中所示意的电子设备100为手机为例,结合图2对手机的硬件结构进行详细描述。Taking the electronic device 100 shown in FIG. 1 as a mobile phone as an example below, the hardware structure of the mobile phone will be described in detail with reference to FIG. 2 .
图2为本申请实施例提供的手机的硬件结构示意图。如图2所示,手机200可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。FIG. 2 is a schematic diagram of a hardware structure of a mobile phone according to an embodiment of the present application. As shown in FIG. 2 , 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, Antenna 1, Antenna 2, Mobile Communication Module 150, Wireless Communication Module 160, Audio Module 170, Speaker 170A, Receiver 170B, Microphone 170C, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191, Indicator 192, Camera 193, Display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
其中,处理器110可以为上述图1中的第一处理器。The processor 110 may be the first processor in FIG. 1 above.
USB接口130可以为上述图1中的第一端口。充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理 模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。The USB interface 130 may be the first port in FIG. 1 described above. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used for connecting 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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
手机200的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160(可以为上述图1中的无线通信模块),调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。手机200中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the mobile phone 200 can be realized by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160 (which can be the wireless communication module in FIG. 1 above), the modulation and demodulation processor and the baseband processor. Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in handset 200 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在手机200上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied on the mobile phone 200 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
无线通信模块160可以经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can receive electromagnetic waves via the antenna 2 , frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,手机200的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得手机200可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the mobile phone 200 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone 200 can communicate with the network and other devices through wireless communication technology. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband 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 a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
显示屏194用于显示应用的显示界面等。显示屏194包括显示面板,显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机200可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display the display interface of the application and the like. The display screen 194 includes a display panel, and the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode. Body (active-matrix organic light emitting diode, AMOLED), flexible light emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, cell phone 200 may include 1 or N display screens 194, where N is a positive integer greater than 1.
摄像头193用于捕获静态图像、动态图像或视频。在本申请实施例中,手机200中摄像头193的数量可以是至少两个。以两个为例,其一个是前置摄像头,另一个是后置摄像头;以三个为例,其中一个是前置摄像头,另外两个是后置摄像头。The camera 193 is used to capture still images, moving images or videos. In this embodiment of the present application, the number of cameras 193 in the mobile phone 200 may be at least two. Take two as an example, one is a front camera and the other is a rear camera; take three as an example, one of which is a front camera and the other two are rear cameras.
内部存储器121可以为上述图1中的第一存储器。The internal memory 121 may be the above-mentioned first memory in FIG. 1 .
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机200 的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将图片,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 200 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. Such as saving pictures, videos and other files in an external memory card.
传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L, bone conduction sensor 180M, etc.
另外,手机200可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机200可以接收按键输入,产生与手机200的用户设置以及功能控制有关的键信号输入。手机200可以接收按键190输入,产生与手机200的用户设置以及功能控制有关的键信号输入。手机200可以利用马达191产生振动提示(比如来电振动提示)。手机200中的指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。手机200中的SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机200的接触和分离。In addition, the mobile phone 200 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc. The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The cell phone 200 can receive key input and generate key signal input related to user settings and function control of the cell phone 200 . The mobile phone 200 can receive the key 190 input and generate the key signal input related to the user setting and function control of the mobile phone 200 . The mobile phone 200 can use the motor 191 to generate vibration alerts (eg, vibration alerts for incoming calls). The indicator 192 in the mobile phone 200 can be an indicator light, which can be used to indicate a charging state, a change in power, and can also be used to indicate a message, a missed call, a notification, and the like. The SIM card interface 195 in the mobile phone 200 is used to connect the SIM card. The SIM card can be contacted and separated from the mobile phone 200 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
可以理解的是,本发明实施例示意的结构并不构成对手机200的具体限定。在本申请另一些实施例中,手机200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the mobile phone 200 . In other embodiments of the present application, the mobile phone 200 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
图3为本申请实施例提供的电子设备的又一种可能的硬件结构示意图。如图3所示,相比于图1中所示意的电子设备100,电子设备300除包括第一处理器、第一端口、第一存储器、无线通信模块、其它外设模块之外,还可以包括第二处理器、第二端口、第三端口、第二存储器、控制器等。其中,有关第一处理器、第一端口、第一存储器、无线通信模块、其它外设模块的相关描述可以参见图1的介绍。FIG. 3 is a schematic diagram of another possible hardware structure of the electronic device provided by the embodiment of the present application. As shown in FIG. 3 , compared with the electronic device 100 shown in FIG. 1 , the electronic device 300 may not only include a first processor, a first port, a first memory, a wireless communication module, and other peripheral modules, but also Including a second processor, a second port, a third port, a second memory, a controller, and the like. Wherein, for the description of the first processor, the first port, the first memory, the wireless communication module, and other peripheral modules, reference may be made to the introduction of FIG. 1 .
(1)对第二处理器进行描述。(1) The second processor is described.
示例性地,第二处理器可以为微控制器,比如微控制单元(microcontroller unit,MCU),又称单片微型计算机(single chip microcomputer)或者单片机。第二处理器可以主要负责异常场景(比如电子设备300开机异常)下的相关实现,具体可以参见后文的描述。Exemplarily, the second processor may be a microcontroller, such as a microcontroller unit (MCU), also known as a single chip microcomputer (single chip microcomputer) or a single chip. The second processor may be mainly responsible for related implementation in an abnormal scenario (for example, the electronic device 300 is turned on abnormally), and for details, refer to the following description.
(2)对第一处理器和第二处理器之间的关系进行描述。(2) The relationship between the first processor and the second processor is described.
第一处理器可以理解为电子设备300的主处理器,第二处理器可以理解为电子设备300的从属处理器。第二处理器的处理能力可以小于第一处理器的处理能力,比如第二处理器可以具备第一处理器的部分处理能力。The first processor may be understood as a master processor of the electronic device 300 , and the second processor may be understood as a slave processor of the electronic device 300 . The processing capability of the second processor may be smaller than the processing capability of the first processor, for example, the second processor may have part of the processing capability of the first processor.
第一处理器和第二处理器可以共享一些模块,比如第一处理器和第二处理器可以共享第一端口,还可以共享无线通信模块等。需要说明的是,第一处理器和第二处理器还可以共享其它可能的外设模块,具体不做限定。由于第一处理器为电子设备300的主处理器,因此,通常情况下,当所述第一处理器能够正常运行或者说处于正常运行状态时,是由第一处理器管理上述共享模块(比如第一端口、无线通信模块),此种情形下,所述第二处理器处于待命状态,即暂不管理上述共享模块;而当第一处理器出现异常运行或者说处于异常运行状态(比如无法进入正常模式)时,可以由第二处理器来接管上述共享模块。以 第一处理器和第二处理器共享第一端口为例,第一处理器和第二处理器可以在不同时间连接(或者说管理)第一端口,而不同时连接第一端口;比如,当第一处理器连接第一端口时,第二处理器与第一端口之间是断开连接的,而当第二处理器连接第一端口时,第一处理器与第一端口之间是断开连接的。The first processor and the second processor may share some modules, for example, the first processor and the second processor may share the first port, and may also share a wireless communication module and the like. It should be noted that the first processor and the second processor may also share other possible peripheral modules, which are not specifically limited. Since the first processor is the main processor of the electronic device 300, under normal circumstances, when the first processor can run normally or is in a normal running state, the first processor manages the above-mentioned shared modules (such as The first port, the wireless communication module), in this case, the second processor is in a standby state, that is, it does not manage the above-mentioned shared module for the time being; When entering the normal mode), the second processor can take over the above-mentioned shared module. Taking the first processor and the second processor sharing the first port as an example, the first processor and the second processor may connect to (or manage) the first port at different times, but not connect to the first port at the same time; for example, When the first processor is connected to the first port, the connection between the second processor and the first port is disconnected, and when the second processor is connected to the first port, the connection between the first processor and the first port is disconnected.
作为一种可能的实现,电子设备300中可以预设一个属性(为便于描述,称为第一属性),当第一处理器处于正常运行状态时,第一属性的取值可以为真(ture),此种情形下,可以由第一处理器管理上述共享模块;而当第一处理器处于异常运行状态时,第一属性的取值可以为伪(false),此种情形下,可以触发第二处理器来接管上述共享模块。As a possible implementation, an attribute (for convenience of description, referred to as the first attribute) may be preset in the electronic device 300, and when the first processor is in a normal running state, the value of the first attribute may be true (true). ), in this case, the above-mentioned shared module can be managed by the first processor; and when the first processor is in an abnormal operation state, the value of the first attribute can be false (false), in this case, it can trigger The second processor takes over the above-mentioned shared module.
作为又一种可能的实现,可以通过另一设备来触发第二处理来接管上述共享模块。具体来说,电子设备300可以通过第一端口与另一设备建立连接,此种情形下,若第一处理器管理第一端口,并通过第一端口响应另一设备的握手信号,则当另一设备确定需要对电子设备300进行代理修复(比如另一设备接收到用户的第一操作命令,第一操作命令具体可以参见后文)或者其它可能的操作时,可以通过第一端口向第一处理器发送切换指令,该切换指令用于指示切换为第二处理器来接管上述共享模块;进而第一处理器接收到切换指令后,可以通过第二端口(或第三端口)向第二处理器发送控制信息,相应地,第二处理器接收到控制信息后,可以接管上述共享模块。As yet another possible implementation, another device may trigger the second process to take over the above-mentioned shared module. Specifically, the electronic device 300 can establish a connection with another device through the 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 When a device determines that it needs to perform proxy repair on the electronic device 300 (for example, another device receives a user's first operation command, the first operation command can be referred to later) or other possible operations, it can send the first port to the first The processor sends a switching instruction, the switching instruction is used to instruct to switch to the second processor to take over the above-mentioned shared module; and after the first processor receives the switching instruction, it can use the second port (or the third port) to process the second processor The second processor sends the control information, correspondingly, after receiving the control information, the second processor can take over the above-mentioned sharing module.
(3)对第二端口、第三端口进行描述。(3) Describe the second port and the third port.
第二端口可以理解为第一处理器和第二处理器之间通用的信息交互或数据交互的总线。第二端口需要依赖于第一处理器的处理能力,比如当第一处理器能够正常运行时,第一处理器和第二处理器之间可以通过第二端口进行通信;而当第一处理器出现异常时,第一处理器的处理能力受限,此种情形下,第一处理器和第二处理器之间可能无法通过第二端口进行通信。在一个示例中,第二端口可以为安全数字输入输出(secure digital input and output,SDIO)端口、通用输入输出(general purpose input output)端口、集成音频接口(integrated interchip sound,I2S)、内部集成电路(inter integrated circuit,I2C),具体不做限定。The second port can be understood as a general information exchange or data exchange bus between the first processor and the second processor. The second port needs to depend on the processing capability of the first processor. For example, when the first processor can run normally, the first processor and the second processor can communicate through the second port; When an exception occurs, the processing capability of the first processor is limited. In this case, communication between the first processor and the second processor may not be possible through the second port. In one example, the second port may be a secure digital input and output (SDIO) port, a general purpose input output (general purpose input output) port, an integrated interchip sound (I2S), an inter-integrated circuit (inter integrated circuit, I2C), there is no specific limitation.
第三端口可以是指比第二端口更为底层的端口,比如当第一处理器出现异常时,即使第一处理器和第二处理器之间无法通过第二端口进行通信,但可以通过第三端口进行通信。在一个示例中,第三端口可以为通用同步/异步串行接收/发送器(universal synchronous/asynchronous receiver/transmitter,USART),具体不做限定。The third port may refer to a lower-level port than the second port. For example, when the first processor is abnormal, even if the first processor and the second processor cannot communicate through the second port, they can communicate through the second port. Three ports for communication. In an example, the third port may be a universal synchronous/asynchronous serial receiver/transmitter (universal synchronous/asynchronous receiver/transmitter, USART), which is not specifically limited.
(4)对第一存储器和第二存储器进行描述。(4) The first memory and the second memory are described.
第一存储器可以为电子设备300的主存储器,第二存储器可以为电子设备300的从属存储器。第一存储器的存储能力可以大于第二存储器的存储能力,或者说,第一存储器的存储空间可以大于第二存储器的存储空间。The first memory may be the main memory of the electronic device 300 , and the second memory may be the slave memory of the electronic device 300 . The storage capacity of the first memory may be greater than the storage capacity of the second memory, or in other words, the storage space of the first memory may be greater than the storage space of the second memory.
第一处理器可以访问第一存储器和第二存储器,比如第一处理器可以将电子设备300的设备信息、版本信息等写入第一存储器和第二存储器。示例性地,第一处理器可以优先访问第一存储器,其次访问第二存储器。第二处理器可以访问第一存储器和第二存储器,比如第二处理器可以将最小系统镜像文件写入第一存储器,又比如第二处理器可以从第二存储器中读取电子设备300的设备信息、版本信息等。示例性地,第二处理器可以优先访问第二存储器,其次访问第一存储器。The first processor may access the first memory and the second memory, for example, the first processor may write device information, version information, etc. of the electronic device 300 into the first memory and the second memory. Illustratively, the first processor may access the first memory first and the second memory second. The second processor can access the first memory and the second memory, for example, the second processor can write the minimum system image file into the first memory, and for example, the second processor can read the device of the electronic device 300 from the second memory information, version information, etc. Illustratively, the second processor may access the second memory first and the first memory second.
针对于第二处理器访问第一存储器,需要说明的是:(1)第二处理器确定需要访问第 一存储器时,可以先判断第一存储器是否处于加锁状态(比如当第一处理器在访问第一存储器时,第一处理器可以设置第一存储器处于加锁状态),若处于加锁状态,则第二处理器无法访问第一存储器,若第一存储器未处于加锁状态,则第二处理器可以访问第一存储器。在其它可能的情形中,若第二处理器确定第一存储器处于未知状态(即不确定是否加锁),则第二处理器此时也可以访问第一存储器。(2)第二处理器访问第一存储器,可以是指,第二处理器访问第一存储器中预留的一个分区,比如第二处理器在该分区中写入数据或者读取数据。示例性地,该预留分区可以位于数据块设备(data block device)的尾部,也就是说,数据块设备中可以包括数据分区和该预留分区;进一步地,用户数据可以优先存储在数据分区,尽量不占用该预留分区。For the second processor to access 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 in a locked state) When 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 first memory 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 (ie, it is uncertain whether it is locked), the second processor can also access the first memory at this time. (2) Accessing the first memory by the second processor may mean that the second processor accesses a partition reserved in the first memory, for example, the second processor writes data or reads data in the partition. Exemplarily, the reserved partition can be located at the end of the data block device (data block device), that is, the data block device can include the data partition and the reserved partition; further, user data can be preferentially stored in the data partition. , try not to occupy the reserved partition.
作为一种可能的实现,第二处理器可以通过控制器与第一存储器连接,当第二处理器能够访问第一存储器时,控制器可以用于辅助第二处理器访问第一存储器,比如辅助第二处理器解析数据结构等。控制器可以为硬件元件,或者也可以为软件模块,具体不做限定;进一步地,控制器可以独立存在,或者也可以集成在第二处理器,具体不做限定。As a possible implementation, the second processor can be connected to the first memory through the controller, and when the second processor can access the first memory, the controller can be used to assist the second processor to access the first memory, such as assisting The second processor parses the data structures and the like. The controller may be a hardware component, or may also be a software module, which is not specifically limited; further, the controller may exist independently, or may also be integrated in the second processor, which is not specifically limited.
可以理解的是,本发明实施例示意的结构并不构成对电子设备300的具体限定。在本申请另一些实施例中,电子设备300可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be 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 the present application, the electronic device 300 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
上述图1至图3对电子设备的硬件结构进行了描述,以下以电子设备的操作系统为Android系统为例,介绍电子设备的软件结构。1 to 3 described above describe the hardware structure of the electronic device. The following describes the software structure of the electronic device by taking the Android system as the operating system of the electronic device as an example.
图4为本申请实施例提供的电子设备的软件结构框图。如图4所示,电子设备的软件结构可以是分层架构,例如可以将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。FIG. 4 is a block diagram of a software structure of an electronic device provided by an embodiment of the present application. As shown in FIG. 4 , the software structure of the electronic device may be a layered architecture, for example, the software may be divided into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层(framework,FWK),安卓运行时(Android runtime)和系统库,以及内核层。下面分别对各层进行详细描述。In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer (framework, FWK), an Android runtime (Android runtime) and system libraries, and a kernel layer. Each layer is described in detail below.
(1)应用程序层可以包括一系列应用程序包。如图4所示,应用程序层可以包括系统应用程序(可简称为系统应用)和第三方应用程序(可简称为第三方应用),其中,系统应用可以包括相机、设置、皮肤模块、用户界面(user interface,UI)、手机管家、通话、短信息等,第三方应用可以包括地图,导航,音乐,视频等。(1) The application layer can include a series of application packages. As shown in FIG. 4 , the application layer may include system applications (referred to as system applications) and third-party applications (referred to as third-party applications), wherein the system applications may include cameras, settings, skin modules, user interfaces (user interface, UI), mobile phone manager, call, SMS, etc., third-party applications can include maps, navigation, music, video, etc.
(2)应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层可以包括一些预先定义的函数。如图4所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。(2) The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer can include some predefined functions. As shown in Figure 4, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
其中,窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。电话管理器用于提供电 子设备的通信功能。例如通话状态的管理(包括接通,挂断等)。资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如,在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。Among them, the window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc. Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide the communication function of the electronic device. For example, the management of call status (including connecting, hanging up, etc.). The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on. The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
(3)Android runtime包括核心库和虚拟机,Android runtime负责安卓系统的调度和管理。其中,核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(media libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。2D图形引擎是2D绘图的绘图引擎。(3) Android runtime includes core library and virtual machine, and Android runtime is responsible for scheduling and management of Android system. Among them, the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android. The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection. A system library can include multiple functional modules. For example: surface manager (surface manager), media library (media library), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc. The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing. 2D graphics engine is a drawing engine for 2D drawing.
(4)内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。(4) The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
此外,电子设备还可以包括硬件层,硬件层可以包括各类传感器,例如本申请实施例中涉及的加速度传感器、陀螺仪传感器、触摸传感器等。In addition, the electronic device may further include a hardware layer, and the hardware layer may include various types of sensors, such as an acceleration sensor, a gyroscope sensor, and a touch sensor involved in the embodiments of the present application.
基于上述对电子设备的硬件结构和软件结构的描述,下面对本申请实施例的一种可能的应用场景进行描述。Based on the above description of the hardware structure and software structure of the electronic device, a possible application scenario of the embodiments of the present application is described below.
图5为本申请实施例提供的应用场景的示意图,该应用场景中包括第一设备、第二设备,还可以包括至少一个服务器(比如第一服务器、第二服务器和第三服务器)。FIG. 5 is a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario includes a first device, a second device, and may also include at least one server (eg, a first server, a second server, and a third server).
其中,第一设备和第二设备可以均为电子设备,此种情形下,第一设备可以称为第一电子设备,第二设备可以称为第二电子设备。本申请实施例中将主要以第一设备和第二设备可以均为电子设备的情形为例进行描述。The first device and the second device may both be electronic devices. In this case, the first device may be referred to as the first electronic device, and the second device may be referred to as the second electronic device. In the embodiments of the present application, a case where both the first device and the second device may be electronic devices will be mainly used for description as an example.
第一电子设备的硬件结构和第二电子设备的硬件结构可以均参见图3所示意的电子设备300的硬件结构。此种情形下,当第一电子设备开机正常、第二电子设备开机异常时,第一电子设备可以通过本申请实施例提供的修复方法对第二电子设备进行修复;当第一电子设备开机异常、第二电子设备开机正常时,第二电子设备可以通过本申请实施例提供的修复方法对第一电子设备进行修复。也就是说,第一电子设备和第二电子设备之间可以相互修复。或者,第一电子设备的硬件结构可以参见图1所示的电子设备100的硬件结构,第二电子设备的硬件结构可以参见图3所示意的电子设备300的硬件结构。此种情形下,当第一电子设备开机正常、第二电子设备开机异常时,第一电子设备可以通过本申请实施例提供的修复方法对第二电子设备进行修复;而当第一电子设备开机异常、第二电子设备开机正常时,由于第一电子设备中不包括第二处理器,因此,第二电子设备可能无法通过 本申请实施例提供的修复方法对第一电子设备进行修复。也就是说,本申请实施例中,被修复的电子设备的硬件结构可以为图3所示意的硬件结构,而执行修复的电子设备的硬件结构可以为图1所示意的硬件结构,或者,也可以为图3所示意的硬件结构。第一电子设备的软件结构和第二电子设备的软件结构均可以参见图4所示意的电子设备的软件结构。For the hardware structure of the first electronic device and the hardware structure of the second electronic device, reference may be made to the hardware structure of the electronic device 300 shown in FIG. 3 . In this case, when the first electronic device is powered on normally and the second electronic device is powered on abnormally, the first electronic device can repair the second electronic device by using the repair method provided in the embodiment of the present application; when the first electronic device is powered on abnormally . When the second electronic device is powered on normally, the second electronic device can repair the first electronic device by using the repair method provided in the embodiment of the present application. That is, the first electronic device and the second electronic device can repair each other. Alternatively, the hardware structure of the first electronic device may refer to the hardware structure of the electronic device 100 shown in FIG. 1 , and the hardware structure of the second electronic device may refer to the hardware structure of the electronic device 300 shown in FIG. 3 . In this case, when the first electronic device is powered on normally and the second electronic device is powered on abnormally, the first electronic device can repair the second electronic device by using the repair method provided in the embodiment of the present application; and when the first electronic device is powered on When the second electronic device is abnormal and the second electronic device is powered on normally, since the first electronic device does not include the second processor, the second electronic device may not be able to repair the first electronic device through the repair method provided in the embodiment of the present application. That is to say, in this embodiment of the present application, the hardware structure of the electronic device to be repaired may be the hardware structure shown in FIG. 3 , and the hardware structure of the electronic device that performs the repair may be the hardware structure shown in FIG. 1 , or, It may be the hardware structure shown in FIG. 3 . For the software structure of the first electronic device and the software structure of the second electronic device, reference may be made to the software structure of the electronic device shown in FIG. 4 .
示例性地,第一电子设备和第二电子设备可以为相同设备类型的电子设备,比如第一电子设备和第二电子设备均为手机,或者均为平板电脑;或者,第一电子设备和第二电子设备也可以为不同设备类型的电子设备,比如第一电子设备为平板电脑,第二电子设备为手机,或者第一电子设备为手机,第二电子设备为手表。Exemplarily, the first electronic device and the second electronic device may be electronic devices of the same device type, for example, both the first electronic device and the second electronic device are mobile phones, or both are tablet computers; The second electronic device may also be electronic devices of different device types, for example, the first electronic device is a tablet computer and the second electronic device is a mobile phone, or the first electronic device is a mobile phone and the second electronic device is a watch.
以第一电子设备通过本申请实施例提供的修复方法对第二电子设备进行修复的场景为例,第一服务器可以称为授权服务器,用于授权第一电子设备对第二电子设备进行代理修复。第二服务器可以称为搜包服务器,用于在接收到第一电子设备的搜包请求后,根据搜包请求搜索用于修复第二电子设备的升级包的信息,并向第一电子设备反馈搜包响应,搜包响应中包括搜索到的升级包的信息。第三服务器可以称为升级服务器(比如空中下载(over-the-Air,OTA)服务器、云服务器等),第三服务器可以是能够存储应用软件的升级包,并为电子设备提供升级包下载服务的第三方设备。比如,第三服务器可以用于在接收到第一电子设备的下载请求(下载请求包括需要下载的升级包的信息)后,根据下载请求返回下载响应,下载响应中包括需要下载的升级包。本申请的下述实施例中将会对第一电子设备和第一服务器、第二服务器、第三服务器的通信交互进行详细描述。Taking the scenario in which the first electronic device repairs the second electronic device by using the repair method provided in the embodiment of the present application as an example, the first server may be called an authorization server, which is used to authorize the first electronic device to perform proxy repair on the second electronic device . The second server may be referred to as a package search server, and is configured to, after receiving the package search request from the first electronic device, search for information for repairing the upgrade package of the second electronic device according to the package search request, and feed back to the first electronic device A package search response, the package search response includes the information of the searched upgrade package. The third server may be called an upgrade server (such as an over-the-air (OTA) server, a cloud server, etc.), and the third server may be an upgrade package capable of storing application software, and provides an upgrade package download service for electronic devices of third-party devices. For example, the third server may be configured to return a download response according to the download request after receiving a download request from the first electronic device (the download request includes information about the upgrade package to be downloaded), where the download response includes the upgrade package to be downloaded. The communication interaction between the first electronic device and the first server, the second server, and the third server will be described in detail in the following embodiments of the present application.
需要说明的是,上述应用场景为一种可能的示例中,具体实施中,该应用场景中还可以包括其它可能的设备,具体不做限定。此外,在其它可能的情形中,第一设备和第二设备也可以分别为万物互联场景中的中继节点设备、子节点设备,也就是说,中继节点设备可以通过本申请实施例中的修复方法修复升级子节点设备,具体不做限定。It should be noted that the above application scenario is a possible example, and in specific implementation, the application scenario may also include other possible devices, which is not specifically limited. In addition, in other possible situations, the first device and the second device may also be relay node devices and sub-node devices in the Internet of Everything scenario, respectively, that is, the relay node device can pass the The repair method repairs and upgrades the sub-node device, which is not limited.
基于上述描述,下面以第一电子设备对第二电子设备进行修复的场景(且第一电子设备的硬件结构和第二电子设备的硬件结构均为图3所示意的电子设备300的硬件结构)为例,对本申请实施例提供的修复方法进行详细描述。也就是说,第一电子设备为开机正常的电子设备,第二设备为开机异常的电子设备。Based on the above description, the following is a scenario in which the first electronic device repairs the second electronic device (and the hardware structure of the first electronic device and the hardware structure of the second electronic device are both the hardware structures of the electronic device 300 shown in FIG. 3 ) As an example, the repair method provided by the embodiment of the present application will be described in detail. That is, the first electronic device is an electronic device that is powered on normally, and the second device is an electronic device that is powered on abnormally.
图6为本申请实施例提供的电子设备开机异常的修复方法所对应的流程示意图,如图6所示,该流程可以包括:FIG. 6 is a schematic flowchart corresponding to a method for repairing an abnormal startup of an electronic device provided by an embodiment of the present application. As shown in FIG. 6 , the process may include:
S601,第一电子设备接收用户的输入信息,该输入信息包括第二电子设备的属性信息。S601. The first electronic device receives input information from a user, where the input information includes attribute information of the second electronic device.
S602,第一电子设备根据用户的输入信息,发出提示信息,该提示信息用于提示用户第一电子设备是否支持修复第二电子设备。S602, the first electronic device sends out prompt information according to the input information of the user, where the prompt information is used to prompt the user whether the first electronic device supports the repair of the second electronic device.
作为一种可能的实现,第一电子设备中可以预先存储支持修复的电子设备的属性信息,比如,第一电子设备的第一存储器中可以存储支持修复的电子设备的属性信息。如此,第一电子设备(具体可以为第一电子设备的第一处理器)接收到用户的输入信息(即第二电子设备的属性信息)后,可以判断预先存储的支持修复的电子设备的属性信息是否包括第二电子设备的属性信息。若预先存储的支持修复的电子设备的属性信息包括第二电子设备的属性信息,则第一电子设备可以确定支持修复第二电子设备,此种情形下,第一电子设备发出的提示信息用于提示用户第一电子设备支持修复第二电子设备;若预先存储的支持修复的电子设备的属性信息不包括第二电子设备的属性信息,则第一电子设备可以确定不 支持修复第二电子设备,此种情形下,第一电子设备发出的提示信息用于提示用户第一电子设备不支持修复第二电子设备。As a possible implementation, attribute information of the electronic device supporting repair may be pre-stored in the first electronic device, for example, attribute information of the electronic device supporting repair may be stored in the first memory of the first electronic device. In this way, after the first electronic device (specifically, the first processor of the first electronic device) receives the user's input information (that is, the attribute information of the second electronic device), it can determine the attributes of the pre-stored electronic device that supports repairing Whether the information includes attribute information of the second electronic device. If the pre-stored attribute information of the electronic device that supports repair includes the attribute information of the second electronic device, the first electronic device can determine that the second electronic device supports repair. In this case, the prompt information sent by the first electronic device is used for Prompt the user that the first electronic device supports the repair of the second electronic device; if the pre-stored attribute information of the electronic device supporting the repair does not include the attribute information of the second electronic device, the first electronic device may determine that the repair of the second electronic device is not supported, In this case, the prompt information sent by the first electronic device is used to prompt the user that the first electronic device does not support repairing the second electronic device.
其中,电子设备的属性信息可以包括以下至少一项:电子设备的设备信息、电子设备的产品信息。比如,电子设备的设备信息可以包括电子设备的序列号(serial number,SN)、电子设备的设备类型;电子设备的产品信息可以包括电子设备的品牌信息(比如华为)、电子设备的系列信息(比如Mate系列、P系列)。The attribute information of the electronic device may include at least one of the following: device information of the electronic device and product information of the electronic device. For example, the device information of the electronic device may include the serial number (SN) of the electronic device and the device type of the electronic device; the product information of the electronic device may include the brand information of the electronic device (such as Huawei), the series information of the electronic device ( Such as Mate series, P series).
此外,第一电子设备接收用户的输入信息的方式可以有多种,下面描述一种可能的实现方式。比如,第一电子设备中可以预先安装用于代理修复的应用程序(为便于描述,称为应用A),即第一电子设备的应用程序层中可以包括应用A,应用A可以为系统应用。当第二电子设备开机异常,用户想要通过第一电子设备对第二电子设备进行修复时,可以在第一电子设备上启动应用A(比如,用户点击应用A的图标,参见图7中的(a)所示),进而第一电子设备的显示屏上可以显示如图7中的(b)所示意的界面,该界面中可以包括一个或多个选项(比如“支持修复的电子设备”选项)。用户可以触发“支持修复的电子设备”这一选项,进而第一电子设备的显示屏上可以显示如图7中的(c)所示意的界面,该界面中可以包括输入框(该输入框用于用户输入第二电子设备的属性信息)。用户可以在输入框中输入第二电子设备的属性信息(比如品牌为“华为”、系列为“P系列”),并点击“确定”按钮,相应地,第一电子设备可以接收到第二电子设备的属性信息,并执行如前文所述的判断过程,若确定支持修复第二电子设备,则可以发出提示信息(比如在第一电子设备的显示屏上显示“支持修复”),参见图7中的(d)所示;若确定支持修复第二电子设备,则可以发出提示信息(比如在第一电子设备的显示屏上显示“不支持修复”),参见图7中的(e)所示。In addition, there may be various manners for the first electronic device to receive the user's input information, and a possible implementation manner is described below. For example, the first electronic device may be pre-installed with an application for proxy repair (referred to as application A for ease of description), that is, the application layer of the first electronic device may include application A, and application A may be a system application. When the second electronic device is turned on abnormally, and the user wants to repair the second electronic device through the first electronic device, application A can be started on the first electronic device (for example, the user clicks the icon of application A, see FIG. 7 . (a)), and then the display screen of the first electronic device may display an interface as shown in (b) in FIG. 7 , and the interface may include one or more options (for example, "electronic device that supports repair" option). The user can trigger the option of "electronic equipment supporting repair", and then the display screen of the first electronic equipment can display an interface as shown in (c) in FIG. 7 , and the interface can include an input box (the input box uses for the user to input the attribute information of the second electronic device). The user can input the attribute information of the second electronic device in the input box (for example, the brand is "Huawei" and the series is "P series"), and click the "OK" button, correspondingly, the first electronic device can receive the second electronic device. The attribute information of the device, and the judgment process as described above is performed. If it is determined that the second electronic device is supported to be repaired, a prompt message can be sent (for example, "repair is supported" is displayed on the display screen of the first electronic device), see Figure 7 As shown in (d) in the above; if it is determined that the repair of the second electronic device is supported, a prompt message may be issued (for example, "repair is not supported" is displayed on the display screen of the first electronic device), see (e) in FIG. 7 . Show.
本申请实施例中,若提示信息用于提示用户第一电子设备支持修复第二电子设备,则可以通过如下S603至S609实现第一电子设备修复第二电子设备;若提示信息用于提示用户第一电子设备不支持修复第二电子设备,则可以不再执行如下S603至S609。如此,通过上述S601和S602可以让用户提前获知第一电子设备是否支持修复第二电子设备,从而避免第一电子设备不支持第二电子设备导致后续修复失败而影响用户体验。In this embodiment of the present application, if the prompt information is used to prompt the user that the first electronic device supports the repair of the second electronic device, the first electronic device can repair the second electronic device through the following S603 to S609; If one electronic device does not support repairing the second electronic device, the following S603 to S609 may not be performed. In this way, through the above S601 and S602, the user can be informed in advance whether the first electronic device supports the repair of the second electronic device, so as to avoid subsequent repair failure caused by the first electronic device not supporting the second electronic device and affecting user experience.
需要说明的是,上述S601和S602为可选步骤,也就是说,具体实施中,也可以选择不执行上述S601和S602,而直接执行S603等后续步骤。It should be noted that the above S601 and S602 are optional steps, that is, in the specific implementation, the above S601 and S602 may also be chosen not to be executed, and subsequent steps such as S603 may be directly executed.
S603,第一电子设备与第二电子设备建立连接。S603, the first electronic device establishes a connection with the second electronic device.
此处,第一电子设备与第二电子设备建立连接的方式可以有多种,下面介绍两种可能的实现方式。Here, there may be multiple manners for establishing a connection between the first electronic device and the second electronic device, and two possible implementation manners are described below.
实现方式1:第一电子设备可以与第二电子设备建立有线连接,比如第一电子设备和第二电子设备通过数据线建立有线连接,该数据线的一端连接第一电子设备的第一端口,另一端连接第二电子设备的第一端口。由于第二电子设备开机异常,即第二电子设备的第一处理器出现异常,此种情形下,第二电子设备中第一属性的取值为伪,进而是由第二处理器管理共享模块(具体可以参见上述图3中的相关描述),即第一端口与第二处理器之间可以建立有连接;因此,第一电子设备的第一处理器通过有线连接与第二电子设备的第二处理器连接,参见图8中的(a)所示。若前文所描述的第一端口为USB Type C端口,则该数据线可以称为CC线。Implementation 1: The first electronic device can establish a wired connection with the second electronic device. For example, the first electronic device and the second electronic device establish a wired connection through a data cable, and one end of the data cable is connected to the first port of the first electronic device. The other end is connected to the first port of the second electronic device. Since the second electronic device is abnormally powered on, that is, the first processor of the second electronic device is abnormal, in this case, the value of the first attribute in the second electronic device is false, and the shared module is managed by the second processor. (For details, please refer to the relevant description in FIG. 3 above), 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 first processor of the second electronic device through a wired connection. The two processors are connected, as shown in (a) of FIG. 8 . If the first port described above is a USB Type C port, the data line can be called a CC line.
实现方式2:第一电子设备可以与第二电子设备建立无线连接。由于第二电子设备开 机异常,即第二电子设备的第一处理器出现异常,此种情形下,第二电子设备中第一属性的取值为伪,进而是由第二处理器管理共享模块(具体可以参见上述图3中的相关描述),即无线通信模块与第二处理器之间可以建立有连接,进而第二处理器可以通过无线通信模块与第一电子设备建立连接;也就是说,第一电子设备的第一处理器通过无线连接与第二电子设备的第二处理器连接,参见图8中的(b)所示。Implementation 2: The first electronic device may establish a wireless connection with the second electronic device. Since the second electronic device is abnormally powered on, that is, the first processor of the second electronic device is abnormal, in this case, the value of the first attribute in the second electronic device is false, and the shared module is managed by the second processor. (For details, please refer to the relevant description in FIG. 3 above), that is, a connection may be established between the wireless communication module and the second processor, and then the second processor may establish a connection with the first electronic device through the wireless communication module; that is, a connection may be established between the wireless communication module and the second processor; , the first processor of the first electronic device is connected to the second processor of the second electronic device through a wireless connection, as shown in (b) of FIG. 8 .
S604,第一电子设备接收用户的第一操作命令,第一操作命令用于触发第一电子设备对第二电子设备进行修复。S604, the first electronic device receives a first operation command from the user, where the first operation command is used to trigger the first electronic device to repair the second electronic device.
此处,第一电子设备接收第一操作命令的实现方式可以有多种,下面描述三种可能的实现方式。Here, there may be various implementation manners for the first electronic device to receive the first operation command, and three possible implementation manners are described below.
实现方式1:第一电子设备可以预先安装用于代理修复的应用程序(比如前文所述的应用A),第一电子设备与第二电子设备建立连接后,用户可以启动应用A(比如,用户点击应用A的图标,参见图7中的(a)所示),进而第一电子设备的显示屏上可以显示如图7中的(b)所示意的界面,该界面中可以包括一个或多个选项(比如“授权检查”选项)。若用户触发“授权检查”(即相当于触发第一操作命令),则第一电子设备可以接收到第一操作命令。Implementation 1: The first electronic device may pre-install an application program for proxy repair (such as the aforementioned application A), and after the first electronic device establishes a connection with the second electronic device, the user can start the application A (for example, the user Click the icon of application A, see (a) in FIG. 7 ), and then the display screen of the first electronic device may display an interface as shown in (b) in FIG. 7 , the interface may include one or more options (such as the "Authorization Check" option). If the user triggers the "authorization check" (ie, is equivalent to triggering the first operation command), the first electronic device may receive the first operation command.
实现方式2:第一电子设备的设置应用中可以预先新增一个选项(比如“授权检查”选项,参见图9所示),进而若用户启动设置应用(比如,用户点击设置应用的图标),进而触发“授权检查”(即相当于触发第一操作命令),则第一电子设备可以接收到第一操作命令。Implementation mode 2: an option (such as an "authorization check" option, as shown in FIG. 9 ) may be added in advance in the setting application of the first electronic device, and then if the user starts the setting application (for example, the user clicks the icon of the setting application), Then the "authorization check" is triggered (that is, equivalent to triggering the first operation command), and the first electronic device can receive the first operation command.
实现方式3:第一电子设备中可以预先设置授权检查功能对应的暗码,进而当用户可以打开第一电子设备的拨号盘,输入该暗码(即相当于触发第一操作命令),则第一电子设备可以接收到第一操作命令。Implementation 3: A password corresponding to the authorization check function can be preset in the first electronic device, and then when the user can open the dial of the first electronic device and enter the password (that is, equivalent to triggering the first operation command), the first electronic device The device may receive the first operation command.
S605,响应于第一操作命令,第一电子设备从第一服务器获取授权文件,所述授权文件用于指示所述第一电子设备具有对所述第二电子设备进行修复的权限。S605, in response to the first operation command, the first electronic device obtains an authorization file from the first server, where the authorization file is used to indicate that the first electronic device has the right to repair the second electronic device.
此处,作为一种可能的实现,第一电子设备接收到第一操作命令后,可以在显示屏上显示如图10中的(a)所示意的界面,该界面中包括两个选项,分别为“已建立信赖关系”、“未建立信赖关系”。Here, as a possible implementation, after receiving the first operation command, the first electronic device may display an interface as shown in (a) in FIG. 10 on the display screen, and the interface includes two options, respectively "Reliable relationship has been established", "Reliable relationship has not been established".
(1)若用户选择“已建立信赖关系”(比如,用户点击“已建立信赖关系”选项,参见图10中的(a)所示),则第一电子设备(具体可以为第一电子设备的第一处理器)可以将第一电子设备的相关信息发送给第二电子设备,第二电子设备的第二处理器接收到第一电子设备的相关信息后,可以将其与从存储器中存储的与第二电子设备建立有信赖关系的电子设备的相关信息进行匹配,当匹配成功后,可以向第一电子设备发送授权通过的指令,该授权通过的指令中可以包括一个加密文件,该加密文件可以由第一服务器解密,而第一电子设备无法解密,该加密文件用于指示第二电子设备授权通过第一电子设备进行修复;进而,第一电子设备可以在界面上显示“授权通过”,参见图10中的(b)所示。当匹配失败后,可以向第一电子设备发送未授权通过的指令;进而,第一电子设备可以在界面上显示“未授权通过”,参见图10中的(c)所示。示例性地,若第一电子设备显示“未授权通过”,则用户可以触发第一电子设备返回到图9所示的界面,通过选择未建立信赖关系来触发第一电子设备获取代理修复权限,具体参见下文的描述。(1) If the user selects “established trust relationship” (for example, the user clicks the “established trust relationship” option, see (a) in FIG. 10 ), the first electronic device (specifically, the first electronic device The first processor of the first electronic device) can send the relevant information of the first electronic device to the second electronic device, and after the second processor of the second electronic device receives the relevant information of the first electronic device, it can be stored with it from the memory. The relevant information of the electronic device that has established a trust relationship with the second electronic device is matched, and when the matching is successful, an instruction for authorization can be sent to the first electronic device, and the instruction for authorization can include an encrypted file. The file can be decrypted by the first server, but cannot be decrypted by the first electronic device, and the encrypted file is used to instruct the second electronic device to authorize the repair through the first electronic device; furthermore, the first electronic device can display "authorized passed" on the interface , see Fig. 10 (b). When the matching fails, an instruction of unauthorized passing may be sent to the first electronic device; further, the first electronic device may display "unauthorized passing" on the interface, as shown in (c) of FIG. 10 . Exemplarily, if the first electronic device displays "unauthorized pass", the user can trigger the first electronic device to return to the interface shown in FIG. 9, and trigger the first electronic device to obtain the proxy repair authority by selecting that the trust relationship is not established, See the description below for details.
其中,第一电子设备和第二电子设备建立信赖关系的具体实现可以有多种。作为一种 可能的实现,在第二电子设备开机正常时,第一电子设备和第二电子设备可以建立连接(比如第一电子设备的第一处理器和第二电子设备的第一处理器建立有线连接或无线连接)。第二电子设备接收用户的第二操作命令,并根据第二操作命令,向第一电子设备发送请求消息,以请求第一电子设备与第二电子设备建立信赖关系。其中,请求消息中可以包括第二电子设备的相关信息。相应地,第一电子设备接收到请求消息后,可以建立第一电子设备与第二电子设备之间的信赖关系,并存储第二电子设备的相关信息(比如存储到第一电子设备的从存储器中);可选地,第一电子设备还可以发出提示信息,用于提示用户已成功建立第一电子设备与第二电子设备之间的信赖关系。以及,第一电子设备向第二电子设备发送响应消息,响应消息中包括第二电子设备的相关信息,第二电子设备接收到响应消息后,可以建立第一电子设备与第二电子设备之间的信赖关系,并存储第一电子设备的相关信息(比如存储到第二电子设备的从存储器中);可选地,第二电子设备还可以发出提示信息,用于提示用户已成功建立第一电子设备与第二电子设备之间的信赖关系。示例性地,电子设备的相关信息可以包括电子设备的设备信息、账户信息等。There may be various specific implementations for establishing the trust relationship between the first electronic device and the second electronic device. As a possible implementation, when the second electronic device is powered on normally, the first electronic device and the second electronic device may establish a connection (for example, the first processor of the first electronic device and the first processor of the second electronic device establish a connection wired or wireless connection). The second electronic device receives the user's second operation command, and sends a request message to the first electronic device according to the second operation command, so as to request the first electronic device to establish a trust relationship with the second electronic device. The request message may include relevant information of the second electronic device. Correspondingly, after the first electronic device receives the request message, it can establish a trust relationship between the first electronic device and the second electronic device, and store relevant information of the second electronic device (such as a slave memory stored in the first electronic device). ); optionally, the first electronic device may also send out prompt information for prompting the user that the trust relationship between the first electronic device and the second electronic device has been successfully established. And, the first electronic device sends a response message to the second electronic device, the response message includes relevant information of the second electronic device, and after receiving the response message, the second electronic device can establish a relationship between the first electronic device and the second electronic device. and store the relevant information of the first electronic device (for example, stored in the slave memory of the second electronic device); optionally, the second electronic device can also send out prompt information to prompt the user that the first electronic device has been successfully established. The trust relationship between the electronic device and the second electronic device. Exemplarily, the related information of the electronic device may include device information, account information, and the like of the electronic device.
第二电子设备接收第二操作命令的实现方式可以有多种。比如,第一电子设备的设置应用中可以预先新增一个选项(比如“设备互助”选项),进而若用户启动设置应用(比如,用户点击设置应用的图标),进而触发“设备互助”(即相当于触发第二操作命令),则第一电子设备可以接收到第二操作命令。There may be various implementations for the second electronic device to receive the second operation command. For example, an option (such as the "device mutual assistance" option) may be added in advance in the setting application of the first electronic device, and if the user starts the setting application (for example, the user clicks on the icon of the setting application), the "device mutual assistance" (ie, the "device mutual assistance") is triggered. is equivalent to triggering the second operation command), the first electronic device can receive the second operation command.
(2)若用户选择未建立信赖关系(比如,用户点击“未建立信赖关系”选项,参见图11中的(a)所示),则第一电子设备的显示屏上可以显示如图11中的(b)所示的界面,该界面中包括多种可能的获取代理修复权限的方式,比如“通过授权码获取代理修复权限”、“通过开机密码(比如数字密码或指纹)获取代理修复权限”,还可以包括其它可能的方式,具体不做限定。(2) If the user chooses that the trust relationship is not established (for example, the user clicks the option of "no trust relationship established", see (a) in FIG. 11 ), the display screen of the first electronic device may display the display shown in FIG. 11 . The interface shown in (b), the interface includes a variety of possible ways to obtain the agent repair authority, such as "obtaining the agent repair authority through the authorization code", "obtaining the agent repair authority through the power-on password (such as digital password or fingerprint)" ”, may also include other possible manners, which are not specifically limited.
进一步地,若用户选择“通过授权码获取代理修复权限”(比如,用于点击“通过授权码获取代理修复权限”选项,参见图11中的(b)所示),则第一电子设备可以显示用于输入授权码的输入框,参见图11中的(c)所示。当第一电子设备接收到用户输入的授权码后,可以将授权码传输给第二电子设备,进而第二电子设备接收到授权码后,可以将授权码与从存储器中存储的授权码进行比对,若一致,则可以确定授权通过,并向第一电子设备发送授权通过的指令,该授权通过的指令中可以包括一个加密文件,该加密文件可以由第一服务器解密,而第一电子设备无法解密,该加密文件用于指示第二电子设备授权通过第一电子设备进行修复;进而,第一电子设备可以在界面上显示“授权通过”,参见图11中的(d)所示;若不一致,则可以确定未授权通过,并向第一电子设备发送未授权通过的指令;进而,第一电子设备可以在界面上显示“未授权通过”,参见图11中的(e)所示。示例性地,若第一电子设备显示“未授权通过”,则用户可以触发见图11中的(e)中所示意的“临时授权”,进而第一电子设备可以向第一服务器申请获取代理修复权限,具体参见下文的描述。Further, if the user selects "obtain proxy repair authority through authorization code" (for example, for clicking the option "obtain proxy repair authority through authorization code", see (b) in FIG. 11 ), the first electronic device can An input box for inputting an authorization code is displayed, as shown in (c) of FIG. 11 . When the first electronic device receives the authorization code input by the user, it can transmit the authorization code to the second electronic device, and after receiving the authorization code, the second electronic device can compare the authorization code with the authorization code stored in the memory Yes, if they are consistent, it can be determined that the authorization is passed, and an instruction of passing the authorization can be sent to the first electronic device. The instruction of passing the authorization can include an encrypted file, and the encrypted file can be decrypted by the first server, and the first electronic device If it cannot be decrypted, the encrypted file is used to instruct the second electronic device to authorize the repair through the first electronic device; furthermore, the first electronic device may display “authorized passed” on the interface, as shown in (d) in FIG. 11 ; if If not, it can be determined to pass without authorization, and send an instruction of unauthorized pass to the first electronic device; furthermore, the first electronic device can display "unauthorized pass" on the interface, as shown in (e) of FIG. 11 . Exemplarily, if the first electronic device displays “pass without authorization”, the user can trigger the “temporary authorization” as shown in (e) in FIG. 11 , and then the first electronic device can apply to the first server to obtain the proxy Repair permissions, see the description below for details.
本申请实施例中,第一电子设备通过图10或图11中的方式授权通过后,可以向第一服务器发送授权请求,授权请求包括第二电子设备的设备信息、第一电子设备的设备信息和加密文件,第一服务器接收到授权请求后,通过解密该加密文件可以获知第二电子设备授权通过第一电子设备进行修复,进而可以对第二电子设备的设备信息、第一电子设备的设备信息进行校验(比如校验方式可以为公钥基础设施(public key infrastructure,PKI)校 验),并对代理授权请求进行合法性认证,当认证通过后,可以向第一电子设备下发授权文件。其中,授权文件可以包含第一电子设备的设备信息和第二电子设备的设备信息,授权文件用于第一电子设备对第二电子设备进行代理修复。In this embodiment of the present application, after the first electronic device is authorized in the manner shown in FIG. 10 or FIG. 11 , an authorization request may be sent to the first server, where the authorization request includes device information of the second electronic device and device information of the first electronic device and encrypted file, after the first server receives the authorization request, by decrypting the encrypted file, it can know that the second electronic device is authorized to repair through the first electronic device, and then the device information of the second electronic device and the device information of the first electronic device can be obtained. The information is verified (for example, the verification method can be public key infrastructure (PKI) verification), and the legality of the proxy authorization request is verified. When the verification is passed, the authorization can be issued to the first electronic device. document. The authorization file may include device information of the first electronic device and device information of the second electronic device, and the authorization file is used for the first electronic device to perform proxy repair on the second electronic device.
若第一电子设备通过图11中的方式未授权通过,则在用户触发“临时授权”后,第一电子设备可以向服务器申请获取代理修复权限。具体来说,第一电子设备可以向第一服务器发送授权请求,授权请求中包括第二电子设备的设备信息、第一电子设备的设备信息;进一步地,授权请求还可以包括第一电子设备的其它可能的信息,比如第一电子设备的账户信息、第一电子设备的产品信息、第一电子设备的状态信息。其中,第一电子设备的产品信息可以包括第一电子设备的品牌信息、系列信息等,第一电子设备的状态信息用于指示第一电子设备当前所处的状态,比如用户状态或超级权限状态(比如root状态)。相应地,第一服务器接收到授权请求后,可以根据授权请求,评估是否允许第一电子设备获取代理修复权限,若允许,则可以向第一电子设备发送授权文件;若不允许(比如第一电子设备的状态为超级权限状态),则可以向第一电子设备发送未授权通过的指令。If the first electronic device is not authorized by the method shown in FIG. 11 , after the user triggers "temporary authorization", the first electronic device can apply to the server for obtaining the proxy repair authority. Specifically, the first electronic device may send an authorization request to the first server, where the authorization request includes device information of the second electronic device and device information of the first electronic device; further, the authorization request may also include the device information of the first electronic device. Other possible information, such as account information of the first electronic device, product information of the first electronic device, state information of the first electronic device. The product information of the first electronic device may include brand information, series information, etc. of the first electronic device, and the state information of the first electronic device is used to indicate the current state of the first electronic device, such as a user state or a super authority state. (such as root status). Correspondingly, after receiving the authorization request, the first server may, according to the authorization request, evaluate whether to allow the first electronic device to obtain the proxy repair authority, and if so, may send the authorization file to the first electronic device; The state of the electronic device is the super-authorized state), an unauthorized passing instruction can be sent to the first electronic device.
S606,第一电子设备对第二电子设备进行体检,进而确定第二电子设备的体检信息,第二电子设备的体检信息用于指示第二电子设备是否能够进入恢复模式;或者说,确定第二电子设备开机异常所对应的情形(比如前文所述的情形1、情形2或情形3)。S606, the first electronic device performs physical examination on the second electronic device, and then determines the physical examination information of the second electronic device, and the physical examination information of the second electronic device is used to indicate whether the second electronic device can enter the recovery mode; The situation corresponding to the abnormal startup of the electronic device (such as the situation 1, situation 2 or situation 3 described above).
此处,第一电子设备对第二电子设备进行体检的方式可以有多种,比如第一电子设备可以通过第一电子设备与第二电子设备之间的连接(参见图8所示),向第二电子设备中的第二处理器发送体检命令,用于获取第二电子设备的体检信息;相应地,第二电子设备的第二处理器接收到体检命令后,可以向第一电子设备返回体检结果,体检结果包括所述第二电子设备的体检信息。Here, the first electronic device can perform physical examination on the second electronic device in various ways. For example, the first electronic device can use the connection between the first electronic device and the second electronic device (as shown in FIG. The second processor in the second electronic device sends a medical examination command to obtain the medical examination information of the second electronic device; correspondingly, after receiving the medical examination command, the second processor of the second electronic device can return to the first electronic device The physical examination result, where the physical examination result includes physical examination information of the second electronic device.
示例性地,第二电子设备中可以预设一个或多个属性(比如第二属性、第三属性)。当第二电子设备的第一处理器能够加载相应分区进入快速启动模式时,第二属性的取值可以为真,当第二电子设备的第一处理器无法成功加载相应分区进入快速启动模式时,第二属性的取值可以为伪。当第二电子设备的第一处理器能够加载相应分区进入恢复模式时,第三属性的取值可以为真,当第二电子设备的第一处理器无法成功加载相应分区进入恢复模式时,第三属性的取值可以为伪。如此,第二处理器接收到体检命令后,通过查询相应属性(比如第二属性和第三属性)的取值,可以得到第二电子设备的体检信息。Exemplarily, one or more attributes (such as the second attribute and the third attribute) may be preset in the second electronic device. When the first processor of the second electronic device can load the corresponding partition to enter the fast boot mode, the value of the second attribute may be true, and when the first processor of the second electronic device cannot successfully load the corresponding partition to enter the 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 to enter the recovery mode, the value of the third attribute may be true, and when the first processor of the second electronic device cannot successfully load the corresponding partition to enter the recovery mode, the first processor The value of the three attributes can be false. In this way, after receiving the medical examination command, the second processor can obtain the medical examination information of the second electronic device by querying the values of the corresponding attributes (eg, the second attribute and the third attribute).
可选地,如果第二电子设备中未预设上述属性(比如第二属性、第三属性),则第二处理器可以向第一处理器发送体检命令(比如第二处理器可以优先通过第二端口向第一处理器发送体检命令,若第一处理器未响应,则第二处理器可以通过第三端口向第一处理器发送体检命令),进而可以得到第二电子设备的体检信息。Optionally, if the above-mentioned attributes (such as the second attribute and the third attribute) are not preset in the second electronic device, the second processor may send a physical examination command to the first processor (for example, the second processor may preferentially pass the first The second port sends a physical examination command to the first processor, and if the first processor does not respond, the second processor can send a physical examination command to the first processor through the third port), and then the physical examination information of the second electronic device can be obtained.
S607,第一电子设备向第二服务器获取用于修复第二电子设备的升级包的信息。S607, the first electronic device obtains from the second server information about an upgrade package for repairing the second electronic device.
示例性地,第一电子设备可以获取第二电子设备的版本信息。第二电子设备的版本信息可以包括第二电子设备的系统版本型号,比如第二电子设备的型号、第二电子设备中操作系统的版本号。其中,第一电子设备获取第二电子设备的版本信息的方式可以有多种,比如参见上文所述,第二电子设备的版本信息可以存储在第二存储器中。如此,第一电子设备可以向第二电子设备的第二处理器发送查询命令,查询命令用于查询第二电子设备的版本信息;相应地,第二电子设备的第二处理器接收到查询命令后,可以通过访问第二存储器得到第二电子设备的版本信息,进而发送给第一电子设备。Exemplarily, the first electronic device may acquire version information of the second electronic device. The version information of the second electronic device may include a system version model of the second electronic device, such as a model of the second electronic device and a version number of an operating system in the second electronic device. The first electronic device may acquire the version information of the second electronic device in various ways. For example, referring to the above, the version information of the second electronic device may be stored in the second memory. In this way, the first electronic device can send a query command to the second processor of the second electronic device, where the query command is used to query the version information of the second electronic device; correspondingly, the second processor of the second electronic device receives the query command Afterwards, the version information of the second electronic device can be obtained by accessing the second memory, and then sent to the first electronic device.
进一步地,第一电子设备可以向第二服务器发送搜包请求,搜包请求包括授权文件和第二电子设备的版本信息;第二服务器接收到搜包请求后,可以根据授权文件,确定第一电子设备为代理模式,并根据第二电子设备的版本信息,确定与第二电子设备的版本所匹配的升级包的信息。进而,第二服务器向第一电子设备发送搜包响应,搜包响应包括匹配的升级包的信息,还可以包括鉴权文件和文件列表信息(比如filelist.xml)。其中,升级包的信息可以包括升级包的下载地址,可选地,还可以包括其它可能的信息,比如升级包的标识,具体不做限定;鉴权文件包括对升级包的描述信息(比如哈希值),用于对升级包进行鉴权,以确保下载的升级包的合法性;文件列表信息包括升级包所包括的各个文件的哈希值,用于确保升级包的完整性。Further, the first electronic device can send a packet search request to the second server, and the packet search request includes the authorization file and the version information of the second electronic device; after receiving the packet search request, the second server can determine the first packet according to the authorization file. The electronic device is in the proxy mode, and according to the version information of the second electronic device, the information of the upgrade package matching the version of the second electronic device is determined. Further, the second server sends a packet search response to the first electronic device, where the packet search response includes information of the matching upgrade package, and may also include authentication file and file list information (eg filelist.xml). Wherein, the information of the upgrade package may include the download address of the upgrade package, and optionally, may also include other possible information, such as the identifier of the upgrade package, which is not specifically limited; the authentication file includes description information of the upgrade package (such as Ha value), which is used to authenticate the upgrade package to ensure the validity of the downloaded upgrade package; the file list information includes the hash value of each file included in the upgrade package, which is used to ensure the integrity of the upgrade package.
S608,第一电子设备根据升级包的信息,从第三服务器下载升级包。S608, the first electronic device downloads the upgrade package from the third server according to the information of the upgrade package.
此处,第一电子设备可以向第三服务器发送下载请求,下载请求包括S607中所获取的升级包的信息;相应地,第三服务器接收到下载请求后,根据升级包的信息搜索对应的升级包,并向第一电子设备发送下载响应,下载响应中包括升级包。Here, the first electronic device may send a download request to the third server, and the download request includes the information of the upgrade package obtained in S607; correspondingly, after receiving the download request, the third server searches for the corresponding upgrade package according to the information of the upgrade package package, and send a download response to the first electronic device, where the download response includes the upgrade package.
示例性地,第一电子设备接收到第三服务器发送的升级包后,可以根据文件列表信息,确定升级包中所包括的文件是否完整。第一电子设备确定升级包所包括的文件完整后,作为一种可能的实现,第一电子设备可以通过第一电子设备与第二电子设备之间的连接,向第二电子设备的第二处理器发送升级包和鉴权文件。相应地,第二电子设备的第二处理器接收到升级包和鉴权文件后,可以访问第二电子设备的第一存储器,若确定第一存储器中的预留分区可以存储升级包和鉴权文件(比如预留分区的剩余空间足够存储升级包和鉴权文件),则可以将升级包和鉴权文件存储在该预留分区中,比如该预留分区可以位于数据块设备的尾部(即位于数据分区之后),以便于在数据分区发生损坏的情况下,保证升级包和鉴权文件的有效存储。进一步地,存储成功后,第二电子设备的第二处理器可以向第一电子设备发送存储成功的响应。第二电子设备的第二处理器若确定预留分区无法存储升级包和鉴权文件(比如预留分区的剩余空间不足,无法存储升级包和鉴权文件),则可以向第一电子设备发送存储失败的响应,进而第一电子设备接收到该响应后,可以将升级包和鉴权文件存储在自己的数据分区中。Exemplarily, after receiving the upgrade package sent by the third server, the first electronic device may determine whether the files included in the upgrade package are complete according to the file list information. After the first electronic device determines that the files included in the upgrade package are complete, as a possible implementation, the first electronic device can perform the second processing on the second electronic device through the connection between the first electronic device and the second electronic device. The server sends the upgrade package and authentication file. Correspondingly, after the second processor of the second electronic device receives the upgrade package and the authentication file, it can access the first memory of the second electronic device, and if it is determined that the reserved partition in the first memory can store the upgrade package and the authentication file file (for example, the remaining space of the reserved partition is enough 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 (ie After the data partition), in order to ensure the effective storage of the upgrade package and authentication files in the case of damage to the data partition. Further, after the storage is successful, the second processor of the second electronic device may send a response that the storage is successful 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 the authentication file (for example, the remaining space of the reserved partition is insufficient to store the upgrade package and the authentication file), it can send the update package and the authentication file to the first electronic device. The failed response is stored, and after receiving the response, the first electronic device can store the upgrade package and the authentication file in its own data partition.
作为又一种可能的实现,第一电子设备也可以直接将升级包和鉴权文件存储在自己的存储器中。As another possible implementation, the first electronic device may also directly store the upgrade package and the authentication file in its own memory.
作为又一种可能的实现,第一电子设备可以通过第一电子设备与第二电子设备之间的连接,向第二电子设备的第二处理器发送升级包,进而第二电子设备的第二处理器可以将升级包存储在第二电子设备的第一存储器的预留分区中,而第一电子设备可以将鉴权文件存储在自己的存储器中。或者,第一电子设备可以通过第一电子设备与第二电子设备之间的连接,向第二电子设备的第二处理器发送鉴权文件,进而第二电子设备的第二处理器可以将鉴权文件存储在第二电子设备的第一存储器的预留分区中,而第一电子设备可以将升级包存储在自己的存储器中。采用该种方式,由于升级包和鉴权文件可以存储在不同设备中,从而能够避免升级包和鉴权文件同时被替换,有效保证升级包和鉴权文件的安全性。As another possible implementation, the first electronic device may send an upgrade package to the second processor of the second electronic device through the connection between the first electronic device and the second electronic device, and then the second electronic device of the second electronic device sends an upgrade package to the second processor of the second electronic device. The processor may store the upgrade package in a reserved partition of the first memory of the second electronic device, and the first electronic device may store the authentication file in its own memory. Alternatively, the first electronic device may send the authentication file to the second processor of the second electronic device through the connection between the first electronic device and the second electronic device, and then the second processor of the second electronic device may authenticate the authentication file. The rights file is stored in a reserved partition of the first memory of the second electronic device, and the first electronic device can store the upgrade package in its own memory. In this way, since the upgrade package and the authentication file can be stored in different devices, the upgrade package and the authentication file can be prevented from being replaced at the same time, and the security of the upgrade package and the authentication file can be effectively guaranteed.
S609,第一电子设备控制所述第二电子设备根据所述升级包进行修复。S609, the first electronic device controls the second electronic device to perform repair according to the upgrade package.
考虑到第二电子设备开机异常可能对应不同的情形,此处,将针对第二电子设备所对应的不同情形,分别描述第一电子设备控制所述第二电子设备根据所述升级包进行修复的实现。Considering that the abnormal startup of the second electronic device may correspond to different situations, here, for the different situations corresponding to the second electronic device, the first electronic device controls the second electronic device to repair according to the upgrade package. accomplish.
(1)第二电子设备能够进入恢复模式(即第二电子设备对应的情形为上述情形3)(1) The second electronic device can enter the recovery mode (that is, the situation corresponding to the second electronic device is the above-mentioned situation 3)
第一电子设备若确定第二电子设备能够进入恢复模式,则可以向第二电子设备发送启动升级命令,第二电子设备的第二处理器接收到启动升级命令后,可以通过第二端口(或第三端口)将启动升级命令传输给第二电子设备的第一处理器。相应地,第二电子设备的第一处理器接收到启动升级命令后,可以进入恢复模式,并搜索第一电子设备的数据分区和第二电子设备的数据分区是否有升级包,若有,则可以根据升级包进行修复。此处,若升级包和鉴权文件存储在第二电子设备中,则第二电子设备的第一处理器可以从第二电子设备中读取升级包和鉴权文件。若升级包和鉴权文件存储在第一电子设备中,则第二电子设备的第一处理器可以从第一电子设备中读取升级包和鉴权文件;此种情形下,第一电子设备的数据分区相当于第二电子设备的外部存储区域。If the first electronic device determines that the second electronic device can enter the recovery mode, it can send a start-up upgrade command to the second electronic device. After receiving the start-up upgrade command, the second processor of the second electronic device The third port) transmits the start-up upgrade command to the first processor of the second electronic device. Correspondingly, after the first processor of the second electronic device receives the start-up upgrade command, it can enter the recovery mode, and search the data partition of the first electronic device and the data partition of the second electronic device whether there is an upgrade package, and if so, then It can be fixed according to the upgrade package. Here, if the upgrade package and the authentication file are stored in the second electronic device, the first processor of the second electronic device can read the upgrade package and the authentication file from the second electronic device. If the upgrade package and the authentication file are stored in the first electronic device, the first processor of the second electronic device can read the upgrade package and the authentication file from the first electronic device; in this case, the first electronic device The data partition is equivalent to the external storage area of the second electronic device.
作为一种可能的实现,第二电子设备的第一处理器根据升级包进行修复(比如将第二电子设备中操作系统的版本由V1升级为V2)的流程可以参见图12,如图12所示,该流程可以包括:As a possible implementation, the process of repairing the first processor of the second electronic device according to the upgrade package (for example, upgrading the version of the operating system in the second electronic device from V1 to V2) may refer to FIG. 12 , as shown in FIG. 12 . As shown, the process can include:
S1201,第二电子设备的第一处理器根据鉴权文件对升级包进行鉴权,若鉴权通过,则可以执行S1202,若鉴权不通过,则确定升级失败。S1201, the first processor of the second electronic device authenticates the upgrade package according to the authentication file, and if the authentication is passed, S1202 may be executed, and if the authentication fails, it is determined that the upgrade fails.
S1202,第一处理器对升级包的签名进行验证,若验证通过,则可以执行S1203,若验证不通过,则可以确定升级失败。S1202, the first processor verifies the signature of the upgrade package, and if the verification passes, S1203 may be executed, and if the verification fails, it may be determined that the upgrade fails.
S1203,第一处理器对升级包进行版本检查,比如检查该升级包是否为第一电子设备的当前版本所对应的升级包,若检查通过,则可以执行S1204,若检查不通过,则可以确定升级失败。S1203, the first processor performs a version check on the upgrade package, such as checking whether the upgrade package is an upgrade package corresponding to the current version of the first electronic device, if the check passes, S1204 may be executed, and if the check fails, it may be determined upgrade unsuccessful.
S1204,第一处理器进行分区表处理。S1204, the first processor performs partition table processing.
S1205,第一处理器启动二进制(binary)升级。S1205, the first processor starts a binary upgrade.
S1206,第一处理器解析升级包的数据。S1206, the first processor parses the data of the upgrade package.
S1207,第一处理器按序写分区镜像。S1207, the first processor writes the partition images in sequence.
S1208,第一处理器进行分区镜像校验。S1208, the first processor performs partition mirror verification.
S1209,第一处理器更新第一电子设备的版本信息,即将操作系统的版本由V1更新为V2,完成升级。S1209, the first processor updates the version information of the first electronic device, that is, the version of the operating system is updated from V1 to V2, and the upgrade is completed.
需要说明的是,图12所描述为一种可能的升级流程,图12中相关步骤的具体实现可以参见现有技术。It should be noted that FIG. 12 describes a possible upgrade process, and the specific implementation of the relevant steps in FIG. 12 may refer to the prior art.
(2)第二电子设备不能进入恢复模式(即第二电子设备对应的情形为上述情形1或情形2)(2) The second electronic device cannot enter the recovery mode (that is, the situation corresponding to the second electronic device is the above-mentioned situation 1 or situation 2)
第一电子设备若确定第二电子设备不能进入恢复模式,则作为一种可能的实现,第一电子设备对第二电子设备进行代理修复的流程可以参见图13。如图13所示,该流程可以包括:If the first electronic device determines that the second electronic device cannot enter the recovery mode, as a possible implementation, the process of performing proxy repair on the second electronic device by the first electronic device may refer to FIG. 13 . As shown in Figure 13, the process may include:
S1301,第一电子设备进入代理恢复模式,解析升级包得到最小系统镜像文件。S1301, the first electronic device enters a proxy recovery mode, and parses the upgrade package to obtain a minimum system image file.
S1302,第一电子设备通过第一电子设备与第二电子设备之间的连接(如图8所示),向第二电子设备的第二处理器发送最小系统镜像文件。S1302 , the first electronic device sends the minimum system image file to the second processor of the second electronic device through the connection between the first electronic device and the second electronic device (as shown in FIG. 8 ).
S1303,第二电子设备的第二处理器接收到最小系统镜像文件后,将最小系统镜像文件存储到第二电子设备的第一存储器(或第二存储器)中。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.
S1304,第一电子设备向第二电子设备的第二处理器发送强制启动命令。S1304, the first electronic device sends a forced startup command to the second processor of the second electronic device.
S1305,第二电子设备的第二处理器接收到强制启动命令后,通过第三端口将强制启动命令传输给第二电子设备的第一处理器。S1305 , after receiving the forced startup command, the second processor of the second electronic device transmits the forced startup command to the first processor of the second electronic device through the third port.
需要说明的是,上述S1304为可选步骤,也就是说,第一电子设备也可以不向第二电子设备的第二处理器发送强制启动命令,此种情形下,第二电子设备的第二处理器接收到最小系统镜像文件,可以主动通过第三端口向第二处理器的第一处理器发送强制启动命令。It should be noted that the above S1304 is an optional step, that is to say, the first electronic device may not send a forced start command to the second processor of the second electronic device. After receiving the minimum system image file, the processor can actively send a forced startup command to the first processor of the second processor through the third port.
S1306,第二电子设备的第一处理器接收到强制启动命令后,可以运行最小系统镜像文件进入恢复模式。S1306, after receiving the forced startup command, the first processor of the second electronic device may run the minimum system image file to enter the recovery mode.
示例性地,上述S607所获取到的鉴权文件中还可以包括最小系统镜像文件的描述信息,因此,第一处理器在运行最小系统镜像文件之前,可以根据鉴权文件中最小系统镜像文件的描述信息,对最小系统镜像文件进行鉴权,若鉴权通过,则可以运行最小系统镜像文件进入恢复模式。Exemplarily, the authentication file obtained in the above S607 may also include description information of the minimum system image file. Therefore, before running the minimum system image file, the first processor may The description information is used to authenticate the minimum system image file. If the authentication is passed, the minimum system image file can be run to enter the recovery mode.
S1307,第二电子设备的第一处理器根据第一电子设备和/或第二电子设备中的升级包和鉴权文件进行修复。S1307, the first processor of the second electronic device performs repair according to the upgrade package and the authentication file in the first electronic device and/or the second electronic device.
针对于上述内容,需要说明的是:上述各个流程图的步骤编号仅为执行流程的一种示例,并不构成对步骤执行的先后顺序的限制,本申请实施例中相互之间没有时序依赖关系的步骤之间没有严格的执行顺序。此外,各个流程图中所示意的步骤并非全部是必须执行的步骤,可以根据实际需要在各个流程图的基础上增添或者删除部分步骤。比如,上述S606可以在S607和S608之前执行,或者也可以在S607和S608之后执行,又或者,也可以与S607和S608同时执行。Regarding the above content, it should be noted that the step numbers of the above flow charts are only an example of the execution flow, and do not constitute a restriction on the sequence of execution of the steps, and there is no timing dependency between each other in the embodiments of the present application There is no strict order of execution between the steps. In addition, not all the steps shown in each flowchart are steps that must be executed, and some steps may be added or deleted on the basis of each flowchart according to actual needs. For example, the above S606 may be executed before S607 and S608, or may be executed after S607 and S608, or may be executed simultaneously with S607 and S608.
采用上述图6中所描述的方式,可以通过开机正常的电子设备对开机异常的电子设备进行代理修复,比如在开机异常的电子设备无法进入快速启动模式或恢复模式时,开机正常的电子设备可以对开机异常的电子设备进行代理修复,从而能够对开机异常的电子设备进行有效修复,提高用户体验。Using the method described in FIG. 6 above, the electronic device that is powered on normally can be used to perform proxy repair on the electronic device that is powered on abnormally. For example, when the electronic device that is powered on abnormally cannot enter the fast boot mode or recovery mode, the electronic device that is powered on normally Proxy repair is performed on the electronic device that is abnormally turned on, so that the electronic device that is abnormally turned on can be effectively repaired, and the user experience can be improved.
基于以上实施例,本申请还提供了一种电子设备,所述电子设备用于实现如图6所示的开机异常的修复方法。参阅图14所示,所述电子设备1400包括:处理器1401、存储器1402、通信接口1403。Based on the above embodiments, the present application further provides an electronic device, the electronic device is used to implement the method for repairing a startup abnormality as shown in FIG. 6 . Referring to FIG. 14 , the electronic device 1400 includes: a processor 1401 , a memory 1402 , and a communication interface 1403 .
(1)图14中所示意的电子设备可以为图6中的第一电子设备。此种情形下,处理器1401可以包括图1或图3中所示意的第一处理器,可选地,还包括图3中所示意的第二处理器;需要说明的是,由于第一电子设备为开机正常的电子设备,因此,当第一电子设备中包括第一处理器和第二处理器时,第一处理器处于正常运行状态,而第二处理器可以处于待命状态。存储器1402可以包括图1或图3中所示意的第一存储器,可选地,还包括图3中所示意的第二存储器。通信接口1403可以包括图1或图3中所示意的第一端口和/或无线通信模块,可选地,还可以包括图3中所示意的第二端口和/或第三端口。可以理解地,该电子设备还可以具有图2所示的各个外围或内部硬件。(1) The electronic device illustrated in FIG. 14 may be the first electronic device in FIG. 6 . In this case, the processor 1401 may include the first processor shown in FIG. 1 or FIG. 3 , and optionally, further include the second processor shown in FIG. 3 ; it should be noted that because the first electronic The device is an electronic device that is normally powered on. Therefore, when the first electronic device includes the first processor and the second processor, the first processor is in a normal operation state, and the second processor may be in a standby state. The memory 1402 may include the first memory shown in FIG. 1 or FIG. 3 , and optionally, further include the second memory shown in FIG. 3 . The communication interface 1403 may include the first port and/or the wireless communication module shown in FIG. 1 or FIG. 3 , and optionally, may further include the second port and/or the third port shown in FIG. 3 . It can be understood that the electronic device may also have various peripheral or internal hardware shown in FIG. 2 .
所述存储器1402,可以用于存储计算机程序,还可以存储用户数据、用于修复第二电子设备的升级包等信息。具体地,计算机程序可以包括程序代码,该程序代码包括计算机操作的指令。所述处理器1401(比如可以是指第一处理器)执行所述存储器1402所存放的程序,并通过上述各个部件,实现上述功能,从而最终实现以上实施例由第一电子设备执行的方法。The memory 1402 may be used to store computer programs, and may also store information such as user data, an upgrade package for repairing the second electronic device, and the like. In particular, a computer program may include program code including instructions for computer operation. The processor 1401 (for example, may be referred to as the first processor) executes the program stored in the memory 1402, and implements the above functions through the above components, thereby finally implementing the method executed by the first electronic device in the above embodiment.
具体来说,在一个实施例中,所述处理器1401结合所述通信接口1403实现如下步骤:与第二电子设备建立连接,所述第二电子设备开机异常的电子设备;获取所述第二电子设备的版本信息;根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;控制所述第二电子设备根据所述升级包进行修复。Specifically, in one embodiment, the processor 1401 implements the following steps in combination with the communication interface 1403: establishing a connection with a second electronic device, the second electronic device is abnormally powered on; obtaining the second electronic device Version information of the electronic device; obtaining an upgrade package for repairing the second electronic device according to the version information of the second electronic device; controlling the second electronic device to perform repair according to the upgrade package.
在一种可能的设计中,所述处理器1401还用于:通过所述通信接口1403接收用户的第一操作命令,所述第一操作命令用于触发所述第一电子设备对所述第二电子设备进行修复;响应于所述第一操作命令,通过所述通信接口1403从第一服务器获取授权文件,所述授权文件用于指示所述第一电子设备具有对所述第二电子设备进行修复的权限。In a possible design, the processor 1401 is further configured to: receive a user's first operation command through the communication interface 1403, where the first operation command is used to trigger the first electronic device to The second electronic device is repaired; in response to the first operation command, an authorization file is obtained from the first server through the communication interface 1403, and the authorization file is used to indicate that the first electronic device has access to the second electronic device. Permission to make repairs.
在一种可能的设计中,所述处理器1401具体用于:获取所述第二电子设备的设备信息;通过所述通信接口1403向所述第一服务器发送授权请求,所述授权请求包括所述第一电子设备的设备信息、所述第二电子设备的设备信息;以及,通过所述通信接口1403接收来自所述第一服务器的授权响应,所述授权响应包括所述授权文件。In a 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 through the communication interface 1403, where the authorization request includes all device information of the first electronic device and device information of the second electronic device; and, through the communication interface 1403, receiving an authorization response from the first server, where the authorization response includes the authorization file.
在一种可能的设计中,所述授权请求还包括以下至少一项:所述第一电子设备的账户信息;所述第一电子设备的产品信息;所述第一电子设备的状态信息。In a possible design, the authorization request further includes at least one of the following: account information of the first electronic device; product information of the first electronic device; state information of the first electronic device.
在一种可能的设计中,所述处理器1401具体用于:通过所述通信接口1403向第二服务器发送搜包请求,所述搜包请求包括所述授权文件和所述第二电子设备的版本信息;以及通过所述通信接口1403接收来自所述第二服务器的搜包响应,所述搜包响应包括所述升级包的信息;根据所述升级包的信息,从第三服务器下载所述升级包。In a possible design, the processor 1401 is specifically configured to: send a packet search request to the second server through the communication interface 1403, where the packet search request includes the authorization file and the data of the second electronic device version information; and receive a packet search response from the second server through the communication interface 1403, the packet search response includes the information of the upgrade package; download the upgrade package from the third server according to the information of the upgrade package upgrade package.
在一种可能的设计中,所述处理器1401具体用于:确定所述第二电子设备的体检信息,所述第二电子设备的体检信息用于指示所述第二电子设备是否能够进入恢复模式;根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复。In a possible design, the processor 1401 is specifically configured to: determine physical examination information of the second electronic device, where the physical examination information of the second electronic device is used to indicate whether the second electronic device can enter recovery mode; according to the medical examination information of the second electronic device, control the second electronic device to repair according to the upgrade package.
在一种可能的设计中,当所述第二电子设备的体检信息用于指示所述第二电子设备能够进入恢复模式时,所述处理器1401具体用于:通过所述通信接口1403向所述第二电子设备发送启动升级命令,以使所述第二电子设备根据所述启动升级命令解析所述升级包,并根据解析后的升级包数据进行修复。In a possible design, when the medical examination information of the second electronic device is used to indicate that the second electronic device can enter the recovery mode, the processor 1401 is specifically configured to: send the communication interface 1403 to the The second electronic device sends a start-up upgrade command, so that the second electronic device parses the upgrade package according to the start-up upgrade command, and performs repairs according to the parsed upgrade package data.
在一种可能的设计中,当所述第二电子设备的体检信息用于指示所述第二电子设备不能进入恢复模式时,所述处理器1401具体用于:解析所述升级包得到最小系统镜像文件;通过所述通信接口1403向所述第二电子设备发送所述最小系统镜像文件和强制启动命令,以使所述第二电子设备运行所述最小系统镜像文件进行修复。In a possible design, when the medical examination information of the second electronic device is used to indicate that the second electronic device cannot enter the recovery mode, the processor 1401 is specifically configured to: parse the upgrade package to obtain the minimum system image file; send the minimum system image file and a forced startup 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.
在一种可能的设计中,所述处理器1401还用于:通过所述通信接口1403接收用户的输入信息,所述输入信息包括第二电子设备的属性信息;将所述第二电子设备的属性信息与预先存储支持修复的电子设备的属性信息进行比较,若预先存储支持修复的电子设备的属性信息包括所述第二电子设备的属性信息,则发出提示信息,所述提示信息用于提示用户所述第一电子设备支持修复所述第二电子设备。In a possible design, the processor 1401 is further configured to: receive input information from the user through the communication interface 1403, where the input information includes attribute information of the second electronic device; The attribute information is compared with the attribute information of the pre-stored electronic device supporting repair, and if the pre-stored attribute information of the electronic device supporting repair includes the attribute information of the second electronic device, prompt information is sent, and the prompt information is used to prompt The user supports the repair of the second electronic device on the first electronic device.
(2)图14中所示意的电子设备可以为图6中的第二电子设备。此种情形下,处理器1401可以包括图1或图3中所示意的第一处理器,还包括图3中所示意的第二处理器;需要说明的是,由于第二电子设备为开机异常的电子设备,因此,第二电子设备中的第一处理器处于异常运行状态,第二处理器可以接管第一处理器的部分功能。存储器1402可以包括图1或图3中所示意的第一存储器,还包括图3中所示意的第二存储器。通信接口1403可以包括第一通信接口和第二通信接口,其中,第一通信接口可以用于第二电子设备与其 它设备之间的通信,比如第一通信接口可以包括图1或图3中所示意的第一端口和/或无线通信模块等;第二通信接口可以用于第一处理器与第二处理器之间的通信,比如第二通信接口可以包括图3中所示意的第二端口和/或第三端口。可以理解地,该电子设备还可以具有图2所示的各个外围或内部硬件。(2) The electronic device illustrated in FIG. 14 may be the second electronic device in FIG. 6 . In this case, the processor 1401 may include the first processor shown in FIG. 1 or FIG. 3 , and also include the second processor shown in FIG. 3 ; it should be noted that because the second electronic device is abnormally powered on Therefore, the first processor in the second electronic device is in an abnormal operation state, and the second processor can take over part of the functions of the first processor. The memory 1402 may include the first memory illustrated in FIG. 1 or FIG. 3 , and further include the second memory illustrated in FIG. 3 . The communication interface 1403 may include a first communication interface and a second communication interface, wherein the first communication interface may be used for communication between the second electronic device and other devices, for example, the first communication interface may include the one shown in FIG. 1 or FIG. 3 . The illustrated first port and/or wireless communication module, etc.; the second communication interface may be used for communication between the first processor and the second processor, for example, the second communication interface may include the second port illustrated in FIG. 3 and/or third port. It can be understood that the electronic device may also have various peripheral or internal hardware shown in FIG. 2 .
所述存储器1402,可以用于存储计算机程序,还可以存储用户数据、升级包等信息。具体地,计算机程序可以包括程序代码,该程序代码包括计算机操作的指令。所述处理器1401(比如可以是指第一处理器和第二处理器)执行所述存储器1402所存放的程序,并通过上述各个部件,实现上述功能,从而最终实现以上实施例由第二电子设备执行的方法。The memory 1402 can be used to store computer programs, and can also store information such as user data and upgrade packages. In particular, a computer program may include program code including instructions for computer operation. The processor 1401 (for example, it may refer to the first processor and the second processor) executes the program stored in the memory 1402, and implements the above functions through the above components, so as to finally realize the above embodiment by the second electronic device. The method performed by the device.
具体来说,在一个实施例中,当所述指令被所述处理器1401执行时,使得所述处理器1401结合所述通信接口1403实现如下步骤:与第一电子设备建立连接,所述第一电子设备开机正常的电子设备;向所述第一电子设备发送所述第二电子设备的版本信息,以使所述第一电子设备根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;在所述第一电子设备的控制下,根据所述升级包进行修复。Specifically, in one embodiment, when the instructions are executed by the processor 1401, the processor 1401 is made to implement the following steps in combination with the communication interface 1403: establishing a connection with the first electronic device, the first electronic device An electronic device with an electronic device powered on normally; sending the version information of the second electronic device to the first electronic device, so that the first electronic device can obtain the version information for repairing according to the version information of the second electronic device An upgrade package of the second electronic device; under the control of the first electronic device, repairing is performed according to the upgrade package.
在一种可能的设计中,所述第二处理器具体用于:通过所述第一通信接口接收来自所述第一电子设备的启动升级命令,并通过所述第二通信接口向所述第一处理器发送所述启动升级命令;所述第一处理器具体用于:根据所述启动升级命令,解析所述升级包,并根据解析后的升级包数据进行修复。In a possible design, the second processor is specifically configured to: receive a start-up upgrade command from the first electronic device through the first communication interface, and send a command to the first electronic device through the second communication interface A processor sends the start-up upgrade command; the first processor is specifically configured to: parse the upgrade package according to the start-up upgrade command, and perform repairs according to the parsed upgrade package data.
在一种可能的设计中,所述第二处理器具体用于:通过所述第一通信接口接收来自所述第一电子设备的最小系统镜像文件,所述最小系统镜像文件是所述第一电子设备解析所述升级包得到的;通过所述第二通信接口向所述第一处理器发送强制启动命令;所述第一处理器具体用于:根据所述强制启动命令,运行所述最小系统镜像文件进行修复。In a possible design, the second processor is specifically configured to: receive a minimum system image file from the first electronic device through the first communication interface, where the minimum system image file is the first obtained by the electronic device parsing the upgrade package; sending a forced startup command to the first processor through the second communication interface; the first processor is specifically configured to: run the minimum startup command according to the forced startup command The system image file is repaired.
基于以上实施例,本申请实施例还提供一种修复系统,包括上述实施例中的第一电子设备和第二电子设备。可选地,还可以包括上述实施例中的第一服务器、第二服务器和第三服务器。Based on the above embodiments, the embodiments of the present application further provide a repair system, including the first electronic device and the second electronic device in the above embodiments. Optionally, the first server, the second server and the third server in the above embodiment may also be included.
基于以上实施例,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当计算机程序在计算机上运行时,使得计算机执行以上实施例提供的修复方法。Based on the above embodiments, the embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on the computer, the computer is made to execute the repair method provided by the above embodiment. .
其中,存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括RAM、ROM、EEPROM、CD-ROM或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。The storage medium may be any available medium that the computer can access. By way of example and not limitation, computer readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or be capable of carrying or storing instructions or data structures in the form of desired program code and any other medium that can be accessed by a computer.
基于以上实施例,本申请实施例还提供了一种程序产品,该程序产品包括指令,当所述指令在计算机上运行时,使得计算机执行以上实施例提供的修复方法。Based on the above embodiments, the embodiments of the present application further provide a program product, the program product includes instructions, when the instructions are run on a computer, the computer is made to execute the repair method provided by the above embodiments.
以上实施例中,根据上下文,术语“当…时”或“当…后”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。另外,在上述实施例中,使用诸如第一、第二之类的关系术语来区份一个实体和另一个实体,而并不限制这些实体之间的任何实际的关系和顺序。In the above embodiments, depending on the context, the terms "when" or "after" may be interpreted to mean "if" or "after" or "in response to determining..." or "in response to detecting..." ". Similarly, depending on the context, the phrases "in determining..." or "if detecting (the stated condition or event)" can be interpreted to mean "if determining..." or "in response to determining..." or "on detecting (the stated condition or event)" or "in response to the detection of (the stated condition or event)". Additionally, in the above-described embodiments, relational terms such as first and second are used to distinguish one entity from another, without limiting any actual relationship and order between these entities.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多 个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。在不冲突的情况下,以上各实施例的方案都可以组合使用。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part 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 may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like. In the case of no conflict, the solutions of the above embodiments can be used in combination.
需要指出的是,本专利申请文件的一部分包含受著作权保护的内容。除了对专利局的专利文件或记录的专利文档内容制作副本以外,著作权人保留著作权。It should be noted that a part of this patent application file contains content protected by copyright. Except for making copies of the patent files of the Patent Office or the contents of the recorded patent files, the copyright owner reserves the right to copyright.

Claims (26)

  1. 一种开机异常的修复方法,其特征在于,所述方法适用于第一电子设备,所述第一电子设备为开机正常的电子设备,所述方法包括:A method for repairing abnormal startup, characterized in that the method is applicable to a first electronic device, and the first electronic device is an electronic device that is properly turned on, and the method includes:
    与第二电子设备建立连接,所述第二电子设备为开机异常的电子设备;establishing a connection with a second electronic device, where the second electronic device is an electronic device that is abnormally powered on;
    获取所述第二电子设备的版本信息;obtaining version information of the second electronic device;
    根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;obtaining an upgrade package for repairing the second electronic device according to the version information of the second electronic device;
    控制所述第二电子设备根据所述升级包进行修复。The second electronic device is controlled to perform repair according to the upgrade package.
  2. 根据权利要求1所述的方法,其特征在于,获取所述第二电子设备的版本信息之前,还包括:The method according to claim 1, wherein before acquiring the version information of the second electronic device, the method further comprises:
    接收用户的第一操作命令,所述第一操作命令用于触发所述第一电子设备对所述第二电子设备进行修复;receiving a first operation command from a user, where 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, where the authorization file is used to indicate that the first electronic device has the right to repair the second electronic device.
  3. 根据权利要求2所述的方法,其特征在于,从所述第一服务器获取授权文件,包括:The method according to claim 2, wherein obtaining an authorization file from the first server comprises:
    获取所述第二电子设备的设备信息;obtaining device information of the second electronic device;
    向所述第一服务器发送授权请求,所述授权请求包括所述第一电子设备的设备信息、所述第二电子设备的设备信息;sending an authorization request to the first server, where the authorization request includes device information of the first electronic device and device information of the second electronic device;
    接收来自所述第一服务器的授权响应,所述授权响应包括所述授权文件。An authorization response is received from the first server, the authorization response including the authorization file.
  4. 根据权利要求3所述的方法,其特征在于,所述授权请求还包括以下至少一项:The method according to claim 3, wherein the authorization request further comprises at least one of the following:
    所述第一电子设备的账户信息;account information of the first electronic device;
    所述第一电子设备的产品信息;product information of the first electronic device;
    所述第一电子设备的状态信息。Status information of the first electronic device.
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包,包括:The method according to any one of claims 2 to 4, wherein obtaining an upgrade package for repairing the second electronic device according to the version information of the second electronic device, comprising:
    向第二服务器发送搜包请求,所述搜包请求包括所述授权文件和所述第二电子设备的版本信息;Send a packet search request to a second server, where the packet search request includes the authorization file and version information of the second electronic device;
    接收来自所述第二服务器的搜包响应,所述搜包响应包括所述升级包的信息;receiving a packet search response from the second server, the packet search response including information of the upgrade package;
    根据所述升级包的信息,从第三服务器下载所述升级包。According to the information of the upgrade package, the upgrade package is downloaded from the third server.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,控制所述第二电子设备根据所述升级包进行修复,包括:The method according to any one of claims 1 to 5, wherein controlling the second electronic device to perform repair according to the upgrade package comprises:
    确定所述第二电子设备的体检信息,所述第二电子设备的体检信息用于指示所述第二电子设备是否能够进入恢复模式;determining the medical examination information of the second electronic device, where the medical examination information of the second electronic device is used to indicate whether the second electronic device can enter the recovery mode;
    根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复。According to the medical examination information of the second electronic device, the second electronic device is controlled to perform repair according to the upgrade package.
  7. 根据权利要求6所述的方法,其特征在于,当所述第二电子设备的体检信息用于指示所述第二电子设备能够进入恢复模式时,根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复,包括:The method according to claim 6, characterized in that, when the medical examination information of the second electronic device is used to indicate that the second electronic device can enter the recovery mode, according to the medical examination information of the second electronic device, control the The second electronic device is repaired according to the upgrade package, including:
    向所述第二电子设备发送启动升级命令,以使所述第二电子设备根据所述启动升级命令解析所述升级包,并根据解析后的升级包数据进行修复。Sending a start-up upgrade command to the second electronic device, so that the second electronic device parses the upgrade package according to the start-up upgrade command, and repairs according to the parsed upgrade package data.
  8. 根据权利要求6所述的方法,其特征在于,当所述第二电子设备的体检信息用于指 示所述第二电子设备不能进入恢复模式时,根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复,包括:The method according to claim 6, characterized in that, when the medical examination information of the second electronic device is used to indicate that the second electronic device cannot enter the recovery mode, according to the medical examination information of the second electronic device, control the The second electronic device is repaired according to the upgrade package, including:
    解析所述升级包得到最小系统镜像文件;Parse the upgrade package to obtain the minimum system image file;
    向所述第二电子设备发送所述最小系统镜像文件和强制启动命令,以使所述第二电子设备运行所述最小系统镜像文件进行修复。Sending the minimum system image file and a forced startup command to the second electronic device, so that the second electronic device runs the minimum system image file for repair.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 8, wherein the method further comprises:
    接收用户的输入信息,所述输入信息包括第二电子设备的属性信息;receiving user input information, the input information including attribute information of the second electronic device;
    将所述第二电子设备的属性信息与预先存储支持修复的电子设备的属性信息进行比较,若预先存储支持修复的电子设备的属性信息包括所述第二电子设备的属性信息,则发出提示信息,所述提示信息用于提示用户所述第一电子设备支持修复所述第二电子设备。Compare the attribute information of the second electronic device with the attribute information of the pre-stored electronic device that supports repair, and if the attribute information of the pre-stored electronic device that supports repair includes the attribute information of the second electronic device, a prompt message is sent , and the prompt information is used to prompt the user that the first electronic device supports the repair of the second electronic device.
  10. 一种开机异常的修复方法,其特征在于,所述方法适用于第二电子设备,所述第二电子设备为开机异常的电子设备,所述方法包括:A method for repairing abnormal startup, characterized in that the method is applicable to a second electronic device, the second electronic device being an electronic device with abnormal startup, and the method comprises:
    与第一电子设备建立连接,所述第一电子设备开机正常的电子设备;establishing a connection with a first electronic device, the first electronic device is an electronic device that is powered on normally;
    向所述第一电子设备发送所述第二电子设备的版本信息,以使所述第一电子设备根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;Sending the 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 according to the version information of the second electronic device ;
    在所述第一电子设备的控制下,根据所述升级包进行修复。Repair is performed according to the upgrade package under the control of the first electronic device.
  11. 根据权利要求10所述的方法,其特征在于,在所述第一电子设备的控制下,根据所述升级包进行修复,包括:The method according to claim 10, wherein, under the control of the first electronic device, repairing according to the upgrade package, comprising:
    接收来自所述第一电子设备的启动升级命令;receiving a start-up upgrade command from the first electronic device;
    根据所述启动升级命令后,解析所述升级包,并根据解析后的升级包数据进行修复。After starting the upgrade command, the upgrade package is parsed and repaired according to the parsed upgrade package data.
  12. 根据权利要求10所述的方法,其特征在于,在所述第一电子设备的控制下,根据所述升级包进行修复,包括:The method according to claim 10, wherein, under the control of the first electronic device, repairing according to the upgrade package, comprising:
    接收来自所述第一电子设备的最小系统镜像文件,所述最小系统镜像文件是所述第一电子设备解析所述升级包得到的;receiving a minimum system image file from the first electronic device, where the minimum system image file is obtained by the first electronic device parsing the upgrade package;
    运行所述最小系统镜像文件进行修复。Run the minimal system image file for repair.
  13. 一种电子设备,其特征在于,所述电子设备为开机正常的电子设备,所述电子设备包括:处理器、存储器、通信接口;其中,所述存储器存储有计算机程序,所述计算机程序包括指令,当所述指令被所述处理器执行时,使得所述处理器结合所述通信接口实现如下步骤:An electronic device, characterized in that the electronic device is an electronic device that is powered on normally, and the electronic device includes: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, and the computer program includes instructions , when the instruction is executed by the processor, causing the processor to implement the following steps in combination with the communication interface:
    与第二电子设备建立连接,所述第二电子设备开机异常的电子设备;establishing a connection with a second electronic device, the second electronic device is abnormally powered on;
    获取所述第二电子设备的版本信息;obtaining version information of the second electronic device;
    根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;obtaining an upgrade package for repairing the second electronic device according to the version information of the second electronic device;
    控制所述第二电子设备根据所述升级包进行修复。The second electronic device is controlled to perform repair according to the upgrade package.
  14. 根据权利要求13所述的电子设备,其特征在于,所述处理器还用于:The electronic device according to claim 13, wherein the processor is further configured to:
    通过所述通信接口接收用户的第一操作命令,所述第一操作命令用于触发所述第一电子设备对所述第二电子设备进行修复;receiving a first operation command of the user through the communication interface, where 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, where the authorization file is used to indicate that the first electronic device has the right to repair the second electronic device.
  15. 根据权利要求14所述的电子设备,其特征在于,所述处理器具体用于:The electronic device according to claim 14, wherein the processor is specifically configured to:
    获取所述第二电子设备的设备信息;obtaining device information of the second electronic device;
    通过所述通信接口向所述第一服务器发送授权请求,所述授权请求包括所述第一电子设备的设备信息、所述第二电子设备的设备信息;以及,通过所述通信接口接收来自所述第一服务器的授权响应,所述授权响应包括所述授权文件。Send an authorization request to the first server through the communication interface, the authorization request including the device information of the first electronic device and the device information of the second electronic device; an authorization response from the first server, where the authorization response includes the authorization file.
  16. 根据权利要求15所述的电子设备,其特征在于,所述授权请求还包括以下至少一项:The electronic device according to claim 15, wherein the authorization request further comprises at least one of the following:
    所述第一电子设备的账户信息;account information of the first electronic device;
    所述第一电子设备的产品信息;product information of the first electronic device;
    所述第一电子设备的状态信息。Status information of the first electronic device.
  17. 根据权利要求14至16中任一项所述的电子设备,其特征在于,所述处理器具体用于:The electronic device according to any one of claims 14 to 16, wherein the processor is specifically configured to:
    通过所述通信接口向第二服务器发送搜包请求,所述搜包请求包括所述授权文件和所述第二电子设备的版本信息;以及通过所述通信接口接收来自所述第二服务器的搜包响应,所述搜包响应包括所述升级包的信息;Send a packet search request to a second server through the communication interface, the packet search request includes the authorization file and version information of the second electronic device; and receive a search packet from the second server through the communication interface a packet response, the packet search response includes the information of the upgrade package;
    根据所述升级包的信息,从第三服务器下载所述升级包。According to the information of the upgrade package, the upgrade package is downloaded from the third server.
  18. 根据权利要求13至17中任一项所述的电子设备,其特征在于,所述处理器具体用于:The electronic device according to any one of claims 13 to 17, wherein the processor is specifically configured to:
    确定所述第二电子设备的体检信息,所述第二电子设备的体检信息用于指示所述第二电子设备是否能够进入恢复模式;determining the medical examination information of the second electronic device, where the medical examination information of the second electronic device is used to indicate whether the second electronic device can enter the recovery mode;
    根据所述第二电子设备的体检信息,控制所述第二电子设备根据所述升级包进行修复。According to the medical examination information of the second electronic device, the second electronic device is controlled to perform repair according to the upgrade package.
  19. 根据权利要求18所述的电子设备,其特征在于,当所述第二电子设备的体检信息用于指示所述第二电子设备能够进入恢复模式时,所述处理器具体用于:通过所述通信接口向所述第二电子设备发送启动升级命令,以使所述第二电子设备根据所述启动升级命令解析所述升级包,并根据解析后的升级包数据进行修复。The electronic device according to claim 18, wherein when the medical examination information of the second electronic device is used to indicate that the second electronic device can enter a recovery mode, the processor is specifically configured to: The communication interface sends a start-up upgrade command to the second electronic device, so that the second electronic device parses the upgrade package according to the start-up upgrade command, and repairs according to the parsed upgrade package data.
  20. 根据权利要求18所述的电子设备,其特征在于,当所述第二电子设备的体检信息用于指示所述第二电子设备不能进入恢复模式时,所述处理器具体用于:解析所述升级包得到最小系统镜像文件;通过所述通信接口向所述第二电子设备发送所述最小系统镜像文件和强制启动命令,以使所述第二电子设备运行所述最小系统镜像文件进行修复。The electronic device according to claim 18, wherein when the medical examination information of the second electronic device is used to indicate that the second electronic device cannot enter a recovery mode, the processor is specifically configured to: parse the The upgrade package obtains the minimum system image file; and sends the minimum system image file and a forced startup command to the second electronic device through the communication interface, so that the second electronic device runs the minimum system image file for repair.
  21. 根据权利要求13至20中任一项所述的电子设备,其特征在于,所述处理器还用于:The electronic device according to any one of claims 13 to 20, wherein the processor is further configured to:
    通过所述通信接口接收用户的输入信息,所述输入信息包括第二电子设备的属性信息;receiving user input information through the communication interface, the input information including attribute information of the second electronic device;
    将所述第二电子设备的属性信息与预先存储支持修复的电子设备的属性信息进行比较,若预先存储支持修复的电子设备的属性信息包括所述第二电子设备的属性信息,则发出提示信息,所述提示信息用于提示用户所述第一电子设备支持修复所述第二电子设备。Compare the attribute information of the second electronic device with the attribute information of the pre-stored electronic device that supports repair, and if the attribute information of the pre-stored electronic device that supports repair includes the attribute information of the second electronic device, a prompt message is sent , and the prompt information is used to prompt the user that the first electronic device supports the repair of the second electronic device.
  22. 一种电子设备,其特征在于,所述电子设备为开机异常的电子设备,所述电子设备包括:处理器、存储器、通信接口;其中,所述存储器存储有计算机程序,所述计算机程序包括指令,当所述指令被所述处理器执行时,使得所述处理器结合所述通信接口实现如下步骤:An electronic device, characterized in that the electronic device is an electronic device with abnormal startup, and the electronic device includes: a processor, a memory, and a communication interface; wherein, the memory stores a computer program, and the computer program includes instructions , when the instruction is executed by the processor, causing the processor to implement the following steps in combination with the communication interface:
    与第一电子设备建立连接,所述第一电子设备开机正常的电子设备;establishing a connection with a first electronic device, the first electronic device is an electronic device that is powered on normally;
    向所述第一电子设备发送所述第二电子设备的版本信息,以使所述第一电子设备根据所述第二电子设备的版本信息,获取用于修复所述第二电子设备的升级包;Sending the 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 according to the version information of the second electronic device ;
    在所述第一电子设备的控制下,根据所述升级包进行修复。Repair is performed according to the upgrade package under the control of the first electronic device.
  23. 根据权利要求22所述的电子设备,其特征在于,所述处理器包括第一处理器和第二处理器,所述通信接口包括第一通信接口和第二通信接口;The electronic device of claim 22, wherein 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 configured to: receive a start-up upgrade command from the first electronic device through the first communication interface, and send the start-up upgrade command to the first processor through the second communication interface Order;
    所述第一处理器具体用于:根据所述启动升级命令,解析所述升级包,并根据解析后的升级包数据进行修复。The first processor is specifically configured to: parse the upgrade package according to the start-up upgrade command, and repair according to the parsed upgrade package data.
  24. 根据权利要求22所述的电子设备,其特征在于,所述处理器包括第一处理器和第二处理器,所述通信接口包括第一通信接口和第二通信接口;The electronic device of claim 22, wherein 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 configured to: receive a minimum system image file from the first electronic device through the first communication interface, where the minimum system image file is obtained by the first electronic device parsing the upgrade package sending a forced start command to the first processor through the second communication interface;
    所述第一处理器具体用于:根据所述强制启动命令,运行所述最小系统镜像文件进行修复。The first processor is specifically configured to: run the minimum system image file for repairing according to the forced startup command.
  25. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在计算机上运行时,使得所述计算机执行如权利要求1至12任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a computer program, which, when the computer program runs on a computer, causes the computer to execute the method according to any one of claims 1 to 12 .
  26. 一种程序产品,其特征在于,包括指令,当所述指令在计算机上运行时,使得所述计算机执行如权利要求1至12任一项所述的方法。A program product, characterized by comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 12.
PCT/CN2021/137550 2020-12-23 2021-12-13 Method and apparatus for repairing abnormal power-on WO2022135215A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011535219.3A CN114661501A (en) 2020-12-23 2020-12-23 Method and device for repairing abnormal starting-up
CN202011535219.3 2020-12-23

Publications (1)

Publication Number Publication Date
WO2022135215A1 true WO2022135215A1 (en) 2022-06-30

Family

ID=82024946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/137550 WO2022135215A1 (en) 2020-12-23 2021-12-13 Method and apparatus for repairing abnormal power-on

Country Status (2)

Country Link
CN (1) CN114661501A (en)
WO (1) WO2022135215A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719670A (en) * 2022-09-30 2023-09-08 荣耀终端有限公司 Data processing method, electronic device and readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116881039B (en) * 2023-09-07 2024-04-19 荣耀终端有限公司 System recovery method and device, readable storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109688427A (en) * 2018-12-14 2019-04-26 广州市科虎电子有限公司 A kind of smart television and its system repair
CN109992453A (en) * 2019-04-30 2019-07-09 Oppo广东移动通信有限公司 System recovery method and Related product
WO2019137280A1 (en) * 2018-01-10 2019-07-18 中兴通讯股份有限公司 Terminal anomaly repair method, apparatus, mobile terminal, and storage medium
CN110362328A (en) * 2019-07-17 2019-10-22 腾讯科技(深圳)有限公司 The method, apparatus and computer equipment of OTA upgrading
CN110837430A (en) * 2019-11-05 2020-02-25 RealMe重庆移动通信有限公司 Boot exception processing method and device, electronic equipment and storage medium
CN111813427A (en) * 2019-04-12 2020-10-23 杭州海康威视数字技术股份有限公司 Equipment repairing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019137280A1 (en) * 2018-01-10 2019-07-18 中兴通讯股份有限公司 Terminal anomaly repair method, apparatus, mobile terminal, and storage medium
CN109688427A (en) * 2018-12-14 2019-04-26 广州市科虎电子有限公司 A kind of smart television and its system repair
CN111813427A (en) * 2019-04-12 2020-10-23 杭州海康威视数字技术股份有限公司 Equipment repairing method and device, electronic equipment and storage medium
CN109992453A (en) * 2019-04-30 2019-07-09 Oppo广东移动通信有限公司 System recovery method and Related product
CN110362328A (en) * 2019-07-17 2019-10-22 腾讯科技(深圳)有限公司 The method, apparatus and computer equipment of OTA upgrading
CN110837430A (en) * 2019-11-05 2020-02-25 RealMe重庆移动通信有限公司 Boot exception processing method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719670A (en) * 2022-09-30 2023-09-08 荣耀终端有限公司 Data processing method, electronic device and readable storage medium
CN116719670B (en) * 2022-09-30 2024-04-12 荣耀终端有限公司 Data processing method, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN114661501A (en) 2022-06-24

Similar Documents

Publication Publication Date Title
US11803451B2 (en) Application exception recovery
US10223132B2 (en) Synchronization between electronic devices
EP3340574B1 (en) Method for providing content corresponding to accessory and electronic device thereof
CN109076331B (en) Electronic device and control method of electronic device
WO2020192447A1 (en) File access authority authentication method and electronic device
WO2022135215A1 (en) Method and apparatus for repairing abnormal power-on
WO2021036706A1 (en) Trusted application operation method and information processing and memory allocation method and apparatus
WO2011127845A2 (en) Method, system and terminal for system update between mobile communication terminals
WO2020015259A1 (en) Data backup method and terminal
WO2022048385A1 (en) Method and apparatus for migrating profile
WO2022156443A1 (en) In-vehicle infotainment product connection method and apparatus
US10257873B2 (en) Method and electronic device for providing tethering service
CN115328563B (en) System starting method and electronic equipment
CN110865837A (en) Method and terminal for upgrading system
US20170078269A1 (en) Method for managing application and electronic device supporting the same
WO2022063037A1 (en) Method and apparatus for installing patch package
WO2022052766A1 (en) Theme packet adaptation method and apparatus
WO2020172874A1 (en) File processing method and terminal device
US20230216732A1 (en) Network Configuration Method and Device
CN113468606A (en) Application program access method and electronic equipment
CN115019418B (en) Bluetooth car key car control method, device and storage medium
WO2022166502A1 (en) Data protection method and system, and medium and electronic device
CN114048469B (en) Directory operation management method, electronic device and readable storage medium
CN114138343A (en) Terminal and terminal starting method
CN114968657A (en) Data backup method and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21909212

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909212

Country of ref document: EP

Kind code of ref document: A1