# US 11,119,844 B2 · Recovery method for terminal device startup failure and terminal device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,119,844 B2
- Document ID: US11119844B2
- Status: Granted
- Kind: B2
- Application number: 16/344,565
- Filed: 2016-10-25
- Published: 2019-09-26
- Granted: 2021-09-14
- Earliest claimed: 2016-10-25
- Assignees: Huawei Technologies Co., Ltd.
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Liang Zhang; Dechun Qi; Xiaoyan Zhou; Zhiqiang Li; Liang Yu; Dengzhou Xia; Chunhua Hu; Zhongsheng Yan
- Web page: https://patentgrep.com/patent/US11119844B2

## CPC

- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 9/4406: {Loading of operating system}
- G06F 9/44552: {Conflict resolution, i.e. enabling coexistence of conflicting executables}
- G06F 11/006: {Identification (G06F11/2289 takes precedence)}
- G06F 11/0742: {in a data processing system embedded in a mobile device, e.g. mobile phones, handheld devices}
- G06F 11/0781: {Error filtering or prioritizing based on a policy defined by the user or on a policy defined by a hardware/software module, e.g. according to a severity level}
- G06F 11/079: {Root cause analysis, i.e. error or fault diagnosis (in a hardware test environment G06F11/22; in a software test environment G06F11/36)}
- G06F 11/1417: {Boot up procedures}
- G06F 11/1438: {Restarting or rejuvenating}
- G06F 11/1441: {Resetting or repowering}
- G06F 11/2284: {by power-on test, e.g. power-on self test [POST]}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Embodiments provide a recovery method for a terminal device startup failure and a terminal device. The method includes: determining that a failure indication event occurs in a startup process, where the failure indication event is used to indicate a startup failure; determining at least one recovery policy based on a type of the failure indication event and/or a cause of the failure indication event; and performing startup recovery based on the at least one recovery policy.

## Claims

### Claim 1

A recovery method, comprising:
determining, by a terminal device, that a failure indication event has occurred in a startup process of the terminal device, wherein the failure indication event indicates a startup failure;
determining, by the terminal device, a first recovery policy based on a first type of the failure indication event or a first cause of the failure indication event, and based on a current quantity of recovery times and a startup stage at which the failure indication event occurred, wherein the terminal device determines the first recovery policy by querying a stored mapping relationship among a plurality of recovery policies, a plurality of stages of startup in which a startup failure may occur, a plurality of quantities of recovery times, a plurality of startup stages, and a plurality of failure indication events or causes of failure indication events; and
performing, by the terminal device, startup recovery on the terminal device based on the first recovery policy.

### Claim 2 (depends on 1)

The recovery method according to claim 1, wherein the first type of the failure indication event comprises: a preset fault type, a startup timeout type, a user force restart type, or a system crash restart type.

### Claim 3 (depends on 2)

The recovery method according to claim 2, wherein the user force restart type corresponds to:
touching and holding a power button;
pressing a preset combination of buttons; or
pulling out a battery.

### Claim 4 (depends on 2)

The recovery method according to claim 2, wherein the first recovery policy is selected from the plurality of recovery policies, and the plurality of recovery policies comprises: a system or service restart recovery policy, backup system enabling recovery policy, safe recovery for user data recovery policy, a factory reset recovery policy, and an online system update recovery policy.

### Claim 5 (depends on 4)

The recovery method according to claim 4, wherein the first type of the failure indication event is the preset fault type, the failure indication event of the preset fault type is generated when a boot of system kernel image check fails or a system kernel image partition is damaged, and the first recovery policy is the online system update policy.

### Claim 6 (depends on 4)

The recovery method according to claim 4, wherein the first type of the failure indication event is the preset fault type, and the failure indication event of the preset fault type is generated when a boot of a core service fails; and
wherein performing startup recovery on the terminal device based on the first recovery policy comprises:
performing startup recovery on the terminal device based on a preset execution sequence, wherein the preset execution sequence sequentially comprises the safe recovery for user data policy, the factory reset recovery policy, and the online system update policy.

### Claim 7 (depends on 4)

The recovery method according to claim 4, wherein the first type of the failure indication event is the preset fault type, and the failure indication event of the preset fault type is generated when a data partition is damaged or a data partition is read-only; and
wherein performing startup recovery on the terminal device based on the first recovery policy comprises:
performing startup recovery on the terminal device based on a preset execution sequence, wherein the preset execution sequence sequentially comprises the system or service restart policy, the safe recovery for user data policy, the factory reset recovery policy, and the online system update policy.

### Claim 8 (depends on 4)

The recovery method according to claim 4, wherein the first type of the failure indication event is the startup timeout type or the user force restart type; and
wherein performing startup recovery on the terminal device based on the first recovery policy comprises:
performing startup recovery on the terminal device based on a preset execution sequence, wherein the preset execution sequence sequentially comprises: the system or service restart policy, the backup system enabling policy, the safe recovery for user data policy, the factory reset recovery policy, and the online system update policy.

### Claim 9 (depends on 1)

The recovery method according to claim 1, wherein performing startup recovery on the terminal device based on the first recovery policy comprises:
performing startup recovery on the terminal device based on a preset execution sequence of the first recovery policy, wherein the startup recovery continues until a first application program starts or all recovery policies corresponding to the first type of the failure indication event or to the first cause of the failure indication event fail.

### Claim 10 (depends on 1)

The recovery method according to claim 1, further comprising:
after startup recovery is performed on the terminal device based on the first recovery policy, generating a startup log corresponding to the first recovery policy, wherein the startup log comprises: the first type of the failure indication event, the startup stage at which the failure indication event occurred, a fault log, the first recovery policy, and a recovery result;
when the startup recovery fails, saving the startup log; and
when the startup recovery succeeds, uploading, to a log statistics and measurement system, the startup log and a saved startup log of a second recovery policy that has previously failed.

### Claim 11

A terminal, comprising:
a processor; and
a non-transitory memory, wherein the memory is configured to store a program to be executed by the processor, the program including instructions for:
determining that a failure indication event has occurred in a startup process of the terminal, wherein the failure indication event indicate a startup failure;
determining a first recovery policy based on a first type of the failure indication event or a first cause of the failure indication event, and based on a current quantity of recovery times and a startup stage at which the failure indication event occurred, wherein the first recovery policy is determined by querying a stored mapping relationship among a plurality of recovery policies, a plurality of stages of startup in which a startup failure may occur, a plurality of quantities of recovery times, a plurality of startup stages, and a plurality of failure indication events or causes of failure indication events; and
performing startup recovery on the terminal based on the first recovery policy.

### Claim 12 (depends on 11)

The terminal according to claim 11, wherein the first type of the failure indication event comprises a preset fault type, a startup timeout type, a user force restart type, or a system crash restart type.

### Claim 13 (depends on 12)

The terminal according to claim 12, wherein the user force restart type corresponds to:
touching and holding a power button;
pressing a preset combination of buttons; or
pulling out a battery.

### Claim 14 (depends on 12)

The terminal according to claim 12, wherein determining the first recovery policy based on the first type of the failure indication event or the first cause of the failure indication event comprises:
when the failure indication event is the system crash restart type, determining the first recovery policy based on a crash cause of the failure indication event of the system crash restart type.

### Claim 15

A non-transitory computer readable storage medium, wherein the non-transitory storage medium is configured to store a computer software instruction used by a terminal, and when the computer software instruction runs on a computer, the computer software instruction causes the terminal to:
determine that a failure indication event has occurred in a startup process, wherein the failure indication event indicates a startup failure;
determine a first recovery policy based on a first type of the failure indication event or a first cause of the failure indication event, and based on a current quantity of recovery times and a startup stage at which the failure indication event occurred, wherein the first recovery policy is determined by querying a stored mapping relationship among a plurality of recovery policies, a plurality of stages of startup in which a startup failure may occur, a plurality of quantities of recovery times, a plurality of startup stages, and a plurality of failure indication events or causes of failure indication events; and
perform startup recovery based on the first recovery policy.
