CN114547584A - Operating system recovery method and electronic equipment - Google Patents

Operating system recovery method and electronic equipment Download PDF

Info

Publication number
CN114547584A
CN114547584A CN202011356854.5A CN202011356854A CN114547584A CN 114547584 A CN114547584 A CN 114547584A CN 202011356854 A CN202011356854 A CN 202011356854A CN 114547584 A CN114547584 A CN 114547584A
Authority
CN
China
Prior art keywords
electronic device
electronic equipment
electronic
image file
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011356854.5A
Other languages
Chinese (zh)
Inventor
龚晨
杨杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011356854.5A priority Critical patent/CN114547584A/en
Publication of CN114547584A publication Critical patent/CN114547584A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1417Boot up procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an operating system recovery method and electronic equipment, which can solve the problems that a key mirror of an operating system of the electronic equipment is damaged and cannot enter a recovery mode, can assist the electronic equipment in recovering the operating system by using other electronic equipment, and improves the safety of recovering the operating system. The method comprises the following steps: the first electronic device obtains the identification information of the second electronic device through the fastboot command, and whether the first electronic device and the second electronic device are mutually trustable electronic devices can be authenticated according to the identification information of the first electronic device and the identification information of the second electronic device. When the first electronic device and the second electronic device are electronic devices that can be trusted with each other, the first electronic device and the second electronic device can directly establish a fastboot communication connection, and send a system image file applicable to the second electronic device through a fastboot mode, so as to assist the second electronic device in completing an operating system recovery operation.

Description

Operating system recovery method and electronic equipment
Technical Field
The present application relates to the field of communications, and in particular, to an operating system recovery method and an electronic device.
Background
In most electronic devices today, the proper operation of the electronic device is dependent on the operating system of the electronic device. When an operating system of an electronic device fails, the electronic device generally cannot be normally started to enter the operating system, and at this time, the electronic device needs to perform an operation of recovering the operating system before being normally started again.
Taking a mobile phone as an example, an existing mobile phone manufacturer generally provides an automatic recovery mode of the mobile phone, such as a recovery mode, and when the mobile phone cannot be normally started continuously for many times, the automatic recovery mode of the mobile phone can be used, such as factory settings being recovered, to execute related operations for recovering an operating system on the mobile phone. However, if a key image (such as linux kernel) of the mobile phone operating system is damaged, the recovery mode cannot be entered, and the operating system recovery can be executed only by a maintenance site authorized by a mobile phone manufacturer, so that the user is inconvenient, time-consuming and has a security risk (personal information leakage).
Disclosure of Invention
The embodiment of the application provides an operating system recovery method and electronic equipment, and solves the problems that a key mirror of an operating system of the electronic equipment is damaged, the operating system cannot enter a recovery mode, and a user cannot conveniently perform operating system recovery when going to a maintenance site, so that the user can assist the electronic equipment in recovering the operating system by using other electronic equipment, and the safety of operating system recovery is improved.
In order to achieve the purpose, the technical scheme is as follows:
in a first aspect, the present application provides a method for recovering an operating system. The system recovery method comprises the following steps: the first electronic device obtains identification information (e.g., encrypted SN or unique identification information such as device chip ID) of the second electronic device in a fastboot command. And the first electronic equipment confirms that the first authentication condition is met, and the first electronic equipment establishes a fastboot communication connection with the second electronic equipment. The first authentication condition is that the identification information of the first electronic device and the identification information of the second electronic device have a corresponding relationship, for example, if the identification information of the first electronic device and the identification information of the second electronic device are stored in the same trusted device list, it may indicate that the identification information of the first electronic device and the identification information of the second electronic device have a corresponding relationship. The first electronic equipment sends the system image file to the second electronic equipment, and the system image file is suitable for the second electronic equipment and can help the second electronic equipment to restore the normal operation of the system. When the system image file is sent completely, the first electronic device sends a first instruction to the second electronic device, and the first instruction is used for indicating the second electronic device to restart. After the first electronic device sends the first instruction, the first electronic device can be considered to complete all operations for assisting the second electronic device to recover the operating system.
Based on the operating system recovery method in the first aspect, the first electronic device may obtain the identification information of the second electronic device through a fastboot command, and confirm that the first electronic device and the second electronic device are trusted electronic devices according to the identification information of the first electronic device and the identification information of the second electronic device. When the first electronic device and the second electronic device are electronic devices that can be trusted with each other, the first electronic device and the second electronic device can directly establish a fastboot communication connection, and send a system image file applicable to the second electronic device through a fastboot mode, so as to assist the second electronic device in completing an operating system recovery operation. Therefore, when the system of the second electronic device is damaged and cannot be normally started, the user can use the fastboot mode to assist the second electronic device to execute the operation system recovery operation through other own devices such as the first electronic device, so that the second electronic device can enter the recovery mode to complete the operation system repair, and the user can use the device more conveniently; and the legality of the electronic equipment assisting the recovery of the operating system is ensured by authenticating the relationship between the first electronic equipment and the second electronic equipment, so that the risk of user information leakage is avoided, and the safety of the recovery of the operating system is improved.
In one possible implementation manner, the confirming, by the first electronic device, that the first authentication condition is satisfied may include: and the first electronic equipment confirms that the first authentication condition is met according to the identification information of the first electronic equipment and the identification information of the second electronic equipment. The first electronic device stores identification information of electronic devices which are trusted devices with the first electronic device. In this arrangement, the relationship of the first electronic device to the second electronic device may be authenticated by the first electronic device. Specifically, after acquiring the identification information of the second electronic device, the first electronic device may query whether the identification information of the second electronic device exists in a trusted device list locally stored in the first electronic device, and if so, may confirm that the first authentication condition is met, so that a fastboot communication connection may be established between the first electronic device and the second electronic device. Therefore, the authentication process can be simplified, the authentication efficiency is improved, the recovery time of the operating system is reduced, and the purposes of avoiding the leakage risk of user information and improving the recovery safety of the operating system are achieved.
In another possible implementation manner, the confirming, by the first electronic device, that the first authentication condition is satisfied may include: the first electronic device sends authentication request information to the server. And the first electronic equipment receives the authentication response information sent by the server. The authentication request information includes identification information of the first electronic device and identification information of the second electronic device. The authentication response information is used to indicate that the first authentication condition is satisfied. The server stores identification information of electronic equipment which is trusted equipment with the first electronic equipment or the second electronic equipment. In this implementation, the relationship between the first electronic device and the second electronic device may also be authenticated by the server. Specifically, after the first electronic device acquires the identification information of the second electronic device, the identification information of the first electronic device and the identification information of the second electronic device may be uploaded to the server at the same time, and the server queries whether the identification information of the first electronic device and the identification information of the second electronic device exist in the same trusted device list in the server at the same time. If the identification information of the first electronic device and the identification information of the second electronic device are simultaneously present in the list, it can be confirmed that the first authentication condition is satisfied. At the moment, the server authorizes the first electronic device to assist the second electronic device to recover the operating system, and the requirement of security authentication is met, so that the aims of avoiding the risk of user information leakage and improving the security recovery of the operating system are fulfilled.
Further, the establishing, by the first electronic device, a fastboot communication connection with the second electronic device may include: the first electronic device sends a sending unlocking instruction to the second electronic device. The unlocking instruction is used for the first electronic equipment to request to establish the fastboot communication connection with the second electronic equipment. If the first electronic device and the second electronic device belong to devices which can be trusted with each other, the first electronic device may request to establish a fastboot communication connection with the second electronic device, so that the first electronic device may send a system image file suitable for the second electronic device to the second electronic device, and the second electronic device receives the complete system image file, so that the second electronic device can enter a recovery mode, and an operating system of the second electronic device is recovered.
Optionally, the unlocking instruction may include identification information of the first electronic device. That is to say, when the first electronic device sends the fastboot unlocking request to the second electronic device, the identification information of the first electronic device may also be sent to the second electronic device. The second electronic device can verify whether the first electronic device and the second electronic device belong to mutually trusted devices again according to the identification information of the first electronic device, and malicious flash (operating system recovery) is avoided, so that the safety of the electronic device during the operating system recovery is further improved.
Optionally, the system image file may include a first system image file. The first system image file may be a system image file of the first electronic device, and the system image file of the first electronic device may be used for the second electronic device. In this alternative, if the system image file of the first electronic device is available for the second electronic device, for example, the first electronic device and the second electronic device belong to the same model of electronic device, or the system version numbers of the first electronic device and the second electronic device are the same or can be common; the first electronic device may send the system image file of the first electronic device to the second electronic device for the second electronic device to restore the operating system. Therefore, if the system image file of the first electronic device is suitable for the second electronic device, the first electronic device directly reads the system image file of the first electronic device and sends the system image file to the second electronic device, and therefore internal operation of the system is simplified, and recovery efficiency of an operating system is improved.
Optionally, the system image file may include a second system image file. The second system image file may be a system image file from a server and may be applicable to the second electronic device. In this alternative, if the system image file of the first electronic device is not available to the second electronic device, the system image file of the second electronic device needs to be acquired from the server. At this time, the server responds to the request of the first electronic device, and sends the system image file suitable for the second electronic device to the first electronic device, so that the second electronic device receives the system image file through fastboot communication connection with the first electronic device, the second electronic device can smoothly enter a recovery mode, and then recovery of the operating system is completed.
Optionally, when the system image file of the second electronic device supports sparse matrix compression storage, the first system image file may be a compressed image file obtained by compressing an image file read from the first electronic device with a sparse matrix. Since the system image file (such as the key image file) of the second electronic device may occupy only a small portion of the space of the system partition, in order to reduce the size of the transmitted system image file, sparse matrix compression may be performed on the system image file, thereby reducing the file transmission time and further improving the efficiency of operating system recovery.
In a possible implementation manner, the operating system recovery method according to the first aspect may further include: the first electronic device detects a fastboot communication connection state between the first electronic device and the second electronic device. And if the fastboot communication connection between the first electronic equipment and the second electronic equipment is abnormal, the first electronic equipment stops sending the system image file to the second electronic equipment. Therefore, the abnormal disconnection condition of the first electronic device and the second electronic device can be normally handled, and the user can timely know the abnormal disconnection condition of the first electronic device and the second electronic device. When the first electronic device and the second electronic device are abnormally disconnected, the system recovery operation needs to be executed again, so that user data leakage is avoided, and the safety and reliability of system recovery are improved.
Optionally, the detecting, by the first electronic device, a fastboot communication connection state between the first electronic device and the second electronic device may include: the first electronic equipment sends connection detection information to the second electronic equipment at regular time. The connection detection information is used for detecting a fastboot communication connection state between the first electronic device and the second electronic device. And if the first electronic equipment does not receive the detection feedback information from the second electronic equipment, the fastboot communication connection between the first electronic equipment and the second electronic equipment is abnormal. The detection feedback information is used for indicating that the fastboot communication connection between the first electronic device and the second electronic device is normal. Therefore, the fastboot communication connection state between the first electronic device and the second electronic device can be timely known, so that the abnormal disconnection condition of the first electronic device and the second electronic device can be timely responded, and the recovery risk of the operating system caused by abnormal disconnection, such as malicious operation, is avoided.
In a second aspect, the present application provides a method for operating system recovery. The system recovery method comprises the following steps: the first electronic device acquires identification information of the second electronic device. The first electronic device confirms that the first authentication condition is satisfied. The first authentication condition is that the identification information of the first electronic device and the identification information of the second electronic device have a corresponding relationship. And when the first electronic equipment confirms that the first authentication condition is met, the first electronic equipment establishes a fastboot communication connection with the second electronic equipment. The first electronic device sends the system image file to the second electronic device. When the system image file is sent completely, the first electronic equipment sends a first instruction to the second electronic equipment; the first instruction is used for indicating the restart of the second electronic equipment. When the second electronic device receives the first instruction from the first electronic device, the second electronic device is restarted.
In one possible implementation manner, the confirming, by the first electronic device, that the first authentication condition is satisfied may include: and the first electronic equipment confirms that the first authentication condition is met according to the identification information of the first electronic equipment and the identification information of the second electronic equipment. The first electronic device stores identification information of electronic devices which are trusted devices with the first electronic device.
In one possible implementation manner, the confirming, by the first electronic device, that the first authentication condition is satisfied may include: the first electronic device sends authentication request information to the server. The authentication request information includes identification information of the first electronic device and identification information of the second electronic device. The first electronic equipment receives authentication response information sent by the server; the authentication response information is used to indicate that the first authentication condition is satisfied. The server stores identification information of electronic equipment which is trusted equipment with the first electronic equipment or the second electronic equipment.
Further, the establishing of the fastboot communication connection between the first electronic device and the second electronic device may include: the first electronic device sends an unlocking instruction to the second electronic device. The unlocking instruction is used for the first electronic equipment to request to establish the fastboot communication connection with the second electronic equipment. And when the second electronic equipment receives an unlocking instruction from the first electronic equipment, the second electronic equipment executes the fastboot port unlocking.
Optionally, the unlocking instruction includes identification information of the first electronic device. Before the second electronic device performs the fastboot port unlocking, the method may further include: and the second electronic equipment confirms that the second authentication condition is met according to the identification information of the first electronic equipment. The second authentication condition is that the identification information of the first electronic device and the identification information of the second electronic device have a corresponding relationship. In the scheme, when the second electronic device receives the unlocking instruction of the first electronic device, whether the identification information of the first electronic device exists in a trusted device list stored in a local memory of the second electronic device can be verified according to the identification information of the first electronic device, so that the validity and the safety of a system image file sent by the second electronic device are further ensured, the recovery safety of an operating system is improved, and malicious flash is avoided.
Optionally, the system image file comprises a first system image file; the first system image file is a system image file of the first electronic device, and the system image file of the first electronic device can be used for the second electronic device.
Optionally, the system image file comprises a second system image file; the second system image file is from a server and is applicable to a system image file of a second electronic device.
Further, when the system image file of the second electronic device supports sparse matrix compression storage, the first system image file is a compressed image file obtained by compressing the image file read from the first electronic device by the sparse matrix.
In a possible implementation manner, the operating system recovery method according to the second aspect may further include: the first electronic device detects a fastboot communication connection state between the first electronic device and the second electronic device. When the fastboot communication connection between the first electronic device and the second electronic device is abnormal, the first electronic device stops sending the system image file to the second electronic device, and the second electronic device is restarted.
It should be understood that if the second electronic device does not receive the connection detection information of the first electronic device, it may indicate that the fastboot communication connection between the first electronic device and the second electronic device is abnormally disconnected, and in the case of abnormal disconnection, the second electronic device automatically restarts, and if the fastboot communication connection needs to be established again with the first electronic device, the first electronic device can continue to assist the second electronic device to recover the operating system, so that the security of recovering the operating system is improved, and malicious operations are avoided.
Further, the detecting, by the first electronic device, a fastboot communication connection state between the first electronic device and the second electronic device may include: the first electronic equipment sends connection detection information to the second electronic equipment at regular time, and the connection detection information is used for detecting the fastboot communication connection state between the first electronic equipment and the second electronic equipment. And when the second electronic equipment receives the connection detection information, the second electronic equipment sends detection feedback information to the first electronic equipment. The detection feedback information is used for indicating that the fastboot communication connection between the first electronic device and the second electronic device is normal. And when the second electronic equipment does not receive the connection detection information after overtime or the first electronic equipment does not receive the detection feedback information after overtime, the fastboot communication connection between the first electronic equipment and the second electronic equipment is abnormal.
In addition, for technical effects of the operating system recovery method according to the second aspect, reference may be made to the technical effects of the system recovery method according to the first aspect, and details are not repeated here.
In a third aspect, the present application provides an electronic device (e.g., the first electronic device described above). The electronic device includes: one or more processors, a memory, and a communication module. Wherein the memory has stored therein one or more computer programs, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the first electronic device to perform the operating system recovery method as described above in the first aspect.
In a fourth aspect, the present application provides an operating system recovery system, including the above first electronic device and second electronic device, where the first electronic device interacts with the second electronic device to implement the operating system recovery method in any aspect.
Optionally, the operating system recovery system may further include a server, configured to interact with the first electronic device, so that the first electronic device executes the operating system recovery method according to the first aspect.
In a fifth aspect, the present application provides a computer-readable storage medium. The computer readable storage medium has stored therein instructions, which when run on the first electronic device, cause the first electronic device to perform the operating system recovery method as described above in the first aspect.
In a sixth aspect, the present application provides a computer program product comprising instructions. The computer program product, when run on the first electronic device, causes the first electronic device to perform the operating system recovery method as described above in the first aspect.
It is understood that the electronic device, the system, the computer-readable storage medium and the computer program product provided by the above aspects are all applied to the corresponding method provided above, and therefore, the beneficial effects achieved by the electronic device, the system, the computer-readable storage medium and the computer program product may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Drawings
Fig. 1A is a first system architecture diagram of an os recovery system according to an embodiment of the present disclosure;
fig. 1B is a system architecture diagram of an operating system recovery system according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a server according to an embodiment of the present application;
fig. 3 is a flowchart of a system recovery method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a first electronic device sending an image file to a second electronic device in a system recovery method according to an embodiment of the present application;
fig. 5 is a first schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
The technical solution of the embodiment of the present application may be applicable to various electronic devices, such as a mobile phone (mobile phone), a tablet computer (Pad), a computer, a smart watch, a smart television (also referred to as a smart screen, a large screen device, and the like), a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self driving), a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), a vehicle-mounted terminal, an RSU with terminal functions, and the like. This embodiment does not set any limit to this.
Taking an electronic device using an android (android) system as an example, when the electronic device fails and cannot be normally started, an operating system file is generally damaged, and the electronic device can be normally started again after an operating system recovery operation needs to be executed.
For an electronic device using an android system, a manufacturer of the device generally provides two modes for executing an operation of recovering an operating system, where the two modes of recovering the operating system are respectively:
(1) recovery mode (recovery): in this mode, data or an operating system inside the electronic device can be repaired, an existing operating system can be backed up or upgraded, and factory settings can be restored. However, if the key image file of the operating system of the electronic device is damaged, the recovery mode cannot be used to perform the operating system recovery.
The key image refers to the most basic operating system, such as a linux kernel, which enables the intelligent terminal device to be started or run.
(2) Fast start mode (fastboot): in an electronic device using the android system, the fastboot mode belongs to an operating system recovery (flash) mode which is a lower layer than the recovery mode. In the fastboot mode, operating system recovery is typically performed by connecting an electronic device via a Universal Serial Bus (USB) interface. However, normally, the fastboot port is in a locked state; in order to ensure the security of the operating system, when the fastboot mode is required to be used for restoring the operating system, a user needs to obtain an authorized identification code for unlocking the fastboot port through an official maintenance site specified by an electronic equipment manufacturer. That is to say, only the official maintenance site authorized by the electronic device manufacturer can acquire the corresponding authorized identification code, unlock the fastboot port after the authorized identification code is acquired, and execute the system recovery operation in the fastboot mode.
Fig. 1A and fig. 1B are schematic diagrams of system architectures of an operating system recovery system according to an embodiment of the present application. Referring to fig. 1A and fig. 1B, the os recovery system includes two electronic devices, such as a first electronic device 101 and a second electronic device 102; when the operating system of the second electronic device 102 fails, a fastboot communication connection may be established between the first electronic device 101 and the second electronic device 102, so that the first electronic device 101 assists the second electronic device 102 in recovering the operating system.
Optionally, the operation recovery system may further include a server 103, referring to fig. 2, the server 103 may include an information storage module 1031, a verification module 1032, and a system image management module 1033; the information storage module 1031 may be configured to store a trusted device list and system version numbers of the electronic devices; the verification module 1032 may be configured to verify whether the first electronic device 101 and the second electronic device 102 have a trusted relationship, and may also be configured to verify whether the system version of the first electronic device 101 is applicable to the second electronic device 102; the system image management module 1033 stores system image files of various system versions, and may be configured to provide the system image file of the second electronic device 102.
The following is a description of how to implement operating system recovery for different electronic devices. It should be understood that the main discussion in the embodiment of the present application is a scenario in which the first electronic device 101 and the second electronic device 102 are electronic devices of the same manufacturer.
When the operating system of the second electronic device 102 fails and the second electronic device cannot be normally powered on, the second electronic device 102 may be manually put into the fastboot mode. Aiming at electronic equipment of different manufacturers, the method for entering the fastboot mode is different, for example, the fastboot mode is entered by connecting a USB interface and then pressing a power-on key and a volume down key. For example, when entering a fastboot mode, the millet mobile phone can directly press the power-on key and the volume down key without connecting the mobile phone with a USB interface. When the second electronic device 102 enters the fastboot mode, a prompt such as "has entered the fastboot mode" may be presented on a display screen of the second electronic device 102 to prompt that the second electronic device 102 may be connected to another electronic device (e.g., the first electronic device 101), so that the first electronic device 101 helps the second electronic device 102 restore the operating system.
At this time, the first electronic device 101 may be connected to the second electronic device 102 through a data connection line (for example, two smartphones may be connected through a typeC-typeC data line), so that the first electronic device 101 and the second electronic device 102 establish a fastboot communication connection. In general, a fastboot port of an electronic device is in a locked state, and the fastboot port can be unlocked only when a specific requirement is met; therefore, in order to meet the requirement of the fastboot communication security and avoid system infringement caused by an illegal device accessing the second electronic device 102, before the first electronic device 101 and the second electronic device 102 establish a fastboot communication connection, the identities of the first electronic device 101 and the second electronic device 102 may be verified, so that the fastboot port of the second electronic device 102 can be unlocked.
The operating system recovery method in the embodiment of the present application may be applied to the following scenarios:
scene one: the operating system is restored through mutual assistance between the smart phone and the smart phone or between the smart phone and the tablet computer, that is, the first electronic device 101 and the second electronic device 102 are smart phones or tablet computers, and at this time, the first electronic device 101 and the second electronic device 102 may be connected through a typeC-typeC data line.
Scene two: the smartphone is assisted by a computer to recover an operating system, that is, the first electronic device 101 is a computer, the second electronic device 102 is a smartphone, and at this time, the first electronic device 101 and the second electronic device 102 can be connected by a typeA-typeC data line.
Scene three: with the assistance of a smart phone or a tablet computer, the device such as a smart television and the like which can be connected with the WiFi network recovers an operating system, that is, the first electronic device 101 is the smart phone or the tablet computer, the second electronic device 102 is the device such as the smart television and the like which can be connected with the WiFi network, and at this time, the first electronic device 101 and the second electronic device 102 can be connected through a typeA-typeC data line or through other applicable data lines;
scene four: with the assistance of a smart phone or a tablet computer, the smart watch, a smart sound box and other devices which can be connected with another smart device through bluetooth can recover an operating system, that is, the first electronic device 101 is a smart phone or a tablet computer, and the second electronic device 102 is a device such as a smart watch and other devices which can be connected with another smart device through bluetooth; in this case, the first electronic device 101 and the second electronic device 102 may be connected by a typeC-typeC data line, or by another suitable data line.
It should be understood that the data connection line between the first electronic device 101 and the second electronic device 102 described in this embodiment of the present application may be determined according to an interface adapted to the USB interface of the first electronic device 101 and the second electronic device 102, and therefore the model of the data connection line between the first electronic device 101 and the second electronic device 102 is not limited in this embodiment of the present application.
In the embodiment of the application, whether the condition for unlocking the fastboot port is met or not may be verified by determining whether the first electronic device 101 and the second electronic device 102 are trusted devices. Next, whether the first electronic device 101 and the second electronic device 102 are trusted devices will be described by using different examples.
Example one: taking the first electronic device 101 and the second electronic device 102 as smart phones, tablet computers, and other devices as examples (i.e., scenario one), when the first electronic device 101 and the second electronic device 102 are both in a normal use state, both the first electronic device 101 and the second electronic device 102 can register unique identification information of the first electronic device 101 and the second electronic device 102, such as an encrypted product Serial Number (SN) or a device chip ID, to the server 103 (e.g., hua mobile phone, which can register hua account to hua website; e.g., millet mobile phone, which can register millet account to millet website) by logging in the same account. That is, when the first electronic device 101 and the second electronic device 102 log in to the same account, the server 103 may record unique identification information of each device logged in through the same account, that is, the unique identification information of the first electronic device 101 and the unique identification information of the second electronic device 102 are recorded in a list of trusted devices under the same account. Therefore, if the unique identification information of the first electronic device 101 and the second electronic device 102 is recorded in the trusted device list of the same account, it may be considered that the first electronic device 101 and the second electronic device 102 belong to mutually trusted electronic devices, and the mutually trusted electronic devices may unlock the fastboot port, establish a fastboot communication connection, and perform related operations such as recovering the fastboot operating system.
The trusted device list establishing method in the first example may also be applicable to the scenario two and the scenario three, and the specific establishing method is similar and will not be described here again.
In addition, after the trusted device list under a certain account in the server 103 is updated, the trusted list under the account may be issued to each trusted electronic device in the trusted list, so that all trusted electronic device lists of the electronic device are also stored in each trusted electronic device.
Example two: taking the first electronic device 101 as a smart phone or a tablet computer, and the second electronic device 102 as an electronic device such as a smart watch that cannot log in the server 103 through the registered account as an example (i.e., scenario four), when the first electronic device 101 and the second electronic device 102 are both in a normal use state, the first electronic device 101 and the second electronic device 102 may be connected wirelessly, for example, through bluetooth. When the first electronic device 101 and the second electronic device 102 are connected through bluetooth to form a bluetooth pairing relationship, files can be transmitted between the first electronic device and the second electronic device, and information can be shared. The first electronic device 101 and the second electronic device 102 thus belong to trusted devices, and the second electronic device 102 can be added to the list of trusted devices of the first electronic device 101; and the trusted list of the first electronic device 101 may be synchronized to the second electronic device 102 via bluetooth, and the trusted device list of the first electronic device 101 may also be synchronized to the server 103.
The establishing method of the trusted device list in the second example may also be applicable to the first scenario, the second scenario, and the third scenario, and the specific establishing method is similar and will not be described herein again.
Example three: taking the example that the first electronic device 101 is a smart phone or a tablet computer, the second electronic device 102 is a smart television and the like, which are often connected with the same wireless network (WiFi) as the smart phone or the tablet computer (i.e., scenario three), when the first electronic device 101 and the second electronic device 102 are both in a normal use state, the first electronic device 101 and the second electronic device 102 may be connected with the same WiFi network at the same time, and the network server may record unique identification information of the first electronic device 101 and the second electronic device 102. In this scenario, the WiFi network server may record the electronic device connected to the WiFi network in a trusted device list under the WiFi network; and, the WiFi network server may synchronize the trusted device list under the WiFi network into the corresponding electronic devices, such as the first electronic device 101 and the second electronic device 102. Furthermore, a list of trusted devices under a certain WiFi network synchronized to the first electronic device 101 may also be synchronized to the server 103 through the first electronic device 101.
The three exemplary ways of establishing the trusted device list may also be applicable to scenario one and scenario two, and the specific establishing ways are similar and will not be described herein again.
It should be understood that, in the embodiment of the present application, the first electronic device 101 is exemplified by a smart phone or a tablet computer, and the second electronic device 102 is exemplified by one of a smart phone, a tablet computer, a smart watch, and a smart television; therefore, the above is merely an example, and the types of the first electronic device 101 and the second electronic device 102 are not limited to the above example.
Exemplarily, when the second electronic device 102 has entered the fastboot mode and a physical connection relationship has been established between the first electronic device 101 and the second electronic device 102 through a data connection line (e.g. a typeC-typeC data connection line), an operating system recovery operation may be performed on the second electronic device 102, please refer to fig. 3, the system recovery method provided by the present application may include the following steps:
s301, the first electronic device 101 acquires identification information of the second electronic device 102.
Specifically, if the first electronic device 101 and the second electronic device 102 have been connected via the data line, a prompt message such as "connect with the second electronic device 102, verify the relationship between the first electronic device 101 and the second electronic device 102" or the like may be displayed on the display screen of the first electronic device 101. If the user selects "yes," the first electronic device 101 may send a fastboot command to the second electronic device 102 to obtain the unique identification information of the second electronic device 102.
Of course, in this step, the first electronic device 101 may also automatically initiate the verification request without a selection operation by the user, so as to simplify the operation steps, and further improve the user experience.
S302, the first electronic device 101 confirms whether the first authentication condition is satisfied.
Specifically, the first authentication condition is that the identification information of the first electronic device 101 and the identification information of the second electronic device 102 have a correspondence relationship. As described above, the server 103 stores unique identification information of each electronic device that logs in the same account; and/or, the server 103 stores therein unique identification information of an electronic device connected to a certain electronic device (e.g., the first electronic device 101) in a wireless connection manner such as bluetooth; and/or the server 103 stores unique identification information of each electronic device connected with the same WiFi network; therefore, the server 103 stores unique identification information of electronic devices that are trusted devices with respect to the first electronic device 101 or the second electronic device 102.
After the first electronic device 101 acquires the unique identification information of the second electronic device 102, the unique identification information of the first electronic device 101 and the unique identification information of the second electronic device 102 may be sent to the server 103. Accordingly, the server 103 may query whether the unique identification information of the first electronic device 101 and the unique identification information of the second electronic device 102 exist in the trusted device list of the same account; or querying whether a second electronic device 102 exists in the trusted device list of the first electronic device 101; or querying whether the unique identification information of the first electronic device 101 and the unique identification information of the second electronic device 102 exist in the trusted device list under the same WiFi network at the same time. If the identity authentication information exists, it is indicated that the identity authentication of the first electronic device 101 and the second electronic device 102 is successful, and the first electronic device 101 and the second electronic device 102 belong to mutually trusted electronic devices, that is, the identification information of the first electronic device 101 and the identification information of the second electronic device 102 have a corresponding relationship, that is, the first authentication condition is satisfied. At this time, the first electronic device 101 and the second electronic device 102 pass the verification of the server 103, and the server 103 sends verification result information to the first electronic device 101 to inform that the first electronic device 101 has satisfied the first authentication condition.
In addition, after the trusted device list under a certain account in the server 103 is updated, the trusted list under the account can be issued to each trusted electronic device in the trusted list, so that all trusted electronic device lists of the electronic device are also stored in each trusted electronic device; after the trusted device list in an electronic device (e.g., the first electronic device 101 or the second electronic device 102) is updated, the trusted device list may be synchronized to an associated electronic device (e.g., an electronic device in the trusted device list), or synchronized to the server 103; authentication of the first electronic device 101 and the second electronic device 102 may also be performed by the first electronic device 101. That is, when the user selects to verify the relationship between the first electronic device 101 and the second electronic device 102, the first electronic device 101 may send a fastboot command to the second electronic device 102 to obtain the unique identification information of the second electronic device 102. Different from the operation of verifying the relationship between the first electronic device 101 and the second electronic device 102 by the server 103, the first electronic device 101 searches whether the unique identification information of the second electronic device 102 exists in a trusted device list stored in the first electronic device 101 according to the acquired unique identification information of the second electronic device 102. If the identification information exists, it is indicated that the authentication of the first electronic device 101 and the second electronic device 102 is successful, the first electronic device 101 and the second electronic device 102 belong to mutually trusted electronic devices, and the identification information of the first electronic device 101 and the identification information of the second electronic device 102 have a corresponding relationship, that is, the first authentication condition is satisfied.
It can be understood that when the first electronic device 101 determines whether the first authentication condition is satisfied, after the first electronic device 101 acquires the unique identification information of the second electronic device 102, it may also be verified whether the unique identification information of the second electronic device 102 exists in a local trusted device list of the first electronic device 101, and if the unique identification information exists, the verification may be considered to be successful, that is, the first authentication condition is satisfied; if the first authentication condition does not exist, the identification information of the first electronic device 101 and the identification information of the second electronic device 102 may be sent to the server 103, and the server 103 verifies whether the first authentication condition is satisfied, for a specific verification process, reference is made to the aforementioned operation for verifying the relationship between the first electronic device 101 and the second electronic device 102 by the server 103, which is not described herein again.
On the contrary, if the first electronic device 101 determines that the first authentication condition is not satisfied, it indicates that the authentication fails, the first electronic device 101 and the second electronic device 102 do not belong to mutually trusted electronic devices, and the first electronic device 101 cannot help the second electronic device 102 to restore the system, so as to avoid the risk of leakage of the user information on the second electronic device 102. At this time, a prompt message such as "authentication failed, please replace the device" may be displayed on the display screen of the first electronic device 101.
S303, the first electronic device 101 establishes a fastboot communication connection with the second electronic device 102.
Specifically, when the first electronic device 101 confirms that the first authentication condition is satisfied, a prompt message such as "the relationship between the first electronic device 101 and the second electronic device 102 is verified, whether a fastboot communication connection is established" may be displayed on the display screen of the first electronic device 101.
If the user selects "yes", the first electronic device 101 sends an unlocking instruction to the second electronic device 102, where the unlocking instruction is an instruction for requesting unlocking, and may be used to request to establish a fastboot communication with the second electronic device 102 for temporary unlocking. When the fastboot communication between the first electronic device 101 and the second electronic device 102 is successfully established and temporarily unlocked, the first electronic device 101 may help the second electronic device 102 to recover the system. That is, when the fastboot communication established between the first electronic device 101 and the second electronic device 102 is temporarily unlocked, the first electronic device 101 may transmit a key image file suitable for the second electronic device 102 to the second electronic device 102.
In the same way, the unlocking instruction can be automatically sent in the step, and the user does not need to make selection operation, so that the operation steps are simplified, and the user experience is further improved.
In addition, in order to prevent malicious flash (i.e., system recovery), the unlocking instruction sent by the first electronic device 101 to the second electronic device 102 may further include unique identification information of the first electronic device 101; when the second electronic device 102 receives the unlocking instruction sent by the first electronic device 101, the second electronic device 102 may determine again whether the first electronic device 101 is a trusted device of the second electronic device 102 through the trusted list stored in the storage space of the second electronic device 102 according to the unique identification information of the first electronic device 101.
Specifically, when the second electronic device 102 receives the unlocking instruction, the second electronic device 102 searches whether the unique identification information of the first electronic device 101 exists in a trusted device list stored in the second electronic device 102 according to the unique identification information of the first electronic device 101 (that is, whether the second electronic device 102 confirms that a second authentication condition is satisfied, where the second authentication condition is that the identification information of the first electronic device 101 and the identification information of the second electronic device 102 have a corresponding relationship). If the information exists, the first electronic device 101 is a trusted device of the second electronic device 102, and the second electronic device 102 confirms that the second authentication condition is satisfied, at this time, the fastboot communication connection can be successfully established between the first electronic device 101 and the second electronic device 102, that is, the second electronic device 102 performs fastboot port unlocking. When the fastboot communication connection is successfully established between the first electronic device 101 and the second electronic device 102, the first electronic device 101 may send the system image file to the second electronic device 102. In this way, the safety of system recovery can be further improved.
In addition, in order to improve the user experience, when the second electronic device 102 confirms that the second authentication condition is satisfied, prompt information such as "the relationship between the first electronic device 101 and the second electronic device 102 is verified, and the fastboot communication connection with the first electronic device 101 is successfully established" may be displayed on the display screen of the second electronic device 102. Similarly, when the second electronic device 102 confirms that the second authentication condition is not satisfied, a prompt message such as "authentication failed, please replace the device" may be displayed on the display screen of the second electronic device 102.
S304, the first electronic device 101 sends the system image file to the second electronic device 102.
When the fastboot communication connection is established between the first electronic device 101 and the second electronic device 102, and when the first electronic device 101 sends a system image file (hereinafter, the key image file is exemplified) to the second electronic device 102, the key image file of the first electronic device 101 itself may be acquired and sent to the second electronic device 102, or the key image file may be downloaded from the server 103 and sent to the second electronic device 102.
Specifically, referring to fig. 4, the sending of the key image file from the first electronic device 101 to the second electronic device 102 may include the following steps:
s304-1, in response to the request of the first electronic device 101, the server 103 determines whether the system version of the first electronic device 101 is applicable to the second electronic device 102.
Specifically, the server 103 stores system version numbers of the first electronic device 101 and the second electronic device 102; after the device versions of the first electronic device 101 and the second electronic device 102 are upgraded, the current system version information of the first electronic device 101 and the second electronic device 102 may be synchronized to the server 103 for storage.
When a fastboot communication connection is established between the first electronic device 101 and the second electronic device, the first electronic device 101 may send a verification request to the server 103 for determining whether the system version of the first electronic device 101 is applicable to the second electronic device 102. In response to the request of the first electronic device 101, the server 103 first acquires the system version numbers of the first electronic device 101 and the second electronic device 102. If the system version numbers of the first electronic device 101 and the second electronic device 102 are the same or can be common, the system version of the first electronic device 101 can be considered to be suitable for the second electronic device 102.
It is to be understood that the system version number stored in the server 103 may also be synchronized into the first electronic device 101, at which time the verification of whether the system version of the first electronic device 101 is suitable for the second electronic device 102 may be executed by the first electronic device 101 without requesting the server 103 to execute any more. The specific verification process is similar to the process of the server 103 verifying whether the system version of the first electronic device 101 is applicable to the second electronic device 102, and therefore, the detailed description is omitted. Accordingly, if the system version number of the second electronic device 102 is not stored in the first electronic device 101, a verification request may be sent to the server 103 again to determine whether the system version number of the first electronic device 101 is applicable to the second electronic device 102. Therefore, the operation can be simplified, and the recovery time of the operating system can be saved.
S304-2, the server sends a second instruction to the first electronic device.
Specifically, after the server 103 completes the determination, a second instruction indicating whether the system version of the first electronic device 101 is applicable to the second electronic device 102 may be sent to the first electronic device 101. If so, executing step S304-2; if not, step S304-3 is performed.
S304-3, the first electronic device 101 reads the partition image in the disk of the first electronic device to generate a system image file.
Specifically, if the system version numbers of the first electronic device 101 and the second electronic device 102 are the same, or the system versions of the first electronic device 101 and the second electronic device 102 are universal, it indicates that the system version of the first electronic device 101 is applicable to the second electronic device 102. At this time, the server 103 may instruct the first electronic device 101 to read the partition image in its disk, and generate the key image file as the system image file to be sent to the second electronic device 102.
S304-4, the first electronic device 101 downloads the system image file of the current system version of the second electronic device 102 from the server 103.
Specifically, if the system version numbers of the first electronic device 101 and the second electronic device 102 are not consistent and not common, it indicates that the system version of the first electronic device 101 is not suitable for the second electronic device 102. At this time, the server 103 instructs the first electronic device 101 to download the key image file of the second electronic device 102 from the server 103 and to serve as the system image file transmitted to the second electronic device 102.
It should be noted that the image file in the server 103, which is applicable to the second electronic device 102, may be actively sent to the first electronic device 101 by the server 103, or may be passively sent to the first electronic device 101 in response to a download request of the first electronic device 101, and specifically, which manner is adopted is not limited in the embodiment of the present application.
In addition, the embodiment of the application only adopts the key image file of the device for example, and the method in the embodiment of the application is also applicable to the scenes of non-key image files.
S304-5, the first electronic device 101 sends the system image file to the second electronic device 102.
It should be noted that, in order to facilitate image file transmission and reduce file transmission time, it may be determined whether a key image file in the second electronic device 102 supports sparse matrix (sparse) compression storage, and if so, the first electronic device 101 reads a partition image file in its own disk and performs sparse matrix compression on the image file, so that the first electronic device 101 may send the image file after sparse matrix compression to the second electronic device 102. Therefore, the size of the system image file can be reduced after the system image file is compressed and stored by the sparse matrix, the file transmission is facilitated, and the file transmission efficiency is improved.
The sparse matrix refers to a large number of 0 elements in the storage matrix, and the non-0 elements are very few; sparse matrix compression is an existing compression storage method. When the method is used for compression storage, only non-0 elements in a matrix are stored, and row marks and column marks in the matrix where the non-0 elements are located are stored at the same time.
In addition, in order to prevent the second electronic device 102 from being transmitted into an illegal system image file, when the first electronic device 101 sends a key image file to the second electronic device 102, the first electronic device 101 may perform integrity check on the system image file to be sent by the first electronic device 101 to the second electronic device 102; and/or the system image file to be sent by the first electronic device 101 to the second electronic device 102 may also be authenticated, and whether the system image file is legal or not may be determined, for example, the system image file may only be a key image file of the second electronic device 102 and may not be other types of image files, such as an image file of a user partition.
S305, the first electronic device 101 sends a first instruction to the second electronic device 102.
The first instruction is used for instructing the second electronic device 102 to restart.
Specifically, after the first electronic device 101 finishes sending the key image file to the second electronic device 102, the first electronic device 101 may send a fastboot command (i.e., a first instruction) to the second electronic device 102 to instruct the second electronic device 102 to restart.
After the first electronic device 101 sends the first instruction to the second electronic device 102, contents such as "help the second electronic device 102 to swipe in the system image file successfully, and disconnect from the second electronic device 102" may be displayed on a display screen of the first electronic device 101. At this time, the user may disconnect the first electronic device 101 from the second electronic device 102.
S306, the second electronic device 102 restarts.
Specifically, after receiving the fastboot command, the second electronic device 102 may automatically restart and then enter a recovery mode, and perform operations related to operating system recovery.
In addition, in order to cope with the abnormal disconnection of the communication connection between the first electronic device 101 and the second electronic device 102, the first electronic device 101 may periodically send detection information to the second electronic device 102, for detecting whether the connection state between the first electronic device 101 and the second electronic device 102 is normal. When receiving the detection information of the first electronic device 101, the second electronic device 102 sends detection feedback information to the first electronic device 101; if the first electronic device 101 normally receives the detection feedback information of the second electronic device 102, it indicates that the connection between the first electronic device 101 and the second electronic device 102 is normal; if the first electronic device 101 does not receive the detection feedback information of the second electronic device 102 after timeout, it indicates that the connection between the first electronic device 101 and the second electronic device 102 is abnormally disconnected and the fastboot communication connection needs to be reestablished, and prompt information such as "the fastboot communication connection with the second electronic device 102 is abnormally disconnected and please be reconnected" may be displayed on the display screen of the first electronic device 101. Correspondingly, if the connection between the first electronic device 101 and the second electronic device 102 is abnormally disconnected, the second electronic device 102 cannot normally receive the detection information of the first electronic device 101, and if the second electronic device 102 does not receive the detection information of the first electronic device 101 within a specified time interval, the second electronic device 102 starts timeout reset, the fastboot port is automatically locked, the fastboot mode needs to be re-entered, and the fastboot communication connection with the first electronic device 101 is re-established.
Therefore, in the system recovery method provided in the embodiment of the present application, when the second electronic device 102 is damaged and cannot be normally started, the user may use the fastboot mode to assist the second electronic device 102 to perform the operation of operating system recovery through the own other device, such as the first electronic device 101, so that the second electronic device 102 can enter the recovery mode to complete operating system recovery, and the user is more convenient to use; and the relationship between the first electronic device 101 and the second electronic device 102 is authenticated, so that the legality of the electronic device assisting the recovery of the operating system is ensured, the risk of user information leakage is avoided, and the safety of the recovery of the operating system is improved.
As shown in fig. 5, an embodiment of the present application discloses an electronic device, which may be a first electronic device (e.g., a mobile phone, a tablet computer) in the foregoing embodiments. The electronic device may specifically include: a display screen 501; one or more processors 502; a memory 503; a communication module 506; one or more application programs (not shown); and one or more computer programs 504, which may be connected via one or more communication buses 505. Wherein the one or more computer programs 504 are stored in the memory 503 and configured to be executed by the one or more processors 502, the one or more computer programs 504 comprising instructions that may be used to perform the steps associated with the first electronic device in the embodiments described above.
As shown in fig. 6, an embodiment of the present application discloses an electronic device, which may be a second electronic device (e.g., a mobile phone, a tablet computer, a television, a watch, etc.) in the foregoing embodiments. The electronic device may specifically include: one or more processors 602; a memory 603; a communication module 606; one or more application programs (not shown); and one or more computer programs 604, which may be connected via one or more communication buses 605. Of course, devices such as a display screen or a touch screen may also be disposed in the second electronic device, which is not limited in this embodiment. Wherein the one or more computer programs 604 are stored in the memory 603 and configured to be executed by the one or more processors 602, the one or more computer programs 604 comprising instructions that can be used to perform the steps associated with the second electronic device in the embodiments described above.
The above embodiments may be implemented in whole or in part by software, hardware (e.g., circuitry), firmware, or any combination thereof. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. The procedures or functions according to the embodiments of the present application are wholly or partially generated when the computer instructions or the computer program are loaded or executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more collections of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a solid state disk.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. In addition, the "/" in this document generally indicates that the former and latter associated objects are in an "or" relationship, but may also indicate an "and/or" relationship, and may be understood with particular reference to the former and latter contexts.
In the present application, "at least one" means one or more, "a plurality" means two or more. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (23)

1. An operating system recovery method, comprising:
the method comprises the steps that first electronic equipment obtains identification information of second electronic equipment;
the first electronic equipment confirms that a first authentication condition is met; the first authentication condition is that the identification information of the first electronic device and the identification information of the second electronic device have a corresponding relationship;
the first electronic equipment establishes a fastboot communication connection with the second electronic equipment;
the first electronic equipment sends a system image file to the second electronic equipment;
when the system image file is sent completely, the first electronic equipment sends a first instruction to the second electronic equipment; the first instruction is used for indicating the second electronic equipment to restart.
2. The operating system recovery method of claim 1, wherein the first electronic device confirming that the first authentication condition is satisfied comprises:
the first electronic equipment confirms that a first authentication condition is met according to the identification information of the first electronic equipment and the identification information of the second electronic equipment;
the first electronic device stores identification information of electronic devices which are trusted devices with the first electronic device.
3. The operating system recovery method of claim 1, wherein the first electronic device confirming that the first authentication condition is satisfied comprises:
the first electronic equipment sends authentication request information to a server; the authentication request information includes identification information of the first electronic device and identification information of the second electronic device;
the first electronic equipment receives authentication response information sent by the server; the authentication response information is used for indicating that a first authentication condition is met;
the server stores identification information of electronic equipment which is trusted equipment with the first electronic equipment or the second electronic equipment.
4. The operating system recovery method according to any one of claims 1 to 3, wherein the first electronic device establishes a fastboot communication connection with a second electronic device, and the method includes:
the first electronic device sends an unlocking instruction to the second electronic device, wherein the unlocking instruction is used for the first electronic device to request to establish a fastboot communication connection with the second electronic device.
5. The operating system recovery method of claim 4, wherein the unlock instruction includes identification information of the first electronic device.
6. The system recovery method of any of claims 1 to 5, wherein the system image file comprises a first system image file; the first system image file is a system image file of the first electronic device, and the system image file of the first electronic device can be used for the second electronic device.
7. The system recovery method of any of claims 1 to 5, wherein the system image file comprises a second system image file; the second system image file is from a server and is applicable to the system image file of the second electronic device.
8. The operating system recovery method according to claim 6, wherein when the system image file of the second electronic device supports sparse matrix compression storage, the first system image file is a compressed image file obtained by compressing an image file read from the first electronic device with a sparse matrix.
9. The operating system recovery method of any of claims 1 to 8, wherein the method further comprises:
the first electronic device detects a fastboot communication connection state between the first electronic device and the second electronic device;
and when the fastboot communication connection between the first electronic equipment and the second electronic equipment is abnormal, the first electronic equipment stops sending the system image file to the second electronic equipment.
10. The operating system recovery method according to claim 9, wherein the detecting, by the first electronic device, the fastboot communication connection state between the first electronic device and the second electronic device includes:
the first electronic equipment sends connection detection information to the second electronic equipment at regular time, wherein the connection detection information is used for detecting a fastboot communication connection state between the first electronic equipment and the second electronic equipment;
when the first electronic device does not receive detection feedback information from the second electronic device after timeout, the fastboot communication connection between the first electronic device and the second electronic device is abnormal;
the detection feedback information is used for indicating that the fastboot communication connection between the first electronic device and the second electronic device is normal.
11. An operating system recovery method, comprising:
the method comprises the steps that first electronic equipment obtains identification information of second electronic equipment;
the first electronic equipment confirms that a first authentication condition is met; the first authentication condition is that the identification information of the first electronic equipment and the identification information of the second electronic equipment have a corresponding relation;
the first electronic equipment and the second electronic equipment establish fastboot communication connection;
the first electronic equipment sends a system image file to the second electronic equipment;
when the system image file is sent completely, the first electronic equipment sends a first instruction to the second electronic equipment; the first instruction is used for indicating the second electronic equipment to restart;
and restarting the second electronic equipment.
12. The operating system recovery method of claim 11, wherein the first electronic device confirming that the first authentication condition is satisfied comprises:
the first electronic equipment confirms that a first authentication condition is met according to the identification information of the first electronic equipment and the identification information of the second electronic equipment; the first electronic device stores identification information of electronic devices which are trusted devices with the first electronic device.
13. The operating system recovery method of claim 11, wherein the first electronic device confirming that the first authentication condition is satisfied comprises:
the first electronic equipment sends authentication request information to a server; the authentication request information includes identification information of the first electronic device and identification information of the second electronic device;
the first electronic equipment receives authentication response information sent by the server; the authentication response information is used for indicating that a first authentication condition is met;
the server stores identification information of electronic equipment which is trusted equipment with the first electronic equipment or the second electronic equipment.
14. The operating system recovery method according to any one of claims 11 to 13, wherein the establishing of the fastboot communication connection between the first electronic device and the second electronic device includes:
the first electronic device sends an unlocking instruction to the second electronic device, wherein the unlocking instruction is used for the first electronic device to request to establish a fastboot communication connection with the second electronic device;
the second electronic device performs fastboot port unlocking.
15. The operating system recovery method according to claim 14, wherein the unlock instruction includes identification information of the first electronic device; before the second electronic device performs the unlocking of the fastboot port, the method further includes:
the second electronic equipment confirms that a second authentication condition is met according to the identification information of the first electronic equipment; the second authentication condition is that the identification information of the first electronic device and the identification information of the second electronic device have a corresponding relationship.
16. The operating system recovery method of any of claims 11 to 15, wherein the system image file comprises a first system image file; the first system image file is a system image file of the first electronic device, and the system image file of the first electronic device can be used for the second electronic device.
17. The operating system recovery method of any of claims 11 to 15, wherein the system image file comprises a second system image file; the second system image file is from a server and is applicable to the system image file of the second electronic device.
18. The os recovery method of claim 16, wherein when the system image of the second electronic device supports sparse matrix compression storage, the first system image is a compressed image obtained by sparse matrix compression of an image read from the first electronic device.
19. The operating system recovery method of any of claims 11 to 18, wherein the method further comprises:
the first electronic equipment detects a fastboot communication connection state between the first electronic equipment and the second electronic equipment;
when the fastboot communication connection between the first electronic device and the second electronic device is abnormal, the first electronic device stops sending the system image file to the second electronic device, and the second electronic device is restarted.
20. The os recovery method of claim 19, wherein the detecting, by the first electronic device, the fastboot communication connection status between the first electronic device and the second electronic device comprises:
the first electronic equipment sends connection detection information to the second electronic equipment at regular time, wherein the connection detection information is used for detecting a fastboot communication connection state between the first electronic equipment and the second electronic equipment;
when the second electronic equipment receives connection detection information, the second electronic equipment sends detection feedback information to the first electronic equipment; the detection feedback information is used for indicating that the fastboot communication connection between the first electronic equipment and the second electronic equipment is normal;
and when the second electronic equipment does not receive connection detection information overtime or the first electronic equipment does not receive detection feedback information overtime, the fastboot communication connection between the first electronic equipment and the second electronic equipment is abnormal.
21. An electronic device, comprising:
one or more processors;
a memory;
a communication module;
wherein the memory has stored therein one or more computer programs, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the operating system recovery method as performed by the first electronic device of any of claims 1-10.
22. A computer-readable storage medium having instructions stored therein, which when run on an electronic device, cause the electronic device to perform the operating system recovery method as performed by the first electronic device of any one of claims 1-10.
23. A computer program product comprising instructions for causing an electronic device to perform the operating system recovery method as performed by the first electronic device of any one of claims 1-10 when the computer program product is run on the electronic device.
CN202011356854.5A 2020-11-26 2020-11-26 Operating system recovery method and electronic equipment Pending CN114547584A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011356854.5A CN114547584A (en) 2020-11-26 2020-11-26 Operating system recovery method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011356854.5A CN114547584A (en) 2020-11-26 2020-11-26 Operating system recovery method and electronic equipment

Publications (1)

Publication Number Publication Date
CN114547584A true CN114547584A (en) 2022-05-27

Family

ID=81667771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011356854.5A Pending CN114547584A (en) 2020-11-26 2020-11-26 Operating system recovery method and electronic equipment

Country Status (1)

Country Link
CN (1) CN114547584A (en)

Cited By (1)

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

Cited By (2)

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

Similar Documents

Publication Publication Date Title
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
KR101673238B1 (en) Method, apparatus, electronic device, program and recording medium for connection management
US8868796B1 (en) Device and method for updating firmware of a peripheral device
US9807268B2 (en) Image forming apparatus having firmware update function, method of controlling the same, program for executing the method, and storage medium
KR100823100B1 (en) Method and apparatus for preventing data outflow in portable terminal
EP3509270B1 (en) Data backup method and device, storage medium and electronic apparatus
CN106020875B (en) Firmware update management method and device of embedded terminal
US20110173691A1 (en) Method for downloading software
WO2022012616A1 (en) Near-field communication (nfc) information display method and apparatus, and electronic device
US20180270050A1 (en) Communication apparatus, communication system, and communication control method
CN109496443B (en) Mobile authentication method and system therefor
CN110838953A (en) Test method, test system, electronic equipment and storage medium
CN111918263B (en) Bluetooth connection method and device and Internet of things equipment
CN115002168A (en) Safety detection method for vehicle remote control and vehicle-mounted system
CN114547584A (en) Operating system recovery method and electronic equipment
CN109002305B (en) Method and system for updating equipment program
WO2018163774A1 (en) Terminal device, registration processing program and registration processing method
WO2015081738A1 (en) Method and smart card for processing transaction data
CN112181461B (en) Upgrading method, network module, equipment, server and upgrading system
CN116225832A (en) Automatic detection method, storage medium and equipment for automatic deployment of database cluster
CN112165706B (en) Equipment connection management method and device and Bluetooth equipment
TW201523260A (en) Electronic device and method for loading program code thereof
CN114913631A (en) Unlocking method and device of heat pump equipment, electronic equipment and storage medium
KR20190115361A (en) Electronic device for managing application associated with a key of external electronic device and the method for the same
CN106156569B (en) Event execution method, electronic equipment, related device and system

Legal Events

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