CN108009039B - Terminal information recording method, device, storage medium and electronic equipment - Google Patents

Terminal information recording method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108009039B
CN108009039B CN201711251693.1A CN201711251693A CN108009039B CN 108009039 B CN108009039 B CN 108009039B CN 201711251693 A CN201711251693 A CN 201711251693A CN 108009039 B CN108009039 B CN 108009039B
Authority
CN
China
Prior art keywords
preset
terminal
thread
information
determining
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
CN201711251693.1A
Other languages
Chinese (zh)
Other versions
CN108009039A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711251693.1A priority Critical patent/CN108009039B/en
Publication of CN108009039A publication Critical patent/CN108009039A/en
Application granted granted Critical
Publication of CN108009039B publication Critical patent/CN108009039B/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
    • 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/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • 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/0751Error or fault detection not based on redundancy

Abstract

The application discloses a recording method and device of terminal information, a storage medium and electronic equipment. The recording method of the terminal information comprises the following steps: detecting a preset flag bit; when the preset zone bit is detected to be modified, determining that the terminal is abnormal; acquiring information of a preset category in the terminal in an abnormal state; and recording the preset type information into a preset storage area, wherein the preset storage area is an area for providing safe storage for data in the terminal. The method and the device can effectively record the terminal information when the terminal is abnormal.

Description

Terminal information recording method, device, storage medium and electronic equipment
Technical Field
The present application belongs to the field, and in particular, to a method and an apparatus for recording terminal information, a storage medium, and an electronic device.
Background
With the progress of science and technology, the software and hardware performance of the terminal is continuously improved, and more functions can be realized by the terminal. In this context, a terminal may be used by a user in various scenarios. In the using process, the terminal is possibly abnormal. However, in the related art, when an abnormality occurs, the terminal cannot effectively record corresponding information so as to locate and analyze the occurred abnormality in the following.
Disclosure of Invention
The embodiment of the application provides a method, a device, a storage medium and an electronic device for recording terminal information, which can effectively record the terminal information when the terminal is abnormal.
The embodiment of the application provides a method for recording terminal information, which comprises the following steps:
detecting a preset flag bit;
when the preset zone bit is detected to be modified, determining that the terminal is abnormal;
acquiring information of a preset category in the terminal in an abnormal state;
and recording the preset type information to a preset storage area, wherein the preset storage area is an area for providing safe storage for data in the terminal.
An embodiment of the present application provides a recording apparatus for terminal information, including:
the detection module is used for detecting the preset zone bit;
the first determining module is used for determining that the terminal is abnormal when the preset zone bit is detected to be modified;
the acquisition module is used for acquiring the information of the preset category in the terminal in the abnormal state;
and the recording module is used for recording the preset type information into a preset storage area, and the preset storage area is an area for providing safe storage for data in the terminal.
An embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed on a computer, causes the computer to execute the steps in the recording method of terminal information provided in the embodiment of the present application.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the steps in the recording method of the terminal information provided in the embodiment of the present application by calling the computer program stored in the memory.
According to the terminal information recording method and device, the storage medium and the electronic device, when the terminal detects that the terminal is abnormal, the terminal can acquire the key information of the preset type and store the key information of the preset type into the preset storage area which can provide safe storage for data. Because the data of the key information stored in the preset storage area can be safely stored and is prevented from being deleted accidentally, the terminal can effectively record the key information in the terminal in an abnormal state in such a way, so that the abnormity appearing in the terminal can be positioned and analyzed subsequently.
Drawings
The technical solution and the advantages of the present invention will be apparent from the following detailed description of the embodiments of the present invention with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a recording method of terminal information according to an embodiment of the present application.
Fig. 2 is another schematic flowchart of a method for recording terminal information according to an embodiment of the present application.
Fig. 3 to fig. 5 are scene schematic diagrams of a recording method of terminal information according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a recording apparatus for terminal information according to an embodiment of the present application.
Fig. 7 is another schematic structural diagram of a recording apparatus for terminal information according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present invention are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the invention and should not be taken as limiting the invention with regard to other embodiments that are not detailed herein.
It can be understood that the execution subject of the embodiment of the present application may be a terminal device such as a smart phone or a tablet computer.
Referring to fig. 1, fig. 1 is a schematic flowchart of a recording method of terminal information according to an embodiment of the present application, where the flowchart may include:
in step S101, a preset flag is detected.
With the progress of science and technology, the software and hardware performance of the terminal is continuously improved, and more functions can be realized by the terminal. In this context, a terminal may be used by a user in various scenarios. In the using process, the terminal is possibly abnormal. However, in the related art, when an abnormality occurs, the terminal cannot effectively record corresponding information so as to locate and analyze the occurred abnormality in the following.
For example, in some cases, a user may perform a flash operation on the mobile terminal. The flashing operation refers to an operation of a user for reinstalling an operating system for the mobile terminal, for example, the user may install a third-party optimized version of the operating system for the mobile terminal. However, an abnormality may occur during the power-on process and cause the mobile terminal to fail to power on. In the related art, when the mobile terminal cannot be started due to the failure of the flashing, the mobile terminal cannot effectively record some key information in the flashing process, so that the abnormity cannot be positioned and analyzed subsequently.
In step S101 in the embodiment of the present application, the terminal may first monitor the preset flag. It should be noted that the preset flag bit is a flag for monitoring whether an abnormality occurs in the terminal.
In one embodiment, it may be determined that the terminal is abnormal when the preset flag is modified, and determined that the terminal is not abnormal when the preset flag is not modified.
In step S102, when it is detected that the preset flag is modified, it is determined that an abnormality occurs in the terminal.
For example, in the process of monitoring the preset flag, the terminal detects that the preset flag is modified, and at this time, it may be determined that the terminal is abnormal.
In step S103, information of a preset category in the terminal in an abnormal state is acquired.
For example, when it is determined that the terminal is abnormal, the terminal may be triggered to acquire information of a preset category in the terminal in an abnormal state.
In one embodiment, the preset category of information may be key information useful for locating and analyzing anomalies occurring in the terminal.
In step S104, the information of the preset category is recorded in a preset storage area, where the preset storage area is an area for providing secure storage for data in the terminal.
For example, after acquiring the information of the preset category in the terminal, the terminal may record the information of the preset category in a preset storage area. The preset storage area is an area for providing safe storage for data in the terminal. Namely, the preset storage area is a storage area in the terminal, which can ensure that data can be safely stored and cannot be accidentally or randomly deleted.
In some embodiments, taking a Memory of the terminal as an Embedded multimedia storage Card (EMMC) type Memory as an example, the preset storage Area in the terminal may be a Boot Area Partition (Boot Area Partitions) or an RPMB Area Partition (relay Protected Memory Block Partition) of the EMMC Memory.
The Boot area is an area used for storing a secure Boot code in the EMMC. The general operation without the authority cannot operate the Boot area, and meanwhile, the general application or thread without the authority cannot operate the Boot area. And the data stored in the Boot area can not be deleted when the terminal performs a flash operation or a formatting operation. The RPMB area is a partition of the EMMC memory having security features. In practical applications, the RPMB area is generally used for storing some core sensitive data, such as fingerprint information. Therefore, the key data are stored in the Boot area or the RPMB area of the EMMC, so that the safety of the data can be ensured, and the data are prevented from being deleted accidentally.
It can be understood that, in the embodiment of the present application, when detecting that an abnormality occurs in the terminal, the terminal may acquire the key information of the preset category, and store the key information of the preset category in the preset storage area that can provide secure storage for data. Because the data of the key information stored in the preset storage area can be safely stored and is prevented from being deleted accidentally, the terminal can effectively record the key information in the terminal in an abnormal state in such a way, so that the abnormity appearing in the terminal can be positioned and analyzed subsequently.
Referring to fig. 2, fig. 2 is another schematic flow chart of a recording method of terminal information according to an embodiment of the present application, where the flow may include:
in step S201, the terminal writes a preset character in a preset position of a preset file, and determines the preset character in the preset position as a preset flag bit.
For example, the terminal may write a predetermined character in the last byte of some predetermined files in advance, for example, the predetermined character is the special flag 0 xDD. Then, the terminal may determine the special flag 0xDD at the last byte of the preset file as a preset flag bit.
Of course, in other embodiments, the terminal may also write other preset characters in other bytes of the preset file, for example, the nth byte from last, and determine the character in the nth byte from last in the preset file as a preset flag, and so on, and it should be understood that the examples herein do not constitute a limitation to the embodiments of the present application.
It should be noted that the preset flag bit is a flag for monitoring whether an abnormality occurs in the terminal.
In step S202, the terminal starts a preset thread.
In step S203, the terminal detects a preset flag bit by using the preset thread.
For example, steps S202 and S203 may include:
after the preset flag bit for monitoring whether the terminal is abnormal is set, the terminal can start the preset thread, and monitor the preset flag bit by using the preset thread to detect whether the preset flag bit is modified.
In one embodiment, it may be determined that the terminal is abnormal when the preset flag is modified, and determined that the terminal is not abnormal when the preset flag is not modified.
In some embodiments, the preset thread may be a completely new thread written by a developer and specifically used for monitoring the preset flag bit. Or, the preset thread may also be an existing thread in the terminal, but the existing thread needs to be modified, and a step and a right for accessing the preset flag bit are added to the existing thread. For example, a thread for reading and writing an encryption password of an existing fingerprint in the terminal may be set as a preset thread, and a step and a right for accessing a preset flag bit are added.
If the terminal does not detect that the preset flag bit is modified by using the preset thread, the terminal can be considered to be not abnormal. In this case, the terminal may perform other operations.
In step S204, when it is detected that the character at the preset position in the preset file is changed from the preset character to another character, the terminal determines that the preset flag is modified, and determines that the terminal is abnormal.
For example, when monitoring characters at a preset position of a preset file, the terminal detects that the characters at the preset position in the preset file are changed from the previously written preset characters to other characters, and at this time, the terminal may determine that the preset flag is modified, and further determine that the terminal is abnormal.
In step S205, the terminal acquires information of a preset category in the terminal in an abnormal state.
For example, when it is determined that the terminal is abnormal, the terminal may be triggered to acquire information of a preset category in the terminal in an abnormal state.
In one embodiment, the preset category of information may be key information useful for locating and analyzing anomalies occurring in the terminal.
In step S206, the terminal records the information of the preset category in a preset storage area by using the preset thread, where the preset storage area is an area for providing secure storage for data in the terminal, and the preset thread has a right to write to the preset storage area.
For example, after acquiring the information of the preset category in the terminal, the terminal may record the information of the preset category in a preset storage area by using the preset thread. The preset storage area is an area for providing safe storage for data in the terminal. Namely, the preset storage area is a storage area in the terminal, which can ensure that data can be safely stored and cannot be accidentally or randomly deleted. And the preset thread has the authority of writing the preset storage area.
In some embodiments, taking a Memory of the terminal as an Embedded multimedia storage Card (EMMC) type Memory as an example, the preset storage Area in the terminal may be a Boot Area Partition (Boot Area Partitions) or an RPMB Area Partition (relay Protected Memory Block Partition) of the EMMC Memory.
The Boot area is an area used for storing a secure Boot code in the EMMC. The general operation without the authority cannot operate the Boot area, and meanwhile, the general application or thread without the authority cannot operate the Boot area. And the data stored in the Boot area can not be deleted when the terminal performs a flash operation or a formatting operation. The RPMB area is a partition of the EMMC memory having security features. In practical applications, the RPMB area is generally used for storing some core sensitive data, such as fingerprint information. Therefore, the key data are stored in the Boot area or the RPMB area of the EMMC, so that the safety of the data can be ensured, and the data are prevented from being deleted accidentally.
In an embodiment, since a certain authority is required for operating the preset storage area, in order to enable the preset thread to record the preset type of information in the preset storage area, the terminal needs to give a corresponding authority to the preset thread.
In one embodiment, the step of writing the preset characters in the preset position of the preset file by the terminal in S201 may include:
the method comprises the steps that a terminal writes preset characters in a preset position of a preset file, and the preset file is a file with changed data when an operating system of the terminal is reinstalled.
For example, the terminal may determine, in advance, some files of which data changes when the operating system of the terminal is reinstalled as preset files, write preset characters in preset positions of the preset files, and determine the preset characters in the preset positions of the preset files as preset flag bits.
For example, the terminal may determine in advance some files, of which data may change when the terminal is booted, as the preset files. It should be noted that the flashing operation refers to an operation of a user reinstalling an operating system for the mobile terminal, for example, the user may install an operating system version optimized by a third party for the mobile terminal.
For example, the terminal may determine a boot. The boot, img file belongs to a system bottom file, and comprises a channel for connecting software and hardware of an operating system of the mobile terminal, wherein bottom layer driving information, such as driving information of a camera, a CPU (central processing unit) or a GPU (graphics processing unit) of the mobile terminal, is contained. Img files are files that must be loaded when the mobile terminal is started. The functions of the mobile terminal can be increased due to the flashing operation, such as increasing digital zooming and the like. Therefore, in general, a flash package for performing a flash operation has a new boot.img file, and the new boot.img file includes new driving information, such as new driving information of a camera. When the flash operation is performed, the new boot. That is, data in the boot.
The terminal can also determine a partition table in which partition information of the memory is recorded as a preset file. The terminal may be re-partitioned as a result of the flush. Therefore, the data of the partition table may be changed when repartitioning occurs.
In addition, the terminal may determine other files, of which data may change during the flash, as preset files, which are not listed here. Then, the terminal may write a preset character at a preset position in the determined preset file, and determine the preset character as a preset flag bit.
It can be understood that when a file with data changed when the terminal is operating system reinstalled (i.e. rebooting) is determined as a preset file, then when the preset flag is detected to be modified, the terminal is considered to be performing the rebooting operation. At this time, the terminal may acquire the preset category information. For example, the preset category of information may be a name of a current WIFI hotspot, location information of GPS positioning, and information of what command the terminal performs a flashing operation. The terminal may then record this information to a preset storage area. Then, when the subsequent terminal cannot be normally used due to the failure of the machine-flushing, a developer of the terminal manufacturer can acquire the previously recorded key information of the preset category from the preset storage area, and locate and analyze the abnormality according to the key information. For example, if it is determined that the terminal cannot be normally used due to a fault when the official version system is reinstalled according to the key information, the developer can locate and analyze bugs in the official version system according to the key information, and further modify the bugs, so that the robustness of the system is improved.
In one embodiment, the step of starting the preset thread by the terminal in S202 may include:
and when the terminal detects the startup, the terminal starts a preset thread.
For example, the terminal may start a preset thread when detecting a power-on. In the flashing process, the terminal executes operations such as automatic startup and the like, so in one implementation, the terminal may be triggered to start the preset thread to monitor the preset flag bit whenever the startup operation is detected, so as to detect whether the terminal is abnormal.
Of course, in other embodiments, the terminal may also start the preset thread in the running process after the terminal is powered on. For example, the terminal may start a preset thread at regular intervals, monitor a preset flag bit, detect whether the terminal is abnormal, and the like.
For example, in one embodiment, the terminal may count usage of applications therein, and set one or more threads corresponding to the applications most frequently used by the user (e.g., the applications with the largest number of usage times within a certain period of time) as preset threads.
For example, in the time period a, the application with the largest number of usage times is the application a, and then the terminal may determine one or more threads corresponding to the application a as the preset threads. And in the time period B, the application with the largest number of use times is changed into the application B, and then the terminal can determine one or more threads corresponding to the application B as the preset threads.
In addition, the terminal can determine whether to determine a thread corresponding to a certain application as a preset thread by combining whether the application contains a thread with a higher security requirement. For example, in a certain period of time, both the application a and the application b are applications with higher use times, for example, the application a is a music playing application and does not include a thread with a higher security requirement, and the application b is an instant messaging application and includes a fingerprint verification thread, so that the terminal can determine the thread with the higher security requirement corresponding to the application b as a preset thread.
It can be understood that by determining the thread with higher security requirement as the preset thread, it is possible to avoid giving higher authority to the general application with low security requirement, thereby avoiding such general application from being illegally used after having higher authority.
Referring to fig. 3 to 5, fig. 3 to 5 are schematic views of scenes of a recording method of terminal information according to an embodiment of the present application.
For example, the terminal determines in advance some files, of which data changes when the operating system of the terminal is reinstalled, as preset files. For example, the terminal determines a file such as a boot. And, the terminal writes preset characters 0xDD at the last byte of the preset files and determines the preset character 0xDD at the last byte of the preset files as a preset flag.
After a while, as shown in fig. 3, the user performs a system reinstallation operation (a flush operation) on the terminal. In the flashing process, the terminal performs operations such as auto-on, as shown in fig. 4.
When the terminal detects the startup, the terminal can start a preset thread, and the preset thread is used for monitoring the preset zone bit so as to detect whether the preset zone bit is modified.
For example, through the preset thread, the terminal detects that the character at the last byte in the preset file is changed from the preset character 0xDD written before to another character such as FF or 00. At this time, the terminal may determine that the terminal is abnormal.
Then, the terminal may acquire the preset category of information. For example, the terminal may obtain the name of the current WIFI hotspot, the location information of GPS positioning, and information such as what command the terminal performs the flashing operation. And then, the terminal can record the acquired information of the preset category to a preset storage area by using a preset thread. For example, taking the memory of the terminal as the memory of the EMMC category as an example, the terminal may record the acquired information of these preset categories in the Preloader area of the memory. The Preloader region is a region that may provide secure storage for data. That is, the saved data of the Preloader area is not deleted during the flashing or formatting.
For example, in the present flashing process, the flashing fails due to improper operation, and the terminal cannot be normally used. At this time, as shown in fig. 5, a developer of a terminal manufacturer may read back data about the preset type of information stored in the Preloader area during the flashing process through a software tool installed on a computer, and decrypt and analyze the data, so as to obtain operation information during the flashing process, and further locate and analyze abnormal points according to the operation information.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a recording apparatus for terminal information according to an embodiment of the present application. The recording apparatus 300 of the terminal information may include: a detection module 301, a first determination module 302, an acquisition module 303, and a recording module 304.
The detecting module 301 is configured to detect a preset flag.
For example, the detection module 301 may first monitor a preset flag. It should be noted that the preset flag bit is a flag for monitoring whether an abnormality occurs in the terminal.
In one embodiment, it may be determined that the terminal is abnormal when the preset flag is modified, and determined that the terminal is not abnormal when the preset flag is not modified.
A first determining module 302, configured to determine that the terminal is abnormal when the preset flag is modified.
For example, in the process of monitoring the preset flag by the detection module 301, the terminal detects that the preset flag is modified, and at this time, the first determination module 302 may determine that the terminal is abnormal.
An obtaining module 303, configured to obtain information of a preset category in the terminal in an abnormal state.
For example, when the first determining module 302 determines that the terminal is abnormal, the obtaining module 303 may be triggered to obtain the preset category information in the terminal in the abnormal state.
In one embodiment, the preset category of information may be key information useful for locating and analyzing anomalies occurring in the terminal.
A recording module 304, configured to record the preset type of information in a preset storage area, where the preset storage area is an area for providing secure storage for data in the terminal.
For example, after the obtaining module 303 obtains the information of the preset category in the terminal, the recording module 304 may record the information of the preset category in a preset storage area. The preset storage area is an area for providing safe storage for data in the terminal. Namely, the preset storage area is a storage area in the terminal, which can ensure that data can be safely stored and cannot be accidentally or randomly deleted.
In some embodiments, taking a Memory of the terminal as an Embedded multimedia storage Card (EMMC) type Memory as an example, the preset storage Area in the terminal may be a Boot Area Partition (Boot Area Partitions) or an RPMB Area Partition (relay Protected Memory Block Partition) of the EMMC Memory.
The Boot area is an area used for storing a secure Boot code in the EMMC. The general operation without the authority cannot operate the Boot area, and meanwhile, the general application or thread without the authority cannot operate the Boot area. And the data stored in the Boot area can not be deleted when the terminal performs a flash operation or a formatting operation. The RPMB area is a partition of the EMMC memory having security features. In practical applications, the RPMB area is generally used for storing some core sensitive data, such as fingerprint information. Therefore, the key data are stored in the Boot area or the RPMB area of the EMMC, so that the safety of the data can be ensured, and the data are prevented from being deleted accidentally.
In one embodiment, the detection module 301 may be configured to: and starting a preset thread, and detecting a preset zone bit by using the preset thread.
The recording module 304 may be configured to: and recording the preset type information to a preset storage area by using the preset thread, wherein the preset thread has the permission of writing operation on the preset storage area.
For example, the detection module 301 may start a preset thread, and monitor a preset flag bit by using the preset thread to detect whether the preset flag bit is modified.
Then, when the first determining module 302 determines that the terminal is abnormal and triggers the obtaining module 303 to obtain the information of the preset category, the recording module 304 may record the information of the preset category in a preset storage area by using the preset thread, where the preset thread has a right to perform a write operation on the preset storage area.
In one embodiment, the detection module 301 may be configured to: and starting a preset thread when the terminal is detected to be started.
For example, the terminal may trigger the detection module 301 to start a preset thread when detecting that the terminal is powered on. Since the terminal may execute operations such as auto-boot during the boot process, in an embodiment, the detection module 301 may be triggered to start the preset thread to monitor the preset flag bit whenever the boot operation is detected, so as to detect whether the terminal is abnormal.
Referring to fig. 7, fig. 7 is another schematic structural diagram of a recording apparatus for recording terminal information according to an embodiment of the present application. In an embodiment, the recording apparatus 300 of the terminal information may further include: a second determination module 305.
The second determining module 305 is configured to write a preset character in a preset position of a preset file, and determine the preset character in the preset position as a preset flag.
Then, the first determination module 302 may be configured to: and when the character at the preset position in the preset file is changed from the preset character to other characters, determining that the preset zone bit is modified, and determining that the terminal is abnormal.
For example, the second determining module 305 may write a predetermined character in the last byte of some predetermined files in advance, for example, the predetermined character is the special flag 0 xDD. Then, the second determination module 305 may determine the special flag 0xDD at the last byte of the preset file as a preset flag bit.
Of course, in other embodiments, the second determining module 305 may also write other preset characters in other bytes of the preset file, for example, the nth byte from last, and determine the character in the nth byte from last in the preset file as the preset flag, and so on, and it should be understood that the examples herein do not constitute a limitation to the embodiments of the present application.
For example, when monitoring a character at a preset position of a preset file, the first determining module 302 detects that the character at the preset position in the preset file is changed from a previously written preset character to another character, and at this time, the first determining module 302 may determine that the preset flag is modified, and further determine that the terminal is abnormal.
In one embodiment, the second determining module 305 may be configured to: writing preset characters in a preset position of a preset file, wherein the preset file is a file with changed data when an operating system of the terminal is reinstalled.
For example, the second determining module 305 may determine some files, of which data may change when the operating system of the terminal is reinstalled, as preset files in advance, write preset characters at preset positions of the preset files, and determine the preset characters at the preset positions of the preset files as preset flag bits.
For example, the second determining module 305 may determine some files, of which data may change when the terminal is booted, as the preset files in advance. It should be noted that the flashing operation refers to an operation of a user reinstalling an operating system for the mobile terminal, for example, the user may install an operating system version optimized by a third party for the mobile terminal.
For example, the second determining module 305 may determine a boot. The boot, img file belongs to a system bottom file, and comprises a channel for connecting software and hardware of an operating system of the mobile terminal, wherein bottom layer driving information, such as driving information of a camera, a CPU (central processing unit) or a GPU (graphics processing unit) of the mobile terminal, is contained. Img files are files that must be loaded when the mobile terminal is started. The functions of the mobile terminal can be increased due to the flashing operation, such as increasing digital zooming and the like. Therefore, in general, a flash package for performing a flash operation has a new boot.img file, and the new boot.img file includes new driving information, such as new driving information of a camera. When the flash operation is performed, the new boot. That is, data in the boot.
The second determination module 305 may also determine a partition table in which partition information of the memory is recorded as a preset file. The terminal may be re-partitioned as a result of the flush. Therefore, the data of the partition table may be changed when repartitioning occurs.
In addition, the second determining module 305 may also determine other files, of which data may change during the machine-flushing, as preset files, which are not listed here. Then, the second determining module 305 may write a predetermined character at a predetermined position in the determined predetermined file, and determine the predetermined character as a predetermined flag.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed on a computer, causes the computer to perform the steps in the recording method of terminal information as provided in the present embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the steps in the method for recording terminal information provided in this embodiment by calling a computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 8, fig. 8 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
The mobile terminal 400 may include a display unit 401, memory 402, a processor 403, and the like. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 8 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The display unit 401 may be used to display information such as images and texts in the terminal and display an interface for human-computer interaction.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the mobile terminal.
In this embodiment, the processor 403 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 403 runs the application programs stored in the memory 402, thereby implementing the steps:
detecting a preset flag bit; when the preset zone bit is detected to be modified, determining that the terminal is abnormal; acquiring information of a preset category in the terminal in an abnormal state; and recording the preset type information to a preset storage area, wherein the preset storage area is an area for providing safe storage for data in the terminal.
Referring to fig. 9, the mobile terminal 500 may include a display unit 501, a memory 502, a processor 503, an input unit 504, an output unit 505, and the like.
The display unit 501 may be used to display information such as images and texts in the terminal and display a human-computer interaction interface.
The memory 502 may be used to store applications and data. Memory 502 stores applications containing executable code. The application programs may constitute various functional modules. The processor 503 executes various functional applications and data processing by running an application program stored in the memory 502.
The processor 503 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the mobile terminal.
The input unit 504 may be used to receive input numbers, character information, or user characteristic information (such as a fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The output unit 505 may be used to display information input by or provided to a user and various graphic user interfaces of the mobile terminal, which may be configured by graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
In this embodiment, the processor 503 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 503 runs the application programs stored in the memory 502, thereby implementing the steps:
detecting a preset flag bit; when the preset zone bit is detected to be modified, determining that the terminal is abnormal; acquiring information of a preset category in the terminal in an abnormal state; and recording the preset type information to a preset storage area, wherein the preset storage area is an area for providing safe storage for data in the terminal.
In one embodiment, when the processor 503 performs the step of detecting the preset flag bit, it may perform: and starting a preset thread, and detecting a preset zone bit by using the preset thread.
Then, when the processor 503 performs the step of recording the information of the preset category in the preset storage area, it may perform: and recording the preset type information to a preset storage area by using the preset thread, wherein the preset thread has the permission of writing operation on the preset storage area.
In one embodiment, before the step of starting the preset thread, the processor 503 may further perform: writing a preset character in a preset position of a preset file, and determining the preset character in the preset position as a preset zone bit.
Then, when the processor 503 executes the step of determining that the terminal is abnormal when detecting that the preset flag bit is modified, it may execute: and when the character at the preset position in the preset file is changed from the preset character to other characters, determining that the preset zone bit is modified, and determining that the terminal is abnormal.
In one embodiment, the processor 503, when executing the step of starting the preset thread, may execute: and starting a preset thread when the terminal is detected to be started.
In one embodiment, when performing the step of writing the preset character in the preset position of the preset file, the processor 503 may perform: writing preset characters in a preset position of a preset file, wherein the preset file is a file with changed data when an operating system of the terminal is reinstalled.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the recording method for the terminal information, and are not described herein again.
The recording apparatus of the terminal information provided in the embodiment of the present application and the recording method of the terminal information in the above embodiments belong to the same concept, and any method provided in the recording method embodiment of the terminal information may be run on the recording apparatus of the terminal information, and a specific implementation process thereof is described in detail in the recording method embodiment of the terminal information, and is not described herein again.
It should be noted that, for the method for recording terminal information described in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process for implementing the method for recording terminal information described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the method for recording terminal information can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the recording apparatus of the terminal information according to the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The above detailed description is provided for a method, an apparatus, a storage medium, and an electronic device for recording terminal information according to embodiments of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (8)

1. A method for recording terminal information, comprising:
counting the use condition of the application, determining the application with the most use times in each time period, and determining at least one thread corresponding to the application with the most use times in the current time period as a preset thread; or
Setting a thread of the fingerprint read-write encryption password in the terminal as a preset thread; or
Writing a new thread for monitoring a preset zone bit as a preset thread;
increasing the authority for accessing a preset zone bit and the authority for writing in a preset storage area for the preset thread;
starting the preset thread every a preset time interval, and monitoring the preset zone bit by using the preset thread so as to detect whether the preset zone bit is modified;
when the preset zone bit is detected to be modified, determining that the terminal is abnormal;
acquiring information of a preset category in the terminal in an abnormal state;
and recording the preset type information to a preset storage area by using the preset thread, wherein the preset storage area is an area for providing safe storage for data in the terminal.
2. The method for recording terminal information according to claim 1, further comprising, before the step of starting the preset thread:
writing a preset character in a preset position of a preset file, and determining the preset character in the preset position as a preset zone bit;
when the preset zone bit is detected to be modified, determining that the terminal is abnormal includes: and when the character at the preset position in the preset file is changed from the preset character to other characters, determining that the preset zone bit is modified, and determining that the terminal is abnormal.
3. The method according to claim 2, wherein the starting the preset thread includes:
and starting a preset thread when the terminal is detected to be started.
4. The method according to claim 3, wherein writing the predetermined character in the predetermined position of the predetermined file comprises:
writing preset characters in a preset position of a preset file, wherein the preset file is a file with changed data when an operating system of the terminal is reinstalled.
5. An apparatus for recording terminal information, comprising:
the detection module is used for counting the use condition of the application, determining the application with the most use times in each time period, and determining at least one thread corresponding to the application with the most use times in the current time period as a preset thread; or setting a thread of the fingerprint read-write encryption password in the terminal as a preset thread; or writing a new thread for monitoring the preset zone bit as a preset thread; increasing the authority for accessing a preset zone bit and the authority for writing in a preset storage area for the preset thread; starting the preset thread every a preset time interval, and monitoring the preset zone bit by using the preset thread so as to detect whether the preset zone bit is modified;
the first determining module is used for determining that the terminal is abnormal when the preset zone bit is detected to be modified;
the acquisition module is used for acquiring the information of the preset category in the terminal in the abnormal state;
and the recording module is used for recording the preset type information to a preset storage area by using the preset thread, wherein the preset storage area is an area for providing safe storage for data in the terminal.
6. The apparatus for recording terminal information according to claim 5, wherein said apparatus further comprises:
the second determining module is used for writing a preset character in a preset position of a preset file and determining the preset character in the preset position as a preset zone bit;
the first determining module is configured to determine that the preset flag is modified and determine that the terminal is abnormal when it is detected that the character at the preset position in the preset file is changed from the preset character to another character.
7. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed on a computer, causes the computer to execute the method according to any of claims 1 to 4.
8. An electronic device comprising a memory, a processor, wherein the processor is configured to perform the method of any of claims 1 to 4 by invoking a computer program stored in the memory.
CN201711251693.1A 2017-12-01 2017-12-01 Terminal information recording method, device, storage medium and electronic equipment Active CN108009039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711251693.1A CN108009039B (en) 2017-12-01 2017-12-01 Terminal information recording method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711251693.1A CN108009039B (en) 2017-12-01 2017-12-01 Terminal information recording method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108009039A CN108009039A (en) 2018-05-08
CN108009039B true CN108009039B (en) 2021-02-19

Family

ID=62056340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711251693.1A Active CN108009039B (en) 2017-12-01 2017-12-01 Terminal information recording method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108009039B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109901942A (en) * 2019-02-26 2019-06-18 上海龙旗科技股份有限公司 Terminal brush machine information store method and equipment
CN110135172A (en) * 2019-04-01 2019-08-16 深圳市豪斯特力节能环保科技有限公司 A kind of device data management method, storage medium and its intelligent terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076110A (en) * 1998-08-28 2000-03-14 Hitachi Ltd Recovering process system of decentralized file system
CN105930283A (en) * 2016-04-12 2016-09-07 珠海市魅族科技有限公司 Information storage method and mobile terminal
CN105975864A (en) * 2016-04-29 2016-09-28 北京小米移动软件有限公司 Operation system starting method and device, and terminal
CN106095623A (en) * 2016-06-27 2016-11-09 乐视控股(北京)有限公司 Terminal control method and device
CN107341074A (en) * 2017-07-25 2017-11-10 广东欧珀移动通信有限公司 One kind upgrades abnormal restorative procedure, upgrading exception prosthetic device and intelligent terminal

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8752049B1 (en) * 2008-12-15 2014-06-10 Open Invention Network, Llc Method and computer readable medium for providing checkpointing to windows application groups
CN103810087A (en) * 2012-11-09 2014-05-21 腾讯科技(深圳)有限公司 Method and device for testing performance of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000076110A (en) * 1998-08-28 2000-03-14 Hitachi Ltd Recovering process system of decentralized file system
CN105930283A (en) * 2016-04-12 2016-09-07 珠海市魅族科技有限公司 Information storage method and mobile terminal
CN105975864A (en) * 2016-04-29 2016-09-28 北京小米移动软件有限公司 Operation system starting method and device, and terminal
CN106095623A (en) * 2016-06-27 2016-11-09 乐视控股(北京)有限公司 Terminal control method and device
CN107341074A (en) * 2017-07-25 2017-11-10 广东欧珀移动通信有限公司 One kind upgrades abnormal restorative procedure, upgrading exception prosthetic device and intelligent terminal

Also Published As

Publication number Publication date
CN108009039A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
CN107515808B (en) Log recording method, apparatus, computer device and computer readable storage medium
US10180842B2 (en) User device and integrity verification method of the same
US9262283B2 (en) Method for reading kernel log upon kernel panic in operating system
CN110059477B (en) Attack detection method and device
CN109471697B (en) Method, device and storage medium for monitoring system call in virtual machine
US9141464B2 (en) Computing device and method for processing system events of computing device
EP3048550B1 (en) Measurement method, electronic device and measurement system
US7373493B2 (en) Boot methods, computer systems, and production methods thereof
CN110083404A (en) The data processing method and system and human interface devices of human interface devices
US10514972B2 (en) Embedding forensic and triage data in memory dumps
CN108009039B (en) Terminal information recording method, device, storage medium and electronic equipment
US10318731B2 (en) Detection system and detection method
CN106484779B (en) File operation method and device
EP2869189A1 (en) Boot up of a multiprocessor computer
CN111428240B (en) Method and device for detecting illegal access of memory of software
US20110202903A1 (en) Apparatus and method for debugging a shared library
CN113467981A (en) Exception handling method and device
CN109634782B (en) Method and device for detecting system robustness, storage medium and terminal
CN116305100A (en) Method, system, computer device and storage medium for identifying hot-plug hard disk
CN114443442A (en) Log storage method and electronic equipment
CN108228299B (en) Display method and electronic equipment
CN103677875A (en) Method for starting electronic equipment, method for controlling permission and electronic equipment
CN113139190A (en) Program file detection method and device, electronic equipment and storage medium
US20100070680A1 (en) Memory management method during power-on self test
CN103927492B (en) A kind of data processing equipment and data guard method

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

GR01 Patent grant
GR01 Patent grant