CN107766089B - System starting method and device - Google Patents

System starting method and device Download PDF

Info

Publication number
CN107766089B
CN107766089B CN201710953186.6A CN201710953186A CN107766089B CN 107766089 B CN107766089 B CN 107766089B CN 201710953186 A CN201710953186 A CN 201710953186A CN 107766089 B CN107766089 B CN 107766089B
Authority
CN
China
Prior art keywords
user data
data partition
partition
standby
main user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710953186.6A
Other languages
Chinese (zh)
Other versions
CN107766089A (en
Inventor
黄炼军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710953186.6A priority Critical patent/CN107766089B/en
Publication of CN107766089A publication Critical patent/CN107766089A/en
Application granted granted Critical
Publication of CN107766089B publication Critical patent/CN107766089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The embodiment of the invention provides a method and a device for starting a system, wherein the system comprises a main user data partition and a standby user data partition; the method comprises the following steps: when the system is started, judging whether the loaded user data partition is the main user data partition; if not, judging that the main user data partition has a fault; loading the spare user data partition; repairing the main user data partition according to a preset processing mode; and starting to enter a standby mode of the system according to the repairing result. In the embodiment of the invention, the system can still be successfully started under the condition that the main user data partition is damaged.

Description

System starting method and device
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to a system booting method and a system booting apparatus.
Background
The development of science and technology enables the mobile terminal to be more and more intelligent, on one hand, people can carry out shopping, entertainment and other activities through the mobile terminal in daily life, and the technology is very convenient and fast; on the other hand, due to the high intelligence of the mobile terminal, when the mobile terminal breaks down, the user is difficult to repair the mobile terminal by himself, and certain trouble is brought to the user.
For example, when a user uses a mobile terminal, the user may not boot up the mobile terminal, and one of the reasons is that the userdata partition file system is damaged, and the userdata partition cannot be loaded. The damage of the file system of the userdata partition is caused by many reasons, including a hardware aspect and a software aspect.
In the process of starting the mobile terminal, before the system loads the userdata partition, whether a file system exists or not and whether the file system has errors or not are detected. If a file system is found and there is an error, then repair is attempted. In some cases, the error may be completely repaired, but in some cases, the error is so severe that it cannot be repaired so that it can be loaded.
In the prior art, when a userdata partition is damaged, no userdata partition is available, the userdata partition cannot be loaded, a service relying on files in the userdata partition cannot be started in the starting process, the mobile terminal can be blocked in the starting process, a mobile phone standby interface cannot be accessed, extremely poor use experience is brought to a user, and meanwhile, harm is brought to a brand of a mobile terminal manufacturer.
Disclosure of Invention
The embodiment of the invention provides a system starting method, which aims to solve the problem that a mobile terminal cannot be started under the condition that a user data partition is damaged.
In order to solve the technical problem, the invention is realized as follows: a method for booting a system, the system including an active user data partition and a standby user data partition, the method comprising:
when the system is started, judging whether the loaded user data partition is the main user data partition;
if not, judging that the main user data partition has a fault;
loading the spare user data partition;
repairing the main user data partition according to a preset processing mode;
and entering a standby mode of the system according to the repairing result.
In a first aspect, an embodiment of the present invention further provides a device for starting a system, where the system includes an active user data partition and a standby user data partition, and the device includes:
a partition judging module, configured to judge whether the loaded user data partition is the primary user data partition when the system is started;
the first fault judgment module is used for judging that the main user data partition has a fault;
the partition loading module is used for loading the standby user data partition;
the partition repair module is used for repairing the main user data partition according to a preset processing mode;
and the standby module is used for entering a standby mode of the system according to the repairing result.
In a second aspect, an embodiment of the present invention provides a mobile terminal, including a processor, a memory, and a computer program stored in the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of the method for system booting as described above.
In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of a system startup method as described above.
In the embodiment of the invention, a system in a mobile terminal comprises a main user data partition and a standby user data partition, when the system is started, whether a loaded user data partition is the main user data partition is judged, if not, the main user data partition is judged to have a fault, then the standby user data partition is loaded, the main user data partition is repaired according to a preset processing mode, and finally the system is started according to a repaired result. Therefore, the system can still be successfully started under the condition that the main user data partition is damaged, and meanwhile, the damaged main user data partition can be repaired, so that the user can normally use the mobile terminal without losing the user data in the damaged partition, the loss of the user data is reduced, and the user experience is improved.
Drawings
FIG. 1 is a flow chart of the steps of a method embodiment of system startup of the present invention;
FIG. 2 is a flow chart of steps of yet another system startup method embodiment of the present invention;
FIG. 3 is a block diagram of an embodiment of a system booting apparatus according to the present invention;
fig. 4 is a schematic hardware structure diagram of a mobile terminal implementing various embodiments of the present invention.
Detailed Description
The technical solutions 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 invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to FIG. 1, a flowchart illustrating steps of a method embodiment of system boot-up of the present invention is shown, the system comprising an active user data partition, a standby user data partition, and a system partition.
In the present invention, the system is a system on a mobile terminal, and the mobile terminal may have the following characteristics:
(1) on a hardware architecture, a device has a central processing unit, a memory, an input unit and an output unit, that is, the device is often a microcomputer device having a communication function. In addition, various input modes such as a keyboard, a mouse, a touch screen, a microphone, a camera and the like can be provided, and input can be adjusted as required. Meanwhile, the equipment often has a plurality of output modes, such as a telephone receiver, a display screen and the like, and can be adjusted according to needs;
(2) on a software system, the device must have an operating system, such as Windows Mobile, Symbian, Palm, Android, iOS, and the like. Meanwhile, the operating systems are more and more open, and personalized application programs developed based on the open operating system platforms are infinite, such as a communication book, a schedule, a notebook, a calculator, various games and the like, so that the requirements of personalized users are met to a great extent;
(3) in terms of communication capacity, the device has flexible access mode and high-bandwidth communication performance, and can automatically adjust the selected communication mode according to the selected service and the environment, thereby being convenient for users to use. The equipment can support GSM, WCDMA, CDMA2000, TDSCDMA, Wi-Fi, WiMAX and the like, thereby being suitable for various systems of networks, not only supporting voice services, but also supporting various wireless data services;
(4) in the aspect of function use, the equipment focuses more on humanization, individuation and multi-functionalization. With the development of computer technology, devices enter a human-centered mode from a device-centered mode, and the embedded computing, control technology, artificial intelligence technology, biometric authentication technology and the like are integrated, so that the human-oriented purpose is fully embodied. Due to the development of software technology, the equipment can be adjusted and set according to individual requirements, and is more personalized. Meanwhile, the device integrates a plurality of software and hardware, and the function is more and more powerful.
In a preferred embodiment of the present invention, the primary user data partition and the standby user data partition are uesrdata partitions, and the system partition is a system partition.
For example, android, a system partition is a partition mounted to a/system directory. The system is equivalent to a C disk of a computer and is used for storing the system. There are/system/bin and/system/sbin that hold many system commands. It is burned in by compiled system. This partition contains essentially the entire android operating system, except for the kernel (kernel) and ramdisk. Including the android user interface, and all pre-installed system applications. Erasing this partition deletes the entire android system. A new ROM, i.e., a new android system, can be installed by entering the Recovery program or bootloader program.
The userdata partition, also called a user data area, contains user data: contacts, short messages, settings, user installed programs, etc. It will be mounted under the/data directory, which is burned in by the compiled userdata. Erasing this partition is essentially equivalent to restoring the handset to factory settings, i.e., the state of the handset system when it was first started, or the state after the last installation of an official or third party ROM. The "data/factor reset" operation performed in the Recovery program is to erase the partition.
The method adopts a double-userdata partition scheme, namely a main userdata partition (called a main user data partition for short) and a standby userdata partition (called a standby user data partition for short). The main user data partition is used for daily use, and the standby user data partition is used for temporary use under the condition that the main user data partition is damaged. Therefore, the primary user data partition is large and can contain all data of a user, the standby user data partition is small, and the size of the standby user data partition only needs to be capable of storing files necessary for enabling the mobile terminal to be started, such as a userdata file system mirror image.
The "start-up" in the present application refers to a process in which a user presses a power key, loads a system, and loads user data until entering a standby interface when the mobile terminal is in a power-off state, and the user can normally use the mobile terminal.
The method specifically comprises the following steps:
step 101, when the system is started, judging whether the loaded user data partition is the main user data partition;
since the system partition contains the files of the whole system, when the system is started, the system partition is loaded first, and then the user data partition is loaded, so that in practical application, which user data partition needs to be loaded can be recorded in the system partition.
For convenience of description, the user data partition that needs to be loaded is referred to as a "boot partition" in this application. For example, when the system is started, the main user data partition needs to be loaded, and then the main user data partition is the starting partition; when the system is started, the standby user data partition needs to be loaded, and then the standby user data partition is the starting partition.
In the embodiment of the present invention, it is determined whether the loaded user data partition is the active user data partition, that is, a record of a boot partition in the system partition is obtained. The user can start the system in the mobile terminal through the entity power key of the mobile terminal, and when the system is started, the system partition, namely the system partition, is loaded firstly, and then the user data partition is loaded by acquiring the starting partition recorded in the system partition.
Since the primary user data partition contains all user data, the boot partition is the primary user data partition by default.
Step 102, if not, judging that the main user data partition has a fault;
in practical application, under the condition that the main user data partition is normal, the starting partition recorded in the system partition is the main user data partition, if the main user data partition is damaged and cannot be loaded normally, the starting partition in the system partition is modified into the standby user data partition, and when the starting partition is read to be the standby user data partition in the system starting process, the main user data partition can be judged to have a fault.
Step 103, loading the spare user data partition;
when the main user data partition is damaged, the storage address of the standby user data partition is directly obtained, and then the data in the standby user data partition is loaded from the storage address.
Of course, the storage addresses of the main user data partition and the standby user data partition, and the storage address of the standby user data partition obtained when the main user data partition is damaged are preset in the configuration information, so that when the system cannot be started normally, the standby user data partition can be loaded from the preset configuration information.
It should be noted that, in addition to the main user data partition being damaged and capable of loading the standby user data partition, in practical applications, the starting partition in the system partition may also be directly modified into the standby user data partition, so that after the system partition is loaded, the standby user data partition is directly loaded without determining whether the main user data partition is damaged.
Step 104, repairing the primary user data partition according to a preset processing mode;
after loading the standby user data partition successfully, a standby interface can be performed, and the user can use the mobile terminal normally, but because the main user data partition contains all data of the user, if the user needs to extract the user data in the main user data partition, the main user data partition can be repaired according to a preset processing mode.
In a preferred embodiment of the present invention, the preset processing manner includes: modifying the loading mode of the main user data partition into a USB flash disk mode, or formatting the main user data partition, or having no operation on the main user data partition;
before the step of repairing the active user data partition according to the preset processing mode, the method further includes:
displaying the preset processing mode;
and receiving an operation instruction corresponding to the processing mode triggered by the user.
Specifically, since the user may want to try to retrieve the data in the damaged partition through a computer or the like, the primary user data partition is set to the usb disk mode, so that the user can read the data in the primary user data partition from other devices such as a computer.
Moreover, in order to avoid misoperation, the reliability of the standby user data partition is improved, and the standby user data partition is not set to be in a USB flash disk mode.
Or, when the main user data partition cannot be repaired due to damage and the user cannot be woken up, the main user data partition can be loaded only by formatting the main user data partition. Thus, an interface is provided to format the primary user data partition when the backup user data partition is used.
Or, if the user does not set the usb disk mode nor format, the user may directly enter the standby interface from the standby user data partition without performing any operation on the primary user data partition, and then send the mobile terminal to the professional maintenance organization.
Therefore, after the standby user data partition is loaded successfully and before the standby interface is entered, the mobile terminal pops up a selection dialog box, the selection dialog box comprises three options such as 'main partition U disk mode, main partition formatting and desktop entering', and when a user clicks one of the options, an operation instruction corresponding to the option is obtained.
And step 105, entering a standby mode of the system according to the processing result.
When a user selects the option of 'main partition USB flash disk mode' or 'desktop entering', the mobile terminal enters a standby interface, and in the 'main partition USB flash disk mode', when the user accesses the mobile terminal into other computing equipment such as a computer, the user data in the main user data partition can be seen, and in the 'desktop entering' mode, the user cannot see the user data in the main user data partition even if the user accesses the mobile terminal into other computing equipment such as a computer; when the user selects the "format main partition" mode, the process returns to step 101, and the process from step 101 to step 105 is continuously executed.
In the embodiment of the invention, a system in a mobile terminal comprises a main user data partition and a standby user data partition, when the system is started, whether a loaded user data partition is the main user data partition is judged, if not, the main user data partition is judged to have a fault, then the standby user data partition is loaded, the main user data partition is repaired according to a preset processing mode, and finally the system is started according to a repaired result. Therefore, the system can still be successfully started under the condition that the main user data partition is damaged, and meanwhile, the damaged main user data partition can be repaired, so that the user can normally use the mobile terminal without losing the user data in the damaged partition, the loss of the user data is reduced, and the user experience is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to FIG. 2, a flowchart illustrating steps of yet another embodiment of a method for booting a system including a primary user data partition, a backup user data partition, and a system partition is shown;
the method specifically comprises the following steps:
step 201, when the system is started, judging whether the loaded user data partition is the main user data partition;
step 202, if not, determining that the primary user data partition has a fault;
step 203, loading the spare user data partition;
step 204, repairing the primary user data partition according to a preset processing mode;
step 205, entering a standby mode of the system according to the repairing result;
step 206, if the loaded user data partition is the main user data partition, judging whether the main user data partition is loaded successfully;
the starting partition recorded in the system partition is the main user data partition, and the system can be successfully started without representing the system. For example, the boot partition recorded in the system partition is the primary user data partition, but a part of files in the primary user data partition are damaged and cannot be loaded normally, so that the system still fails to boot under such a condition, and therefore, it is further necessary to detect whether the primary user data partition is loaded successfully.
In a preferred embodiment of the present invention, the step of determining whether the active user data partition is successfully loaded includes:
acquiring mounting information of the system;
judging whether the main user data partition is loaded on a mounting path of a user data partition or not based on mounting information of the system;
if yes, judging that the loading of the main user data partition is successful; otherwise, judging that the loading of the main user data partition fails.
proc a virtual file system/proc file system is a mechanism (so called/proc) by which the kernel and kernel module send information to a process (process). This pseudo file system allows the user to interact with the kernel internal data structure, obtain useful information about the process, and change settings (by changing kernel parameters) on the fly (ontafly). Unlike other file systems,/proc resides in memory rather than on a hard disk.
The/proc is controlled by the kernel, and no device for carrying/proc exists. Since/proc primarily stores state information controlled by the kernel, most of the logical location of this information is in the kernel-controlled memory. Performing 'ls-l' once on/proc can see that most files are 0 bytes large; but some information is indeed visible when viewing these files. This is because the/proc file system registers itself with the virtual file system layer (VFS) as with other conventional file systems. However, until when the VFS calls it, requesting the i-node of the file, directory, the/proc file system does not build the corresponding file and directory from the information in the kernel.
View/proc files may be used to access information about the state of the kernel, the properties of the computer, the state of the running process, etc. Files and directories in most/proc provide up-to-date information of the physical environment of the system. Although the files in/proc are virtual, they can still be viewed using any file editor or program like 'more', 'less' or 'cat'.
The/proc file system may be used to gather useful information about the system and the running kernel. The following are some important documents: information of/proc/cpuinfo-CPU (model, family, cache size, etc.)/proc/meminfo-physical memory, swap space, etc./information of/proc/mounts-list of loaded file system/proc/devices-list of available devices/proc/files-supported file system/proc/modules-loaded module/proc/version-kernel version/proc/cmdline-kernel command line parameters input at startup of the system.
In the embodiment of the invention, at the last step of partition loading, mounting information of a system is read, wherein the mounting information is stored in a/proc/mounts path, and whether a main user data partition is mounted on the mounting path of the user data partition is judged, wherein the mounting path of the user data partition is/data, if yes, the main user data partition is normal, and if not, the main user data partition is damaged.
Step 207, if yes, entering a standby mode of the system;
and if the loading of the main user data partition is successful, entering a standby interface, and enabling the user to normally use the mobile terminal.
Step 208, if not, modifying the authority of the system partition into a readable and writable one;
if the loading of the main user data partition fails, the process returns to step 201 to reload the system partition, modify the authority of the system partition to be readable and writable, and then modify the starting partition to be the standby user data partition, otherwise, after the loading of the system partition is completed, the damaged main user data partition is continuously loaded, so that endless loop is performed, and the mobile terminal is infinitely restarted.
Step 209, set the loaded user data partition as a standby user data partition;
specifically, the record of the starting partition in the system partition is modified into the standby user data partition.
Step 2010, restarting the system.
In the embodiment of the invention, a system in a mobile terminal comprises a main user data partition, a standby user data partition and a system partition, when the system is started, whether a loaded user data partition is the main user data partition is judged, if not, the main user data partition is judged to have a fault, then the standby user data partition is loaded, the main user data partition is repaired according to a preset processing mode, finally, the system is started according to the repairing result, if the loaded user data partition is the main user data partition, whether the main user data partition is successfully loaded is judged, and if yes, the system is started; if not, the authority of the system partition is modified to be readable and writable, the loaded user data partition is set as a standby user data partition, and then the system is restarted. Therefore, the system can still be successfully started under the condition that the main user data partition is damaged, and the condition that the mobile terminal is infinitely restarted is avoided.
Meanwhile, the damaged main user data partition can be repaired, so that the user can normally use the mobile terminal without losing the damaged user data in the partition, the loss of the user data is reduced, and the user experience is improved.
Referring to fig. 3, a block diagram of an embodiment of a system boot apparatus according to the present invention is shown, where the system includes an active user data partition and a standby user data partition;
the device may specifically include the following modules:
a partition determining module 301, configured to determine whether the loaded user data partition is the primary user data partition when the system is started;
a first failure determining module 302, configured to determine that a failure exists in the primary user data partition;
a partition loading module 303, configured to load the spare user data partition;
a partition repair module 304, configured to repair the active user data partition according to a preset processing manner;
a standby module 305, configured to enter a standby mode of the system according to a result of the repair.
In a preferred embodiment of the present invention, the system further comprises a system partition; the device further comprises:
a second fault judgment module, configured to judge whether the loaded user data partition is a main user data partition;
the standby module is also used for entering a standby mode of the system;
the permission modification module is used for modifying the permission of the system partition into a readable and writable permission;
the partition setting module is used for setting the loaded user data partition as a standby user data partition;
a restart module to restart the system.
In a preferred embodiment of the present invention, the second failure determination module includes:
the mounting information acquisition submodule is used for acquiring mounting information of the system;
a mount path judgment submodule, configured to judge whether the primary user data partition is loaded on a mount path of a user data partition based on mount information of the system;
and the partition loading judgment submodule is used for judging that the loading of the main user data partition is successful or judging that the loading of the main user data partition is failed.
In a preferred embodiment of the present invention, the preset processing manner includes: modifying the loading mode of the main user data partition into a USB flash disk mode, or formatting the main user data partition, or having no operation on the main user data partition;
the device further comprises:
the display module is used for displaying the preset processing mode;
and the receiving module is used for receiving an operation instruction corresponding to the processing mode triggered by the user.
In a preferred embodiment of the present invention, the active user data partition and the standby user data partition are partitions containing user data, and the system partition is a partition containing system files.
The device provided by the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to fig. 2, and is not described herein again to avoid repetition.
In the embodiment of the invention, a system in a mobile terminal comprises a main user data partition and a standby user data partition, when the system is started, whether a loaded user data partition is the main user data partition is judged, if not, the main user data partition is judged to have a fault, then the standby user data partition is loaded, the main user data partition is repaired according to a preset processing mode, and finally the system is started according to a repaired result. Therefore, the system can still be successfully started under the condition that the main user data partition is damaged, and meanwhile, the damaged main user data partition can be repaired, so that the user can normally use the mobile terminal without losing the user data in the damaged partition, the loss of the user data is reduced, and the user experience is improved.
Figure 4 is a schematic diagram of a hardware configuration of a mobile terminal implementing various embodiments of the present invention,
the mobile terminal 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 4140, and power supply 411. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 4 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 410 is configured to, when the system is started, determine whether the loaded user data partition is the active user data partition;
if not, judging that the main user data partition has a fault;
loading the spare user data partition;
repairing the main user data partition according to a preset processing mode;
and entering a standby mode of the system according to the repairing result.
In the embodiment of the invention, a system in a mobile terminal comprises a main user data partition and a standby user data partition, when the system is started, whether a loaded user data partition is the main user data partition is judged, if not, the main user data partition is judged to have a fault, then the standby user data partition is loaded, the main user data partition is repaired according to a preset processing mode, and finally the system is started according to a repaired result. Therefore, the system can still be successfully started under the condition that the main user data partition is damaged, and meanwhile, the damaged main user data partition can be repaired, so that the user can normally use the mobile terminal without losing the user data in the damaged partition, the loss of the user data is reduced, and the user experience is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 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. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the mobile terminal 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The mobile terminal 400 also includes at least one sensor 405, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 4061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 4061 and/or the backlight when the mobile terminal 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command from the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 408 is an interface through which an external device is connected to the mobile terminal 400. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 400 or may be used to transmit data between the mobile terminal 400 and external devices.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby integrally monitoring the mobile terminal. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The mobile terminal 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the mobile terminal 400 includes some functional modules that are not shown, and thus, are not described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, which includes a processor 410, a memory 409, and a computer program that is stored in the memory 409 and can be run on the processor 410, and when being executed by the processor 410, the computer program implements each process of the above-mentioned system startup method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned method for system startup, and can achieve the same technical effect, and in order to avoid repetition, the detailed description is omitted here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A method for starting system is characterized in that the system comprises a main user data partition and a standby user data partition; the method comprises the following steps:
when the system is started, judging whether the loaded user data partition is the main user data partition;
if not, judging that the main user data partition has a fault; the preset processing mode comprises the following steps: modifying the loading mode of the main user data partition into a USB flash disk mode, or formatting the main user data partition, or having no operation on the main user data partition;
loading the spare user data partition;
repairing the main user data partition according to a preset processing mode;
entering a standby mode of the system according to the repairing result;
wherein the system further comprises a system partition; the method further comprises the following steps:
if the loaded user data partition is the main user data partition, judging whether the main user data partition is loaded successfully;
if yes, entering a standby mode of the system;
if not, modifying the authority of the system partition into a readable and writable one;
setting the loaded user data partition as a standby user data partition;
the system is restarted.
2. The method of claim 1, wherein the step of determining whether the active user data partition is successfully loaded comprises:
acquiring mounting information of the system;
judging whether the main user data partition is loaded on a mounting path of a user data partition or not based on mounting information of the system;
if yes, judging that the loading of the main user data partition is successful; otherwise, judging that the loading of the main user data partition fails.
3. The method according to claim 1, wherein before the step of repairing the active user data partition according to a preset processing manner, the method further comprises:
displaying the preset processing mode;
and receiving an operation instruction corresponding to the processing mode triggered by the user.
4. The method of claim 1, wherein the active user data partition and the standby user data partition are partitions containing user data, and the system partition is a partition containing system files.
5. A system startup device is characterized in that the system comprises a main user data partition and a standby user data partition; the device comprises:
a partition judging module, configured to judge whether the loaded user data partition is the primary user data partition when the system is started;
the first fault judgment module is used for judging that the main user data partition has a fault;
the partition loading module is used for loading the standby user data partition;
the partition repair module is used for repairing the main user data partition according to a preset processing mode; wherein, the preset processing mode comprises: modifying the loading mode of the main user data partition into a USB flash disk mode, or formatting the main user data partition, or having no operation on the main user data partition;
the standby module is used for entering a standby mode of the system according to a repairing result;
wherein the system further comprises a system partition; the device further comprises:
a second fault judgment module, configured to judge whether the loaded user data partition is a main user data partition;
the standby module is also used for entering a standby mode of the system;
the permission modification module is used for modifying the permission of the system partition into a readable and writable permission;
the partition setting module is used for setting the loaded user data partition as a standby user data partition;
a restart module to restart the system.
6. The apparatus of claim 5, wherein the second failure determination module comprises:
the mounting information acquisition submodule is used for acquiring mounting information of the system;
a mount path judgment submodule, configured to judge whether the primary user data partition is loaded on a mount path of a user data partition based on mount information of the system;
and the partition loading judgment submodule is used for judging that the loading of the main user data partition is successful or judging that the loading of the main user data partition is failed.
7. The apparatus of claim 5, further comprising:
the display module is used for displaying the preset processing mode;
and the receiving module is used for receiving an operation instruction corresponding to the processing mode triggered by the user.
8. The apparatus of claim 5, wherein the active user data partition and the standby user data partition are partitions containing user data, and the system partition is a partition containing system files.
9. A mobile terminal comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of a system initiated method as claimed in any one of claims 1 to 4.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of a system startup method according to any one of claims 1 to 4.
CN201710953186.6A 2017-10-13 2017-10-13 System starting method and device Active CN107766089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710953186.6A CN107766089B (en) 2017-10-13 2017-10-13 System starting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710953186.6A CN107766089B (en) 2017-10-13 2017-10-13 System starting method and device

Publications (2)

Publication Number Publication Date
CN107766089A CN107766089A (en) 2018-03-06
CN107766089B true CN107766089B (en) 2021-06-04

Family

ID=61269558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710953186.6A Active CN107766089B (en) 2017-10-13 2017-10-13 System starting method and device

Country Status (1)

Country Link
CN (1) CN107766089B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565896B (en) * 2019-09-10 2023-09-19 深圳Tcl数字技术有限公司 System repairing method, terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636217A (en) * 2013-11-14 2015-05-20 厦门雅迅网络股份有限公司 Root file system automatic backup and exception recovery method and partition structure
CN105701162A (en) * 2015-12-30 2016-06-22 青岛海信移动通信技术股份有限公司 User data partition management method of intelligent terminal and intelligent terminal
CN107066343A (en) * 2017-01-24 2017-08-18 广东欧珀移动通信有限公司 The restorative procedure of partition table, device and mobile terminal in mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9202059B2 (en) * 2011-03-01 2015-12-01 Apurva M. Bhansali Methods, systems, and apparatuses for managing a hard drive security system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636217A (en) * 2013-11-14 2015-05-20 厦门雅迅网络股份有限公司 Root file system automatic backup and exception recovery method and partition structure
CN105701162A (en) * 2015-12-30 2016-06-22 青岛海信移动通信技术股份有限公司 User data partition management method of intelligent terminal and intelligent terminal
CN107066343A (en) * 2017-01-24 2017-08-18 广东欧珀移动通信有限公司 The restorative procedure of partition table, device and mobile terminal in mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android ROM开发—ubuntu下编译CyanogenMod生成SDK;花郎;《https://www.cnblogs.com/loulijun/archive/2012/03/06/2381842.html》;20120316;正文第2页 *

Also Published As

Publication number Publication date
CN107766089A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
US20220276909A1 (en) Screen projection control method and electronic device
EP3073379B1 (en) Firmware recovery method, device and terminal
CN107273160A (en) A kind of method and device of edition upgrading
CN109964227B (en) Method and terminal for updating SELinux security policy
CN112055424B (en) Electronic device and method for switching electronic device
CN107168818B (en) Terminal and machine-refreshing failure recovery method
US11176228B2 (en) Application interface display method, apparatus, and terminal, and storage medium
US10802622B2 (en) Electronic device and method for controlling same
CN110837327B (en) Message viewing method and terminal
CN110764825B (en) Starting method and terminal equipment
CN107979851B (en) Abnormal data reporting method and device
CN108647160A (en) USB force downloads circuit, mobile terminal, method for down loading and data line
CN108228230A (en) Upgrade method, terminal and the computer readable storage medium of UFS firmwares
CN109101363A (en) Abnormal restoring method, device, smart machine and storage medium based on android system
CN109002547B (en) Log file storage method, mobile terminal and computer readable storage medium
CN108475181B (en) Electronic device and method for operating an electronic device
CN108037934B (en) Method and device for updating application program
CN111522575B (en) Application program upgrading method and electronic equipment
CN111124753A (en) Application program control method, electronic equipment and server
CN107766222B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN109788470B (en) Method, device and terminal for identifying eSIM card
CN107341032B (en) Data loading method, mobile terminal and computer readable storage medium
EP3129883B1 (en) Method and apparatus for repairing dynamic link library file
CN107832191B (en) Black screen detection method, mobile terminal and computer readable storage medium
CN109361807A (en) Information access control method, mobile terminal and computer readable storage medium

Legal Events

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