[go: up one dir, main page]

CN118012450A - Flashing method, device, electronic device, readable storage medium and program product - Google Patents

Flashing method, device, electronic device, readable storage medium and program product Download PDF

Info

Publication number
CN118012450A
CN118012450A CN202410199265.2A CN202410199265A CN118012450A CN 118012450 A CN118012450 A CN 118012450A CN 202410199265 A CN202410199265 A CN 202410199265A CN 118012450 A CN118012450 A CN 118012450A
Authority
CN
China
Prior art keywords
electronic device
flashing
fault information
information
fault
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
CN202410199265.2A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202410199265.2A priority Critical patent/CN118012450A/en
Publication of CN118012450A publication Critical patent/CN118012450A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The application discloses a brushing method, a brushing device, electronic equipment, a readable storage medium and a program product, and belongs to the technical field of electronic equipment. The method comprises the following steps: under the condition that the brushing equipment is connected with the electronic equipment, acquiring fault information of the electronic equipment from a target storage area of the electronic equipment; the fault information is used for indicating the fault type of the electronic equipment; and performing the brushing treatment on the electronic equipment according to the brushing strategy corresponding to the fault information.

Description

刷机方法、装置、电子设备、可读存储介质和程序产品Flashing method, device, electronic device, readable storage medium and program product

技术领域Technical Field

本申请属于电子设备技术领域,具体涉及一种刷机方法、装置、电子设备、可读存储介质和程序产品。The present application belongs to the technical field of electronic equipment, and specifically relates to a flashing method, device, electronic equipment, readable storage medium and program product.

背景技术Background technique

随着智能化生活的普及,移动终端的应用越来越广泛。当移动终端由于某些故障类型导致无法正常启动开机,往往需要到售后服务中心进行刷机操作,如此,导致刷机操作的便捷性差。With the popularization of intelligent life, mobile terminals are increasingly widely used. When a mobile terminal cannot be started normally due to certain faults, it is often necessary to go to an after-sales service center for flashing, which results in poor convenience of flashing.

发明内容Summary of the invention

本申请实施例的目的是提供一种刷机方法、装置、电子设备、可读存储介质和程序产品,能够提高刷机操作的便捷性。The purpose of the embodiments of the present application is to provide a flashing method, device, electronic device, readable storage medium and program product, which can improve the convenience of flashing operations.

第一方面,本申请实施例提供了一种刷机方法,应用于刷机设备,包括:In a first aspect, an embodiment of the present application provides a flashing method, which is applied to a flashing device, comprising:

在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息;故障信息用于指示电子设备的故障类别;When the flashing device is connected to the electronic device, the fault information of the electronic device is obtained from the target storage area of the electronic device; the fault information is used to indicate the fault category of the electronic device;

根据故障信息对应的刷机策略对电子设备进行刷机处理。The electronic device is flashed according to the flashing strategy corresponding to the fault information.

第二方面,本申请实施例提供了一种刷机方法,应用于电子设备,包括:In a second aspect, an embodiment of the present application provides a flashing method, which is applied to an electronic device, comprising:

在处于无法开机状态的情况下,根据电子设备的运行状态信息确定故障信息;故障信息用于指示电子设备的故障类别;In the case of being unable to start up, determining fault information according to the operation status information of the electronic device; the fault information is used to indicate the fault type of the electronic device;

将故障信息存储至目标存储区域;Storing fault information in a target storage area;

其中,在刷机设备与电子设备相连接的情况下,刷机设备从目标存储区域获取故障信息,根据故障信息对应的刷机策略对电子设备进行刷机处理。When the flashing device is connected to the electronic device, the flashing device obtains the fault information from the target storage area and performs a flashing process on the electronic device according to the flashing strategy corresponding to the fault information.

第三方面,本申请实施例提供了一种刷机装置,装置包括:In a third aspect, an embodiment of the present application provides a flashing device, the device comprising:

第一获取模块,用于在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息;故障信息用于指示电子设备的故障类别;A first acquisition module is used to acquire the fault information of the electronic device from the target storage area of the electronic device when the flashing device is connected to the electronic device; the fault information is used to indicate the fault type of the electronic device;

刷机模块,用于根据故障信息对应的刷机策略对电子设备进行刷机处理。The flashing module is used to flash the electronic device according to the flashing strategy corresponding to the fault information.

第四方面,本申请实施例提供了一种刷机装置,装置包括:In a fourth aspect, an embodiment of the present application provides a flashing device, the device comprising:

确定模块,用于在处于无法开机状态的情况下,根据电子设备的运行状态信息确定故障信息;故障信息用于指示电子设备的故障类别;A determination module, used to determine fault information according to the operation status information of the electronic device when the electronic device is in a state where it cannot be turned on; the fault information is used to indicate the fault type of the electronic device;

存储模块,用于将故障信息存储至目标存储区域;A storage module, used for storing the fault information in a target storage area;

其中,在刷机设备与电子设备相连接的情况下,刷机设备从目标存储区域获取故障信息,根据故障信息对应的刷机策略对电子设备进行刷机处理。When the flashing device is connected to the electronic device, the flashing device obtains the fault information from the target storage area and performs a flashing process on the electronic device according to the flashing strategy corresponding to the fault information.

第五方面,本申请实施例提供了一种电子设备,该电子设备包括处理器和存储器,存储器存储可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面或第二方面的方法的步骤。In a fifth aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect or the second aspect are implemented.

第六方面,本申请实施例提供了一种可读存储介质,可读存储介质上存储程序或指令,程序或指令被处理器执行时实现如第一方面或第二方面的方法的步骤。In a sixth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect or the second aspect are implemented.

第七方面,本申请实施例提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如第一方面或第二方面的方法。In the seventh aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect or the second aspect.

第八方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面或第二方面的方法。In an eighth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect or the second aspect.

在本申请实施例中,能够在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息,由于故障信息用于指示电子设备的故障类别,因此根据故障信息对应的刷机策略对电子设备进行刷机处理。这样,用户无需去售后服务中心即可进行刷机操作,提高了刷机操作的便捷性。In the embodiment of the present application, when the flashing device is connected to the electronic device, the fault information of the electronic device can be obtained from the target storage area of the electronic device. Since the fault information is used to indicate the fault type of the electronic device, the electronic device is flashed according to the flashing strategy corresponding to the fault information. In this way, the user can perform the flashing operation without going to the after-sales service center, which improves the convenience of the flashing operation.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请实施例提供的一种刷机方法的流程示意图;FIG1 is a schematic diagram of a flashing method provided in an embodiment of the present application;

图2是本申请实施例提供的刷机方法中验证过程的流程示意图;FIG2 is a flow chart of a verification process in a flashing method provided in an embodiment of the present application;

图3是本申请实施例提供的刷机方法中刷机包数据下载的流程示意图;3 is a schematic diagram of a process of downloading flash package data in the flash method provided in an embodiment of the present application;

图4是本申请实施例提供的另一种刷机方法的流程示意图;FIG4 is a flow chart of another flashing method provided in an embodiment of the present application;

图5是本申请实施例提供的一种刷机装置的结构示意图;FIG5 is a schematic structural diagram of a flash device provided in an embodiment of the present application;

图6是本申请实施例提供的另一种刷机装置的结构示意图;FIG6 is a schematic diagram of the structure of another flashing device provided in an embodiment of the present application;

图7是本申请实施例提供的电子设备的结构示意图;FIG7 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

图8是本申请实施例提供的电子设备的硬件结构示意图。FIG8 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally indicates that the objects associated with each other are in an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的刷机方法进行详细地说明。The flashing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

图1是本申请实施例提供的一种刷机方法的流程示意图。如图1所示,刷机方法可以包括如下步骤:FIG1 is a schematic diagram of a flashing method provided in an embodiment of the present application. As shown in FIG1 , the flashing method may include the following steps:

步骤101,在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息;故障信息用于指示电子设备的故障类别。Step 101: when the flashing device is connected to the electronic device, the fault information of the electronic device is obtained from the target storage area of the electronic device; the fault information is used to indicate the fault type of the electronic device.

在步骤101中,当电子设备处于无法开机状态时,可以将电子设备与任意一台可以开机的刷机设备进行连接,此处的连接可以通过无线连接也可以通过有线连接,具体不做限定。在本实施例中,以刷机设备与电子设备通过USB连接为例进行说明。In step 101, when the electronic device is in a state where it cannot be turned on, the electronic device can be connected to any flashing device that can be turned on, and the connection here can be wireless or wired, and is not specifically limited. In this embodiment, the flashing device and the electronic device are connected via USB as an example for description.

示例地,在刷机设备与电子设备相连接的情况下,可以在刷机设备上使用电子设备的账号密码登录电子设备的救机模式,刷机设备可以依托于救机模式的控制单元对电子设备进行刷机处理,以使电子设备刷机后可以成功开机。刷机设备登录救机模式时的账号密码即可作为电子设备的标识信息,指示出电子设备正处于无法开机状态,以便刷机设备可以从电子设备的目标存储区域获取电子设备的故障信息。For example, when the flashing device is connected to the electronic device, the electronic device's account and password can be used on the flashing device to log in to the electronic device's rescue mode, and the flashing device can rely on the control unit of the rescue mode to flash the electronic device so that the electronic device can be successfully powered on after the flashing. The account and password when the flashing device logs in to the rescue mode can be used as identification information of the electronic device, indicating that the electronic device is in a state where it cannot be powered on, so that the flashing device can obtain the fault information of the electronic device from the target storage area of the electronic device.

可以理解的是,电子设备可以根据其运行状态信息生成故障信息,并存储于目标存储区域中。其中该目标存储区域可以是指电子设备中的任意存储分区,下文将以目标存储区域为电子设备的临时分区为例进行说明。It is understandable that the electronic device can generate fault information according to its running state information and store it in the target storage area, wherein the target storage area can refer to any storage partition in the electronic device, and the following description will take the target storage area as a temporary partition of the electronic device as an example.

可选地,刷机设备可以通过控制单元下发GetDevErr指令到电子设备,以便电子设备在识别到该指令后返回存储于临时分区中的故障信息。Optionally, the flashing device may send a GetDevErr instruction to the electronic device through the control unit, so that the electronic device returns the fault information stored in the temporary partition after identifying the instruction.

步骤102,根据故障信息对应的刷机策略对电子设备进行刷机处理。Step 102: flashing the electronic device according to the flashing strategy corresponding to the fault information.

在步骤102中,刷机设备可以根据故障信息对应的刷机策略,对电子设备进行刷机处理。In step 102, the flashing device may flash the electronic device according to the flashing strategy corresponding to the fault information.

示例地,可以是在获取到故障信息后,匹配预先建立的故障信息与刷机策略的关系表,确定刷机策略。或者,还可以通过刷机设备显示获取到的故障信息以及多个刷机策略选项,用户可以在刷机设备上自行选择对应的刷机策略。For example, after obtaining the fault information, the pre-established relationship table between the fault information and the flashing strategy may be matched to determine the flashing strategy. Alternatively, the obtained fault information and multiple flashing strategy options may be displayed on the flashing device, and the user may select the corresponding flashing strategy on the flashing device.

刷机设备可以根据刷机策略,下发对应的刷机指令至电子设备,以便电子设备可以根据刷机指令执行对应的刷机操作。可以理解的是,对于需要重新刷入系统镜像文件的,还可以通过刷机设备下载对应系统镜像文件传输至电子设备。The flashing device can send the corresponding flashing instruction to the electronic device according to the flashing strategy, so that the electronic device can perform the corresponding flashing operation according to the flashing instruction. It is understandable that if the system image file needs to be re-flashed, the corresponding system image file can also be downloaded by the flashing device and transmitted to the electronic device.

在本申请实施例中,刷机方法能够在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息,由于故障信息用于指示电子设备的故障类别,因此根据故障信息对应的刷机策略对电子设备进行刷机处理。这样,用户无需去售后服务中心即可进行刷机操作,提高了刷机操作的便捷性。In the embodiment of the present application, the flashing method can obtain the fault information of the electronic device from the target storage area of the electronic device when the flashing device is connected to the electronic device. Since the fault information is used to indicate the fault type of the electronic device, the electronic device is flashed according to the flashing strategy corresponding to the fault information. In this way, the user can perform the flashing operation without going to the after-sales service center, which improves the convenience of the flashing operation.

在一些实施例中,电子设备的故障信息是电子设备根据运行状态信息确定的,可以是在电子设备处于无法开机状态下确定的,也可以是电子设备执行特定操作后确定的,该特定操作例如OTA增量系统升级但未升级成功。以前者为例,电子设备的开机流程通常需要经过启动镜像文件、挂载用户数据分区等程序才能顺利开机,电子设备出现无法开机时,可以根据其运行状态信息生成故障信息。In some embodiments, the fault information of the electronic device is determined by the electronic device based on the running status information, which can be determined when the electronic device is in a state where it cannot be turned on, or it can be determined after the electronic device performs a specific operation, such as an OTA incremental system upgrade that fails to be successfully upgraded. Taking the former as an example, the boot process of the electronic device usually requires procedures such as booting the image file and mounting the user data partition to successfully boot. When the electronic device cannot be turned on, fault information can be generated based on its running status information.

其中,故障信息可以是字段,也可以是标识码,还可以是特定的符号等,此处不作具体限定。The fault information may be a field, an identification code, or a specific symbol, etc., which is not specifically limited here.

示例地,无法开机场景可以包括如下几种:For example, the following scenarios may occur:

1、电子设备未触发系统升级,用户某次启动后,开机流程在用户数据分区挂载时出现无法开机,可以认为是用户数据分区损坏,无法挂载导致的不开机,此时电子设备可以将该故障类型标记为ERROR103,作为第一故障信息写入到临时分区。1. The electronic device did not trigger a system upgrade. After the user started it up once, the boot process failed to boot when the user data partition was mounted. This can be considered to be caused by damage to the user data partition, which failed to mount. At this time, the electronic device can mark the fault type as ERROR103 and write it to the temporary partition as the first fault information.

2、电子设备未触发系统升级,用户某次启动后,开机流程在用户数据分区挂载过后出现无法开机,此时可以认为虽然用户数据分区成功挂载,但是可能由于应用程序或系统某些用户数据库出现如被篡改等异常导致的不开机,此时电子设备可以将该故障类型标记为ERROR104,作为第二故障信息写入到临时分区。2. The electronic device did not trigger a system upgrade. After the user started it up once, the boot process failed to boot after the user data partition was mounted. At this time, it can be considered that although the user data partition was successfully mounted, the failure to boot may be caused by abnormalities such as tampering with the application or some user databases of the system. At this time, the electronic device can mark the fault type as ERROR104 and write it to the temporary partition as the second fault information.

3、电子设备触发系统升级且升级失败,导致无法开机,此时可以认为是系统异常等因素导致系统升级流程失败,导致系统镜像文件分区损坏,此时电子设备可以将该故障类型标记为ERROR100,作为第三故障信息写入到临时分区。可以理解的是,第三故障信息写入到临时分区可以是在升级失败时写入,也可以是在后续启动开机流程,且处于无法开机状态时写入,此处不作具体限定。3. When the electronic device triggers a system upgrade and the upgrade fails, resulting in an inability to boot up, it can be considered that the system upgrade process failed due to system abnormalities and other factors, resulting in damage to the system image file partition. At this time, the electronic device can mark the fault type as ERROR100 and write it to the temporary partition as the third fault information. It is understandable that the third fault information can be written to the temporary partition when the upgrade fails, or when the boot process is subsequently started and the device is in an inability to boot up state, which is not specifically limited here.

4、电子设备未触发系统升级,用户某次启动后,开机流程未运行到挂载用户数据分区就出现无法开机,可以认为是底层启动镜像文件由于硬件或者其他异常导致的不开机,此时电子设备可以将该故障类型标记为ERROR102,作为第四故障信息写入到临时分区。4. The electronic device does not trigger a system upgrade. After the user starts the device for a certain time, the boot process fails to run to mount the user data partition and the device cannot be booted. This can be considered to be caused by hardware or other abnormalities in the underlying boot image file. In this case, the electronic device can mark the fault type as ERROR102 and write it into the temporary partition as the fourth fault information.

5、电子设备触发系统升级,且升级成功后无法开机,此时可以认为是新版本的软件没有兼容好电子设备的某些场景,导致低概率性不匹配无法开机,此时电子设备可以将该故障类型标记为ERROR101,作为第五故障信息写入到临时分区。5. The electronic device triggers a system upgrade and cannot be turned on after the upgrade is successful. At this time, it can be considered that the new version of the software is not compatible with certain scenarios of the electronic device, resulting in a low probability mismatch and inability to boot. At this time, the electronic device can mark the fault type as ERROR101 and write it to the temporary partition as the fifth fault information.

不同的故障信息对应不同的刷机策略。例如第一故障信息ERROR103对应的刷机策略可以为格式化用户数据分区;第二故障信息ERROR104对应的刷机策略可以为格式化用户数据分区;第三故障信息ERROR100对应的刷机策略可以为刷入最新版本的系统镜像文件;第四故障信息ERROR102对应的刷机策略可以为刷入最新版本的系统镜像文件;第五故障信息ERROR101对应的刷机策略可以为刷入升级前版本的系统镜像文件。Different fault information corresponds to different flashing strategies. For example, the flashing strategy corresponding to the first fault information ERROR103 may be to format the user data partition; the flashing strategy corresponding to the second fault information ERROR104 may be to format the user data partition; the flashing strategy corresponding to the third fault information ERROR100 may be to flash the latest version of the system image file; the flashing strategy corresponding to the fourth fault information ERROR102 may be to flash the latest version of the system image file; the flashing strategy corresponding to the fifth fault information ERROR101 may be to flash the system image file of the previous version.

这样,电子设备可以在处于无法开机状态的情况下,根据运行状态信息确定的故障信息并存储于目标存储区域中,刷机设备可以从目标存储区域中获取到该故障信息,以便识别出电子设备的故障类型,采用对应的刷机策略对电子设备执行精准刷机处理,提高了刷机操作的便捷性和准确性。In this way, when the electronic device is in a state where it cannot be turned on, the fault information can be determined based on the operating status information and stored in the target storage area. The flashing device can obtain the fault information from the target storage area to identify the fault type of the electronic device and use the corresponding flashing strategy to perform precise flashing processing on the electronic device, thereby improving the convenience and accuracy of the flashing operation.

在一些实施例中,上述步骤101之前,刷机方法还可以包括如下步骤:In some embodiments, before the above step 101, the flashing method may further include the following steps:

基于验证信息进行身份校验;Perform identity verification based on verification information;

上述步骤101还可以包括如下步骤:The above step 101 may also include the following steps:

在身份校验通过的情况下,从电子设备的目标存储区域获取电子设备的故障信息。When the identity verification is passed, the fault information of the electronic device is obtained from the target storage area of the electronic device.

在本实施例中,验证信息可以包括指示电子设备的身份的相关信息,例如可以包括电子设备的串号信息和/或解锁信息等。In this embodiment, the verification information may include relevant information indicating the identity of the electronic device, for example, may include serial number information and/or unlocking information of the electronic device.

如图2所示,电子设备201可以将能验证其身份的相关信息,例如设备信息、解锁信息等通过加密机204加密后生成加密数据。并预先存储在第一服务器205中。其中第一服务器205可以为任意服务器,如可以为对应的云服务器,此处不作具体限定。刷机设备202可以通过控制单元203可以从第一服务器205处获取到加密数据,并基于该加密数据对验证信息进行身份校验。As shown in FIG2 , the electronic device 201 can encrypt the relevant information that can verify its identity, such as device information, unlocking information, etc., through the encryption machine 204 to generate encrypted data. And pre-stored in the first server 205. The first server 205 can be any server, such as a corresponding cloud server, which is not specifically limited here. The flashing device 202 can obtain the encrypted data from the first server 205 through the control unit 203, and perform identity verification on the verification information based on the encrypted data.

示例地,可以采用加密机对应的解密算法对加密数据进行解密,解密得到的信息与验证信息进行对比,若一致则可以认为电子设备的刷机操作是合法的,身份校验通过。在身份校验通过的情况下,刷机设备可以从电子设备的目标存储区域获取电子设备的故障信息。For example, the encrypted data can be decrypted using a decryption algorithm corresponding to the encryption machine, and the decrypted information can be compared with the verification information. If they are consistent, it can be considered that the flashing operation of the electronic device is legal and the identity verification has passed. If the identity verification has passed, the flashing device can obtain the fault information of the electronic device from the target storage area of the electronic device.

若不一致则可以认为电子设备的刷机操作不合法,可能存在别人盗取设备非法刷机的风险,身份校验不通过,无法继续进行后续的刷机操作。If there is inconsistency, it can be considered that the flashing operation of the electronic device is illegal. There may be a risk of someone stealing the device and illegally flashing it. The identity verification fails and subsequent flashing operations cannot be performed.

这样,可以基于验证信息进行身份校验,在身份校验通过的情况下才获取故障信息以便后续执行刷机操作,有效保证了刷机操作的合法性和安全性。In this way, identity verification can be performed based on the verification information, and fault information is obtained only when the identity verification passes so as to perform the flashing operation later, which effectively ensures the legitimacy and security of the flashing operation.

在一些实施例中,验证信息包括电子设备的设备信息以及用户输入的解锁信息,加密数据为电子设备基于其解锁信息和设备信息加密生成的。In some embodiments, the verification information includes device information of the electronic device and unlocking information input by a user, and the encrypted data is generated by the electronic device based on its unlocking information and device information.

在本实施例中,可以在刷机设备上提示用户输入电子设备的解锁信息,响应于用户的输入,获取用户输入的解锁信息。还可以下发指令GetDevinfo到电子设备,并接收电子设备响应于该指令返回的设备信息。其中,解锁信息可以包括密码、指纹和人脸等,设备信息可以包括串号信息、型号信息和版本信息等。In this embodiment, the user may be prompted on the flashing device to input unlocking information of the electronic device, and the unlocking information input by the user may be obtained in response to the user's input. A GetDevinfo instruction may also be sent to the electronic device, and the device information returned by the electronic device in response to the instruction may be received. The unlocking information may include a password, fingerprint, face, etc., and the device information may include serial number information, model information, version information, etc.

以解锁信息为锁屏密码,设备信息为串号信息为例。加密数据可以是电子设备的锁屏密码和串号信息加密生成的,可以基于加密信息验证用户输入的密码以及电子设备返回的串号信息,以保证刷机操作的合法性。For example, the unlock information is the lock screen password and the device information is the serial number information. The encrypted data can be generated by encrypting the lock screen password and the serial number information of the electronic device. The password entered by the user and the serial number information returned by the electronic device can be verified based on the encrypted information to ensure the legitimacy of the flashing operation.

这样,通过电子设备的解锁信息和设备信息进行双重验证,可以进一步保证刷机操作的合法性和安全性。In this way, double verification is performed through the unlocking information and device information of the electronic device to further ensure the legality and security of the flashing operation.

在一些实施例中,上述步骤102还可以包括如下步骤:In some embodiments, the above step 102 may further include the following steps:

根据故障信息对应的刷机策略生成刷机指令;Generate a flashing instruction according to the flashing strategy corresponding to the fault information;

通过刷机指令对电子设备进行刷机处理。Flash the electronic device through the flash command.

在本实施例中,刷机指令可以用于指示具体的刷机操作,例如重新刷入系统镜像文件操作或格式化操作,刷机指令可以携带刷机对象,刷机对象用于指示具体刷机操作所针对的对象。在一些示例中,刷机指令还可以携带刷机包数据,其中刷机对象可以指示将刷机包数据中的文件刷入对应的存储区域中。In this embodiment, the flashing instruction can be used to indicate a specific flashing operation, such as a re-flash operation of a system image file or a formatting operation, and the flashing instruction can carry a flashing object, which is used to indicate the object targeted by the specific flashing operation. In some examples, the flashing instruction can also carry flashing package data, where the flashing object can indicate that the files in the flashing package data are flashed into the corresponding storage area.

可以将刷机指令发送至电子设备,以使电子设备可以根据该刷机指令执行刷机操作。The flashing instruction can be sent to the electronic device, so that the electronic device can perform the flashing operation according to the flashing instruction.

这样,可以通过刷机指令确保电子设备能够执行刷机策略对应的刷机操作,保证刷机操作的准确性。In this way, the flashing instruction can be used to ensure that the electronic device can execute the flashing operation corresponding to the flashing strategy, thereby ensuring the accuracy of the flashing operation.

在一些实施例中,刷机指令还可以携带校验信息,校验信息用于电子设备验证刷机指令的合法性。In some embodiments, the flashing instruction may also carry verification information, and the verification information is used by the electronic device to verify the legitimacy of the flashing instruction.

在本实施例中,可以理解的是,刷机指令会对电子设备内部的数据进行操作,为保证信息安全,可以在执行刷机指令前,对其进行验证。In this embodiment, it can be understood that the flashing instruction will operate on the data inside the electronic device. To ensure information security, the flashing instruction can be verified before it is executed.

示例地,刷机指令还可以携带校验信息,即刷机指令可以表示为EraseData<校验信息><userdata>或FlashROSystem<校验信息><分区1,分区1镜像文件><分区2,分区2镜像文件>···<分区n,分区n镜像文件>。For example, the flashing instruction may also carry verification information, that is, the flashing instruction may be expressed as EraseData<verification information><userdata> or FlashROSystem<verification information><partition 1, partition 1 image file><partition 2, partition 2 image file>···<partition n, partition n image file>.

该校验信息可以是刷机设备在接收到用户输入的解锁信息和第一服务器返回的加密数据的情况下,采用特定的加密算法对解锁信息和加密数据进行加密处理后生成的。刷机设备将校验信息发送至电子设备,电子设备使用对应的解密算法进行解密,得到解锁信息和加密数据,再根据自身的解锁信息和设备信息,分别验证解锁信息和加密数据,以确保刷机指令的合法性。The verification information can be generated by the flashing device after receiving the unlocking information input by the user and the encrypted data returned by the first server, by encrypting the unlocking information and the encrypted data using a specific encryption algorithm. The flashing device sends the verification information to the electronic device, which decrypts the unlocking information and the encrypted data using the corresponding decryption algorithm, and then verifies the unlocking information and the encrypted data according to its own unlocking information and device information, respectively, to ensure the legitimacy of the flashing instruction.

这样,可以在执行刷机指令前通过校验信息验证其合法性,以保证信息安全。In this way, the legitimacy of the flashing instruction can be verified by checking the information before executing it to ensure information security.

在一些实施例中,在故障信息为第一故障信息或第二故障信息的情况下,故障信息对应的刷机策略为格式化用户数据分区;In some embodiments, when the fault information is the first fault information or the second fault information, the flashing strategy corresponding to the fault information is to format the user data partition;

其中,在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成第一故障信息;在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成第二故障信息。Among them, when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be powered on, and the power-on process is mounted on the user data partition, the first fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be powered on, and the power-on process has been mounted on the user data partition, the second fault information is generated.

在本实施例中,若故障信息指示故障类型为未触发系统升级且开机流程在用户数据分区挂载,或在用户数据分区挂载过,即对应上文所言的ERROR103或ERROR104,此时对应的刷机策略可以为格式化用户数据分区。In this embodiment, if the fault information indicates that the fault type is that the system upgrade is not triggered and the boot process is mounted on the user data partition, or the user data partition has been mounted, that is, corresponding to ERROR103 or ERROR104 mentioned above, the corresponding flashing strategy can be to format the user data partition.

示例地,根据该刷机策略生成的刷机指令可以为EraseData,用于指示格式化操作,刷机指令携带的刷机对象可以为userdata,用于指示用户数据分区。可以将EraseData<userdata>发送至电子设备,以使电子设备格式化用户数据分区。For example, the flashing instruction generated according to the flashing strategy may be EraseData, used to indicate a formatting operation, and the flashing object carried by the flashing instruction may be userdata, used to indicate a user data partition. EraseData<userdata> may be sent to the electronic device to cause the electronic device to format the user data partition.

这样,可以在用户数据分区出现异常,无法挂载或挂载后无法正常启动的情况下,指示电子设备格式化用户数据分区,完成刷机操作,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。In this way, when the user data partition is abnormal and cannot be mounted or cannot be started normally after mounting, the electronic device can be instructed to format the user data partition and complete the flashing operation. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of flashing.

在一些实施例中,在故障信息为第三故障信息或第四故障信息的情况下,故障信息对应的刷机策略为重新刷入最新版本的系统镜像文件;其中,在电子设备的运行状态信息指示电子设备系统升级失败的情况下,生成第三故障信息;在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成第四故障信息;In some embodiments, when the fault information is the third fault information or the fourth fault information, the flashing strategy corresponding to the fault information is to re-flash the latest version of the system image file; wherein, when the running status information of the electronic device indicates that the electronic device system upgrade has failed, the third fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered the system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, the fourth fault information is generated;

在故障信息为第五故障信息的情况下,故障信息对应的刷机策略为重新刷入升级前版本的系统镜像文件;其中,在电子设备的运行状态信息指示电子设备系统升级成功,但电子设备处于无法开机状态的情况下,生成第五故障信息。When the fault information is the fifth fault information, the flashing strategy corresponding to the fault information is to re-flash the system image file of the version before the upgrade; wherein, when the running status information of the electronic device indicates that the electronic device system has been successfully upgraded, but the electronic device is in a state where it cannot be turned on, the fifth fault information is generated.

在本实施例中,若故障信息指示故障类型为触发系统升级且升级失败,或者,未触发系统升级且开机流程未挂载至用户数据分区,即对应上文所言的ERROR100或ERROR102,此时对应的刷机策略可以为重新刷入最新版本的系统镜像文件。In this embodiment, if the fault information indicates that the fault type is triggering a system upgrade and the upgrade fails, or the system upgrade is not triggered and the boot process is not mounted to the user data partition, that is, corresponding to ERROR100 or ERROR102 mentioned above, the corresponding flashing strategy at this time can be to re-flash the latest version of the system image file.

示例地,根据该刷机策略生成的刷机指令可以为FlashROSystem,用于指示重新刷入系统镜像文件操作,刷机指令携带的刷机对象可以为<分区1,分区1镜像文件><分区2,分区2镜像文件>···<分区n,分区n镜像文件>,其中,<分区n,分区n镜像文件>表示为键对值,指示分区名和最新版本的系统镜像文件中对应要刷入该分区的文件。For example, the flashing instruction generated according to the flashing strategy may be FlashROSystem, which is used to instruct the operation of re-flashing the system image file. The flashing object carried by the flashing instruction may be <partition 1, partition 1 image file><partition 2, partition 2 image file>...<partition n, partition n image file>, wherein <partition n, partition n image file> is represented as a key pair value, indicating the partition name and the corresponding file in the latest version of the system image file to be flashed into the partition.

若故障信息指示故障类型为触发系统升级且升级成功,即对应上文所言的ERROR101,此时对应的刷机策略可以为重新刷入升级前版本的系统镜像文件。If the fault information indicates that the fault type is triggering a system upgrade and the upgrade is successful, that is, it corresponds to ERROR101 mentioned above. At this time, the corresponding flashing strategy can be to re-flash the system image file of the version before the upgrade.

示例地,根据该刷机策略生成的刷机指令可以为FlashROSystem,用于指示重新刷入系统镜像文件操作,刷机指令携带的刷机对象可以为<分区1,分区1镜像文件><分区2,分区2镜像文件>···<分区n,分区n镜像文件>,其中,<分区n,分区n镜像文件>表示为键对值,指示分区名和升级前版本的系统镜像文件中对应要刷入该分区的文件。For example, the flashing instruction generated according to the flashing strategy may be FlashROSystem, which is used to instruct the operation of re-flashing the system image file. The flashing object carried by the flashing instruction may be <partition 1, partition 1 image file><partition 2, partition 2 image file>...<partition n, partition n image file>, wherein <partition n, partition n image file> is represented as a key pair value, indicating the partition name and the corresponding file to be flashed into the partition in the system image file of the previous version of the upgrade.

这样,可以在最新版本的系统镜像文件发生损坏导致无法开机的情况下,指示重新刷入最新版本的系统镜像文件,或者,在最新版本的系统镜像文件不兼容导致无法开机的情况下,指示重新刷入升级前版本的系统镜像文件,以完成刷机操作,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。同时,该刷机操作可以保留用户数据,提高了刷机的灵活性和智能化。In this way, if the latest version of the system image file is damaged and cannot be turned on, you can instruct to re-flash the latest version of the system image file; or if the latest version of the system image file is incompatible and cannot be turned on, you can instruct to re-flash the system image file of the previous version to complete the flashing operation. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of flashing. At the same time, the flashing operation can retain user data, which improves the flexibility and intelligence of flashing.

还可以理解的是,上述刷机指令还可以携带刷机包数据,在一些实施例中,上述步骤102之前,刷机方法还可以包括如下步骤:It can also be understood that the flashing instruction can also carry flashing package data. In some embodiments, before the above step 102, the flashing method can also include the following steps:

在接收到电子设备的设备信息的情况下,基于设备信息生成请求,并发送至第二服务器,其中设备信息包括型号信息,或者,设备信息包括型号信息和升级前版本信息;When receiving device information of the electronic device, generating a request based on the device information and sending the request to the second server, wherein the device information includes model information, or the device information includes model information and pre-upgrade version information;

获取刷机包数据,刷机包数据为第二服务器响应于请求返回的,在设备信息包括型号信息的情况下,刷机包数据包括电子设备的最新版本的系统镜像文件,在设备信息包括型号信息和升级前版本信息的情况下,刷机包数据包括电子设备的升级前版本的系统镜像文件;Obtaining flash package data, the flash package data is returned by the second server in response to the request, and when the device information includes model information, the flash package data includes the latest version of the system image file of the electronic device; when the device information includes model information and pre-upgrade version information, the flash package data includes the pre-upgrade version of the system image file of the electronic device;

将刷机包数据传输至电子设备。Transfer the flash package data to the electronic device.

在一些示例中,如图3所示,刷机设备302还可以接收电子设备301的型号信息,并基于该型号信息生成第一请求,第一请求可以用于指示该型号信息对应的最新版本的系统镜像文件对应的刷机包数据。刷机设备302可以通过控制单元303将第一请求发送至第二服务器304。可以理解的是,第二服务器可以为存储刷机包数据的服务器。In some examples, as shown in FIG3 , the flashing device 302 may also receive the model information of the electronic device 301, and generate a first request based on the model information, and the first request may be used to indicate the flashing package data corresponding to the latest version of the system image file corresponding to the model information. The flashing device 302 may send the first request to the second server 304 through the control unit 303. It is understandable that the second server may be a server that stores the flashing package data.

可以获取第二服务器304响应于第一请求返回的刷机包数据,刷机包数据可以包括电子设备301的最新版本的系统镜像文件。刷机设备302可以下载该刷机包数据,并通过USB连接将刷机包数据传输至电子设备301。The flash package data returned by the second server 304 in response to the first request may be obtained, and the flash package data may include the latest version of the system image file of the electronic device 301. The flash device 302 may download the flash package data and transmit the flash package data to the electronic device 301 via a USB connection.

刷机指令可以携带刷机对象和刷机包数据,电子设备301在接收到上述刷机指令的情况下,可以重新刷入最新版本的系统镜像文件,完成刷机操作。The flashing instruction may carry a flashing object and flashing package data. When the electronic device 301 receives the flashing instruction, it may re-flash the latest version of the system image file to complete the flashing operation.

在另一些示例中,如图3所示,刷机设备302还可以接收电子设备301的型号信息和升级前版本信息,示例地,刷机设备302可以下发指令GetDevPrever至电子设备301,电子设备31将保存在临时分区中的升级前版本信息返回给刷机设备302。In other examples, as shown in Figure 3, the flashing device 302 can also receive model information and pre-upgrade version information of the electronic device 301. For example, the flashing device 302 can send the instruction GetDevPrever to the electronic device 301, and the electronic device 31 returns the pre-upgrade version information stored in the temporary partition to the flashing device 302.

刷机设备302基于型号信息和升级前版本信息生成第二请求,第二请求可以用于指示该型号信息对应的升级前版本的系统镜像文件所对应的刷机包数据。刷机设备302可以通过控制单元303将第二请求发送至第二服务器304。The flashing device 302 generates a second request based on the model information and the pre-upgrade version information, and the second request can be used to indicate the flashing package data corresponding to the pre-upgrade version of the system image file corresponding to the model information. The flashing device 302 can send the second request to the second server 304 through the control unit 303.

可以获取第二服务器304响应于第二请求返回的刷机包数据,刷机包数据可以包括电子设备301的升级前版本的系统镜像文件。刷机设备302可以下载该刷机包数据,并通过USB连接将刷机包数据传输至电子设备301。The flash package data returned by the second server 304 in response to the second request may be obtained, and the flash package data may include the system image file of the pre-upgrade version of the electronic device 301. The flash device 302 may download the flash package data and transmit the flash package data to the electronic device 301 via a USB connection.

刷机指令可以携带刷机对象和刷机包数据,电子设备301在接收到上述刷机指令的情况下,可以重新刷入升级前版本的系统镜像文件,完成刷机操作。The flashing instruction may carry a flashing object and flashing package data. When the electronic device 301 receives the flashing instruction, it may re-flash the system image file of the version before the upgrade to complete the flashing operation.

在一些实施例中,上述获取刷机包数据,还可以包括如下步骤:In some embodiments, the above-mentioned obtaining of flash package data may also include the following steps:

获取按照预设文件大小进行拆分后的刷机包数据;Get the flash package data after splitting according to the preset file size;

上述将刷机包数据传输至电子设备,还可以包括如下步骤:The above-mentioned step of transmitting the flash package data to the electronic device may further include the following steps:

将拆分后的刷机包数据依次传输至电子设备。The split flashing package data is transmitted to the electronic device in sequence.

在本实施例中,下载刷机包数据时可以使用刷机设备的网络进行流下载,即不用先将整个刷机包数据下载到刷机设备本地,可以对刷机包数据按照预设文件大小进行拆分,预设文件大小可以根据实际需求进行设定,例如可以基于USB的传输速度设定文件大小,例如USB2.0的传输速度实际带宽值在32M+左右,可以将刷机包数据以32M为单元拆分下载,下载完32M数据流在刷机设备本地缓存,通过USB将缓存数据传送给电子设备进行刷写,每传输完一个分区的镜像文件,等待电子设备返回刷入状态,再继续进行下一个分区的镜像文件的传输和刷写,直至最后将整个刷机包数据下载传输刷写完成。In this embodiment, when downloading the flashing package data, the network of the flashing device can be used for streaming download, that is, there is no need to download the entire flashing package data to the local flashing device first, and the flashing package data can be split according to a preset file size. The preset file size can be set according to actual needs. For example, the file size can be set based on the transmission speed of the USB. For example, the actual bandwidth value of the transmission speed of USB2.0 is about 32M+, and the flashing package data can be split and downloaded in units of 32M. After downloading, the 32M data stream is cached locally in the flashing device, and the cached data is transmitted to the electronic device through the USB for flashing. After each transmission of the image file of a partition, wait for the electronic device to return to the flashing state, and then continue to transmit and flash the image file of the next partition, until the download, transmission and flashing of the entire flashing package data are completed.

这样,通过拆分刷机包数据,避免过多占用刷机设备的内存,提高了刷机操作的可操作性和适用范围。In this way, by splitting the flashing package data, excessive memory occupation of the flashing device is avoided, thereby improving the operability and applicability of the flashing operation.

图4是本申请实施例提供的另一种刷机方法的流程示意图。如图1所示,刷机方法可以包括如下步骤:FIG4 is a flow chart of another flashing method provided by an embodiment of the present application. As shown in FIG1 , the flashing method may include the following steps:

步骤401,在处于无法开机状态的情况下,根据电子设备的运行状态信息确定故障信息;故障信息用于指示电子设备的故障类别。Step 401, when the electronic device is in a state where it cannot be turned on, determine fault information according to the operating state information of the electronic device; the fault information is used to indicate the fault type of the electronic device.

在步骤401中,若电子设备无法开机,此时电子设备可以根据电子设备的运行状态信息判断导致其无法开机的故障类型,对不同的故障类型进行标记,可以生成不同的故障信息。其中,故障信息可以是字段,也可以是标识码,还可以是特定的符号等,此处不作具体限定。In step 401, if the electronic device cannot be turned on, the electronic device can determine the type of fault that causes it to be unable to be turned on according to the operating status information of the electronic device, mark different fault types, and generate different fault information. The fault information can be a field, an identification code, or a specific symbol, etc., which is not specifically limited here.

步骤402,将故障信息存储至目标存储区域;其中,在刷机设备与电子设备相连接的情况下,刷机设备从目标存储区域获取故障信息,根据故障信息对应的刷机策略对电子设备进行刷机处理。Step 402, storing the fault information in the target storage area; wherein, when the flashing device is connected to the electronic device, the flashing device obtains the fault information from the target storage area and flashes the electronic device according to the flashing strategy corresponding to the fault information.

在步骤402中,可以并故障信息存储于目标存储区域中,以便后续在刷机设备与电子设备相连接的情况下,刷机设备可以从目标存储区域获取故障信息,进而可以针对不同故障类型执行不同的刷机操作。其中该目标存储区域可以是指电子设备中的任意存储分区,下文将以目标存储区域为临时分区为例进行说明。In step 402, the fault information can be stored in the target storage area, so that when the flashing device is connected to the electronic device, the flashing device can obtain the fault information from the target storage area, and then perform different flashing operations for different fault types. The target storage area can refer to any storage partition in the electronic device, and the following description will take the target storage area as a temporary partition as an example.

这样,电子设备可以根据其运行状态信息确定故障信息并存储在目标存储区域的故障信息,以便后续刷机设备可以根据该故障信息所指示的无法开机的故障类型,确定出对应的刷机策略来对电子设备进行刷机处理,无需去售后服务中心即可进行刷机操作,提高了刷机操作的便捷性。In this way, the electronic device can determine fault information based on its operating status information and store the fault information in the target storage area, so that the subsequent flashing device can determine the corresponding flashing strategy to flash the electronic device based on the type of fault that cannot be turned on indicated by the fault information. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of the flashing operation.

在一些实施例中,上述步骤401可以包括如下步骤:In some embodiments, the above step 401 may include the following steps:

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成第一故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is mounted on a user data partition, generating first fault information;

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成第二故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the user data partition has been mounted during the boot process, the second fault information is generated;

在电子设备的运行状态信息指示电子设备系统升级失败的情况下,生成第三故障信息;When the operation status information of the electronic device indicates that the system upgrade of the electronic device fails, generating third fault information;

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成第四故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, fourth fault information is generated;

在电子设备的运行状态信息指示电子设备系统升级成功,但电子设备处于无法开机状态的情况下,生成第五故障信息。When the running status information of the electronic device indicates that the system of the electronic device is successfully upgraded, but the electronic device is in a state where it cannot be turned on, the fifth fault information is generated.

在本实施例中,如上文所言,在电子设备的运行状态信息指示电子设备未触发系统升级,启动后处于无法开机状态,且开机流程正运行到挂载用户数据分区的情况下,可以认为是用户数据分区损坏,无法挂载导致的不开机,此时电子设备可以将该故障类型进行标记,生成第一故障信息ERROR103,并写入到临时分区。In this embodiment, as mentioned above, when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, is in an unbootable state after startup, and the boot process is running to mount the user data partition, it can be considered that the user data partition is damaged and cannot be mounted, resulting in the failure to boot. At this time, the electronic device can mark the fault type, generate the first fault information ERROR103, and write it to the temporary partition.

在电子设备的运行状态信息指示电子设备未触发系统升级,启动后处于无法开机状态,且开机流程已经运行过挂载用户数据分区的情况下,可以认为虽然用户数据分区成功挂载,但是可能由于应用程序或系统某些用户数据库出现如被篡改等异常导致的不开机,此时电子设备可以将该故障类型进行标记,生成第二故障信息ERROR104,并写入到临时分区。When the operating status information of the electronic device indicates that the electronic device has not triggered a system upgrade, is in an unbootable state after startup, and the boot process has already run to mount the user data partition, it can be considered that although the user data partition is successfully mounted, it may fail to boot due to anomalies such as tampering with the application or some user databases of the system. At this time, the electronic device can mark the fault type, generate a second fault information ERROR104, and write it to the temporary partition.

在电子设备的运行状态信息指示电子设备触发系统升级且升级失败的情况下,可以认为是系统异常等因素导致系统升级流程失败,导致系统镜像文件分区损坏,此时电子设备可以将该故障类型进行标记,生成第三故障信息ERROR100,并写入到临时分区。可以理解的是,第三故障信息写入到临时分区可以是在升级失败时写入,也可以是在后续启动开机流程,且处于无法开机状态时写入,此处不作具体限定。In the case where the running status information of the electronic device indicates that the electronic device triggers a system upgrade and the upgrade fails, it can be considered that the system upgrade process fails due to factors such as system abnormality, resulting in damage to the system image file partition. At this time, the electronic device can mark the fault type, generate the third fault information ERROR100, and write it to the temporary partition. It can be understood that the third fault information can be written to the temporary partition when the upgrade fails, or when the boot process is subsequently started and it is in a state where it cannot be booted, which is not specifically limited here.

在电子设备的运行状态信息指示电子设备未触发系统升级,启动后处于无法开机状态,且开机流程未运行到挂载用户数据分区的情况下,可以认为是底层启动镜像文件由于硬件或者其他异常导致的不开机,此时电子设备可以将该故障类型进行标记,生成第四故障信息ERROR102,并写入到临时分区。When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, is in an unbootable state after startup, and the boot process has not run to mount the user data partition, it can be considered that the underlying boot image file fails to boot due to hardware or other abnormalities. At this time, the electronic device can mark the fault type, generate the fourth fault information ERROR102, and write it to the temporary partition.

在电子设备的运行状态信息指示电子设备触发系统升级且升级成功,处于无法开机状态的情况下,可以认为是新版本的软件没有兼容好电子设备的某些场景,导致低概率性不匹配无法开机,此时电子设备可以将该故障类型进行标记,生成第五故障信息ERROR101,并写入到临时分区。When the operating status information of the electronic device indicates that the electronic device triggered a system upgrade and the upgrade was successful, but is in a state where it cannot be turned on, it can be considered that the new version of the software is not compatible with certain scenarios of the electronic device, resulting in a low probability mismatch and inability to turn on. At this time, the electronic device can mark the fault type, generate the fifth fault information ERROR101, and write it to the temporary partition.

这样,电子设备可以在处于无法开机状态的情况下,根据运行状态信息确定的故障信息共存储于目标存储区域中,刷机设备可以从目标存储区域中获取到该故障信息,以便识别出电子设备的故障类型,采用对应的刷机策略对电子设备执行精准刷机处理,提高了刷机操作的便捷性和准确性。In this way, when the electronic device is in a state where it cannot be turned on, the fault information determined based on the operating status information can be stored in the target storage area, and the flashing device can obtain the fault information from the target storage area to identify the fault type of the electronic device, and use the corresponding flashing strategy to perform precise flashing processing on the electronic device, thereby improving the convenience and accuracy of the flashing operation.

在一些实施例中,刷机方法还可以包括如下步骤:In some embodiments, the flashing method may further include the following steps:

接收刷机设备发送的刷机指令,其中,刷机指令为刷机设备根据故障信息对应的刷机策略生成;Receiving a flashing instruction sent by a flashing device, wherein the flashing instruction is generated by the flashing device according to a flashing strategy corresponding to the fault information;

响应于刷机指令进行刷机操作。A flashing operation is performed in response to the flashing instruction.

在本实施例中,刷机设备可以根据故障信息,确定与电子设备无法开机的故障类型相对应的刷机策略,并根据刷机策略,生成刷机指令发送至电子设备,其中刷机指令可以用于指示具体的刷机操作,例如重新刷入系统镜像文件操作或格式化操作,刷机指令还可以携带用于指示具体刷机操作所针对的刷机对象。In this embodiment, the flashing device can determine the flashing strategy corresponding to the fault type that prevents the electronic device from starting up based on the fault information, and generate a flashing instruction based on the flashing strategy and send it to the electronic device, where the flashing instruction can be used to indicate a specific flashing operation, such as re-flashing a system image file operation or a formatting operation, and the flashing instruction can also carry a flashing object used to indicate the specific flashing operation.

电子设备可以接收刷机设备发送的刷机指令,并可以响应于刷机指令进行刷机操作。The electronic device can receive a flashing instruction sent by a flashing device, and can perform a flashing operation in response to the flashing instruction.

这样,电子设备可以在接收到刷机指令后自行刷机,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。In this way, the electronic device can flash itself after receiving the flashing instruction, and the flashing operation can be performed without going to an after-sales service center, which improves the convenience of flashing.

在一些实施例中,刷机指令还可以携带校验信息;上述响应于刷机指令进行刷机操作,还可以包括如下步骤:In some embodiments, the flashing instruction may further carry verification information; the flashing operation in response to the flashing instruction may further include the following steps:

基于解锁信息和设备信息对校验信息进行验证;Verifying the verification information based on the unlocking information and the device information;

在验证通过的情况下,响应于刷机指令进行刷机操作。When the verification is passed, the flashing operation is performed in response to the flashing instruction.

在本实施例中,刷机指令还可以携带校验信息,校验信息可以是刷机设备对用户输入的解锁信息和第一服务器返回的加密数据采用特定的加密算法进行加密处理后生成的。加密数据则是电子设备的解锁信息和设备信息经过加密机加密后生成的,并预先存储于第一服务器中。In this embodiment, the flashing instruction may also carry verification information, which may be generated by the flashing device encrypting the unlocking information input by the user and the encrypted data returned by the first server using a specific encryption algorithm. The encrypted data is generated by encrypting the unlocking information and device information of the electronic device through an encryption machine and is pre-stored in the first server.

电子设备使用对应的解密算法对校验信息进行解密,得到用户输入的解锁信息和第一服务器返回的加密数据。基于自身的解锁信息验证校验信息中的解锁信息,使用加密机的公钥对加密数据进行解密,得到解锁信息和设备信息,在基于自身的解锁信息和设备信息对加密数据汇总的解锁信息和设备信息进行验证。The electronic device uses the corresponding decryption algorithm to decrypt the verification information to obtain the unlocking information input by the user and the encrypted data returned by the first server. The electronic device verifies the unlocking information in the verification information based on its own unlocking information, decrypts the encrypted data using the public key of the encryption machine, obtains the unlocking information and device information, and verifies the unlocking information and device information summarized in the encrypted data based on its own unlocking information and device information.

若验证通过,则可以认为刷机指令是合法性,此时可以响应于刷机指令进行刷机操作。If the verification is successful, the flashing instruction can be considered to be legal, and the flashing operation can be performed in response to the flashing instruction.

这样,可以在执行刷机指令前通过校验信息验证其合法性,以保证信息安全。In this way, the legitimacy of the flashing instruction can be verified by checking the information before executing it to ensure information security.

本申请实施例提供的刷机方法,执行主体可以为刷机装置。本申请实施例中以刷机装置执行刷机的方法为例,说明本申请实施例提供的刷机的装置。The flashing method provided in the embodiment of the present application can be executed by a flashing device. In the embodiment of the present application, the flashing method performed by the flashing device is taken as an example to illustrate the flashing device provided in the embodiment of the present application.

如图5所示,本申请实施例还提供一种刷机装置500,刷机装置500可以为上文所言的刷机设备,刷机装置500包括:As shown in FIG. 5 , the embodiment of the present application further provides a flashing device 500 , which may be the flashing device mentioned above, and includes:

第一获取模块501,用于在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息;故障信息用于指示电子设备的故障类别;The first acquisition module 501 is used to acquire the fault information of the electronic device from the target storage area of the electronic device when the flashing device is connected to the electronic device; the fault information is used to indicate the fault type of the electronic device;

刷机模块502,用于根据故障信息对应的刷机策略对电子设备进行刷机处理。The flashing module 502 is used to flash the electronic device according to the flashing strategy corresponding to the fault information.

在本申请实施例中,能够在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息,由于故障信息用于指示电子设备的故障类别,因此根据故障信息对应的刷机策略对电子设备进行刷机处理。这样,用户无需去售后服务中心即可进行刷机操作,提高了刷机操作的便捷性。In the embodiment of the present application, when the flashing device is connected to the electronic device, the fault information of the electronic device can be obtained from the target storage area of the electronic device. Since the fault information is used to indicate the fault type of the electronic device, the electronic device is flashed according to the flashing strategy corresponding to the fault information. In this way, the user can perform the flashing operation without going to the after-sales service center, which improves the convenience of the flashing operation.

在一些实施例中,电子设备的故障信息是在电子设备处于无法开机状态的情况下,电子设备根据运行状态信息确定的。In some embodiments, the fault information of the electronic device is determined by the electronic device based on the operating status information when the electronic device is in a state where it cannot be powered on.

这样,电子设备可以在处于无法开机状态的情况下,根据运行状态信息确定的故障信息并存储于目标存储区域中,刷机设备可以从目标存储区域中获取到该故障信息,以便识别出电子设备的故障类型,采用对应的刷机策略对电子设备执行精准刷机处理,提高了刷机操作的便捷性和准确性。In this way, when the electronic device is in a state where it cannot be turned on, the fault information can be determined based on the operating status information and stored in the target storage area. The flashing device can obtain the fault information from the target storage area to identify the fault type of the electronic device and use the corresponding flashing strategy to perform precise flashing processing on the electronic device, thereby improving the convenience and accuracy of the flashing operation.

在一些实施例中,刷机装置500还可以包括:In some embodiments, the flashing device 500 may further include:

身份校验模块,用于基于验证信息进行身份校验;An identity verification module, used for performing identity verification based on verification information;

获取模块501还可以用于:The acquisition module 501 may also be used for:

在身份校验通过的情况下,从电子设备的目标存储区域获取电子设备的故障信息。When the identity verification is passed, the fault information of the electronic device is obtained from the target storage area of the electronic device.

这样,可以基于验证信息进行身份校验,在身份校验通过的情况下才获取故障信息以便后续执行刷机操作,有效保证了刷机操作的合法性和安全性。In this way, identity verification can be performed based on the verification information, and fault information is obtained only when the identity verification passes so as to perform the flashing operation later, which effectively ensures the legitimacy and security of the flashing operation.

在一些实施例中,在故障信息为第一故障信息或第二故障信息的情况下,故障信息对应的刷机策略为格式化用户数据分区;In some embodiments, when the fault information is the first fault information or the second fault information, the flashing strategy corresponding to the fault information is to format the user data partition;

其中,在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成第一故障信息;在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成第二故障信息。Among them, when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be powered on, and the power-on process is mounted on the user data partition, the first fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be powered on, and the power-on process has been mounted on the user data partition, the second fault information is generated.

这样,可以在用户数据分区出现异常,无法挂载或挂载后无法正常启动的情况下,指示电子设备格式化用户数据分区,完成刷机操作,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。In this way, when the user data partition is abnormal and cannot be mounted or cannot be started normally after mounting, the electronic device can be instructed to format the user data partition and complete the flashing operation. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of flashing.

在一些实施例中,在故障信息为第三故障信息或第四故障信息的情况下,故障信息对应的刷机策略为重新刷入最新版本的系统镜像文件;其中,在电子设备的运行状态信息指示电子设备系统升级失败的情况下,生成第三故障信息;在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成第四故障信息;In some embodiments, when the fault information is the third fault information or the fourth fault information, the flashing strategy corresponding to the fault information is to re-flash the latest version of the system image file; wherein, when the running status information of the electronic device indicates that the electronic device system upgrade has failed, the third fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered the system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, the fourth fault information is generated;

在故障信息为第五故障信息的情况下,故障信息对应的刷机策略为重新刷入升级前版本的系统镜像文件;其中,在电子设备的运行状态信息指示电子设备系统升级成功,但电子设备处于无法开机状态的情况下,生成第五故障信息。When the fault information is the fifth fault information, the flashing strategy corresponding to the fault information is to re-flash the system image file of the version before the upgrade; wherein, when the running status information of the electronic device indicates that the electronic device system has been successfully upgraded, but the electronic device is in a state where it cannot be turned on, the fifth fault information is generated.

这样,可以在最新版本的系统镜像文件发生损坏导致无法开机的情况下,指示重新刷入最新版本的系统镜像文件,或者,可以在最新版本的系统镜像文件不兼容导致无法开机的情况下,指示电子设备重新刷入升级前版本的系统镜像文件,以完成刷机操作,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。同时,该刷机操作可以保留用户数据,提高了刷机的灵活性和智能化。In this way, when the latest version of the system image file is damaged and cannot be turned on, the system image file of the latest version can be instructed to be re-flashed; or when the latest version of the system image file is incompatible and cannot be turned on, the electronic device can be instructed to re-flash the system image file of the previous version to complete the flashing operation. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of flashing. At the same time, the flashing operation can retain user data, which improves the flexibility and intelligence of flashing.

在一些实施例中,刷机模块502,还可以用于:In some embodiments, the flash module 502 may also be used to:

根据故障信息对应的刷机策略生成刷机指令;Generate a flashing instruction according to the flashing strategy corresponding to the fault information;

通过刷机指令对电子设备进行刷机处理。Flash the electronic device through the flash command.

这样,可以通过刷机指令确保电子设备能够执行刷机策略对应的刷机操作,保证刷机操作的准确性。In this way, the flashing instruction can be used to ensure that the electronic device can execute the flashing operation corresponding to the flashing strategy, thereby ensuring the accuracy of the flashing operation.

如图6所示,本申请实施例还提供一种刷机装置600,刷机装置600可以为上文所言的电子设备,刷机装置600可以包括:As shown in FIG6 , the embodiment of the present application further provides a flashing device 600 , which may be the electronic device mentioned above, and may include:

确定模块601,用于在处于无法开机状态的情况下,根据电子设备的运行状态信息确定故障信息;故障信息用于指示电子设备的故障类别;The determination module 601 is used to determine fault information according to the operation status information of the electronic device when the electronic device is in a state where it cannot be turned on; the fault information is used to indicate the fault type of the electronic device;

存储模块602,用于将故障信息存储至目标存储区域;The storage module 602 is used to store the fault information in the target storage area;

其中,在刷机设备与电子设备相连接的情况下,刷机设备从目标存储区域获取故障信息,根据故障信息对应的刷机策略对电子设备进行刷机处理。When the flashing device is connected to the electronic device, the flashing device obtains the fault information from the target storage area and performs a flashing process on the electronic device according to the flashing strategy corresponding to the fault information.

这样,电子设备可以根据其运行状态信息确定故障信息并存储在目标存储区域的故障信息,以便后续刷机设备可以根据该故障信息所指示的无法开机的故障类型,确定出对应的刷机策略来对电子设备进行刷机处理,无需去售后服务中心即可进行刷机操作,提高了刷机操作的便捷性。In this way, the electronic device can determine fault information based on its operating status information and store the fault information in the target storage area, so that the subsequent flashing device can determine the corresponding flashing strategy to flash the electronic device based on the type of fault that cannot be turned on indicated by the fault information. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of the flashing operation.

在一些实施例中,确定模块601还可以用于:In some embodiments, the determination module 601 may also be used to:

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成第一故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is mounted on a user data partition, generating first fault information;

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成第二故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the user data partition has been mounted during the boot process, the second fault information is generated;

在电子设备的运行状态信息指示电子设备系统升级失败的情况下,生成第三故障信息;When the operation status information of the electronic device indicates that the system upgrade of the electronic device fails, generating third fault information;

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成第四故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, fourth fault information is generated;

在电子设备的运行状态信息指示电子设备系统升级成功,但电子设备处于无法开机状态的情况下,生成第五故障信息。When the running status information of the electronic device indicates that the system of the electronic device is successfully upgraded, but the electronic device is in a state where it cannot be turned on, the fifth fault information is generated.

这样,电子设备可以在处于无法开机状态的情况下,根据运行状态信息确定的故障信息共存储于目标存储区域中,刷机设备可以从目标存储区域中获取到该故障信息,以便识别出电子设备的故障类型,采用对应的刷机策略对电子设备执行精准刷机处理,提高了刷机操作的便捷性和准确性。In this way, when the electronic device is in a state where it cannot be turned on, the fault information determined based on the operating status information can be stored in the target storage area, and the flashing device can obtain the fault information from the target storage area to identify the fault type of the electronic device, and use the corresponding flashing strategy to perform precise flashing processing on the electronic device, thereby improving the convenience and accuracy of the flashing operation.

在一些实施例中,刷机装置600还可以包括:In some embodiments, the flashing device 600 may further include:

接收模块,用于接收刷机设备发送的刷机指令,其中,刷机指令为刷机设备根据故障信息对应的刷机策略生成;A receiving module, used for receiving a flashing instruction sent by a flashing device, wherein the flashing instruction is generated by the flashing device according to a flashing strategy corresponding to the fault information;

执行模块,用于响应于刷机指令进行刷机操作。The execution module is used to perform a flashing operation in response to a flashing instruction.

这样,电子设备可以在接收到刷机指令后自行刷机,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。In this way, the electronic device can flash itself after receiving the flashing instruction, and the flashing operation can be performed without going to an after-sales service center, which improves the convenience of flashing.

本申请实施例中的刷机装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtualreality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personalcomputer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personalcomputer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The flashing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

本申请实施例中的刷机装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The flashing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

本申请实施例提供的刷机装置能够实现图1至图4的方法实施例实现的各个过程,为避免重复,这里不再赘述。The flashing device provided in the embodiment of the present application can implement each process implemented in the method embodiments of Figures 1 to 4, and will not be described again here to avoid repetition.

可选地,如图7所示,本申请实施例还提供一种电子设备700,包括处理器701和存储器702,存储器702上存储有可在处理器701上运行的程序或指令,该程序或指令被处理器701执行时实现上述刷机方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 7, an embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702, and the memory 702 stores programs or instructions that can be executed on the processor 701. When the program or instructions are executed by the processor 701, the various steps of the above-mentioned flashing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

需要说明的是,本申请实施例中的电子设备包括上述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

图8为实现本申请实施例的一种电子设备的硬件结构示意图。FIG8 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备800包括但不限于:射频单元801、网络模块802、音频输出单元803、输入单元804、传感器805、显示单元806、用户输入单元807、接口单元808、存储器809、以及处理器810等部件。The electronic device 800 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810 and other components.

本领域技术人员可以理解,电子设备800还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器810逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art will appreciate that the electronic device 800 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 810 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The electronic device structure shown in FIG8 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.

其中,处理器810可以用于:The processor 810 may be used for:

在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息;故障信息用于指示电子设备的故障类别;When the flashing device is connected to the electronic device, the fault information of the electronic device is obtained from the target storage area of the electronic device; the fault information is used to indicate the fault category of the electronic device;

根据故障信息对应的刷机策略对电子设备进行刷机处理。The electronic device is flashed according to the flashing strategy corresponding to the fault information.

在本申请实施例中,能够在刷机设备与电子设备相连接的情况下,从电子设备的目标存储区域获取电子设备的故障信息,由于故障信息用于指示电子设备的故障类别,因此根据故障信息对应的刷机策略对电子设备进行刷机处理。这样,用户无需去售后服务中心即可进行刷机操作,提高了刷机操作的便捷性。In the embodiment of the present application, when the flashing device is connected to the electronic device, the fault information of the electronic device can be obtained from the target storage area of the electronic device. Since the fault information is used to indicate the fault type of the electronic device, the electronic device is flashed according to the flashing strategy corresponding to the fault information. In this way, the user can perform the flashing operation without going to the after-sales service center, which improves the convenience of the flashing operation.

在一些实施例中,电子设备的故障信息是在电子设备处于无法开机状态的情况下,电子设备根据运行状态信息确定的。In some embodiments, the fault information of the electronic device is determined by the electronic device based on the operating status information when the electronic device is in a state where it cannot be powered on.

这样,电子设备可以在处于无法开机状态的情况下,根据运行状态信息确定的故障信息并存储于目标存储区域中,刷机设备可以从目标存储区域中获取到该故障信息,以便识别出电子设备的故障类型,采用对应的刷机策略对电子设备执行精准刷机处理,提高了刷机操作的便捷性和准确性。In this way, when the electronic device is in a state where it cannot be turned on, the fault information can be determined based on the operating status information and stored in the target storage area. The flashing device can obtain the fault information from the target storage area to identify the fault type of the electronic device and use the corresponding flashing strategy to perform precise flashing processing on the electronic device, thereby improving the convenience and accuracy of the flashing operation.

在一些实施例中,处理器810还可以用于:In some embodiments, the processor 810 may also be configured to:

基于验证信息进行身份校验;Perform identity verification based on verification information;

在身份校验通过的情况下,从电子设备的目标存储区域获取电子设备的故障信息。When the identity verification is passed, the fault information of the electronic device is obtained from the target storage area of the electronic device.

这样,可以基于验证信息进行身份校验,在身份校验通过的情况下才获取故障信息以便后续执行刷机操作,有效保证了刷机操作的合法性和安全性。In this way, identity verification can be performed based on the verification information, and fault information is obtained only when the identity verification passes so as to perform the flashing operation later, which effectively ensures the legitimacy and security of the flashing operation.

在一些实施例中,在故障信息为第一故障信息或第二故障信息的情况下,故障信息对应的刷机策略为格式化用户数据分区;In some embodiments, when the fault information is the first fault information or the second fault information, the flashing strategy corresponding to the fault information is to format the user data partition;

其中,在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成第一故障信息;在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成第二故障信息。Among them, when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be powered on, and the power-on process is mounted on the user data partition, the first fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be powered on, and the power-on process has been mounted on the user data partition, the second fault information is generated.

这样,可以在用户数据分区出现异常,无法挂载或挂载后无法正常启动的情况下,指示电子设备格式化用户数据分区,完成刷机操作,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。In this way, when the user data partition is abnormal and cannot be mounted or cannot be started normally after mounting, the electronic device can be instructed to format the user data partition and complete the flashing operation. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of flashing.

在一些实施例中,在故障信息为第三故障信息或第四故障信息的情况下,故障信息对应的刷机策略为重新刷入最新版本的系统镜像文件;其中,在电子设备的运行状态信息指示电子设备系统升级失败的情况下,生成第三故障信息;在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成第四故障信息;In some embodiments, when the fault information is the third fault information or the fourth fault information, the flashing strategy corresponding to the fault information is to re-flash the latest version of the system image file; wherein, when the running status information of the electronic device indicates that the electronic device system upgrade has failed, the third fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered the system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, the fourth fault information is generated;

在故障信息为第五故障信息的情况下,故障信息对应的刷机策略为重新刷入升级前版本的系统镜像文件;其中,在电子设备的运行状态信息指示电子设备系统升级成功,但电子设备处于无法开机状态的情况下,生成第五故障信息。When the fault information is the fifth fault information, the flashing strategy corresponding to the fault information is to re-flash the system image file of the version before the upgrade; wherein, when the running status information of the electronic device indicates that the electronic device system has been successfully upgraded, but the electronic device is in a state where it cannot be turned on, the fifth fault information is generated.

这样,可以在最新版本的系统镜像文件发生损坏导致无法开机的情况下,指示重新刷入最新版本的系统镜像文件,或者,可以在最新版本的系统镜像文件不兼容导致无法开机的情况下,指示电子设备重新刷入升级前版本的系统镜像文件,以完成刷机操作,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。同时,该刷机操作可以保留用户数据,提高了刷机的灵活性和智能化。In this way, when the latest version of the system image file is damaged and cannot be turned on, the system image file of the latest version can be instructed to be re-flashed; or when the latest version of the system image file is incompatible and cannot be turned on, the electronic device can be instructed to re-flash the system image file of the previous version to complete the flashing operation. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of flashing. At the same time, the flashing operation can retain user data, which improves the flexibility and intelligence of flashing.

在一些实施例中,处理器810还可以用于:In some embodiments, the processor 810 may also be configured to:

根据故障信息对应的刷机策略生成刷机指令;Generate a flashing instruction according to the flashing strategy corresponding to the fault information;

通过刷机指令对电子设备进行刷机处理。Flash the electronic device through the flash command.

这样,可以通过刷机指令确保电子设备能够执行刷机策略对应的刷机操作,保证刷机操作的准确性。In this way, the flashing instruction can be used to ensure that the electronic device can execute the flashing operation corresponding to the flashing strategy, thereby ensuring the accuracy of the flashing operation.

在另一些实施例中,电子设备800中的处理器810可以用于:In some other embodiments, the processor 810 in the electronic device 800 may be configured to:

在处于无法开机状态的情况下,根据电子设备的运行状态信息确定故障信息;故障信息用于指示电子设备的故障类别;In the case of being unable to start up, determining fault information according to the operation status information of the electronic device; the fault information is used to indicate the fault type of the electronic device;

将故障信息存储至目标存储区域;Storing fault information in a target storage area;

其中,在刷机设备与电子设备相连接的情况下,刷机设备从目标存储区域获取故障信息,根据故障信息对应的刷机策略对电子设备进行刷机处理。When the flashing device is connected to the electronic device, the flashing device obtains the fault information from the target storage area and performs a flashing process on the electronic device according to the flashing strategy corresponding to the fault information.

这样,电子设备可以根据其运行状态信息确定故障信息并存储在目标存储区域的故障信息,以便后续刷机设备可以根据该故障信息所指示的无法开机的故障类型,确定出对应的刷机策略来对电子设备进行刷机处理,无需去售后服务中心即可进行刷机操作,提高了刷机操作的便捷性。In this way, the electronic device can determine fault information based on its operating status information and store the fault information in the target storage area, so that the subsequent flashing device can determine the corresponding flashing strategy to flash the electronic device based on the type of fault that cannot be turned on indicated by the fault information. The flashing operation can be performed without going to the after-sales service center, which improves the convenience of the flashing operation.

在一些实施例中,处理器810还可以用于:In some embodiments, the processor 810 may also be configured to:

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成第一故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is mounted on a user data partition, generating first fault information;

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成第二故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the user data partition has been mounted during the boot process, the second fault information is generated;

在电子设备的运行状态信息指示电子设备系统升级失败的情况下,生成第三故障信息;When the operation status information of the electronic device indicates that the system upgrade of the electronic device fails, generating third fault information;

在电子设备的运行状态信息指示电子设备未触发系统升级,但电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成第四故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, fourth fault information is generated;

在电子设备的运行状态信息指示电子设备系统升级成功,但电子设备处于无法开机状态的情况下,生成第五故障信息。When the running status information of the electronic device indicates that the system of the electronic device is successfully upgraded, but the electronic device is in a state where it cannot be turned on, the fifth fault information is generated.

这样,电子设备可以在处于无法开机状态的情况下,根据运行状态信息确定的故障信息共存储于目标存储区域中,刷机设备可以从目标存储区域中获取到该故障信息,以便识别出电子设备的故障类型,采用对应的刷机策略对电子设备执行精准刷机处理,提高了刷机操作的便捷性和准确性。In this way, when the electronic device is in a state where it cannot be turned on, the fault information determined based on the operating status information can be stored in the target storage area, and the flashing device can obtain the fault information from the target storage area to identify the fault type of the electronic device, and use the corresponding flashing strategy to perform precise flashing processing on the electronic device, thereby improving the convenience and accuracy of the flashing operation.

在一些实施例中,射频单元801可以用于:In some embodiments, the radio frequency unit 801 may be used to:

接收刷机设备发送的刷机指令,其中,刷机指令为刷机设备根据故障信息对应的刷机策略生成;Receiving a flashing instruction sent by a flashing device, wherein the flashing instruction is generated by the flashing device according to a flashing strategy corresponding to the fault information;

处理器810可以用于:响应于刷机指令进行刷机操作。The processor 810 may be configured to: perform a flashing operation in response to a flashing instruction.

这样,电子设备可以在接收到刷机指令后自行刷机,无需去售后服务中心即可进行刷机操作,提高了刷机的便捷性。In this way, the electronic device can flash itself after receiving the flashing instruction, and the flashing operation can be performed without going to an after-sales service center, which improves the convenience of flashing.

应理解的是,本申请实施例中,输入单元804可以包括图形处理器(GraphicsProcessing Unit,GPU)8041和麦克风8042,图形处理器8041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元806可包括显示面板8061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板8061。用户输入单元807包括触控面板8071以及其他输入设备8072中的至少一种。触控面板8071,也称为触摸屏。触控面板8071可包括触摸检测装置和触摸控制器两个部分。其他输入设备8072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 804 may include a graphics processor (Graphics Processing Unit, GPU) 8041 and a microphone 8042, and the graphics processor 8041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

存储器809可用于存储软件程序以及各种数据。存储器809可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器809可以包括易失性存储器或非易失性存储器,或者,存储器809可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器809包括但不限于这些和任意其它适合类型的存储器。The memory 809 can be used to store software programs and various data. The memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instruction required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 809 may include a volatile memory or a non-volatile memory, or the memory 809 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

处理器810可包括一个或多个处理单元;可选的,处理器810集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器810中。The processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 810.

本申请实施例还提供一种可读存储介质,可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述刷机方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned flashing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

其中,处理器为上述实施例中的电子设备中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

本申请实施例另提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述刷机方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned flashing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述刷机方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the flashing method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims (10)

1.一种刷机方法,其特征在于,应用于刷机设备,所述方法包括:1. A flashing method, characterized in that it is applied to a flashing device, and the method comprises: 在刷机设备与电子设备相连接的情况下,从所述电子设备的目标存储区域获取所述电子设备的故障信息;所述故障信息用于指示所述电子设备的故障类别;When the flashing device is connected to the electronic device, acquiring the fault information of the electronic device from the target storage area of the electronic device; the fault information is used to indicate the fault type of the electronic device; 根据所述故障信息对应的刷机策略对所述电子设备进行刷机处理。The electronic device is flashed according to the flashing strategy corresponding to the fault information. 2.根据权利要求1所述的方法,其特征在于,所述电子设备的故障信息是根据所述电子设备的运行状态信息确定的。2 . The method according to claim 1 , wherein the fault information of the electronic device is determined based on the operating status information of the electronic device. 3.根据权利要求1所述的方法,其特征在于,所述从所述电子设备的目标存储区域获取所述电子设备的故障信息之前,所述方法还包括:3. The method according to claim 1, characterized in that before acquiring the fault information of the electronic device from the target storage area of the electronic device, the method further comprises: 基于验证信息进行身份校验;Perform identity verification based on verification information; 所述从所述电子设备的目标存储区域获取所述电子设备的故障信息,包括:The acquiring the fault information of the electronic device from the target storage area of the electronic device includes: 在身份校验通过的情况下,从所述电子设备的目标存储区域获取所述电子设备的故障信息。When the identity verification is passed, the fault information of the electronic device is obtained from the target storage area of the electronic device. 4.根据权利要求1所述的方法,其特征在于,在所述故障信息为第一故障信息或第二故障信息的情况下,所述故障信息对应的刷机策略为格式化用户数据分区;4. The method according to claim 1, characterized in that, when the fault information is the first fault information or the second fault information, the flashing strategy corresponding to the fault information is formatting the user data partition; 其中,在所述电子设备的运行状态信息指示所述电子设备未触发系统升级,但所述电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成所述第一故障信息;在所述电子设备的运行状态信息指示所述电子设备未触发系统升级,但所述电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成所述第二故障信息。Among them, when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be turned on, and the boot process is mounted on the user data partition, the first fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state that cannot be turned on, and the boot process has been mounted on the user data partition, the second fault information is generated. 5.根据权利要求1所述的方法,其特征在于,在所述故障信息为第三故障信息或第四故障信息的情况下,所述故障信息对应的刷机策略为重新刷入最新版本的系统镜像文件;其中,在所述电子设备的运行状态信息指示所述电子设备系统升级失败的情况下,生成所述第三故障信息;在所述电子设备的运行状态信息指示所述电子设备未触发系统升级,但所述电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成所述第四故障信息;5. The method according to claim 1 is characterized in that, when the fault information is the third fault information or the fourth fault information, the flashing strategy corresponding to the fault information is to re-flash the latest version of the system image file; wherein, when the running status information of the electronic device indicates that the system upgrade of the electronic device has failed, the third fault information is generated; when the running status information of the electronic device indicates that the electronic device has not triggered the system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, the fourth fault information is generated; 在所述故障信息为第五故障信息的情况下,所述故障信息对应的刷机策略为重新刷入升级前版本的系统镜像文件;其中,在所述电子设备的运行状态信息指示所述电子设备系统升级成功,但所述电子设备处于无法开机状态的情况下,生成所述第五故障信息。When the fault information is the fifth fault information, the flashing strategy corresponding to the fault information is to re-flash the system image file of the version before the upgrade; wherein, when the running status information of the electronic device indicates that the electronic device system has been successfully upgraded, but the electronic device is in a state where it cannot be turned on, the fifth fault information is generated. 6.根据权利要求1所述的方法,其特征在于,所述根据所述故障信息对应的刷机策略对所述电子设备进行刷机处理,包括:6. The method according to claim 1, characterized in that the flashing process of the electronic device according to the flashing strategy corresponding to the fault information comprises: 根据所述故障信息对应的刷机策略生成刷机指令;Generate a flashing instruction according to the flashing strategy corresponding to the fault information; 通过所述刷机指令对所述电子设备进行刷机处理。The electronic device is flashed using the flashing instruction. 7.一种刷机方法,其特征在于,应用于电子设备,所述方法包括:7. A flashing method, characterized in that it is applied to an electronic device, the method comprising: 根据所述电子设备的运行状态信息确定故障信息;所述故障信息用于指示所述电子设备的故障类别;Determining fault information according to the operating status information of the electronic device; the fault information is used to indicate the fault type of the electronic device; 将所述故障信息存储至目标存储区域;Storing the fault information in a target storage area; 其中,在刷机设备与所述电子设备相连接的情况下,所述刷机设备从所述目标存储区域获取所述故障信息,根据所述故障信息对应的刷机策略对所述电子设备进行刷机处理。Wherein, when the flashing device is connected to the electronic device, the flashing device obtains the fault information from the target storage area, and performs a flashing process on the electronic device according to the flashing strategy corresponding to the fault information. 8.根据权利要求7所述的方法,其特征在于,所述根据所述电子设备的运行状态信息确定故障信息,包括:8. The method according to claim 7, wherein determining the fault information according to the operating status information of the electronic device comprises: 在所述电子设备的运行状态信息指示所述电子设备未触发系统升级,但所述电子设备处于无法开机状态,且开机流程挂载在用户数据分区的情况下,生成第一故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is mounted on a user data partition, generating first fault information; 在所述电子设备的运行状态信息指示所述电子设备未触发系统升级,但所述电子设备处于无法开机状态,且开机流程在用户数据分区挂载过的情况下,生成第二故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the user data partition has been mounted during the boot process, second fault information is generated; 在所述电子设备的运行状态信息指示所述电子设备系统升级失败的情况下,生成第三故障信息;generating third fault information when the operation status information of the electronic device indicates that the system upgrade of the electronic device fails; 在所述电子设备的运行状态信息指示所述电子设备未触发系统升级,但所述电子设备处于无法开机状态,且开机流程未挂载至用户数据分区的情况下,生成第四故障信息;When the running status information of the electronic device indicates that the electronic device has not triggered a system upgrade, but the electronic device is in a state where it cannot be turned on, and the boot process is not mounted to the user data partition, fourth fault information is generated; 在所述电子设备的运行状态信息指示所述电子设备系统升级成功,但所述电子设备处于无法开机状态的情况下,生成第五故障信息。When the running status information of the electronic device indicates that the system of the electronic device is successfully upgraded, but the electronic device is in a state where it cannot be turned on, fifth fault information is generated. 9.根据权利要求7所述的方法,其特征在于,所述方法还包括:9. The method according to claim 7, characterized in that the method further comprises: 接收所述刷机设备发送的刷机指令,其中,所述刷机指令为所述刷机设备根据所述故障信息对应的刷机策略生成的;receiving a flashing instruction sent by the flashing device, wherein the flashing instruction is generated by the flashing device according to a flashing strategy corresponding to the fault information; 响应于所述刷机指令进行刷机操作。A flashing operation is performed in response to the flashing instruction. 10.一种可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1-6任一项所述的方法的步骤,或者,如权利要求7-9所述的方法的步骤。10. A readable storage medium, characterized in that the readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6, or the steps of the method according to claims 7 to 9 are implemented.
CN202410199265.2A 2024-02-22 2024-02-22 Flashing method, device, electronic device, readable storage medium and program product Pending CN118012450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410199265.2A CN118012450A (en) 2024-02-22 2024-02-22 Flashing method, device, electronic device, readable storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410199265.2A CN118012450A (en) 2024-02-22 2024-02-22 Flashing method, device, electronic device, readable storage medium and program product

Publications (1)

Publication Number Publication Date
CN118012450A true CN118012450A (en) 2024-05-10

Family

ID=90944088

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410199265.2A Pending CN118012450A (en) 2024-02-22 2024-02-22 Flashing method, device, electronic device, readable storage medium and program product

Country Status (1)

Country Link
CN (1) CN118012450A (en)

Similar Documents

Publication Publication Date Title
US10931451B2 (en) Securely recovering a computing device
CN101578609B (en) Secure booting a computing device
JP5576983B2 (en) Secure boot and configuration of subsystems from non-local storage
TWI598814B (en) System and method for managing and diagnosing a computing device equipped with unified extensible firmware interface (uefi)-compliant firmware
WO2015184891A1 (en) Security management and control method, apparatus, and system for android system
US20090259855A1 (en) Code Image Personalization For A Computing Device
WO2013182155A1 (en) Firmware version upgrade method and system
EP3588354B1 (en) Automatic verification method and system
CN111177709A (en) A terminal trusted component execution method, device and computer equipment
WO2024260299A1 (en) System legitimacy verification method and apparatus, and electronic device
CN116070217A (en) Safe starting system and method for chip module
CN113885907A (en) Firmware upgrading system and method
CN114721693B (en) Microprocessor, BIOS firmware updating method, computer equipment and storage medium
CN118690377B (en) Chip burning method, upper computer and chip burning system
CN110196741A (en) Method for setting basic input/output system, terminal and computer storage medium
CN112231709B (en) System safety design method with remote upgrading function
JP2022008173A (en) Method and device for remote resetting to factory default setting
CN114675865A (en) Method and device for upgrading over-the-air technology, storage medium and terminal equipment
CN118138340A (en) Data processing method and device and electronic equipment
CN118012450A (en) Flashing method, device, electronic device, readable storage medium and program product
CN115688120A (en) Secure chip firmware importing method, secure chip and computer readable storage medium
CN114357464A (en) Firmware verification method and device, storage medium, and electronic device
CN114879980A (en) Vehicle-mounted application installation method and device, computer equipment and storage medium
CN118605926A (en) Functional accessory driving method, device and electronic equipment
CN119766650A (en) System upgrading method, device, electronic equipment and readable storage medium

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