CN112912855A - Starting-up detection method, starting-up detection device and mobile terminal - Google Patents

Starting-up detection method, starting-up detection device and mobile terminal Download PDF

Info

Publication number
CN112912855A
CN112912855A CN201880098763.0A CN201880098763A CN112912855A CN 112912855 A CN112912855 A CN 112912855A CN 201880098763 A CN201880098763 A CN 201880098763A CN 112912855 A CN112912855 A CN 112912855A
Authority
CN
China
Prior art keywords
stage
starting
preset
storage device
phase
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201880098763.0A
Other languages
Chinese (zh)
Inventor
王立中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN112912855A publication Critical patent/CN112912855A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Landscapes

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

Abstract

A power-on detection method, a power-on detection device, a mobile terminal (5) and a computer readable storage medium, wherein the power-on detection method comprises: detecting whether a preset identifier exists in a storage device (S101, S202); if the preset identification exists in the storage device, acquiring a starting-up stage corresponding to the preset identification (S102, S203); and determining that the starting-up stage corresponding to the preset identification is not completed in the starting-up process (S103, S204). The method can solve the problem that the prior art can not judge which stage of the starting process the starting is not completed in.

Description

Starting-up detection method, starting-up detection device and mobile terminal Technical Field
The present application belongs to the technical field of mobile terminals, and in particular, relates to a power-on detection method, a power-on detection apparatus, a mobile terminal, and a computer-readable storage medium.
Background
With the development and progress of communication technology, mobile terminals such as mobile phones and tablet computers have become important tools in life. The mobile terminal often has the situation that the starting is not completed, and the prior art cannot judge which stage the starting is not completed in the starting process when the starting of the mobile terminal is not completed.
Disclosure of Invention
The application provides a startup detection method, a startup detection device, a mobile terminal and a computer readable storage medium, which are used for solving the problem that the prior art cannot judge which stage of the startup process the startup is not completed in.
A first aspect of the present application provides a power-on detection method, where the power-on detection method includes:
detecting whether a preset identifier exists in a storage device or not;
if the preset identification exists in the storage device, a starting-up stage corresponding to the preset identification is obtained;
and determining that the starting-up stage corresponding to the preset identification is not completed in the starting-up process.
A second aspect of the present application provides a power-on detection apparatus, including:
the identification detection module is used for detecting whether a preset identification exists in the storage device;
the stage acquisition module is used for acquiring a starting stage corresponding to the preset identification if the preset identification exists in the storage device;
and the stage determining module is used for determining that the starting stage corresponding to the preset identification is not completed in the starting process.
A third aspect of the present application provides a mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as described in the first aspect above when executing the computer program.
A fourth aspect of the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect as described above.
A fifth aspect of the application provides a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the method as described above in the first aspect.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart illustrating an implementation of a power-on detection method according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating an implementation of a power-on detection method according to a second embodiment of the present application;
fig. 3 is a schematic diagram of a power-on detection apparatus according to a third embodiment of the present application;
fig. 4 is a schematic diagram of a mobile terminal according to a fourth embodiment of the present application;
fig. 5 is a schematic diagram of a mobile terminal according to a fifth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
In particular implementations, the mobile terminals described in embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a mobile terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The mobile terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the mobile terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
It should be understood that, the sequence numbers of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation to the implementation process of the embodiment of the present application.
In order to explain the technical solution of the present application, the following description will be given by way of specific examples.
Example 1
Referring to fig. 1, which is a schematic diagram illustrating an implementation flow of a power-on detection method provided in an embodiment of the present application, where the power-on detection method is applied to a mobile terminal, as shown in the figure, the power-on detection method may include the following steps:
step S101, whether a preset identifier exists in the storage device is detected.
In this embodiment of the application, the preset identifier may be a preset identifier used for indicating that the booting is not completed. The mobile terminal usually includes a plurality of startup stages in the startup process, and a preset identifier may be set for each startup stage, that is, a corresponding relationship between different startup stages and different preset identifiers is established, and different startup stages correspond to different preset identifiers, so that the specific stage in which startup is not completed is determined according to the preset identifier.
Optionally, the boot stage includes a first boot stage, a second boot stage, a Kernel stage, and an Android stage.
In the embodiment of the present application, the booting process may include four booting stages, which are a first booting stage, a second booting stage, a Kernel stage, and an Android stage, and the four booting stages are sequentially executed in the booting process. The first starting stage is used for setting a security environment, initializing drivers such as a bus, a Double Data Rate (DDR) memory, a clock, a Power Management Integrated Circuit (PMIC) and the like, and loading a second starting stage; the second starting stage is used for initializing drivers such as PMIC, Universal Asynchronous Receiver/Transmitter (UART) and the like and loading Fastboot or Kernel; the Kernel stage provides functions of a file system, process management, memory management and the like; and the Android stage provides supports such as applications and interfaces.
Optionally, the first Boot stage is an eXtensible Boot Loader (XBL) stage or a preload program Preloader stage.
Optionally, the second starting stage is a Unified Extensible Firmware Interface (UEFI) stage and a small Kernel (LK) stage.
In this embodiment of the present application, the mobile terminal uses different platforms, and the first start stage and the second start stage may be different, for example, when the mobile terminal uses a high-pass platform, the first start stage may be an XBL stage, and the second start stage may be a UEFI stage; when the mobile terminal uses the platform of the distribution department, the first starting stage can be a Preloader stage, and the second starting stage can be an LK stage.
Step S102, if the preset identification exists in the storage device, a starting-up stage corresponding to the preset identification is obtained.
In the embodiment of the application, if the preset identifier exists in the storage device, it is determined that the situation that the startup is not completed exists in the startup process, and a specific stage of the startup not completed occurrence can be acquired through the preset identifier; and if the preset identification does not exist in the storage device, determining that the situation that the starting is not completed does not exist in the starting process, and not executing the subsequent flow.
Step S103, determining that the starting-up stage corresponding to the preset identification is not completed in the starting-up process.
The incomplete starting-up stage corresponding to the preset identifier may mean that a fault (e.g., a jam) occurs when the starting-up stage corresponding to the preset identifier is executed, and all contents of the starting-up stage corresponding to the preset identifier cannot be executed.
Illustratively, the first boot stage corresponds to the preset flag 0x5A, the second boot stage corresponds to the preset flag 0x6B, the Kernel stage corresponds to the preset flag 0x7C, and the Android stage corresponds to the preset flag 0x8D, where if it is detected that the storage device has 0x7C, it indicates that the Kernel stage is not completed in the boot process.
According to the method and the device, the preset identification for representing incomplete startup is set for each startup stage, the preset identification is written into the storage device, whether the preset identification exists in the storage device is detected, if the preset identification exists, the incomplete startup stage corresponding to the preset identification can be determined, and therefore the incomplete startup stage can be quickly and accurately found according to the preset identification.
Example 2
Referring to fig. 2, it is a schematic diagram of an implementation flow of a power-on detection method provided in the second embodiment of the present application, where the power-on detection method is applied to a mobile terminal, and as shown in the figure, the power-on detection method may include the following steps:
step S201, each boot stage is monitored during the boot process, and if any boot stage is not completed, a preset identifier corresponding to the boot stage is written in the storage device.
Optionally, the Storage device may be an Embedded multimedia memory Card (eMMC) or a Universal Flash Storage (UFS).
Optionally, the monitoring each boot stage in the boot process, and if any boot stage is monitored to be not completed, the writing of the preset identifier corresponding to the boot stage in the storage device includes:
starting a watchdog timer;
if the watchdog timer is monitored to be overtime in a first starting stage, determining that the first starting stage is not completed in the starting process, and writing a first preset identifier in the storage device;
if the watchdog timer is monitored to be overtime in the second starting stage, the second starting stage is determined not to be completed in the starting process, and a second preset identifier is written in the storage device.
In the embodiment of the application, the watchdog timer is started when the first starting stage is started, and if the watchdog timer is monitored to be overtime in the first starting stage, it can be determined that the first starting stage is not completed in the starting process. Similarly, if the first starting stage is successfully completed in the starting process, the watchdog timer is cleared, the watchdog timer resets the preset time (for example, 20 seconds) for kicking the dog and starts to execute the second starting stage, if the watchdog timer is monitored to be overtime in the second starting stage, it can be determined that the second starting stage is not completed in the starting process, because if the first starting stage is successfully completed, the watchdog timer is cleared, and the watchdog timer cannot be overtime.
In this embodiment of the Application, if the first start stage is an XBL stage, a watchdog timer of a PMIC may be used for monitoring in the XBL stage, and if the second start stage is a UEFI stage, a watchdog timer of an Application Processor (AP) may be used for monitoring in the UEFI stage; if the first starting stage is a Preloader stage and the second starting stage is an LK stage, the watchdog timer of the AP can be adopted for monitoring in both the Preloader stage and the LK stage.
Optionally, the monitoring each boot stage in the boot process, and if any boot stage is monitored to be not completed, the writing of the preset identifier corresponding to the boot stage in the storage device includes:
starting a Kernel timer;
if the Kernel timer is monitored to be overtime in the Kernel stage, detecting whether first preset zone bit information exists or not;
if the first preset zone bit information does not exist, or the first preset zone bit information exists and is not a first preset value, determining that the Kernel stage is not completed in the starting process, and writing a third preset identifier in the storage device;
if the Kernel timer is monitored to be overtime in the Android stage, whether second preset zone bit information exists is detected; or starting a Service at the Android stage, and detecting whether second preset zone bit information exists after the Service is awakened;
if the second preset zone bit information does not exist, or the second preset zone bit information exists and is not a second preset value, it is determined that the Android stage is not completed in the starting process, and a fourth preset identification is written in the storage device.
In this embodiment of the present application, the Kernel stage may be monitored by using a Kernel timer, specifically: if the second starting stage is successfully completed in the starting process, executing a watchdog timer clearing operation, resetting preset time (for example, 20 seconds) for kicking a dog by the watchdog timer (at the moment, the watchdog timer can be used for monitoring other programs), starting a Kernel timer, setting timeout time (for example, 8 minutes) in the Kernel timer, if the Kernel timer is monitored to be timeout (for example, after 8 minutes) in the Kernel stage, detecting whether first preset flag bit information exists, and if the first preset flag bit information does not exist, determining that the Kernel stage is not completed in the starting process, and writing a third preset identifier in the storage device; or if the first preset zone bit information exists and the first preset zone bit information is not a first preset value, determining that the Kernel stage is not completed in the starting process; and if the first preset zone bit information exists and is a first preset value, determining that the Kernel stage is successfully completed in the starting process. The first preset flag bit information is used for indicating whether the Kernel stage is successfully completed or not, the first preset value is used for indicating that the Kernel stage is successfully completed, when the Kernel stage is monitored to be successfully completed, the first preset flag bit information is set and is set to be a first preset value, and a user can set the first preset value, such as 1 or TRUE.
In this embodiment of the application, the Android stage can adopt the Kernel timer to monitor, and is specific: and if the Kernel stage is successfully completed in the starting process, starting to execute the Android stage and continuously using the Kernel timer, and if the Kernel timer is monitored to be overtime in the Android stage, detecting whether second preset zone bit information exists. In the Android stage, a Service may also be started when the Android stage is executed, the Service is used for monitoring a boot process of the Android stage, the Service is provided with a sleep time (for example, 5 minutes), and after the sleep time, the Service is awakened, and whether second preset flag bit information exists is detected. The second preset flag bit information may be a sys. The second preset value is used for indicating that the Android stage is successfully completed, when it is monitored that the Android stage is successfully completed, second preset zone bit information is set, the second preset zone bit information is set to be the second preset value, and a user can set the second preset value, such as 1 or TRUE, by himself.
Optionally, when the preset identifier corresponding to the boot stage is written in the storage device, the embodiment of the present application further includes:
recording a current field log, and sending the field log to a preset server.
In the embodiment of the application, when an incomplete startup phase is monitored, a preset identifier corresponding to the startup phase (i.e., the monitored incomplete startup phase) may be written in the storage device before the mobile terminal is restarted to indicate which phase the startup is incomplete, and simultaneously record a current field log, store the field log in the storage device, and after the mobile terminal is successfully started, return the field log to the preset server, so that research and development personnel can analyze the reason why the startup phase is incomplete by checking the field log, thereby performing the repair. The preset server may refer to a server of a mobile terminal operator. The current live log may refer to environment information of the mobile terminal at the current time, such as some identification information of the incomplete startup phase at the current time, status information of the mobile terminal, and the like, which can analyze the reason why the startup phase is incomplete.
Step S202, detecting whether a preset identifier exists in the storage device.
In the embodiment of the present application, the step is the same as or similar to step 101, and reference may be specifically made to the related description of step 101, which is not repeated herein.
Step S203, if the preset identifier exists in the storage device, acquiring a boot stage corresponding to the preset identifier.
In the embodiment of the present application, the step is the same as or similar to step 102, and reference may be specifically made to the related description of step 102, which is not repeated herein.
Step S204, determining that the starting-up stage corresponding to the preset identification is not completed in the starting-up process.
In the embodiment of the present application, the step is the same as or similar to step 103, and reference may be specifically made to the related description of step 103, which is not repeated herein.
According to the method and the device, the preset identification for representing incomplete startup is set for each startup stage, the preset identification is written into the storage device, whether the preset identification exists in the storage device is detected, if the preset identification exists, the incomplete startup stage corresponding to the preset identification can be determined, and therefore the incomplete startup stage can be quickly and accurately found according to the preset identification.
Example 3
Referring to fig. 3, a power-on detection apparatus provided in the third embodiment of the present application is provided, where the power-on detection apparatus may be integrated in a mobile terminal, and for convenience of description, only the relevant portions related to the third embodiment of the present application are shown.
The power-on detection device comprises:
an identifier detecting module 31, configured to detect whether a preset identifier exists in the storage device;
a stage obtaining module 32, configured to obtain, if the preset identifier exists in the storage device, a boot stage corresponding to the preset identifier;
and a stage determining module 33, configured to determine that the boot stage corresponding to the preset identifier is not completed in the boot process.
Optionally, the boot stage includes a first boot stage, a second boot stage, a Kernel stage, and an Android stage.
Optionally, the first boot stage is an extensible boot loader XBL stage or a Preloader stage of a preload program.
Optionally, the second boot phase is a unified extensible firmware interface UEFI phase and a small kernel LK phase.
Optionally, the power-on detection apparatus further includes:
the boot monitoring module 34 is configured to monitor each boot stage in the boot process, and if any boot stage is not completed, write a preset identifier corresponding to the boot stage into the storage device.
Optionally, the power-on monitoring module 34 includes:
the first starting unit is used for starting a watchdog timer;
the first determining unit is used for determining that the first starting stage is not finished in the starting process and writing a first preset identifier into the storage device if the watchdog timer is monitored to be overtime in the first starting stage;
a second determining unit, configured to determine that the second start stage is not completed in the boot process if the watchdog timer is monitored to be overtime in the second start stage, and write a second preset identifier in the storage device;
the second starting unit is used for starting the Kernel timer;
the first detection unit is used for detecting whether first preset zone bit information exists or not if the Kernel timer is monitored to be overtime in the Kernel stage;
a third determining unit, configured to determine that the Kernel stage is not completed in a boot process if the first preset flag bit information does not exist, or the first preset flag bit information exists and the first preset flag bit information is not a first preset value, and write a third preset identifier in the storage device;
the second detection unit is used for detecting whether second preset zone bit information exists or not if the Kernel timer is monitored to be overtime in the Android stage; or starting a Service at the Android stage, and detecting whether second preset zone bit information exists after the Service is awakened;
and a fourth determining unit, configured to determine that the Android stage is not completed in a boot process and write a fourth preset identifier in the storage device if the second preset flag bit information does not exist or the second preset flag bit information exists and the second preset flag bit information is not a second preset value.
Optionally, the power-on monitoring module 34 is further configured to:
recording a current field log, and sending the field log to a preset server.
Optionally, the storage device is an embedded multimedia memory card eMMC or a universal flash memory storage UFS.
The power-on detection device provided in the embodiment of the present application can be applied to the first and second embodiments of the method, and for details, reference is made to the description of the first and second embodiments of the method, and details are not repeated here.
Example 4
Fig. 4 is a schematic diagram of a mobile terminal according to a fourth embodiment of the present application. The mobile terminal as shown in the figure may include: one or more processors 401 (only one shown); one or more input devices 402 (only one shown), one or more output devices 403 (only one shown), and memory 404. The processor 401, the input device 402, the output device 403, and the memory 404 are connected by a bus 405. The memory 404 is used for storing instructions and the processor 401 is used for executing the instructions stored by the memory 404. Wherein:
the processor 401 is configured to detect whether a preset identifier exists in the storage device; if the preset identification exists in the storage device, a starting-up stage corresponding to the preset identification is obtained; and determining that the starting-up stage corresponding to the preset identification is not completed in the starting-up process.
Optionally, the boot stage includes a first boot stage, a second boot stage, a Kernel stage, and an Android stage.
Optionally, the first boot stage is an extensible boot loader XBL stage or a Preloader stage of a preload program.
Optionally, the second boot phase is a unified extensible firmware interface UEFI phase and a small kernel LK phase.
Optionally, the processor 401 is further configured to:
and monitoring a starting-up stage in the starting-up process, and if any starting-up stage is not completed in the starting-up process, writing a preset identification corresponding to the starting-up stage into the storage device.
Optionally, the processor 401 is specifically configured to:
starting a watchdog timer;
if the watchdog timer is monitored to be overtime in a first starting stage, determining that the first starting stage is not completed in the starting process, and writing a first preset identifier in the storage device;
if the watchdog timer is monitored to be overtime in the second starting stage, the second starting stage is determined not to be completed in the starting process, and a second preset identifier is written in the storage device.
Optionally, the processor 401 is specifically configured to:
starting a Kernel timer;
if the Kernel timer is monitored to be overtime in the Kernel stage, detecting whether first preset zone bit information exists or not;
if the first preset zone bit information does not exist, or the first preset zone bit information exists and is not a first preset value, determining that the Kernel stage is not completed in the starting process, and writing a third preset identifier in the storage device;
if the Kernel timer is monitored to be overtime in the Android stage, whether second preset zone bit information exists is detected; or starting a Service at the Android stage, and detecting whether second preset zone bit information exists after the Service is awakened;
if the second preset zone bit information does not exist, or the second preset zone bit information exists and is not a second preset value, it is determined that the Android stage is not completed in the starting process, and a fourth preset identification is written in the storage device.
Optionally, the processor 401 is further configured to:
recording a current field log, and sending the field log to a preset server.
Optionally, the storage device is an embedded multimedia memory card eMMC or a universal flash memory storage UFS.
It should be understood that, in the embodiment of the present Application, the Processor 401 may be a Central Processing Unit (CPU), and the Processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 402 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, a data receiving interface, and the like. The output devices 403 may include a display (LCD, etc.), speakers, a data transmission interface, and the like.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory. For example, the memory 404 may also store device type information.
In a specific implementation, the processor 401, the input device 402, the output device 403, and the memory 404 described in this embodiment may execute the implementation described in the embodiment of the power-on detection method provided in this embodiment, or may execute the implementation described in the power-on detection apparatus described in the third embodiment, which is not described herein again.
Example 5
Fig. 5 is a schematic diagram of a mobile terminal according to a fifth embodiment of the present application. As shown in fig. 5, the mobile terminal 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the above-described respective information processing method embodiments, such as steps S101 to S103 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 31 to 34 shown in fig. 3.
Illustratively, the computer program 52 may be partitioned into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 52 in the mobile terminal 5. For example, the computer program 52 may be divided into an identification detection module, a phase acquisition module, a phase determination module, and a power-on monitoring module, and the specific functions of each module are as follows:
the identification detection module is used for detecting whether a preset identification exists in the storage device;
the stage acquisition module is used for acquiring a starting stage corresponding to the preset identification if the preset identification exists in the storage device;
and the stage determining module is used for determining that the starting stage corresponding to the preset identification is not completed in the starting process.
Optionally, the boot stage includes a first boot stage, a second boot stage, a Kernel stage, and an Android stage.
Optionally, the first boot stage is an extensible boot loader XBL stage or a Preloader stage of a preload program.
Optionally, the second boot phase is a unified extensible firmware interface UEFI phase and a small kernel LK phase.
Optionally, the boot monitoring module is configured to monitor each boot stage in the boot process, and if any boot stage is monitored to be incomplete, write a preset identifier corresponding to the boot stage into the storage device.
Optionally, the power-on monitoring module includes:
the first starting unit is used for starting a watchdog timer;
the first determining unit is used for determining that the first starting stage is not finished in the starting process and writing a first preset identifier into the storage device if the watchdog timer is monitored to be overtime in the first starting stage;
a second determining unit, configured to determine that the second start stage is not completed in the boot process if the watchdog timer is monitored to be overtime in the second start stage, and write a second preset identifier in the storage device;
the second starting unit is used for starting the Kernel timer;
the first detection unit is used for detecting whether first preset zone bit information exists or not if the Kernel timer is monitored to be overtime in the Kernel stage;
a third determining unit, configured to determine that the Kernel stage is not completed in a boot process if the first preset flag bit information does not exist, or the first preset flag bit information exists and the first preset flag bit information is not a first preset value, and write a third preset identifier in the storage device;
the second detection unit is used for detecting whether second preset zone bit information exists or not if the Kernel timer is monitored to be overtime in the Android stage; or starting a Service at the Android stage, and detecting whether second preset zone bit information exists after the Service is awakened;
and a fourth determining unit, configured to determine that the Android stage is not completed in a boot process and write a fourth preset identifier in the storage device if the second preset flag bit information does not exist or the second preset flag bit information exists and the second preset flag bit information is not a second preset value.
Optionally, the power-on monitoring module is further configured to:
recording a current field log, and sending the field log to a preset server.
Optionally, the storage device is an embedded multimedia memory card eMMC or a universal flash memory storage UFS.
The mobile terminal 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The mobile terminal may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a mobile terminal 5 and does not constitute a limitation of the mobile terminal 5 and may include more or less components than those shown, or some of the components may be combined, or different components, e.g., the mobile terminal may also include input-output devices, network access devices, buses, etc.
The processor 50 may be a central processing unit CPU, but may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the mobile terminal 5, such as a hard disk or a memory of the mobile terminal 5. The memory 51 may also be an external storage device of the mobile terminal 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the mobile terminal 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the mobile terminal 5. The memory 51 is used for storing the computer program and other programs and data required by the mobile terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/mobile terminal may be implemented in other ways. For example, the above-described apparatus/mobile terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (20)

  1. A power-on detection method, comprising:
    detecting whether a preset identifier exists in a storage device or not;
    if the preset identification exists in the storage device, a starting-up stage corresponding to the preset identification is obtained;
    and determining that the starting-up stage corresponding to the preset identification is not completed in the starting-up process.
  2. The boot detection method of claim 1, wherein the boot phases comprise a first boot phase, a second boot phase, a Kernel phase, and an Android phase.
  3. The power-on detection method of claim 2, wherein the first boot phase is an extensible boot loader (XBL) phase or a preload program (Preloader) phase.
  4. The power-on detection method of claim 2, wherein the second boot phase is a Unified Extensible Firmware Interface (UEFI) phase and a small kernel (LK) phase.
  5. The power-on detection method according to claim 2, wherein before detecting whether the preset identifier exists in the storage device, the method further comprises:
    and monitoring each starting-up stage in the starting-up process, and if any starting-up stage is not completed, writing a preset identification corresponding to the starting-up stage into the storage device.
  6. The power-on detection method of claim 5, wherein the monitoring each power-on phase during the power-on process, and if any power-on phase is not completed, the writing of the preset identifier corresponding to the power-on phase in the storage device comprises:
    starting a watchdog timer;
    if the watchdog timer is monitored to be overtime in a first starting stage, determining that the first starting stage is not completed in the starting process, and writing a first preset identifier in the storage device;
    if the watchdog timer is monitored to be overtime in the second starting stage, the second starting stage is determined not to be completed in the starting process, and a second preset identifier is written in the storage device.
  7. The power-on detection method of claim 5, wherein the monitoring each power-on phase during the power-on process, and if any power-on phase is not completed, the writing of the preset identifier corresponding to the power-on phase in the storage device comprises:
    starting a Kernel timer;
    if the Kernel timer is monitored to be overtime in the Kernel stage, detecting whether first preset zone bit information exists or not;
    if the first preset zone bit information does not exist, or the first preset zone bit information exists and is not a first preset value, determining that the Kernel stage is not completed in the starting process, and writing a third preset identifier in the storage device;
    if the Kernel timer is monitored to be overtime in the Android stage, whether second preset zone bit information exists is detected; or starting a Service at the Android stage, and detecting whether second preset zone bit information exists after the Service is awakened;
    if the second preset zone bit information does not exist, or the second preset zone bit information exists and is not a second preset value, it is determined that the Android stage is not completed in the starting process, and a fourth preset identification is written in the storage device.
  8. The power-on detection method as claimed in claim 5, wherein when the preset identifier corresponding to the power-on stage is written in the storage device, the method further comprises:
    recording a current field log, and sending the field log to a preset server.
  9. A power-on detection method according to any of claims 1 to 8, wherein the storage device is an embedded multimedia memory card eMMC or a universal flash memory storage UFS.
  10. A power-on detection apparatus, comprising:
    the identification detection module is used for detecting whether a preset identification exists in the storage device;
    the stage acquisition module is used for acquiring a starting stage corresponding to the preset identification if the preset identification exists in the storage device;
    and the stage determining module is used for determining that the starting stage corresponding to the preset identification is not completed in the starting process.
  11. A mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of:
    detecting whether a preset identifier exists in a storage device or not;
    if the preset identification exists in the storage device, a starting-up stage corresponding to the preset identification is obtained;
    and determining that the starting-up stage corresponding to the preset identification is not completed in the starting-up process.
  12. The mobile terminal of claim 11, wherein the boot-up phase comprises a first boot-up phase, a second boot-up phase, a Kernel phase, and an Android phase.
  13. The mobile terminal of claim 12, wherein the first boot phase is an extensible boot loader (XBL) phase or a preload program (Preloader) phase.
  14. The mobile terminal of claim 12, wherein the second boot phase is a Unified Extensible Firmware Interface (UEFI) phase and a small kernel (LK) phase.
  15. The mobile terminal of claim 12, wherein the processor, when executing the computer program, further performs the steps of:
    and monitoring a starting-up stage in the starting-up process, and if any starting-up stage is not completed in the starting-up process, writing a preset identification corresponding to the starting-up stage into the storage device.
  16. The mobile terminal of claim 15, wherein the processor, when executing the computer program, embodies the steps of:
    starting a watchdog timer;
    if the watchdog timer is monitored to be overtime in a first starting stage, determining that the first starting stage is not completed in the starting process, and writing a first preset identifier in the storage device;
    if the watchdog timer is monitored to be overtime in the second starting stage, the second starting stage is determined not to be completed in the starting process, and a second preset identifier is written in the storage device.
  17. The mobile terminal of claim 15, wherein the processor, when executing the computer program, embodies the steps of:
    starting a Kernel timer;
    if the Kernel timer is monitored to be overtime in the Kernel stage, detecting whether first preset zone bit information exists or not;
    if the first preset zone bit information does not exist, or the first preset zone bit information exists and is not a first preset value, determining that the Kernel stage is not completed in the starting process, and writing a third preset identifier in the storage device;
    if the Kernel timer is monitored to be overtime in the Android stage, whether second preset zone bit information exists is detected; or starting a Service at the Android stage, and detecting whether second preset zone bit information exists after the Service is awakened;
    if the second preset zone bit information does not exist, or the second preset zone bit information exists and is not a second preset value, it is determined that the Android stage is not completed in the starting process, and a fourth preset identification is written in the storage device.
  18. The mobile terminal of claim 15, wherein the processor, when executing the computer program, further performs the steps of:
    recording a current field log, and sending the field log to a preset server.
  19. The mobile terminal according to any of claims 11 to 18, wherein said storage means is an embedded multimedia memory card, eMMC, or a universal flash memory storage, UFS.
  20. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the power-on detection method according to any one of claims 1 to 9.
CN201880098763.0A 2018-12-05 2018-12-05 Starting-up detection method, starting-up detection device and mobile terminal Pending CN112912855A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/119377 WO2020113469A1 (en) 2018-12-05 2018-12-05 Power on self test method, power on self test device and mobile terminal

Publications (1)

Publication Number Publication Date
CN112912855A true CN112912855A (en) 2021-06-04

Family

ID=70974451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880098763.0A Pending CN112912855A (en) 2018-12-05 2018-12-05 Starting-up detection method, starting-up detection device and mobile terminal

Country Status (2)

Country Link
CN (1) CN112912855A (en)
WO (1) WO2020113469A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778732A (en) * 2021-08-06 2021-12-10 锐捷网络股份有限公司 Fault positioning method and device for service board card
CN114237378A (en) * 2022-02-24 2022-03-25 荣耀终端有限公司 Electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130132776A1 (en) * 2011-11-21 2013-05-23 Huawei Technologies Co., Ltd. Method for outputting power-on self test information, virtual machine manager, and processor
CN103905603A (en) * 2012-12-21 2014-07-02 上海晨兴希姆通电子科技有限公司 Mobile phone powering-on method and mobile phone powering-on system
CN104166561A (en) * 2014-07-25 2014-11-26 深圳市江波龙电子有限公司 Electronic device system start method and electronic device
CN106021006A (en) * 2016-05-17 2016-10-12 广东欧珀移动通信有限公司 Terminal startup abnormity processing method and terminal
CN107145413A (en) * 2017-04-21 2017-09-08 深圳市同泰怡信息技术有限公司 A kind of firmware development method of the server B MC Post runnings detection based on BMC
CN107704380A (en) * 2017-07-26 2018-02-16 深圳天珑无线科技有限公司 Mobile terminal adjustment method, device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761124B (en) * 2014-01-06 2017-03-01 武汉烽火富华电气有限责任公司 Embedded Linux system for protection supervisory equipment starts method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130132776A1 (en) * 2011-11-21 2013-05-23 Huawei Technologies Co., Ltd. Method for outputting power-on self test information, virtual machine manager, and processor
CN103905603A (en) * 2012-12-21 2014-07-02 上海晨兴希姆通电子科技有限公司 Mobile phone powering-on method and mobile phone powering-on system
CN104166561A (en) * 2014-07-25 2014-11-26 深圳市江波龙电子有限公司 Electronic device system start method and electronic device
CN106021006A (en) * 2016-05-17 2016-10-12 广东欧珀移动通信有限公司 Terminal startup abnormity processing method and terminal
CN107145413A (en) * 2017-04-21 2017-09-08 深圳市同泰怡信息技术有限公司 A kind of firmware development method of the server B MC Post runnings detection based on BMC
CN107704380A (en) * 2017-07-26 2018-02-16 深圳天珑无线科技有限公司 Mobile terminal adjustment method, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778732A (en) * 2021-08-06 2021-12-10 锐捷网络股份有限公司 Fault positioning method and device for service board card
CN114237378A (en) * 2022-02-24 2022-03-25 荣耀终端有限公司 Electronic device

Also Published As

Publication number Publication date
WO2020113469A1 (en) 2020-06-11

Similar Documents

Publication Publication Date Title
CN107608693B (en) Version upgrading method and terminal equipment
US9563439B2 (en) Caching unified extensible firmware interface (UEFI) and/or other firmware instructions in a non-volatile memory of an information handling system (IHS)
CN107193598B (en) Application starting method, mobile terminal and computer readable storage medium
US20130086571A1 (en) Dynamically Updating Firmware In A Computing System
US8345891B2 (en) Intelligent selective system mute
CN108400868B (en) Seed key storage method and device and mobile terminal
CN110410353B (en) Fan control method and device and terminal equipment
US10339284B2 (en) Measurement method, electronic device, and measurement system
CN110244963B (en) Data updating method and device and terminal equipment
CN107368735B (en) Application installation method, mobile terminal and computer readable storage medium
CN110515671B (en) Initialization method, initialization device, terminal device and readable storage medium
CN108520063B (en) Event log processing method and device and terminal equipment
CN112912855A (en) Starting-up detection method, starting-up detection device and mobile terminal
US10115375B2 (en) Systems and methods for enabling a systems management interface with an alternate frame buffer
US11429723B2 (en) Multi-domain boot and runtime status code drift detection
CN109104481B (en) File integrity detection method, file integrity detection device and terminal equipment
CN111857854A (en) Shutdown resource loading method and device, storage medium and electronic equipment
CN110874729B (en) Switching method and switching device for electronic red packet identification strategy and mobile terminal
CN109271266B (en) File transmission method and device and terminal equipment
US20190004903A1 (en) Data Restoration Method and Apparatus, and Terminal
TWI502442B (en) Clamshell electronic device and calibration method thereof
CN107580030B (en) Data management method and device and server
CN109799715B (en) Data receiving method, device and terminal equipment
CN112763251A (en) Mobile robot testing method and device
US9104558B2 (en) Preventing out-of-space errors for legacy option ROM in a computing system

Legal Events

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