CN110018918B - Method and device for repairing terminal abnormity, mobile terminal and storage medium - Google Patents

Method and device for repairing terminal abnormity, mobile terminal and storage medium Download PDF

Info

Publication number
CN110018918B
CN110018918B CN201810022187.3A CN201810022187A CN110018918B CN 110018918 B CN110018918 B CN 110018918B CN 201810022187 A CN201810022187 A CN 201810022187A CN 110018918 B CN110018918 B CN 110018918B
Authority
CN
China
Prior art keywords
terminal
starting
configuration file
repairing
strategy
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.)
Active
Application number
CN201810022187.3A
Other languages
Chinese (zh)
Other versions
CN110018918A (en
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201810022187.3A priority Critical patent/CN110018918B/en
Priority to PCT/CN2019/070121 priority patent/WO2019137280A1/en
Publication of CN110018918A publication Critical patent/CN110018918A/en
Application granted granted Critical
Publication of CN110018918B publication Critical patent/CN110018918B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a method for repairing terminal abnormity, which comprises the following steps: when a starting-up instruction is detected, determining a starting-up strategy of the starting-up; when the starting strategy is a preset abnormal recovery starting strategy, deleting an application configuration file in a terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application; acquiring an installation package of a terminal application, and analyzing the acquired installation package to generate a new application configuration file; and acquiring prestored operation data of the terminal application before the start-up, and importing the acquired operation data into the new application configuration file. The invention also discloses a mobile terminal and a computer readable storage medium. The invention can realize the restoration of the terminal abnormity and simultaneously reserve the user data to the maximum extent.

Description

Method and device for repairing terminal abnormity, mobile terminal and storage medium
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to a method and an apparatus for repairing a terminal abnormality, a mobile terminal, and a storage medium.
Background
Currently, mobile terminals such as smart phones and tablet computers have become entertainment centers, information centers and data centers of people. In the using process of the mobile terminal, abnormal phenomena of the system, such as no response to touch, frequent error reporting, card pause, flash retreat and the like, may occur due to insufficient memory, insufficient system resources, incompatible software or other reasons, which seriously affects the normal use of the mobile terminal by the user.
Taking a mobile phone as an example, when the above abnormal phenomenon occurs in the mobile phone, the user can generally try to solve the problem in the following two ways: 1) and restarting the mobile phone. The method is convenient and quick, has no influence on data inside the mobile phone, and can also solve some simple abnormal problems, but for some serious abnormal problems, the problem still exists after the restart is possible; 2) and restoring factory settings. The mobile phone is reset, which is the most thorough recovery, generally, most of failures caused by software can be solved by recovering factory settings, but this way may cause all user data to be lost, although a backup and restore function may be used, the backup and restore function may only restore the state of the mobile phone to the last backup point, and data after the backup point cannot be restored.
Therefore, how to enable the mobile terminal to repair the abnormality and retain the user data to the maximum becomes a problem to be solved urgently at present.
Disclosure of Invention
The invention mainly aims to provide a method and a device for repairing terminal abnormity, a mobile terminal and a computer readable storage medium, aiming at repairing the terminal abnormity and simultaneously reserving user data to the maximum extent.
In order to achieve the above object, the present invention provides a method for repairing terminal abnormality, which comprises the following steps:
when a starting-up instruction is detected, determining a starting-up strategy of the starting-up;
when the starting strategy is a preset abnormal recovery starting strategy, deleting an application configuration file in a terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application;
acquiring an installation package of a terminal application, and analyzing the acquired installation package to generate a new application configuration file;
and acquiring prestored operation data of the terminal application before the start-up, and importing the acquired operation data into the new application configuration file.
Optionally, when the boot instruction is detected, before the step of determining the boot policy of the current boot, the method further includes:
receiving an abnormal repairing instruction triggered by a user based on a preset display interface;
and controlling the terminal to restart according to the received abnormal repairing instruction.
Optionally, the step of receiving an abnormal repair instruction triggered by a user based on a preset display interface includes:
detecting whether the terminal is in a preset abnormal state or not;
if so, displaying a user interaction interface to prompt a user to carry out abnormal repair;
and receiving an exception repairing instruction triggered by the user based on the user interaction interface.
Optionally, the step of receiving an abnormal repair instruction triggered by a user based on a preset display interface includes:
when the terminal is in a recovery flashing mode or a fastboot flashing mode, displaying an abnormal repairing control in a main menu of the recovery flashing mode or the fastboot flashing mode;
and receiving an abnormal repairing instruction triggered by the user based on the abnormal repairing control.
Optionally, when the boot instruction is detected, the step of determining the boot policy of the current boot includes:
when a starting-up instruction is detected, reading a starting-up configuration file, and judging whether preset abnormal repair information exists in the starting-up configuration file or not;
if yes, determining the starting-up strategy of the starting-up at this time as an abnormal recovery starting-up strategy,
if not, determining that the starting-up strategy of the starting-up is a normal starting-up strategy.
Optionally, after the step of obtaining pre-stored operation data of the terminal application before the power-on of this time and importing the obtained operation data into the new application configuration file, the method further includes:
detecting whether the obtained running data is imported completely;
and if so, controlling the terminal to normally start according to the starting configuration file.
Optionally, before the step of controlling the terminal to normally boot according to the boot configuration file, the method further includes:
extracting the odex file in the acquired installation package;
the step of controlling the normal startup of the terminal according to the startup configuration file comprises the following steps:
and controlling the terminal to normally start according to the starting configuration file and the extracted odex file.
In order to achieve the above object, the present invention also provides a device for repairing an abnormal terminal, including:
the determining module is used for determining a starting-up strategy of the starting-up when a starting-up instruction is detected;
the deleting module is used for deleting an application configuration file in the terminal system when the starting strategy is a preset abnormal recovery starting strategy, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application;
the analysis module is used for acquiring an installation package of the terminal application and analyzing the acquired installation package to generate a new application configuration file;
and the import module is used for acquiring the prestored running data of the terminal application before the start-up, and importing the acquired running data into the new application configuration file.
In addition, to achieve the above object, the present invention also provides a mobile terminal, including: the method comprises the steps of storing a memory, a processor and a terminal abnormity repairing program which is stored on the memory and can run on the processor, wherein the terminal abnormity repairing program realizes the steps of the terminal abnormity repairing method when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a repairing program of a terminal abnormality is stored, which when executed by a processor implements the steps of the repairing method of the terminal abnormality as described above.
When a starting-up instruction is detected, a starting-up strategy of the starting-up is determined; when the starting strategy is a preset abnormal recovery starting strategy, deleting an application configuration file in a terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application; acquiring an installation package of a terminal application, and analyzing the acquired installation package to generate a new application configuration file; and acquiring prestored operation data of the terminal application before the start-up, and importing the acquired operation data into the new application configuration file. Through the mode, the invention provides the light repair mode, the application configuration file in the terminal system is regenerated, the terminal abnormity caused by the error of the application configuration file can be solved, the pre-stored running data is imported into the regenerated application configuration file, and the user data can be retained to the maximum extent.
Drawings
Fig. 1 is a schematic structural diagram of a mobile terminal in a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for repairing an abnormal terminal according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for repairing an abnormal terminal according to a second embodiment of the present invention;
fig. 4 is a schematic block diagram of a device for repairing terminal abnormality according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: when a starting-up instruction is detected, determining a starting-up strategy of the starting-up; when the starting strategy is a preset abnormal recovery starting strategy, deleting an application configuration file in a terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application; acquiring an installation package of a terminal application, and analyzing the acquired installation package to generate a new application configuration file; and acquiring prestored operation data of the terminal application before the start-up, and importing the acquired operation data into the new application configuration file.
At present, when the mobile phone is abnormal, the user can generally try to solve the problem by adopting the following two ways: 1) and restarting the mobile phone. The method can solve some simple abnormal problems, but for some serious abnormal problems, the problem still exists after the restart is possible; 2) and restoring factory settings. This way, the user data is lost completely, although the backup and restore function can be used, the backup and restore function can only restore the state of the mobile phone to the last backup point, and the data after the backup point cannot be restored. Therefore, how to enable the mobile terminal to repair the abnormality and retain the user data to the maximum becomes a problem to be solved urgently at present.
The invention provides a light repairing mode, which can solve the problem of terminal abnormity caused by the error of an application configuration file by regenerating the application configuration file in a terminal system, and can lead the pre-stored running data into the regenerated application configuration file so as to furthest reserve the user data.
The invention provides a method for repairing terminal abnormity.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a mobile terminal device with a display function, such as a smart phone, a tablet computer, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a repair program for terminal abnormality.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call a repair procedure for the terminal abnormality stored in the memory 1005, and perform the following operations:
when a starting-up instruction is detected, determining a starting-up strategy of the starting-up;
when the starting strategy is a preset abnormal recovery starting strategy, deleting an application configuration file in a terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application;
acquiring an installation package of a terminal application, and analyzing the acquired installation package to generate a new application configuration file;
and acquiring prestored operation data of the terminal application before the start-up, and importing the acquired operation data into the new application configuration file.
Further, the processor 1001 may call a repair program of the terminal abnormality stored in the memory 1005, and also perform the following operations:
receiving an abnormal repairing instruction triggered by a user based on a preset display interface;
and controlling the terminal to restart according to the received abnormal repairing instruction.
Further, the processor 1001 may call a repair program of the terminal abnormality stored in the memory 1005, and also perform the following operations:
detecting whether the terminal is in a preset abnormal state or not;
if so, displaying a user interaction interface to prompt a user to carry out abnormal repair;
and receiving an exception repairing instruction triggered by the user based on the user interaction interface.
Further, the processor 1001 may call a repair program of the terminal abnormality stored in the memory 1005, and also perform the following operations:
when the terminal is in a recovery flashing mode or a fastboot flashing mode, displaying an abnormal repairing control in a main menu of the recovery flashing mode or the fastboot flashing mode;
and receiving an abnormal repairing instruction triggered by the user based on the abnormal repairing control.
Further, the processor 1001 may call a repair program of the terminal abnormality stored in the memory 1005, and also perform the following operations:
when a starting-up instruction is detected, reading a starting-up configuration file, and judging whether preset abnormal repair information exists in the starting-up configuration file or not;
if yes, determining the starting-up strategy of the starting-up at this time as an abnormal recovery starting-up strategy,
if not, determining that the starting-up strategy of the starting-up is a normal starting-up strategy.
Further, the processor 1001 may call a repair program of the terminal abnormality stored in the memory 1005, and also perform the following operations:
detecting whether the obtained running data is imported completely;
and if so, controlling the terminal to normally start according to the starting configuration file.
Further, the processor 1001 may call a repair program of the terminal abnormality stored in the memory 1005, and also perform the following operations:
extracting the odex file in the acquired installation package;
the step of controlling the normal startup of the terminal according to the startup configuration file comprises the following steps:
and controlling the terminal to normally start according to the starting configuration file and the extracted odex file.
Based on the hardware structure, the embodiment of the method for repairing the terminal abnormity is provided.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a method for repairing terminal abnormality according to the present invention, where the method includes:
step S10, when a boot command is detected, determining a boot strategy of the boot;
the method for repairing the terminal abnormality is applied to the starting process of the terminal, wherein the terminal can be a mobile terminal device with a display function, such as a smart phone, a tablet computer and a portable computer.
Firstly, when a terminal detects a starting-up command, a starting-up strategy of the starting-up is determined, wherein the starting-up strategy comprises a normal starting-up strategy and an abnormal recovery starting-up strategy, when the terminal is determined to be the normal starting-up strategy, the terminal executes a normal starting-up process, and when the terminal is determined to be the abnormal recovery starting-up strategy, the terminal executes an abnormal recovery starting-up process. Specifically, when detecting a power-on instruction, the terminal may read a power-on configuration file, and determine whether preset abnormal repair information, such as a preset abnormal repair field or an abnormal repair instruction, exists in the power-on configuration file; if the preset abnormal repairing information exists in the boot configuration file, the boot strategy of the boot is judged to be an abnormal repairing boot strategy, and if the preset abnormal repairing information does not exist in the boot configuration file, the boot strategy of the boot is judged to be a normal boot strategy.
Step S20, when the startup strategy is a preset abnormal recovery startup strategy, deleting an application configuration file in the terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application;
and when the starting strategy is determined to be a preset abnormal repairing starting strategy, the terminal starts a light repairing function. Firstly, a terminal searches an application configuration file in a system and deletes the application configuration file from the terminal system, wherein the application configuration file is used for recording information such as attributes and authority of an application installed in the terminal, the application configuration file in the terminal system is generally named as package.
Step S30, acquiring an installation package of the terminal application, and analyzing the acquired installation package to generate a new application configuration file;
after deleting the application configuration file, the terminal acquires all application installation packages in the system, namely files with apk as suffix, and then analyzes the acquired installation packages to generate a new application configuration file. Taking the application configuration file as a package.xml as an example, when an old package.xml file is deleted, the terminal acquires an application installation package in the system, and then a new package.xml file can be regenerated through a package manager service.java program.
It should be noted that, in order to ensure that the installation packages of all applications in the terminal system are obtained as much as possible, a protection mechanism may be preset, that is, for the system application of the terminal, the user has no authority to delete the installation package, and for the third-party application, even if the user deletes the installation package, the installation package may be retrieved by the system, so that, in the mild repair mode, the terminal can record the attribute and authority information of the corresponding application according to the application configuration file regenerated by the installation package, and ensure that the application information is not lost.
Step S40, obtaining pre-stored operation data of the terminal application before the boot of this time, and importing the obtained operation data into the new application configuration file.
After generating a new application configuration file, the terminal acquires pre-stored operation data of the application before the start-up, and then imports the operation data into the new application configuration file. The running data of the application, i.e. the user data, includes, but is not limited to, configuration data, download data, storage data, access data, status data, etc. of the application, and these data are synchronously stored in the terminal system during the running process of the application. Therefore, when the terminal is started up at this time, the terminal imports the pre-saved running data of the application before the startup into the new application configuration file, and can reserve the user data to the maximum extent.
It should be noted that the reason why the rewriting application configuration file can implement the terminal abnormality recovery is that: at present, most of the exceptions which cannot be repaired by adopting the terminal restarting mode are software exceptions, and most of the software exceptions are file errors caused by frequent updating or reading and writing of the application configuration file in the using process of the terminal.
In this embodiment, when a boot instruction is detected, a boot policy of the current boot is determined; when the starting strategy is a preset abnormal recovery starting strategy, deleting an application configuration file in a terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application; acquiring an installation package of a terminal application, and analyzing the acquired installation package to generate a new application configuration file; and acquiring prestored operation data of the terminal application before the start-up, and importing the acquired operation data into the new application configuration file. Through the manner, the embodiment provides a light repair mode, and the light repair mode can solve the problem of terminal abnormality caused by an error of an application configuration file by regenerating the application configuration file in a terminal system, and can maximally retain user data by importing the pre-saved running data into the regenerated application configuration file.
Further, referring to fig. 3, fig. 3 is a flowchart illustrating a method for repairing a terminal abnormality according to a second embodiment of the present invention. Based on the above embodiment shown in fig. 2, before step S10, the method may further include:
step S50, receiving an abnormal repairing instruction triggered by a user based on a preset display interface;
and step S60, controlling the terminal to restart according to the received abnormal repairing instruction.
In this embodiment, when the user needs to perform "light repair" on the terminal, an abnormal repair instruction may be triggered through a preset display interface, and the terminal receives the abnormal repair instruction triggered by the user based on the preset display interface, that is, controls the terminal to restart.
Specifically, step S50 may include: detecting whether the terminal is in a preset abnormal state or not; if so, displaying a user interaction interface to prompt a user to carry out abnormal repair; and receiving an exception repairing instruction triggered by the user based on the user interaction interface. As an implementation manner, in a power-on state of the terminal, an anomaly monitoring program may be enabled to detect whether the terminal is in a preset anomaly state, such as no response to touch, frequent error reporting, jamming, flashing back, and the like, if the terminal is detected to be in the preset anomaly state, a user interaction interface may be displayed to prompt a user to perform anomaly restoration, three restoration modes of restarting, factory restoration setting restoration, and mild restoration may be displayed on the user interaction interface for the user to select, and when the user selects mild restoration, the mild restoration mode is entered.
Further, step S50 may further include: when the terminal is in a recovery flashing mode or a fastboot flashing mode, displaying an abnormal repairing control in a main menu of the recovery flashing mode or the fastboot flashing mode; and receiving an abnormal repairing instruction triggered by the user based on the abnormal repairing control. As another embodiment, when a terminal is seriously abnormal, for example, when there is no response to touch, a user cannot control the terminal to enter a mild repair mode in a boot state, and at this time, the user may manually control the terminal to restart and enter a recovery power-on mode or a fastboot power-on mode when restarting, where the recovery power-on mode or the fastboot power-on mode is a mode that can modify data or a system inside a mobile phone and is provided by the current mobile phone.
This embodiment is through providing the entry of abnormal repair to the user, and when the terminal appears unusually, the user can get into mild repair mode through these entry control terminals, and convenient operation is swift, has guaranteed the timely solution of unusual problem.
Further, a third embodiment of the method for repairing the terminal abnormality is provided based on the first or second embodiment of the method for repairing the terminal abnormality of the present invention.
In this embodiment, step S10 may include: when a starting-up instruction is detected, reading a starting-up configuration file, and judging whether preset abnormal repair information exists in the starting-up configuration file or not; if yes, the starting strategy of the starting is determined to be an abnormal recovery starting strategy, and if not, the starting strategy of the starting is determined to be a normal starting strategy.
When the terminal detects a starting-up command, firstly, a starting-up strategy of the starting-up is determined, wherein the starting-up strategy comprises a normal starting-up strategy and an abnormal recovery starting-up strategy, when the terminal is determined to be the normal starting-up strategy, the terminal executes a normal starting-up process, and when the terminal is determined to be the abnormal recovery starting-up strategy, the terminal executes an abnormal recovery starting-up process. Specifically, when detecting a power-on instruction, the terminal may read a power-on configuration file, and determine whether preset abnormal repair information, such as a preset abnormal repair field or an abnormal repair instruction, exists in the power-on configuration file; if the preset abnormal repairing information exists in the boot configuration file, the boot strategy of the boot is judged to be an abnormal repairing boot strategy, and if the preset abnormal repairing information does not exist in the boot configuration file, the boot strategy of the boot is judged to be a normal boot strategy.
Further, after step S40, the method may further include: detecting whether the obtained running data is imported completely; and if so, controlling the terminal to normally start according to the starting configuration file.
When the terminal imports the prestored running data of the terminal application before the start-up into a new application configuration file, whether the import of the running data is finished is detected, if so, a normal start-up process is entered, namely, the terminal is controlled to start up normally according to the read start-up configuration file.
Further, before the step of controlling the terminal to normally boot according to the boot configuration file, the method may further include: extracting the odex file in the acquired installation package; at this time, the step of controlling the terminal to normally start up according to the start-up configuration file may be replaced by: and controlling the terminal to normally start according to the starting configuration file and the extracted odex file.
After the operation data is imported, the terminal can also extract an odex file in the obtained application installation package, wherein the odex file is an operable file extracted from an application program apk on an android, namely, a classes. After the odex file is extracted, the terminal can be normally started according to the starting configuration file and the odex file.
In the embodiment, the terminal can be automatically and normally started after mild repair is completed, so that convenience and rapidness are realized; and through odex optimization, occupation of the RAM can be reduced, and the starting speed of software are accelerated.
The invention also provides a device for repairing the terminal abnormity.
Referring to fig. 4, fig. 4 is a block diagram illustrating an embodiment of a device for repairing terminal abnormality according to the present invention. The device for repairing terminal abnormality of the present invention comprises:
the determining module 10 is configured to determine a boot policy of the boot when the boot instruction is detected;
a deleting module 20, configured to delete an application configuration file in the terminal system when the startup policy is a preset abnormal recovery startup policy, where the application configuration file is used to record attributes and permission information of the terminal application;
the analysis module 30 is configured to obtain an installation package of a terminal application, and analyze the obtained installation package to generate a new application configuration file;
and the importing module 40 is configured to obtain pre-stored operation data of the terminal application before the start-up of the terminal application, and import the obtained operation data into the new application configuration file.
The functions implemented by the modules can refer to the embodiment of the method for repairing the terminal abnormality, and are not described herein again.
The invention also provides a mobile terminal.
The mobile terminal of the present invention comprises: the method comprises the steps of storing a memory, a processor and a terminal abnormity repairing program which is stored on the memory and can run on the processor, wherein the terminal abnormity repairing program realizes the steps of the terminal abnormity repairing method when being executed by the processor.
The method implemented when the repairing program of the terminal exception running on the processor is executed may refer to the embodiment of the method for repairing the terminal exception of the present invention, and is not described herein again.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a repairing program of the terminal abnormality, and the repairing program of the terminal abnormality realizes the steps of the repairing method of the terminal abnormality as described above when executed by the processor.
The method implemented when the repairing program of the terminal exception running on the processor is executed may refer to the embodiment of the method for repairing the terminal exception of the present invention, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for repairing terminal abnormity is characterized by comprising the following steps:
when a starting-up instruction is detected, determining a starting-up strategy of the starting-up;
when the starting strategy is a preset abnormal recovery starting strategy, deleting an application configuration file in a terminal system, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application;
acquiring an installation package of a terminal application, and analyzing the acquired installation package to generate a new application configuration file;
and acquiring prestored operation data of the terminal application before the start-up, and importing the acquired operation data into the new application configuration file.
2. The method for repairing a terminal abnormality according to claim 1, wherein before the step of determining a boot policy for the current boot when the boot instruction is detected, the method further comprises:
receiving an abnormal repairing instruction triggered by a user based on a preset display interface;
and controlling the terminal to restart according to the received abnormal repairing instruction.
3. The method for repairing the terminal abnormality according to claim 2, wherein the step of receiving the abnormality repairing instruction triggered by the user based on the preset display interface includes:
detecting whether the terminal is in a preset abnormal state or not;
if so, displaying a user interaction interface to prompt a user to carry out abnormal repair;
and receiving an exception repairing instruction triggered by the user based on the user interaction interface.
4. The method for repairing the terminal abnormality according to claim 2, wherein the step of receiving the abnormality repairing instruction triggered by the user based on the preset display interface includes:
when the terminal is in a recovery flashing mode or a fastboot flashing mode, displaying an abnormal repairing control in a main menu of the recovery flashing mode or the fastboot flashing mode;
and receiving an abnormal repairing instruction triggered by the user based on the abnormal repairing control.
5. The method for repairing abnormal terminal as claimed in any one of claims 1 to 4, wherein the step of determining the boot policy of the current boot when the boot command is detected comprises:
when a starting-up instruction is detected, reading a starting-up configuration file, and judging whether preset abnormal repair information exists in the starting-up configuration file or not;
if yes, determining the starting-up strategy of the starting-up at this time as an abnormal recovery starting-up strategy,
if not, determining that the starting-up strategy of the starting-up is a normal starting-up strategy.
6. The method for repairing the terminal abnormality according to claim 5, wherein after the step of acquiring the pre-stored operation data of the terminal application before the current boot, and importing the acquired operation data into the new application configuration file, the method further includes:
detecting whether the obtained running data is imported completely;
and if so, controlling the terminal to normally start according to the starting configuration file.
7. The method for repairing abnormal terminal as claimed in claim 6, wherein before the step of controlling normal terminal booting according to the booting configuration file, the method further comprises:
extracting the odex file in the acquired installation package;
the step of controlling the normal startup of the terminal according to the startup configuration file comprises the following steps:
and controlling the terminal to normally start according to the starting configuration file and the extracted odex file.
8. A device for repairing an abnormality in a terminal, comprising:
the determining module is used for determining a starting-up strategy of the starting-up when a starting-up instruction is detected;
the deleting module is used for deleting an application configuration file in the terminal system when the starting strategy is a preset abnormal recovery starting strategy, wherein the application configuration file is used for recording the attribute and the authority information of the terminal application;
the analysis module is used for acquiring an installation package of the terminal application and analyzing the acquired installation package to generate a new application configuration file;
and the import module is used for acquiring the prestored running data of the terminal application before the start-up, and importing the acquired running data into the new application configuration file.
9. A mobile terminal, characterized in that the mobile terminal comprises: memory, processor and a data statistics program stored on said memory and executable on said processor, said data statistics program when executed by said processor implementing the steps of the method of repairing a terminal anomaly according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a repair program of a terminal abnormality, which when executed by a processor implements the steps of the method of repairing a terminal abnormality according to any one of claims 1 to 7.
CN201810022187.3A 2018-01-10 2018-01-10 Method and device for repairing terminal abnormity, mobile terminal and storage medium Active CN110018918B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810022187.3A CN110018918B (en) 2018-01-10 2018-01-10 Method and device for repairing terminal abnormity, mobile terminal and storage medium
PCT/CN2019/070121 WO2019137280A1 (en) 2018-01-10 2019-01-02 Terminal anomaly repair method, apparatus, mobile terminal, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810022187.3A CN110018918B (en) 2018-01-10 2018-01-10 Method and device for repairing terminal abnormity, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN110018918A CN110018918A (en) 2019-07-16
CN110018918B true CN110018918B (en) 2022-01-25

Family

ID=67188071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810022187.3A Active CN110018918B (en) 2018-01-10 2018-01-10 Method and device for repairing terminal abnormity, mobile terminal and storage medium

Country Status (2)

Country Link
CN (1) CN110018918B (en)
WO (1) WO2019137280A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157751B (en) * 2020-09-07 2022-12-27 荣耀终端有限公司 Method, apparatus and computer readable storage medium for restoring configuration
CN114661501A (en) * 2020-12-23 2022-06-24 华为技术有限公司 Method and device for repairing abnormal starting-up

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375750A (en) * 2010-08-25 2012-03-14 西门子公司 Software recovery device and method
US8886995B1 (en) * 2011-09-29 2014-11-11 Emc Corporation Fault tolerant state machine for configuring software in a digital computer
CN105068881A (en) * 2015-08-19 2015-11-18 北京奇虎科技有限公司 Method, device and system for repairing abnormal operation of application program
CN105653454A (en) * 2015-12-30 2016-06-08 浙江德景电子科技有限公司 Android system-based application program abnormity processing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100544283C (en) * 2007-06-27 2009-09-23 杭州华三通信技术有限公司 Configuration backup method, system and configuration file server and managed devices
US8843444B2 (en) * 2010-05-18 2014-09-23 Ca, Inc. Systems and methods to determine security holes of a backup image
CN102110032A (en) * 2011-02-23 2011-06-29 杭州海康威视数字技术股份有限公司 Method and device for improving reliability of configuration file
CN102346697A (en) * 2011-09-27 2012-02-08 宇龙计算机通信科技(深圳)有限公司 Method and system for backing up and recovering Android package (APK) and mobile terminal
CN105930247B (en) * 2016-04-14 2018-09-04 北京小米移动软件有限公司 Processing method, device and the mobile terminal of system reboot problem
CN106941672A (en) * 2017-03-09 2017-07-11 东软集团股份有限公司 The method and device of application software abnormality processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102375750A (en) * 2010-08-25 2012-03-14 西门子公司 Software recovery device and method
US8886995B1 (en) * 2011-09-29 2014-11-11 Emc Corporation Fault tolerant state machine for configuring software in a digital computer
CN105068881A (en) * 2015-08-19 2015-11-18 北京奇虎科技有限公司 Method, device and system for repairing abnormal operation of application program
CN105653454A (en) * 2015-12-30 2016-06-08 浙江德景电子科技有限公司 Android system-based application program abnormity processing method and device

Also Published As

Publication number Publication date
WO2019137280A1 (en) 2019-07-18
CN110018918A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN109683967B (en) Firmware support method, device, mobile terminal and readable storage medium
JP2019525275A (en) Abnormal stack information acquisition method, apparatus, and computer-readable storage medium
US20130318400A1 (en) Electronic device, system, and method for testing exception handling mechanism
CN109684573B (en) Target picture display method and device, storage medium and electronic equipment
CN109358827B (en) Method, system, equipment and storage medium for controlling application serial port printing
CN109117153B (en) Application processing method, device, terminal and storage medium
CN110018918B (en) Method and device for repairing terminal abnormity, mobile terminal and storage medium
CN111538523A (en) Differential upgrading method, device and storage medium
CN110502263B (en) Upgrade package manufacturing method, system and computer readable storage medium
CN113672296B (en) Custom application switching method, switching device, electronic equipment and storage medium
CN108235101B (en) Smart television initialization method, smart television and computer readable storage medium
CN108268274B (en) Application management method and device, storage medium and electronic equipment
CN116719670B (en) Data processing method, electronic device and readable storage medium
CN113656063A (en) System version replacing method, device, equipment and computer readable medium
CN106792193B (en) Android television-based repair system and repair method
CN111522564A (en) Method and device for identifying system upgrading state and computer readable storage medium
CN114237722B (en) System starting method, device, equipment and engineering vehicle
CN103309769A (en) Operation system starting protection method and device
CN110647433A (en) Function self-checking method and device and computer readable storage medium
CN111324491A (en) Program bug fixing method and device and computer readable storage medium
CN109669743B (en) Terminal-based operation method and system, terminal, and storage medium
CN117290164B (en) Information recording method at restarting, electronic device and readable storage medium
CN110993016B (en) Chip pre-copying detection method and device and computer readable storage medium
CN114116035B (en) BIOS setting method and device under Windows and storage medium
CN108235095B (en) Set top box starting/debugging method based on disk medium, set top box and 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
GR01 Patent grant
GR01 Patent grant