CN110764825B - Starting method and terminal equipment - Google Patents
Starting method and terminal equipment Download PDFInfo
- Publication number
- CN110764825B CN110764825B CN201810845268.3A CN201810845268A CN110764825B CN 110764825 B CN110764825 B CN 110764825B CN 201810845268 A CN201810845268 A CN 201810845268A CN 110764825 B CN110764825 B CN 110764825B
- Authority
- CN
- China
- Prior art keywords
- msbud
- data
- terminal device
- communication port
- terminal equipment
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4403—Processor initialisation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the application provides a starting method and terminal equipment, relates to the technical field of electronics, and provides the starting method capable of recovering data when the terminal equipment cannot be started normally, so that the loss of user data is avoided. The method comprises the following steps: when the terminal equipment determines to start the MSBUD, after a CPU small core is initialized, a DDR main frequency is configured to be less than or equal to a main frequency threshold value, and an eMMC drive is initialized, the MSBUD is loaded; the terminal equipment initializes a main service process of an operating system kernel of the MSBUD, wherein the main service process comprises the following steps: processes, memory and interrupts of the operating system kernel; and the terminal equipment mounts the data partition through the MSBUD and loads a communication port driver, wherein the communication port driver is used for mapping a communication port communicated with external equipment, so that the external equipment receives the data read by the MSBUD in the data partition through the communication port.
Description
Technical Field
The embodiment of the application relates to the technical field of electronics, in particular to a starting method and terminal equipment.
Background
In the normal starting process of an Android (Android) mobile phone, a Central Processing Unit (CPU), a double data rate synchronous dynamic random access memory (DDR), an embedded multimedia memory card (eMMC), and other basic devices are required to function normally, and the functions of the external devices such as a sensor, a modem (modem), a camera (camera), a Liquid Crystal Display (LCD), a touch panel (touch panel, TP), and the like are required to be normal.
Based on normal starting of the mobile phone, the data recovery method for the user mainly comprises the following two approaches: when the backup and recovery functions are set through a setting menu of a mobile phone manufacturer, backup can be carried out through checking backup data, and backup refreshing is required to be carried out manually; of course, the user may select to perform data backup in a cloud service, a computer, an internal storage, an SD card, a USB storage device, or the like, or perform data backup through a backup function of a third party vendor, so that data can be restored through backup. In the above solutions, data recovery is performed based on normal start of the mobile phone and in an interactive operation state, and if the liquid crystal display or the touch panel device is abnormal and cannot interact with the user, the function of the peripheral device is damaged to cause abnormal start-up, and the basic device is abnormal and cannot be started up, the user cannot perform data recovery, so that user data in the mobile phone is completely lost.
Disclosure of Invention
The embodiment of the application provides a starting method and terminal equipment, and the starting method can be used for recovering data when the terminal equipment cannot be started normally, so that the loss of user data is avoided.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
in a first aspect, a boot method is provided. Specifically, the boot method provided by the embodiment of the present application is: when the terminal equipment determines to start a minimum recovery user data system MSBUD (minimum system for backup user data), after a CPU (central processing unit) corelet is initialized, a DDR (double data rate) main frequency is configured to be less than or equal to a main frequency threshold value, and an eMMC (enhanced multimedia controller) drive is initialized, the minimum recovery user data system MSBUD is loaded; the terminal equipment initializes a main service process of an MSBUD operating system kernel, wherein the main service process comprises the following steps: processes, memory and interrupts of the operating system kernel; the terminal device mounts the data partition through the MSBUD and loads a communication port driver, wherein the communication port driver is used for mapping a communication port communicated with the external device, so that the external device can receive data read by the MSBUD in the data partition through the communication port. In the scheme, when a terminal device determines to start an MSBUD, in a fastboot (fast start) processing stage, the terminal only initializes a CPU small core, configures a DDR main frequency less than or equal to a main frequency threshold (for example, the lowest main frequency may be configured), initializes an eMMC drive, loads the MSBUD depending on the initialized CPU small core, the low-frequency DDR and a memory of the eMMC drive, and then initializes a main service process of an operating system kernel of the MSBUD, for example, a process, a memory and an interrupt of the operating system kernel, in a kernel (kernel) processing stage, in the scheme, the operating system kernel may adopt a linux kernel; in the starting process, a CPU large core is not initialized, a high-frequency DDR (double data rate) main frequency is not configured, the problem that the basic device cannot be started due to the abnormal CPU large core or the high-frequency abnormal DDR is avoided, in addition, only a main service process of an operating system kernel is initialized, the drive of external devices such as a sensor, a modem, a camera, an LCD (liquid crystal display), a TP (touch panel) and the like is not started, the problem that the external devices cannot be started due to the abnormal external devices is avoided, and finally, in a HAL (hardware abstraction layer) processing stage, the terminal device hangs up a data partition through the MSBUD and loads a communication port drive, wherein the communication port drive is used for mapping a communication port communicated with the external device, so that the external device can receive data read by the MSBUD in the data partition through the communication port, the starting of the terminal device is realized, a data recovery method is provided, and the loss of user data is avoided.
Optionally, the determining, by the terminal device, to start the minimum recovery user data system MSBUD includes: the terminal equipment receives a starting instruction triggered by a preset key and determines to start the MSBUD according to the starting instruction. For example, when the terminal device determines that the user presses the power key for 1 second, legacy BIOS (basic input output system) boot is triggered, and when it is determined that the power key and the volume case are triggered simultaneously for more than 10 seconds, the start instruction is generated, and at this time, the terminal device is actively controlled by the user to enter this mode.
Optionally, the determining, by the terminal device, to start the minimum recovery user data system MSBUD includes: and the terminal equipment acquires a pre-stored system mark to be started and determines to start the MSBUD according to the system mark. The system mark to be started may be set in the MISC partition by default, or written in the MISC partition in advance through a command issued by an external device, for example, in a normal power-on state of the terminal device, the command issued by the PC is received by the android system and written in the MISC partition.
Optionally, when determining that the restart time exceeds a restart time threshold (for example, 2 times), the terminal device writes a system flag to be started in the MISC partition, where the restart of the terminal device may be caused by an abnormality of the peripheral device. Or, the terminal equipment writes a system mark to be started in the MISC subarea when determining that the abnormal times of the high-frequency points of the basic device exceed the abnormal times threshold.
Optionally, the method further includes: the terminal equipment receives an authentication password sent by external equipment; and when the terminal equipment passes the verification of the verification password, reading specified original Data in the Data subarea according to a Data reading instruction sent by the external equipment, and sending the original Data to the external equipment.
In a second aspect, a terminal device is provided, which includes:
the starting unit is used for loading the MSBUD when the MSBUD is determined to be started, after the CPU small core is initialized, the DDR main frequency is configured to be less than or equal to a main frequency threshold value, and the eMMC drive is initialized;
the starting unit is further configured to initialize a main service process of an operating system kernel of the MSBUD, where the main service process includes: processes, memory and interrupts of the operating system kernel;
and the processing unit is used for mounting the data partition through the MSBUD and loading a communication port driver, wherein the communication port driver is used for mapping a communication port communicated with external equipment, so that the external equipment can receive the data read by the MSBUD in the data partition through the communication port.
Optionally, the starting unit is specifically configured to receive a starting instruction triggered by a predetermined key, and determine to start the MSBUD according to the starting instruction.
Optionally, the starting unit is specifically configured to obtain a pre-stored system flag to be started, and determine to start the MSBUD according to the system flag.
Optionally, the starting unit is specifically configured to write the system flag to be started in the MISC partition when it is determined that the number of times of restarting exceeds a restart number threshold.
Optionally, the starting unit is specifically configured to write the system flag to be started in the MISC partition when it is determined that the number of times of abnormality of the high-frequency point of the base device exceeds the abnormality number threshold.
Optionally, the method further includes: the receiving unit is used for receiving the verification password sent by the external equipment;
the processing unit is further configured to read, in the Data partition, original Data corresponding to the Data reading instruction according to the Data reading instruction sent by the external device after the verification of the verification password is passed;
a sending unit, configured to send the raw data read by the processing unit to the external device.
Optionally, the terminal device includes: one or more processors, a communication interface. Wherein the communication interface is coupled with the one or more processors; the terminal device communicates with other devices via a communication interface, the processor is configured to execute computer program code in the memory, the computer program code comprising instructions to cause the terminal device to perform the power-on method as described above in the first aspect and its various possible implementations.
In a third aspect, a computer-readable storage medium having instructions stored therein is also provided; when running on the first communication means, it causes the terminal device to perform the power-on method as described in the first aspect and its various possible implementations.
In a fourth aspect, there is also provided a computer program product comprising instructions that, when run on a terminal device, cause the terminal device to perform the boot method according to the first aspect and its various possible implementations.
For a detailed description of the second aspect, the third aspect, the fourth aspect, and various implementations thereof in the present application, reference may be made to the detailed description of the first aspect and various implementations thereof; moreover, for the beneficial effects of the second aspect, the third aspect, the fourth aspect and various implementation manners thereof, reference may be made to beneficial effect analysis in the first aspect and various implementation manners thereof, and details are not described here.
These and other aspects of the present application will be more readily apparent from the following description.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly described below.
Fig. 1 is an application scenario of a boot method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a mobile phone according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating normal startup of a terminal device according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a method for booting a terminal device according to an embodiment of the present application;
fig. 5 is a schematic system architecture diagram of a terminal device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship. Furthermore, "first" and "second" etc. in this application do not denote any importance or order, but rather merely denote a difference.
In the embodiments of the present application, the word "exemplary" is used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, the term using examples is intended to present concepts in a concrete fashion. The term "module", as used herein, is intended to refer to a device or entity, either hardware, firmware, a combination of hardware and software, or software in execution, that performs digital or analog signal processing.
Referring to fig. 1, an application scenario of the power-on method provided by the embodiment of the present application is shown, and includes a terminal device 11, such as a mobile phone, a tablet computer, a palmtop computer, and the like, and an external device 12, such as: personal Computers (PCs). The embodiment of the application is applied to MSBUD startup when the terminal equipment cannot be normally started, for example: the system is characterized in that the system is not started, a power-on card is dead when the system is turned on, and hardware peripheral devices such as an LCD, a TP and a WIFI are abnormal, so that the system cannot be started normally. The external device 12 is configured to interact with the terminal device 11, and back up user data of the terminal device after the terminal device is turned on by the MSBUD, where the external device 12 may select backup data through a backup program. Finally, after the data backup is finished, the terminal device may be repaired, for example: factory settings are restored, full package upgrading and repairing, non-startup scheme repairing, hardware maintenance and the like, and loss of user data is avoided.
The terminal device 11 in this embodiment of the application may be a mobile phone (e.g., the mobile phone 200 shown in fig. 2), a tablet computer, a palmtop computer, a personal digital assistant PDA, a smart watch, a wearable electronic device, and the like, and the specific form of the device is not particularly limited in this embodiment of the application.
As shown in fig. 2, taking the mobile phone 200 as the above terminal device for example, the mobile phone 200 may specifically include: processor 201, radio frequency RF circuitry 202, memory 203, touch screen 204, bluetooth device 205, one or more sensors 206, wireless fidelity Wi-Fi device 207, positioning device 208, audio circuitry 209, peripheral interface 210, and power supply device 211. These components may communicate over one or more communication buses or signal lines (not shown in fig. 2). Those skilled in the art will appreciate that the hardware configuration shown in fig. 2 is not intended to be limiting, and that the handset 200 may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes the components of the handset 700 in detail with reference to fig. 2:
the processor 201 is a control center of the cellular phone 200, connects various parts of the cellular phone 200 using various interfaces and lines, and performs various functions of the cellular phone 200 and processes data by running or executing an application program stored in the memory 203 and calling data stored in the memory 203. In some embodiments, the processor 201 may include one or more processing units. In some embodiments of the present application, the processor 201 may further include a fingerprint verification chip, configured to verify the acquired fingerprint.
The rf circuit 202 may be used for receiving and transmitting wireless signals during the transmission and reception of information or calls. In particular, the rf circuit 202 may receive downlink data of the base station and then process the downlink data to the processor 201; in addition, data relating to uplink is transmitted to the base station. Typically, the radio frequency circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, RF circuit 202 may also communicate with other devices via wireless communication. The wireless communication may use any communication standard or protocol including, but not limited to, global system for mobile communications, general packet radio service, code division multiple access, wideband code division multiple access, long term evolution, email, short message service, and the like.
The memory 203 is used for storing application programs and data, and the processor 201 executes various functions and data processing of the mobile phone 200 by running the application programs and data stored in the memory 203. The memory 203 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and application programs (such as a sound playing function and an image processing function) required by at least one function; the storage data area may store data (such as audio data, a phonebook, etc.) created from the use of the handset 200. Further, the memory 203 may include high speed Random Access Memory (RAM), and may also include non-volatile memory, such as magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices. The memory 203 may store various operating systems, such as an iOS operating system, an Android operating system, and the like. The memory 203 may be independent and connected to the processor 701 through the communication bus; the memory 703 may also be integrated with the processor 201.
The touch screen 204 may specifically include a touch pad 204-1 and a display 204-2.
Wherein the touch pad 204-1 may capture touch events of the user of the cell phone 200 on or near the touch pad 204-1 (e.g., user operation of any suitable object such as a finger, a stylus, etc. on or near the touch pad 204-1) and transmit the captured touch information to other devices (e.g., the processor 201). Wherein, a touch event of the user near the touch pad 204-1 can be called a hover touch; hover touch may refer to a user not having to directly contact the touchpad in order to select, move, or drag a target (e.g., an icon, etc.), but rather only having to be in proximity to the device in order to perform a desired function. In addition, the touch pad 204-1 can be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave.
Display (also referred to as a display screen) 204-2 may be used to display information entered by or provided to the user as well as various menus for handset 200. The display 204-2 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The touch pad 204-1 may be overlaid on the display 204-2, and when the touch pad 204-1 detects a touch event thereon or nearby, it may be communicated to the processor 201 to determine the type of touch event, and the processor 201 may then provide a corresponding visual output on the display 204-2 according to the type of touch event. Although in FIG. 2, the touch pad 204-1 and the display screen 704-2 are shown as two separate components to implement the input and output functions of the cell phone 200, in some embodiments, the touch pad 204-1 and the display screen 204-2 may be integrated to implement the input and output functions of the cell phone 200. It is understood that the touch screen 204 is formed by stacking multiple layers of materials, and only the touch pad (layer) and the display screen (layer) are shown in the embodiment of the present application, and other layers are not described in the embodiment of the present application. In addition, the touch pad 2704-1 may be disposed on the front surface of the mobile phone 200 in a full panel manner, and the display screen 204-2 may also be disposed on the front surface of the mobile phone 200 in a full panel manner, so that a frameless structure can be implemented on the front surface of the mobile phone.
In addition, the mobile phone 200 may also have a fingerprint recognition function. For example, fingerprint identifier 212 may be disposed on the back side of cell phone 200 (e.g., below the rear facing camera), or fingerprint identifier 212 may be disposed on the front side of cell phone 200 (e.g., below touch screen 204). For another example, the fingerprint acquisition device 212 may be configured in the touch screen 204 to realize the fingerprint identification function, i.e., the fingerprint acquisition device 212 may be integrated with the touch screen 204 to realize the fingerprint identification function of the mobile phone 200. In this case, the fingerprint acquisition device 212 is disposed in the touch screen 204, can be a part of the touch screen 204, and can be disposed in the touch screen 204 in other manners. The main component of fingerprint acquisition device 212 in the present embodiment is a fingerprint sensor, which may employ any type of sensing technology, including but not limited to optical, capacitive, piezoelectric, or ultrasonic sensing technologies, among others.
The handset 200 may also include a bluetooth device 205 for enabling data exchange between the handset 200 and other short-range devices (e.g., cell phones, smartwatches, etc.). The bluetooth device in the embodiment of the present application may be an integrated circuit or a bluetooth chip.
The handset 200 may also include at least one sensor 206, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display of the touch screen 204 according to the brightness of ambient light, and the proximity sensor may turn off the power of the display when the mobile phone 200 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone 200, further description is omitted here.
The Wi-Fi device 207 is used for providing network access for the mobile phone 200 according to Wi-Fi related standard protocols, the mobile phone 200 can be accessed to a Wi-Fi access point through the Wi-Fi device 207, so that the user can be helped to receive and send e-mails, browse webpages, access streaming media and the like, and wireless broadband internet access is provided for the user. In other embodiments, the Wi-Fi apparatus 207 can also act as a Wi-Fi wireless access point and can provide Wi-Fi network access to other devices.
And a positioning device 208 for providing a geographical position for the mobile phone 200. It can be understood that the Positioning device 208 may specifically be a receiver of a Global Positioning System (GPS) or a Positioning System such as the beidou satellite navigation System, russian GLONASS, and the like. After receiving the geographic location sent by the positioning system, the positioning device 208 sends the information to the processor 201 for processing, or sends the information to the memory 203 for storage. In still other embodiments, the positioning device 208 may also be a receiver of an assisted global positioning system, AGPS, that assists the positioning device 208 in performing ranging and positioning services by acting as an assistance server, in which case the assistance positioning server provides positioning assistance by communicating with the positioning device 208 (i.e., GPS receiver) of the device, such as the handset 200, over a wireless communication network. In some other embodiments, the positioning device 208 may also be a Wi-Fi access point based positioning technology. Because each Wi-Fi access point has a globally unique MAC address, the device can scan and collect broadcast signals of the surrounding Wi-Fi access points under the condition of starting Wi-Fi, and therefore the MAC addresses broadcasted by the Wi-Fi access points can be obtained; the device sends the data (such as the MAC address) capable of identifying the Wi-Fi access points to the location server through the wireless communication network, the location server retrieves the geographical location of each Wi-Fi access point, and calculates the geographical location of the device according to the strength of the Wi-Fi broadcast signal and sends the geographical location of the device to the positioning device 208 of the device.
Peripheral interface 210 is used to provide various interfaces for external input/output devices (e.g., keyboard, mouse, external display, external memory, sim card, etc.). For example, the mouse is connected through a Universal Serial Bus (USB) interface, and the SIM card provided by a telecom operator is connected through metal contacts on a card slot of the SIM card. Peripheral interface 2710 may be used to couple the aforementioned external input/output peripheral devices to processor 201 and memory 203.
In this embodiment of the application, the mobile phone 200 may communicate with other devices in the device group through the peripheral interface 210, for example, the peripheral interface 210 may receive display data sent by the other devices for displaying, and the like, which is not limited in this embodiment of the application.
The handset 200 may further include a power supply device 211 (such as a battery and a power management chip) for supplying power to each component, and the battery may be logically connected to the processor 201 through the power management chip, so as to implement functions of managing charging, discharging, and power consumption through the power supply device 211.
Although not shown in fig. 2, the mobile phone 200 may further include a camera (front camera and/or rear camera), a flash, a micro-projector, a NFC device, and the like, which are not described in detail herein.
Referring to fig. 3, the normal starting process of the terminal device is described as follows: after the power key is pressed for 1 second, a legacy (BIOS starting mode) small system is started; in a fastboot (fast boot) processing stage, a normal boot mode is selected to be entered according to a key and a boot mark of a MISC partition, wherein the MISC partition is used for storing recovery (backup) boot information, such as a storage record upgrade boot mode mark, and is used for recording a boot mark in the application; in a kernel processing stage, after various registration drivers are loaded by a kernel, an android root file system is mounted, and init (initialization) is executed; a Hardware Abstraction Layer (HAL) processing stage, namely initializing partition images such as mounting system, Data, cache and the like, and starting zygate (which is an Android application incubator and is responsible for the creation and starting work of other processes of an Android application framework layer, for example, for creating a new process by an Android system); FWK (framework) & APP (application) processing phase, the android system is started by zygate. In the normal starting process, the functions of basic devices such as the CPU, the DDR, the eMMC and the like are normal, and the functions of external devices such as the sensor, the modem, the camera, the LCD, the TP and the like are also required to be normal. For example, in the fastboot processing stage, if the CPU and the DDR high frequency point are abnormal, the external device cannot be normally powered on, and in the kernel processing stage, if the functions of the external devices such as the sensor, the modem, the camera, the LCD, and the TP are abnormal or damaged, the drive of the external device cannot be normally powered on, so that the external device cannot be normally powered on, and thus the user cannot perform data recovery, which causes complete loss of user data in the terminal device.
In order to solve the above problem, an embodiment of the present application provides a boot scheme, where when determining to start an MSBUG in a legacy phase, in a fastboot processing phase, a terminal initializes only a CPU corelet, configures a DDR master frequency that is less than or equal to a master frequency threshold (for example, a lowest master frequency may be configured), initializes an eMMC driver, and loads an MSBUG depending on the initialized CPU corelet, a low-frequency DDR, and a memory of the eMMC driver, and then initializes a main service process of an operating system kernel of the MSBUG in a kernel processing phase, for example, a process, a memory, and an interrupt of the operating system kernel, where in the scheme, the operating system kernel may adopt a linux kernel; in the starting process, a CPU large core is not initialized, a high-frequency DDR (double data rate) main frequency is not configured, the problem that the basic device cannot be started due to the abnormal CPU large core or the high-frequency abnormal DDR is avoided, in addition, only a main service process of an operating system kernel is initialized, the drive of external devices such as a sensor, a modem, a camera, an LCD (liquid crystal display), a TP (touch panel) and the like is not started, the problem that the external devices cannot be started due to the abnormal external devices is avoided, and finally, in a HAL (hardware abstraction layer) processing stage, the terminal device hangs up a data partition through the MSBUD and loads a communication port drive, wherein the communication port drive is used for mapping a communication port communicated with the external device, so that the external device can receive data read by the MSBUD in the data partition through the communication port, the starting of the terminal device is realized, a data recovery method is provided, and the loss of user data is avoided.
Specifically, referring to the terminal device and the hardware based on the above, an embodiment of the present application provides a booting method, which is shown in fig. 4 and includes the following steps:
101. when the terminal equipment determines to start the MSBUD, the MSBUD is loaded after a CPU small core is initialized, a DDR main frequency is configured to be less than or equal to a main frequency threshold value, and an eMMC driver is initialized.
The terminal equipment determines to start a minimum recovery user data system MSBUD, and the method comprises an active mode and a passive mode:
wherein, the initiative mode includes: the terminal equipment receives a starting instruction triggered by a preset key and determines to start the MSBUD according to the starting instruction. For example, when the terminal device determines that the user presses the power key for 1 second, legacy BIOS (basic input output system) boot is triggered, and when it is determined that the power key and the volume case are triggered simultaneously for more than 10 seconds, the start instruction is generated, and at this time, the terminal device is actively controlled by the user to enter this mode.
The passive mode includes: and the terminal equipment acquires a pre-stored system mark to be started and determines to start the MSBUD according to the system mark. The system mark to be started may be set in the MISC partition by default, or written in the MISC partition in advance through a command issued by an external device, for example, in a normal power-on state of the terminal device, the command issued by the PC is received by the android system and written in the MISC partition. And when the terminal equipment determines that the restart time exceeds a restart time threshold (for example, 2 times), writing a system mark to be started in the MISC partition, wherein the restart of the terminal equipment can be caused by the abnormality of the peripheral device. Or, the terminal equipment writes a system mark to be started in the MISC subarea when determining that the abnormal times of the high-frequency points of the basic device exceed the abnormal times threshold.
Illustratively, referring to the system architecture of the terminal device shown in fig. 5, the specific implementation of step 101 is as follows: in the legacy processing stage, the terminal equipment determines to start a minimum recovery user data system MSBUD; in a fastboot processing stage, initializing a CPU (Central processing Unit) corelet, configuring a DDR (double data Rate) master frequency less than or equal to a master frequency threshold, and initializing an eMMC (enhanced multimedia card) drive; in hardware (hardware), the boot scheme only needs the support of a CPU (central processing unit) corelet, a low-frequency DDR (double data rate) and an eMMC (eMMC), and the coupling of other functional modules or systems is removed. The MSBUD can be realized by constructing a ramdisk root file system mirror image, and the function of realizing the fastboot processing stage by constructing a simplified kernel boot mirror image can be realized.
102. The terminal equipment initializes a main service process of an MSBUD operating system kernel, wherein the main service process comprises the following steps: processes, memory, and interrupts of the operating system kernel.
Referring to the system architecture of the terminal device shown in fig. 5, in step 102, the kernel processing stage does not start the drivers of the sensors, the modems, the cameras, the LCD, the TPs, and other peripheral devices, and simplifies defconfig and kernel characteristics, wherein the kernel of the operating system illustratively adopts a linux kernel.
103. The terminal device mounts the Data subarea through the MSBUD and loads a communication port driver, wherein the communication port driver is used for mapping a communication port communicated with the external device, so that the external device can receive the Data read by the MSBUD in the Data subarea through the communication port.
Referring to the system architecture of the terminal device shown in fig. 5, in this process 103, a communication port driver is implemented by loading an executable file through a ramdisk in the HAL, so as to map out a communication port for communicating with an external device, where the communication port may be an ADB port such as a USB port. The starting-up process is completed so far, and the processing process of the frame and the APP is not involved in the scheme.
In the scheme, when a terminal device determines to start an MSBUD, in a fastboot (fast start) processing stage, the terminal only initializes a CPU small core, configures a DDR main frequency less than or equal to a main frequency threshold (for example, the lowest main frequency may be configured), initializes an eMMC drive, loads the MSBUD depending on the initialized CPU small core, the low-frequency DDR and a memory of the eMMC drive, and then initializes a main service process of an operating system kernel of the MSBUD, for example, a process, a memory and an interrupt of the operating system kernel, in a kernel (kernel) processing stage, in the scheme, the operating system kernel may adopt a linux kernel; in the starting process, a CPU large core is not initialized, a high-frequency DDR (double data rate) main frequency is not configured, the problem that the basic device cannot be started due to the abnormal CPU large core or the high-frequency abnormal DDR is avoided, in addition, only a main service process of an operating system kernel is initialized, the drive of external devices such as a sensor, a modem, a camera, an LCD (liquid crystal display), a TP (touch panel) and the like is not started, the problem that the external devices cannot be started due to the abnormal external devices is avoided, and finally, in a HAL (hardware abstraction layer) processing stage, the terminal device hangs up a data partition through the MSBUD and loads a communication port drive, wherein the communication port drive is used for mapping a communication port communicated with the external device, so that the external device can receive data read by the MSBUD in the data partition through the communication port, the starting of the terminal device is realized, a data recovery method is provided, and the loss of user data is avoided.
In addition, after the startup process is completed, the terminal device enumerates the communication port to establish an interaction channel with an external device (e.g., a PC). Then the terminal device can interact with the external device to read the protocol format, load the data partition data command, and simultaneously construct a function for reading the original data (naked data) of the encrypted data partition. The external device may start a backup program (e.g., APP) and detect a communication port connected thereto. Specifically, the data backup process is as follows:
201. and the terminal equipment receives the verification password sent by the external equipment.
202. And when the terminal equipment passes the verification of the verification password, reading the specified original data in the data subarea according to a data reading instruction sent by the external equipment, and sending the original data to the external equipment.
And finally, the external equipment analyzes the content of the original data, and searches a file corresponding to the application according to the application format corresponding to the original data to realize the backup of the user data. The types of the user data can include communication data, media data and important application data; wherein the communication data may be: contacts, information, call records; the media data includes: photos, sound recordings, videos; important application data include: hitachi, memorandum, bookmark, intelligent assistant, file of the confidential cabinet and document.
The embodiment of the application provides a terminal device, and the terminal device is used for executing the starting-up method. The terminal device provided by the embodiment of the application can comprise modules corresponding to the corresponding steps.
In the embodiment of the present application, the terminal device may be divided into the functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The division of the modules in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of dividing each function module according to each function, as shown in fig. 6, a method for dividing a function module by a terminal device is provided, which includes: a starting unit 61 and a processing unit 62;
the starting unit 61 is configured to load the minimum recovery user data system MSBUD after initializing the CPU corelet, configuring a DDR master frequency less than or equal to a master frequency threshold, and initializing the eMMC driver when determining to start the minimum recovery user data system MSBUD;
the starting unit 61 is further configured to initialize a main service process of an operating system kernel of the MSBUD, where the main service process includes: processes, memory and interrupts of the operating system kernel;
and the processing unit 62 is configured to mount the Data partition through the MSBUD and load a communication port driver, where the communication port driver is configured to map a communication port for communicating with an external device, so that the external device receives Data read by the MSBUD in the Data partition through the communication port.
In an exemplary scheme, the starting unit 61 is specifically configured to receive a starting instruction triggered by a predetermined key, and determine to start the MSBUD according to the starting instruction.
In an exemplary scheme, the starting unit 61 is specifically configured to obtain a pre-stored system flag to be started, and determine to start the MSBUD according to the system flag.
In an exemplary scheme, the starting unit 61 is specifically configured to write the system flag to be started in the MISC partition when it is determined that the number of restarts exceeds a restart threshold.
In an exemplary scheme, the starting unit 61 is specifically configured to write the system flag to be started in the MISC partition when it is determined that the number of high-frequency point anomalies of the base device exceeds an anomaly number threshold.
In an exemplary aspect, the method further comprises:
a receiving unit 63, configured to receive an authentication password sent by an external device;
the processing unit 62 is further configured to, after the verification of the verification password is passed, read original Data corresponding to the Data reading instruction in the Data partition according to the Data reading instruction sent by the external device;
a sending unit 64, configured to send the raw data read by the processing unit 62 to the external device.
Of course, the first communication apparatus provided in the embodiment of the present application includes, but is not limited to, the above module, and for example, the terminal device may further include a storage unit. The memory unit may be used to store program codes of the terminal device. All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
In another implementation, the starting unit 61 and the processing unit 62 may be the processor 201 in fig. 2; the receiving unit and the transmitting unit may be the communication interface 210 in fig. 2. When the terminal device runs, the terminal device executes the boot method of the above embodiment.
Another embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device executes the boot method of the foregoing embodiment.
In another embodiment of the present application, there is also provided a computer program product comprising computer executable instructions stored in a computer readable storage medium; the at least one processor of the terminal device may read the computer executable instruction from the computer readable storage medium, and the at least one processor executes the computer executable instruction to enable the terminal device to implement the boot method for executing the foregoing embodiments.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware or any combination thereof. When implemented using a software program, may take the form of a computer program product, either entirely or partially. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the present application are all or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, e.g., the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium can be any available medium that can be accessed by a computer or a data terminal device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, 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 be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. 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 unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (12)
1. A boot method, comprising:
when the terminal equipment determines to start the MSBUD, after initializing a CPU (central processing unit) small core, configuring a DDR (double data rate) synchronous dynamic random access memory, wherein the DDR main frequency is less than or equal to a main frequency threshold value, and initializing an embedded multimedia memory card eMMC (enhanced multimedia memory card) drive, loading the MSBUD;
the terminal equipment initializes a main service process of an operating system kernel of the MSBUD, wherein the main service process comprises the following steps: processes, memory and interrupts of the operating system kernel;
and the terminal equipment mounts the data partition through the MSBUD and loads a communication port driver, wherein the communication port driver is used for mapping a communication port communicated with external equipment, so that the external equipment can receive the data read by the MSBUD in the data partition through the communication port.
2. The boot method according to claim 1, wherein the determining, by the terminal device, to start the MSBUD of the minimum recovery user data system comprises:
and the terminal equipment receives a starting instruction triggered by a preset key and determines to start the MSBUD according to the starting instruction.
3. The boot method according to claim 1, wherein the determining, by the terminal device, to start the MSBUD of the minimum recovery user data system comprises:
and the terminal equipment acquires a pre-stored system mark to be started and determines to start the MSBUD according to the system mark.
4. A booting method according to claim 3, characterized in that the terminal device writes the system flag to be booted in the MISC partition when it is determined that the number of reboots exceeds the number of reboots threshold.
5. The boot method according to claim 3, wherein the terminal device writes the system flag to be started in the MISC partition when it is determined that the number of high-frequency point anomalies of the base device exceeds the anomaly number threshold.
6. The boot method according to claim 1, further comprising:
the terminal equipment receives an authentication password sent by external equipment;
and when the terminal equipment passes the verification of the verification password, reading specified original data in the data subarea according to a data reading instruction sent by the external equipment, and sending the original data to the external equipment.
7. A terminal device, comprising:
the starting unit is used for loading the MSBUD when the MSBUD is determined to be started, after the CPU small core is initialized, the DDR main frequency is configured to be smaller than or equal to a main frequency threshold value, and the eMMC drive is initialized;
the starting unit is further configured to initialize a main service process of an operating system kernel of the MSBUD, where the main service process includes: processes, memory and interrupts of the operating system kernel;
and the processing unit is used for mounting the data partition through the MSBUD and loading a communication port driver, wherein the communication port driver is used for mapping a communication port communicated with external equipment, so that the external equipment can receive the data read by the MSBUD in the data partition through the communication port.
8. The terminal device of claim 7, wherein the starting unit is specifically configured to receive a starting instruction triggered by a predetermined key, and determine to start the MSBUD according to the starting instruction.
9. The terminal device of claim 7, wherein the starting unit is specifically configured to obtain a pre-stored system flag to be started, and determine to start the MSBUD according to the system flag.
10. The terminal device according to claim 9, wherein the startup unit is configured to, upon determining that the number of restarts exceeds a restart threshold, write the system flag to be started in the MISC partition.
11. The terminal device according to claim 9, wherein the startup unit is configured to write the system flag to be started in the MISC partition, when it is determined that the number of high-frequency point anomalies of the base device exceeds an anomaly number threshold.
12. The terminal device according to claim 7, further comprising:
the receiving unit is used for receiving the verification password sent by the external equipment;
the processing unit is further configured to read, in the data partition, original data corresponding to the data reading instruction according to the data reading instruction sent by the external device after the verification of the verification password is passed;
a sending unit, configured to send the raw data read by the processing unit to the external device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810845268.3A CN110764825B (en) | 2018-07-27 | 2018-07-27 | Starting method and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810845268.3A CN110764825B (en) | 2018-07-27 | 2018-07-27 | Starting method and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110764825A CN110764825A (en) | 2020-02-07 |
CN110764825B true CN110764825B (en) | 2021-02-09 |
Family
ID=69328368
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810845268.3A Active CN110764825B (en) | 2018-07-27 | 2018-07-27 | Starting method and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110764825B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111880846B (en) * | 2020-06-04 | 2023-12-15 | 普联国际有限公司 | Method, device and equipment for quickly starting embedded system |
CN113805946B (en) * | 2020-06-15 | 2023-08-18 | 苏州佳世达电通有限公司 | Processing method and device for nonvolatile attribute of android system and electronic equipment |
CN112507324B (en) * | 2021-02-05 | 2021-06-04 | 浙江地芯引力科技有限公司 | RISC processor circuit and method for analyzing data and command safety |
CN115562731A (en) * | 2021-06-30 | 2023-01-03 | 阿里云计算有限公司 | Device driving method and device of micro-kernel architecture, electronic device and storage medium |
CN113642008B (en) * | 2021-10-14 | 2021-12-28 | 飞天诚信科技股份有限公司 | Method and device for realizing replacement of startup picture of intelligent POS equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104423997A (en) * | 2013-09-05 | 2015-03-18 | 中兴通讯股份有限公司 | Remote base station version installing method and remote base station version installing device |
US9032414B1 (en) * | 2011-12-08 | 2015-05-12 | Symantec Corporation | Systems and methods for managing system resources allocated for backup validation |
CN106462478A (en) * | 2015-04-29 | 2017-02-22 | 华为技术有限公司 | Data recovery method, device and terminal |
CN107766177A (en) * | 2017-10-12 | 2018-03-06 | 广东欧珀移动通信有限公司 | Start optimization method, device, storage medium and terminal device |
CN108319520A (en) * | 2018-01-25 | 2018-07-24 | 张志和 | Mobile device alternate operating system based on secure storage |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10120694B2 (en) * | 2013-03-15 | 2018-11-06 | Bitmicro Networks, Inc. | Embedded system boot from a storage device |
-
2018
- 2018-07-27 CN CN201810845268.3A patent/CN110764825B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9032414B1 (en) * | 2011-12-08 | 2015-05-12 | Symantec Corporation | Systems and methods for managing system resources allocated for backup validation |
CN104423997A (en) * | 2013-09-05 | 2015-03-18 | 中兴通讯股份有限公司 | Remote base station version installing method and remote base station version installing device |
CN106462478A (en) * | 2015-04-29 | 2017-02-22 | 华为技术有限公司 | Data recovery method, device and terminal |
CN107766177A (en) * | 2017-10-12 | 2018-03-06 | 广东欧珀移动通信有限公司 | Start optimization method, device, storage medium and terminal device |
CN108319520A (en) * | 2018-01-25 | 2018-07-24 | 张志和 | Mobile device alternate operating system based on secure storage |
Also Published As
Publication number | Publication date |
---|---|
CN110764825A (en) | 2020-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110764825B (en) | Starting method and terminal equipment | |
US10734831B2 (en) | Device for performing wireless charging and method thereof | |
CN107276789B (en) | Log uploading method and device and computer readable storage medium | |
CN105426141B (en) | Information processing method and electronic device supporting the same | |
US10565672B2 (en) | Electronic device for composing graphic data and method thereof | |
CN112055424B (en) | Electronic device and method for switching electronic device | |
CN111142711B (en) | Firmware configuration method and device, storage medium and mobile terminal | |
US10318328B2 (en) | Method for managing operating system and electronic device supporting the same | |
CN110362328B (en) | OTA (over the air) upgrading method and device and computer equipment | |
US11579714B2 (en) | Apparatus and method for providing memo function | |
US20170235694A1 (en) | Data transceiving method and device | |
US9876884B2 (en) | Electronic device and method of wireless signal transmission and reception therefor | |
JP2020537211A (en) | Application management method and terminal | |
KR20170054072A (en) | Electronic Apparatus and Operation Method for Detecting of Accessory Device Thereof | |
CN109788470B (en) | Method, device and terminal for identifying eSIM card | |
US10558290B2 (en) | Electronic device and method for recognizing touch input therefor | |
CN111557097A (en) | Control method of power key in virtual remote controller and terminal | |
CN107832191B (en) | Black screen detection method, mobile terminal and computer readable storage medium | |
CN111726848B (en) | Equipment binding method, target starting device, fixed terminal and storage medium | |
CN111078312A (en) | MBN loading method and electronic equipment | |
CN108702694B (en) | Method and electronic device for network connection | |
US10108242B2 (en) | Method of controlling power supply in submersion and electronic device thereof | |
US20170262838A1 (en) | Method of processing card operating information and electronic device supporting the same | |
CN107766089B (en) | System starting method and device | |
CN113220330A (en) | Management method and device of electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |