CN114138547A - System starting method and terminal - Google Patents

System starting method and terminal Download PDF

Info

Publication number
CN114138547A
CN114138547A CN202010923302.1A CN202010923302A CN114138547A CN 114138547 A CN114138547 A CN 114138547A CN 202010923302 A CN202010923302 A CN 202010923302A CN 114138547 A CN114138547 A CN 114138547A
Authority
CN
China
Prior art keywords
partition
terminal
memory card
external memory
portable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010923302.1A
Other languages
Chinese (zh)
Inventor
孙哲
张亚芹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN202010923302.1A priority Critical patent/CN114138547A/en
Publication of CN114138547A publication Critical patent/CN114138547A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating

Abstract

The invention discloses a system starting method and a terminal, which are used for starting and operating a portable system which is internally provided with an external memory card on the terminal. The method comprises the following steps: the method comprises the steps that a terminal monitors that an external memory card containing a portable system is inserted, a user restarts the system of the terminal after selecting to start the portable system, a system partition mounted under a local directory is replaced by a system partition of the external memory card in a mounting flow stage of the restart of the system of the terminal, and a portable system in the system partition is operated to execute an android starting stage of the start of the portable system; and the terminal interrupts the flow of the system mount data partition of the terminal at the android starting stage of the portable system starting, uses the equipment identification of the external memory card to mount the data partition, and continues to start the portable system.

Description

System starting method and terminal
Technical Field
The invention relates to the technical field of multiple systems, in particular to a system starting method and a terminal.
Background
With the development of multimedia technology, the storage space inside the terminal cannot meet the actual application requirements, and the storage space can be expanded through an external memory card. Most of the existing external memory cards store some file information, such as video files, picture files, txt files, and the like, and a terminal can solve the problem of limited terminal storage space by storing some relatively large files on a T card and accessing the files on the T card. In the prior art, starting a portable system on an external memory card cannot be realized.
Disclosure of Invention
The invention provides a system starting method and a terminal, which are used for starting and operating a portable system which is internally provided with an external memory card on the terminal.
In a first aspect, the present invention provides a method for system boot, the method comprising:
the method comprises the steps that a terminal monitors that an external memory card containing a portable system is inserted, a user restarts the system of the terminal after selecting to start the portable system, a system partition mounted under a local directory is replaced by a system partition of the external memory card in a mounting flow stage of the restart of the system of the terminal, and a portable system in the system partition is operated to execute an android starting stage of the start of the portable system;
and the terminal interrupts the flow of the system mount data partition of the terminal at the android starting stage of the portable system starting, uses the equipment identification of the external memory card to mount the data partition, and continues to start the portable system.
The portable system starting method provided by the invention mainly aims at the starting of the portable system of the external memory card of the terminal so that the terminal can use the portable system of the external memory card, since there is no portable system currently stored on an external memory card, and if the portable system is to be read, it needs to be read using a file system, namely, the system partition is required to be mounted, but no portable system exists in the current external memory card, so when the external memory card is inserted into the current local system of the terminal, the system partition in the device is not mounted, the portable system is not verified, only the reading operation without the file system is carried out, but the invention can mount the system partition and the data partition of the portable system, therefore, the portable system is started, the terminal uses the portable system on the external memory card, and the experience of the user in using the terminal is effectively improved.
In a possible implementation manner, the external memory card further includes a check partition; the method further comprises the following steps:
and in the kernel starting stage of the restart of the local system, the terminal checks the external memory card through the check partition, and enters the mounting process stage of the local system after the check is determined to be passed.
The embodiment of the invention provides a method for checking an external memory card, so that the portable system can be effectively prevented from being started after being maliciously tampered, and the safety of the portable system is improved.
In a possible implementation manner, after the terminal replaces the system partition mounted in the local directory with the system partition of the external memory card, the method further includes:
the terminal creates a preset link of a preset directory under the system partition directory;
the terminal operates the portable system in the system partition, and comprises:
and the terminal accesses and loads the data in the preset link in the process of operating the portable system in the system partition.
After the terminal in this embodiment replaces the system partition mounted in the local directory with the system partition of the external memory card, since the system partition of the external memory card is used, a key link of the key directory needs to be created in the system partition directory, so as to ensure that the portable system can be started normally.
In a possible implementation manner, the external memory card further includes a check partition;
before executing the process of interrupting the data partition mounted by the local system, the terminal further comprises:
and after the terminal determines that the original system version number in the verification partition is the same as the version number of the running portable system, the terminal enters a flow stage of interrupting the data mounting partition of the system of the terminal.
The invention also provides a method for continuously verifying the portable system in the process of starting the portable system, which can prevent the portable system of an unofficial version from running at the terminal according to the mode of verifying the version number of the portable system.
In a possible implementation manner, the method includes that a terminal monitors that an external memory card including a portable system is inserted, and a user restarts the system after selecting to start the portable system, and includes:
after the terminal is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and if the terminal receives an instruction of a user for selecting to start the portable system, restarting the system.
The embodiment also provides a method for determining whether to pop up and start the interface of the portable system according to the monitoring event inserted into the external memory card, thereby solving the problem that the external memory card of the terminal cannot be processed in the terminal starting process.
In a second aspect, the present invention provides a system-enabled terminal, comprising: a processor and an external interface, wherein:
the processor is configured to perform the following process:
monitoring that an external memory card containing a portable system is inserted through the external interface, restarting the local system after a user selects to start the portable system, replacing a system partition mounted under a local directory with a system partition of the external memory card at a mounting flow stage of the restart of the local system, and operating the portable system in the system partition to execute an android starting stage of the start of the portable system;
and in the android starting stage of starting the portable system, interrupting the flow of mounting the data partition of the system of the portable system, using the equipment identifier of the external memory card to mount the data partition, and continuing to start the portable system.
In a possible implementation manner, the external memory card further includes a check partition; the processor is further specifically configured to:
and in the restarting kernel starting stage of the local system, the external memory card is verified through the verification partition, and the external memory card enters the mounting process stage of the local system after the verification is determined to pass.
In one possible implementation, the processor is specifically further configured to:
creating a preset link of a preset directory under the system partition directory;
operating the portable system in the system partition, comprising:
and accessing and loading the data in the preset link in the process of operating the portable system in the system partition.
In a possible implementation manner, the external memory card further includes a check partition; the processor is further specifically configured to:
and entering a flow stage of interrupting the data mounting partition of the system after determining that the original system version number in the verification partition is the same as the version number of the running portable system.
In one possible implementation, the processor is specifically further configured to:
after the terminal is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and restarting the system after receiving an instruction of selecting to start the portable system by the user.
In a third aspect, the present invention provides a system startup device, comprising: replacing a system partition unit and mounting a data partition unit, wherein:
the system partition replacing unit is used for monitoring that an external memory card containing a portable system is inserted, restarting the system of the local machine after a user selects to start the portable system, replacing a system partition mounted under a local directory with a system partition of the external memory card at a mounting flow stage of the restart of the system of the local machine, and operating the portable system in the system partition to execute an android starting stage of the start of the portable system;
and the mounted data partition unit is used for interrupting the flow of the mounted data partition of the portable system at the android starting stage of starting the portable system, using the equipment identifier of the external memory card to identify the mounted data partition, and continuing to start the portable system.
In a possible implementation manner, the external memory card further includes a check partition; the apparatus further comprises a verification unit for:
and in the kernel starting stage of the restart of the local system, checking the external memory card through the checking partition, and entering the mounting process stage of the local system after the check is determined to be passed.
In a possible implementation manner, the replacement system partition unit is further specifically configured to:
creating a preset link of a preset directory under the system partition directory;
and accessing and loading the data in the preset link in the process of operating the portable system in the system partition.
In a possible implementation manner, the external memory card further includes a check partition; the mount data partition unit is further specifically configured to:
and entering a flow stage of interrupting the data mounting partition of the system after determining that the original system version number in the verification partition is the same as the version number of the running portable system.
In a possible implementation manner, the replacement system partition unit is further specifically configured to:
after the terminal is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and restarting the system after receiving an instruction of selecting to start the portable system by the user.
In a fourth aspect, the present invention provides a computer storage medium having stored thereon a computer program which, when executed by a processing unit, performs the steps of the method of the first aspect.
In addition, for technical effects brought by any one implementation manner of the second aspect to the fourth aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1A is a schematic diagram of a terminal into which an external memory card is inserted according to an embodiment of the present invention;
fig. 1B is a schematic diagram of a terminal into which an external memory card is inserted according to an embodiment of the present invention;
fig. 2 is a flowchart of a system booting method according to an embodiment of the present invention;
FIG. 3A is a diagram of an external memory card plug-in terminal according to an embodiment of the present invention;
FIG. 3B is a diagram of an external memory card plug-in terminal according to an embodiment of the present invention;
fig. 3C is a schematic diagram of a terminal for triggering a system restart process according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating an implementation of a terminal to verify a portable system according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating specific execution of a terminal to start a portable system according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating an embodiment of a method for starting a portable system according to the present invention;
fig. 7 is a schematic diagram of a system-initiated terminal according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a system boot apparatus according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a system-initiated terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. 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.
Some of the words that appear in the text are explained below:
1. the term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
2. The term "terminal", or "terminal device", in the embodiment of the present invention, is a device located at the outermost periphery of a network in a computer network, and can access a wireless local area network WLAN to perform input of user information and output of processing results, and includes a desktop computer, a mobile phone, a notebook, a tablet computer, a POS machine, and a vehicle-mounted computer.
The application scenario described in the embodiment of the present invention is for more clearly illustrating the technical solution of the embodiment of the present invention, and does not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems. In the description of the present invention, the term "plurality" means two or more unless otherwise specified.
Example one
In the embodiment of the invention, the portable system is stored on the external memory card of the terminal, and the portable system can be started by replacing a system partition mounted under a local directory and a mode of using a device identifier of the external memory card to mount a data partition in the restarting process of the local system by the terminal. The external memory card in the embodiment of the present invention may be, but is not limited to, an SD card, a T card, and the like, and the portable system in the embodiment of the present invention is an operating system, and may be, but is not limited to, an android system. Among them, the T card, i.e., the TF card, is a kind of flash memory card.
As shown in fig. 1A and fig. 1B, schematic diagrams of a terminal into which an external memory card is inserted according to an embodiment of the present invention are shown, where the external memory card is a T card.
The invention provides a method for starting a portable system of an external memory card, which is characterized in that the portable system is started by replacing a local system partition mounting mode and a data partition mounting mode in a local system starting process of a terminal.
In the embodiment of the invention, the starting process of the portable system is completed in the execution process of the starting process of the android system, so the starting process of the android system is simply introduced at first.
The android system is divided into four layers from top to bottom: the system comprises an application layer, an application program framework layer, a system operation library layer and a linux kernel layer; the Linux kernel provides memory management, process management, network protocols and various drivers (such as a display driver, a camera driver, a Bluetooth driver and the like) for the android system; the system operation library layer is used for starting the system operation library layer and comprises a C/C + + library and an android runtime; the application framework layer provides various components and services for the development of the application layer; the application layer is mainly written by java programs, contains various resource files and can interact with users.
The starting process of the whole Android system can be generally divided into three stages, which are respectively: a Boot Loader Boot stage of a system Boot Loader; a linux Kernel starting stage, namely a Kernel starting stage; and starting an Android system, namely, at a starting stage of ramdisk. The Boot Loader can be understood as preparation for an operating system before starting, and is used for initializing hardware equipment, establishing a mapping image of a memory space, preparing an environment for finally calling a system kernel, and transmitting necessary data to the kernel; the Linux kernel is started mainly for completing initialization of the Linux kernel and performing system setting; after initialization of the Linux kernel is completed, the Android system can be loaded, and the init process can be started firstly when the Android system is loaded; the init process is the first process of a user space in the Android system, the process number is 1, the init process is a key process in starting of the Android system, and the init process is simply summarized as follows:
(1) a directory of files required to start the system is created and mounted.
(2) The attribute service is initialized and started. The attribute service here, like the registry manager in the Windows operating system, is used to record some information of users, software, etc.
(3) Rc profile is parsed and incubator zygate process is started.
The Zygote process starts a key service System Server which is mainly used for creating an application program process and creating and starting a System; system Server process initiation is used primarily to create System services. The final step in the system launch is the launch Launcher, which is used to launch the application and to display and manage the shortcut icons or other desktop components of the application.
In addition, the ROM in the Android system is divided into different areas for placing different programs, and the ROM in the Android system is mainly divided into the following partitions:
root/boot: storing a bootstrap program, including a kernel and a memory operating program;
system: storing an Android system and system applications;
repetition: recovering the partition, wherein the system can be recovered by entering the partition;
data: a user data area containing user data: contact person, short message, setting, user installation program;
c/cache: the android system cache region is used for storing data and application programs which are accessed most frequently by the system;
cndot/misc: including some miscellaneous content such as system settings and system function enablement disable settings;
sdcard: the user's own storage area can deposit files such as photos, music, videos.
When the computer is started and powered on, the Bootloader is loaded firstly, reads the ROM back to find the operating system, and loads the Linux kernel into the RAM. When the Linux kernel is started, a driver is loaded to mount a root file system, wherein mounting refers to a process of making computer files and directories on a storage device (such as a hard disk, a CD-ROM or a shared resource) accessible to a user through the file system of the computer by an operating system.
As shown in fig. 2, an embodiment of the present invention provides a method for starting a system, which can start a portable system in an external memory card during a restart of a terminal system, and a specific implementation flow of the method is as follows:
200, monitoring that an external memory card containing a portable system is inserted by a terminal, restarting a local system after a user selects to start the portable system, replacing a system partition mounted under a local directory with a system partition of the external memory card at a mounting flow stage of restarting the local system, and operating the portable system in the system partition to execute an android starting stage of starting the portable system;
in the implementation, interrupt processing can be added after the system partition of the local computer is mounted in the mounting process stage of the local computer system, the system partition mounted under the local computer directory is replaced by the system partition of the external memory card, and after the system partition is currently operated, the terminal is actually operated as a portable system.
As an optional implementation manner, the terminal monitors that an external memory card including a portable system is inserted, and a user restarts the local system after selecting to start the portable system, including:
after the terminal is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and the terminal restarts the system after receiving an instruction of starting the portable system selected by the user.
In implementation, as shown in fig. 3A and 3B, after the terminal is powered on, after the external memory card is determined to be inserted into the terminal, an interface for starting the portable system is popped up, and as shown in fig. 3C, if the user clicks to start the portable system, a system restart process is triggered to start the portable system. It should be noted that, the local system starts to be started after the terminal is powered on, a monitoring event is registered in a kernel starting stage of the local system starting, and is used for monitoring whether the external memory card is inserted into the terminal, and after the external memory card is determined to be inserted into the terminal according to a monitoring result, an interface whether the portable system is started or not is popped up. The monitoring event in the embodiment can solve the problem that the external memory card of the terminal cannot be processed in the terminal starting process.
As an optional implementation manner, after the terminal replaces the system partition mounted in the local directory with the system partition of the external memory card, the method further includes: and the terminal creates a preset link of a preset directory under the system partition directory.
In practice, creating some key links, such as a/product directory, that point to key directories under a system directory requires pointing to the/system/product directory, such as a mount-o bind/system/product/product.
As an optional implementation, the terminal runs a portable system in the system partition, and includes:
and the terminal accesses and loads the data in the preset link in the process of operating the portable system in the system partition.
And step 201, the terminal interrupts the flow of the system mount data partition of the terminal at the android startup stage of the portable system startup, uses the device identifier of the external memory card to mount the data partition, and continues to start the portable system.
It should be noted that, in this embodiment, the starting process of the terminal to the portable system is performed in the process of restarting the terminal, and the terminal is a system restart process triggered after receiving an instruction to start the portable system. In the process of restarting the system, the local system can check the data in the system partition by using the vbmeta check data in one protection partition, and when the check values are consistent, a normal system starting process is carried out, so that the local system of one terminal can only identify one system, if a plurality of systems are to be identified, a plurality of vbmeta check data are required to be built in, and a plurality of system partitions are prepared, so that switching between the two systems can be realized.
In order to solve the above problem, in the process of restarting the system of the terminal according to the embodiment of the present invention, in order to not destroy the verification of the local system partition of the terminal, in a kernel start stage of the process of restarting the local system, the local system normally executes the verification of the local system partition, and after the verification of the local system partition is successful, in a mount flow stage of the local system, the system partition mounted under the local directory is replaced with the system partition of the external memory card, and the portable system in the system partition is operated.
As an alternative embodiment, the program file of the portable system does not include content related to drivers or hardware. This allows the portable system to start and operate on either terminal.
It should be noted that, in this embodiment, the start-up process executed after the data partition is mounted is the same as that in the prior art, and since the start-up process of the portable system in the embodiment of the present invention is based on the start-up process of the local system, the start-up process has universality, and any terminal equipped with an android system can use the portable system in the external memory card in the present invention. One interrupt processing is used for replacing a system partition mounted under a local directory with a system partition of an external memory card at the stage of the mounting process of the local system, the other interrupt processing is used for interrupting the process of mounting a data partition of the local system, the data partition is mounted by using equipment identification of the external memory card, and after the two interrupt processing is executed, the system started by the local system is actually a portable system.
It should be noted that, in this embodiment, the process of mounting the data partition by the native system needs to be interrupted first, and since the native system needs to use the configuration file when mounting the data partition, and the configuration file is stored in the vendor partition, and since the configuration file in the vendor partition has high coupling with the driver and the hardware, in this embodiment, data in the vendor partition is not replaced, and then, if the process of mounting the data partition by the native system is normally executed, the read configuration file is user data in the data partition of the native system, and is not a data partition of the external memory card.
Therefore, the terminal of this embodiment interrupts the flow of mounting the data partition of the local system, and uses the device identifier of the external memory card to mount the data partition, thereby completing the replacement of the data partition, and reading the user data in the data partition of the external memory card.
Optionally, the external memory card in this embodiment at least includes: system partitions and data partitions.
As an optional implementation manner, the external memory card further includes a verification partition. Optionally, the check partition includes a first check partition and a second check partition.
In the kernel start stage of the local system, the terminal checks the external memory card through the check partition, and enters the mount flow stage of the local system after the check is confirmed to be passed.
It should be noted that, in this embodiment, before the portable system is started, the portable system may be checked to verify whether the portable system is an official version and whether the portable system is tampered, so as to improve the security of the terminal in operating the portable system.
The portable system in the embodiment of the invention is a general system, and comprises the following four partitions:
1) the system partition is used for storing system files, which can be understood as storing files of a portable system, system application and the like; optionally, the system partition in the invention does not contain data strongly related to the drive or hardware, so the portable system of the external memory card in the invention has universality.
2) And the data partition is used for storing the data of the user, such as: contact person, short message, setting, user installation program;
3) the first check subarea stores the information of the subarea table; the first check partition has no file system and can not be mounted, and a terminal can directly read the first check partition;
optionally, the first check partition further includes an original system version number.
4) The second check partition is used for storing a system check file; the second check partition is provided with a file system and can be read only by the terminal after mounting.
The external memory card in the embodiment of the invention can burn the data or files of the four partitions into the external memory card through the burning tool, and because the system partition in the invention is burnt with the system file which only contains the files of the portable system and the system application and does not contain the contents related to the drive or the hardware (can be understood as not containing the private file of a manufacturer), the portable system in the embodiment has universality, and the portable system does not have strong related contents with equipment and does not have high coupling.
As shown in fig. 4, an embodiment of the present invention provides a method for verifying a portable system of an external memory card, which can verify the portable system in the external memory card during a restart process of a terminal system, so that a terminal can start the portable system after the verification is passed, and a specific implementation flow of the method is as follows:
step 400, a terminal monitors that an external memory card containing a portable system is inserted, a user restarts the system of the terminal after selecting to start the portable system, and each partition of the external memory card is read in a kernel starting stage of restarting the system of the terminal, wherein the external memory card comprises a system partition, a data partition, a first verification partition and a second verification partition;
step 401, the terminal performs first verification on each partition information of the external memory card according to partition table information stored in a first verification partition;
optionally, the partition information in this embodiment includes, but is not limited to: partition size, starting location of the partition, partition name, etc. That is, the first check in this embodiment is used to check whether the partition information is corrupted, for example, whether the size of each partition is modified.
In implementation, the terminal compares whether each piece of partition information of the external memory card is consistent with each piece of partition information in the partition table information according to the partition table information stored in the first check partition, for example, whether the size of each partition of the external memory card is consistent with the size of each partition in the partition table information, whether the name of each partition of the external memory card is consistent with the name of each partition in the partition table information, whether the initial position of each partition of the external memory card is consistent with the initial position of each partition in the partition table information, and if the initial positions of the partitions of the external memory card are consistent with the initial positions of each partition in the partition table information, it is determined that each piece of partition information is not modified and verified to pass the verification.
For example, the partition table information includes partitions starting from a location of 0x0000 to a location of 0x0300, where every 92 bits length represents a size of one partition, a first 92 bits represents a size of a system partition, a second 92 bits represents a size of a data partition, a third 92 bits represents a size of a first check partition, and a fourth 92 bits represents a size of a second check partition.
As an optional implementation manner, in this embodiment, the process of performing the first verification on the partition information of the external memory card is completed in a kernel start stage of a system restart process.
Step 402, after the first check is passed, the terminal performs a second check on the system partition of the external memory card according to the system check file stored in the second check partition, and if the second check is passed, the portable system is started.
It should be noted that, in this embodiment, the process of performing the second check on the system partition of the external memory card is performed at the stage of the mount flow of the native system startup.
Optionally, this embodiment provides a way of performing a second check on the system partition:
the terminal creates a temporary directory at the stage of a mounting process of the system starting of the terminal, mounts the second check partition to the temporary directory, and reads a system check file stored in the second check partition;
and the terminal determines a check value of the data in the system partition according to a preset check algorithm, compares whether a check code stored in the system check file is consistent with the check value or not, and determines that the second check is passed if the check code is consistent with the check value.
Optionally, the preset check algorithm in this embodiment may be, but is not limited to, hash check.
In this embodiment, the preset verification algorithm used by the terminal may be obtained in the system partition of the external memory card, or may also be obtained in the data partition, the first verification partition, or the second verification partition of the external memory card, which is not limited in this embodiment. Optionally, the external memory card in this embodiment further includes an additional partition for storing required data or a preset verification algorithm. Specifically, if the preset algorithm is hash check, the terminal may read a check value (e.g., hash value) in a system check file at a mount process stage of the system start, perform check (e.g., hash check) on data in the system partition by using the check value (e.g., hash value), and start the portable system if the check passes.
It should be noted that, in this embodiment, the verification process of the terminal on the portable system is performed during the restart process of the terminal, and the terminal is a system restart process triggered after receiving an instruction to start the portable system. In the process of restarting the system, the local system can check the data in the system partition by using the vbmeta check data in one protection partition, and when the check values are consistent, a normal system starting process is carried out, so that the local system of one terminal can only identify one system, if a plurality of systems are to be identified, a plurality of vbmeta check data are required to be built in, and a plurality of system partitions are prepared, so that switching between the two systems can be realized.
In order to solve the above problems, in the process of restarting the system, in order to not destroy the verification of the local system partition of the terminal, in the kernel starting stage of the restart process of the local system, the local system normally executes the verification of the local system partition, and after the verification of the local system partition is successful, the portable system starts to be verified, that is, each partition of the external memory card can be read; or, in a kernel starting stage of a system restarting process, the local system normally executes the verification of the local system partition, meanwhile, reads each partition of the external memory card, after the local system partition is successfully verified and the first verification passes, the terminal performs second verification on the system partition of the external device according to a system verification file stored in the second verification partition, and if the second verification passes, the portable system is started.
Optionally, in a kernel starting stage of starting the local system, after the local system successfully performs verification on the local system partition, reading each partition of the external memory card, and performing first verification on each partition information of the external device according to partition table information stored in a first verification partition; or the like, or, alternatively,
in a kernel starting stage of starting a local system, the local system executes the check of a local system partition, reads each partition of an external storage card, performs first check on the partition information of the external device according to partition table information stored in a first check partition, if the local system partition is successfully checked and the first check passes, the terminal performs second check on the system partition of the external device according to a system check file stored in a second check partition, and if the second check passes, the portable system is started.
It should be noted that, this embodiment also provides a way of checking the system version number, in the android startup stage of the portable system startup, the currently running system version number is checked, and the startup process is continuously executed after the check is determined to pass.
As an optional implementation manner, before executing the process of interrupting the data partition mounted by the local system, the terminal further includes:
and after the terminal determines that the original system version number in the verification partition is the same as the version number of the running portable system, the terminal enters a flow stage of interrupting the data mounting partition of the system of the terminal.
As an optional implementation manner, this embodiment further provides a verification method, including:
and in an android starting stage of starting the portable system, the terminal determines that the original system version number in the verification partition is the same as the version number of the running portable system, and then the verification is passed.
As an optional implementation manner, if the first check fails, the current native startup process is interrupted, and the system is restarted to return to the native system; or the like, or, alternatively,
if the second check fails, interrupting the current local starting process, and restarting the system to return to the local system; or the like, or, alternatively,
if the version number of the portable system in the system partition is verified according to the original system version number in the first verification partition and the verification fails, the current local starting process is interrupted, and the system is restarted and returned to the local system.
It should be noted that, in the embodiment of the present invention, the portable system may be verified in two different verification manners, and the portable system may also be verified in combination with a third verification manner after the two verification manners pass, where the external memory card is subjected to the first verification, that is, the information of each partition is verified, so that the portable system is not started after the size of each partition is adjusted, and the portable system is considered as not an official version and is automatically modified; the external memory card is checked for the second time, namely the system partition is checked, so that the portable system cannot be started after the data in the system partition is replaced, and the integrity of the system partition is ensured; the version number of the portable system of the external memory card is verified, so that the portable system cannot be started when the system version number or the system version number is not the official version number, and the portable system is prevented from being started when a user burns the portable system of the unofficial version in the external memory card.
It should be noted that, the process of checking the version number of the portable system by the terminal is performed in an android startup phase of starting the portable system.
The present embodiment may also start the portable system after the second check-up passes.
It should be noted that, in this embodiment, the start-up process executed after the data partition is mounted is the same as that in the prior art, and since the start-up process of the portable system in the embodiment of the present invention is based on the start-up process of the local system, the start-up process is universal, and any terminal equipped with an android system can use the portable system in the external memory card of the present invention. One interrupt processing is used for replacing a system partition mounted under a local directory with a system partition of an external memory card at the stage of the mounting process of the local system, the other interrupt processing is used for interrupting the process of mounting a data partition of the local system, the data partition is mounted by using equipment identification of the external memory card, and after the two interrupt processing is executed, the system started by the local system is actually a portable system.
The embodiment further provides a method for starting the portable system, which is used for the terminal to check the portable system after receiving an instruction for starting the portable system, and start the portable system after the check is passed, so that the use of the portable system in the external memory card is realized, and the terminal can realize the use of a plurality of operating systems.
As an optional implementation manner, in an android startup stage of starting the portable system, the version number of the portable system in the system partition is checked according to the original system version number in the first check partition, where a specific checking manner includes any one of the following:
1) if the terminal does not acquire the original system version number and/or the version number of the portable system within the preset time, determining that the verification fails;
2) and the terminal encrypts the version number of the currently running portable system according to the encryption algorithm of the currently running portable system to obtain the version number of the encrypted system, and if the original system version number is the same as the version number of the encrypted system, the terminal determines that the verification is passed.
In the verification mode, in an android startup stage of starting the portable system, the portable system sends the version number of the portable system recorded in the system to the driver for verification (the driver is notified in a node writing mode):
one mode is that the driver does not acquire the version number of the portable system within preset time and/or determines that the verification fails if the version number of the original system in the first verification partition is not acquired;
the other mode is that if the driver obtains the version number of the portable system and the version number of the original system within the preset time, the version number of the portable system is compared with the version number of the original system, if the version numbers of the portable system and the version number of the original system are consistent, the portable system passes the verification, otherwise, the current local starting process is interrupted, and the system is restarted and returns to the local system.
It should be noted that, in this embodiment, the process of checking the version number of the portable system by the terminal is executed after the device identifier of the external memory card is used to mount the data partition in the android startup phase of the portable system; in practice, the version number of the portable system in this embodiment is the version number encrypted according to the preset algorithm.
As shown in fig. 5, the specific execution flow for the terminal to start the portable system is as follows:
step 500, after the portable system passes the verification, in the mounting process stage of the local system, the terminal replaces the system partition mounted in the local directory with the system partition of the external memory card;
for example, the replaced local directory is mount-t ext4/dev/block/mmcblk1p1/system, where mount is a command to perform a mount operation, i.e., a mount command is used to replace a system partition, -t ext4 indicates that the file system of the external memory card is in an ext4 format, dev/block/mmcblk1p1 is a device name of the external memory card (i.e., a device name corresponding to the portable system), and system is a system partition of the external memory card (i.e., a system partition to be replaced).
Step 501, the terminal creates a preset link of a preset directory under the system partition directory.
In practice, creating some key links, such as a/product directory, that point to key directories under a system directory requires pointing to the/system/product directory, such as a mount-o bind/system/product/product.
Step 502, the terminal runs the portable system in the system partition to execute an android starting stage of starting the portable system;
it is easy to understand that, since the terminal replaces the system partition mounted under the local directory with the system partition of the external memory card, the current system partition in which the local system operates is actually a portable system in the external memory card.
Step 503, the terminal interrupts the flow of the local system mounting data partition at the android starting stage of the portable system starting;
step 504, the terminal uses the device identifier of the external memory card to mount the data partition;
after the terminal runs the portable system in the system partition, the currently started portable system is the portable system in the external memory card, so that the version number of the currently running portable system can be checked in the process of starting the portable system. However, before checking the version number of the portable system, the process of mounting the data partition by the native system needs to be interrupted, since the native system needs to use a configuration file when mounting the data partition, and the configuration file is stored in the vendor partition, and since the configuration file in the vendor partition has high coupling with the driver and the hardware, in this embodiment, data in the vendor partition is not replaced, and then, if the process of mounting the data partition by the native system is normally executed, the read configuration file is user data in the data partition of the native system, and is not a data partition of an external memory card.
Therefore, the terminal of this embodiment interrupts the flow of mounting the data partition of the local system, and uses the device identifier of the external memory card to mount the data partition, thereby completing the replacement of the data partition, and reading the user data in the data partition of the external memory card.
505, the terminal decrypts the data partition according to the existing method and notifies the driver in a node writing manner after the data partition is decrypted successfully, and the written node content may be the version number of the currently running portable system encrypted according to the encryption algorithm of the currently running portable system to obtain the version number of the encrypted system;
step 506, after the driver receives the version number of the encryption system, comparing whether the version number of the original system is consistent with the version number of the encryption system; if yes, go to step 507, otherwise go to step 508;
step 507, continuing to start the portable system;
and step 508, interrupting the starting of the portable system, and restarting the system to return to the local system.
As shown in fig. 6, this embodiment further provides a method for starting a portable system, and the specific implementation flow is as follows:
step 600, starting up and powering on the terminal;
601, according to a monitoring event for inserting the external memory card, popping up an interface whether to start the portable system or not after the external memory card is inserted into the terminal;
step 602, receiving an instruction for starting the portable system, and restarting the system;
step 603, reading each partition of an external storage card in a kernel starting stage of the system restart of the local computer, wherein the external storage card comprises a system partition, a data partition, a first check partition and a second check partition;
step 604, performing first verification on each partition information of the external memory card according to the partition table information stored in the first verification partition;
step 605, judging whether the first check is passed, if so, executing step 606, otherwise, executing step 615;
step 606, creating a temporary directory at the stage of the mounting process started by the native system, and mounting the second check-up partition on the temporary directory;
step 607, reading the system check file stored in the second check partition, and the terminal determining the check value of the data in the system partition according to a preset check algorithm;
step 608, comparing whether the check code stored in the system check file is consistent with the check value, if so, executing step 609, otherwise, executing step 615;
step 609, in the mounting process stage of the local system, replacing the system partition mounted in the local directory with the system partition of the external memory card, and operating the portable android starting stage in the system partition to execute the portable system starting;
step 610, the terminal interrupts the flow of the local system mounting data partition in the android starting stage of the portable system starting, and uses the device identification of the external memory card to mount the data partition;
611, carrying out decryption operation on the data partition according to a preset mode;
the preset mode is the same as the encryption and decryption operation of the data partition in the prior art;
step 612, after the decryption is successful, verifying the version number of the portable system in the system partition according to the original system version number in the first verification partition;
step 613, judging whether the verification is passed, if the verification is passed, executing step 614, otherwise executing step 615;
optionally, if the terminal does not acquire the original system version number and/or the version number of the portable system within a preset time, determining that the verification fails; or the like, or, alternatively,
and the terminal encrypts the version number of the currently running portable system according to the encryption algorithm of the currently running portable system to obtain the version number of the encrypted system, and if the version number of the original system is the same as the version number of the encrypted system, the terminal determines that the verification is passed, namely, the terminal compares whether the version number of the original system is consistent with the version number of the encrypted system.
Step 614, the portable system continues to be started.
And step 615, interrupting the starting of the portable system, and restarting the system to return to the local system.
Example two
Based on the same inventive concept, the embodiment of the present invention further provides a terminal for system startup, and since the terminal is the terminal in the method in the embodiment of the present invention, and the principle of the terminal to solve the problem is similar to that of the method, the implementation of the terminal may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 7, the terminal includes: a processor 700 and an external interface 701, wherein:
the processor is configured to perform the following process:
monitoring that an external memory card containing a portable system is inserted through the external interface, restarting the local system after a user selects to start the portable system, replacing a system partition mounted under a local directory with a system partition of the external memory card at a mounting flow stage of the restart of the local system, and operating the portable system in the system partition to execute an android starting stage of the start of the portable system;
and in the android starting stage of starting the portable system, interrupting the flow of mounting the data partition of the system of the portable system, using the equipment identifier of the external memory card to mount the data partition, and continuing to start the portable system.
In a possible implementation manner, the external memory card further includes a check partition; the processor 700 is further specifically configured to:
and in the kernel starting stage of the restart of the local system, checking the external memory card through the checking partition, and entering the mounting process stage of the local system after the check is determined to be passed.
In a possible implementation manner, the processor 700 is specifically further configured to:
creating a preset link of a preset directory under the system partition directory;
the processor 700 is specifically configured to:
and accessing and loading the data in the preset link in the process of operating the portable system in the system partition.
In a possible implementation manner, the external memory card further includes a check partition; the processor 700 is further specifically configured to:
and entering a flow stage of interrupting the data mounting partition of the system after determining that the original system version number in the verification partition is the same as the version number of the running portable system.
In a possible implementation manner, the processor 700 is specifically further configured to:
after the portable system is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and restarting the system after receiving an instruction of selecting to start the portable system by the user.
EXAMPLE III
Based on the same inventive concept, the embodiment of the present invention further provides a system startup device, and since the device is the device in the method in the embodiment of the present invention, and the principle of the device to solve the problem is similar to that of the method, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 8, the apparatus includes: replacement system partition unit 800, mount data partition unit 801, wherein:
the system partition replacing unit 800 is configured to monitor that an external memory card including a portable system is inserted, restart the local system after a user selects to start the portable system, replace a system partition mounted in a local directory with a system partition of the external memory card in a mounting process stage of the local system restart, and run the portable system in the system partition to execute an android startup stage of starting the portable system;
the mounted data partition unit 801 is configured to, in an android startup stage of the portable system startup, interrupt a flow of the mounted data partition of the local system, use a device identifier of an external memory card to mount the data partition, and continue to start the portable system.
In a possible implementation manner, the external memory card further includes a check partition; the apparatus further comprises a verification unit for:
and in the kernel starting stage of the restart of the local system, checking the external memory card through the checking partition, and entering the mounting process stage of the local system after the check is determined to be passed.
In a possible implementation manner, the replacement system partition unit 800 is further specifically configured to:
creating a preset link of a preset directory under the system partition directory;
the replacement system partition unit 800 is specifically configured to:
and accessing and loading the data in the preset link in the process of operating the portable system in the system partition.
In a possible implementation manner, the external memory card further includes a check partition; the mount data partition unit 801 is further specifically configured to:
and entering a flow stage of interrupting the data mounting partition of the system after determining that the original system version number in the verification partition is the same as the version number of the running portable system.
In a possible implementation manner, the replacement system partition unit 800 is further specifically configured to:
after the portable system is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and restarting the system after receiving an instruction of selecting to start the portable system by the user.
Example four
Based on the same inventive concept, the embodiment of the present invention further provides a system check terminal, and since the terminal is the terminal in the method in the embodiment of the present invention and the principle of the terminal to solve the problem is similar to that of the method, the implementation of the terminal may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 9, the terminal 900 includes: a Radio Frequency (RF) circuit 910, a power supply 920, a processor 930, a memory 940, an input unit 950, a display unit 960, a camera 970, a communication interface 980, and a Wireless Fidelity (Wi-Fi) module 990. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 9 is not intended to be limiting, and that the terminal provided by the embodiments of the present application may include more or less components than those shown, or some components may be combined, or a different arrangement of components may be provided.
The following describes the various components of the terminal 900 in detail with reference to fig. 9:
the RF circuit 910 may be used for receiving and transmitting data during a communication or conversation. In particular, the RF circuit 910 sends the downlink data of the base station to the processor 930 for processing; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 910 may also communicate with networks and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global system for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The Wi-Fi technology belongs to a short-distance wireless transmission technology, and the terminal 900 may connect to an Access Point (AP) through a Wi-Fi module 990, thereby implementing Access to a data network. The Wi-Fi module 990 may be used for receiving and transmitting data during communication.
The terminal 900 may be physically connected to other terminals via the communication interface 980. Optionally, the communication interface 980 is connected to the communication interfaces of the other terminals through cables, so as to implement data transmission between the terminal 900 and the other terminals.
In the embodiment of the present application, the terminal 900 can implement a communication service to send information to other contacts, so the terminal 900 needs to have a data transmission function, that is, the terminal 900 needs to include a communication module inside. Although fig. 9 illustrates communication modules such as the RF circuit 910, the Wi-Fi module 990, and the communication interface 980, it is to be understood that at least one of the above-described components or other communication modules (e.g., a bluetooth module) for enabling communication may be present in the terminal 900 for data transmission.
For example, when the terminal 900 is a mobile phone, the terminal 900 may include the RF circuit 910 and may further include the Wi-Fi module 990; when the terminal 900 is a computer, the terminal 900 can include the communication interface 980 and can also include the Wi-Fi module 990; when the terminal 900 is a tablet computer, the terminal 900 may include the Wi-Fi module.
The memory 940 may be used to store software programs and modules. The processor 930 executes various functional applications and data processing of the terminal 900 by executing the software programs and modules stored in the memory 940, and after the processor 930 executes the program codes in the memory 940, part or all of the processes in embodiment 1 of the present invention may be implemented.
Alternatively, the memory 940 may mainly include a program storage area and a data storage area. Wherein, the storage program area can store an operating system, various application programs and the like; the storage data area may store data created according to the use of the terminal, such as use duration information of an application, and the like.
Further, the memory 940 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 input unit 950 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal 900.
Alternatively, the input unit 950 may include a touch panel 951 and other input terminals 952.
The touch panel 951, also referred to as a touch screen, can collect touch operations of a user (for example, operations of a user on or near the touch panel 951 using any suitable object or accessory such as a finger or a stylus pen) and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 951 may include two parts, i.e., 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 it into touch point coordinates, and sends the touch point coordinates to the processor 930, and can receive and execute commands sent from the processor 930. In addition, the touch panel 951 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave.
Optionally, the other input terminals 952 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 960 may be used to display information input by a user or information provided to a user and various menus of the terminal 900. The display unit 960 is a display system of the terminal 900, and is configured to present an interface and implement human-computer interaction.
The display unit 960 may include a display panel 961. Alternatively, the Display panel 961 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting Diode (OLED), or the like.
Further, the touch panel 951 may cover the display panel 961, and when the touch panel 951 detects a touch operation on or near the touch panel 951, the touch panel 951 transmits the touch operation to the processor 930 to determine the type of the touch event, and then the processor 930 provides a corresponding visual output on the display panel 961 according to the type of the touch event.
Although in fig. 9, the touch panel 951 and the display panel 961 are two independent components to implement the input and output functions of the terminal 900, in some embodiments, the touch panel 951 and the display panel 961 may be integrated to implement the input and output functions of the terminal 900.
The processor 930 is a control center of the terminal 900, connects each component using various interfaces and lines, performs various functions of the terminal 900 and processes data by operating or executing software programs and/or modules stored in the memory 940 and calling data stored in the memory 940, thereby implementing various services based on the terminal.
Optionally, the processor 930 may include one or more processing units. Optionally, the processor 930 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 930.
The camera 970 is configured to implement a shooting function of the terminal 900 and shoot pictures or videos. The camera 970 can also be used for realizing the scanning function of the terminal 900 and scanning a scanning object (two-dimensional code/bar code).
The terminal 900 also includes a power supply 920 (e.g., a battery) for powering the various components. Optionally, the power supply 920 may be logically connected to the processor 930 through a power management system, so as to implement functions of managing charging, discharging, power consumption, and the like through the power management system.
It should be noted that, the processor 930 according to the embodiment of the present invention may execute the following steps:
monitoring that an external memory card containing a portable system is inserted, restarting the local system after a user selects to start the portable system, replacing a system partition mounted under a local directory with a system partition of the external memory card at a mounting flow stage of the restart of the local system, and operating the portable system in the system partition to execute an android starting stage of starting the portable system;
and in the android starting stage of starting the portable system, interrupting the flow of mounting the data partition of the system of the portable system, using the equipment identifier of the external memory card to mount the data partition, and continuing to start the portable system.
In a possible implementation manner, the external memory card further includes a check partition; the processor is further specifically configured to:
and in the kernel starting stage of the restart of the local system, checking the external memory card through the checking partition, and entering the mounting process stage of the local system after the check is determined to be passed.
In one possible implementation, the processor is specifically further configured to:
creating a preset link of a preset directory under the system partition directory;
the processor is specifically configured to:
and accessing and loading the data in the preset link in the process of operating the portable system in the system partition.
In a possible implementation manner, the external memory card further includes a check partition; the processor is further specifically configured to:
and entering a flow stage of interrupting the data mounting partition of the system after determining that the original system version number in the verification partition is the same as the version number of the running portable system.
In one possible implementation, the processor is specifically further configured to:
after the portable system is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and the terminal restarts the system after receiving an instruction of starting the portable system selected by the user.
An embodiment of the present invention further provides a computer-readable non-volatile storage medium, which includes program code, and when the program code runs on a computing terminal, the program code is configured to enable the computing terminal to execute the following steps:
monitoring that an external memory card containing a portable system is inserted, restarting the local system after a user selects to start the portable system, replacing a system partition mounted under a local directory with a system partition of the external memory card at a mounting flow stage of the restart of the local system, and operating the portable system in the system partition to execute an android starting stage of starting the portable system;
and in the android starting stage of starting the portable system, interrupting the flow of mounting the data partition of the system of the portable system, using the equipment identifier of the external memory card to mount the data partition, and continuing to start the portable system.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method for system boot, the method comprising:
the method comprises the steps that a terminal monitors that an external memory card containing a portable system is inserted, a user restarts the system of the terminal after selecting to start the portable system, a system partition mounted under a local directory is replaced by a system partition of the external memory card in a mounting flow stage of the restart of the system of the terminal, and a portable system in the system partition is operated to execute an android starting stage of the start of the portable system;
and the terminal interrupts the flow of the system mount data partition of the terminal at the android starting stage of the portable system starting, uses the equipment identification of the external memory card to mount the data partition, and continues to start the portable system.
2. The method of claim 1, wherein the external memory card further comprises a check partition; the method further comprises the following steps:
and in the kernel starting stage of the restart of the local system, the terminal checks the external memory card through the check partition, and enters the mounting process stage of the local system after the check is determined to be passed.
3. The method according to claim 1, wherein after the terminal replaces the system partition mounted in the local directory with the system partition of the external memory card, the method further comprises:
the terminal creates a preset link of a preset directory under the system partition directory;
the terminal operates the portable system in the system partition, and comprises:
and the terminal accesses and loads the data in the preset link in the process of operating the portable system in the system partition.
4. The method of claim 1, wherein the external memory card further comprises a check partition;
before executing the process of interrupting the data partition mounted by the local system, the terminal further comprises:
and after the terminal determines that the original system version number in the verification partition is the same as the version number of the running portable system, the terminal enters a flow stage of interrupting the data mounting partition of the system of the terminal.
5. The method according to any one of claims 1 to 4, wherein the terminal monitors that an external memory card including a portable system is inserted, and a user restarts the local system after selecting to start the portable system, comprising:
after the terminal is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and the terminal restarts the system after receiving an instruction of starting the portable system selected by the user.
6. A system-enabled terminal, comprising: a processor and an external interface, wherein:
the processor is configured to perform the following process:
monitoring that an external memory card containing a portable system is inserted through the external interface, restarting the local system after a user selects to start the portable system, replacing a system partition mounted under a local directory with a system partition of the external memory card at a mounting flow stage of the restart of the local system, and operating the portable system in the system partition to execute an android starting stage of the start of the portable system;
and in the android starting stage of starting the portable system, interrupting the flow of mounting the data partition of the system of the portable system, using the equipment identifier of the external memory card to mount the data partition, and continuing to start the portable system.
7. The terminal of claim 6, wherein the external memory card further comprises a verification partition; the processor is further specifically configured to:
and in the kernel starting stage of the restart of the local system, checking the external memory card through the checking partition, and entering the mounting process stage of the local system after the check is determined to be passed.
8. The terminal of claim 6, wherein the processor is further specifically configured to:
creating a preset link of a preset directory under the system partition directory;
the processor is specifically configured to:
and accessing and loading the data in the preset link in the process of operating the portable system in the system partition.
9. The terminal of claim 6, wherein the external memory card further comprises a verification partition; the processor is further specifically configured to:
and entering a flow stage of interrupting the data mounting partition of the system after determining that the original system version number in the verification partition is the same as the version number of the running portable system.
10. The terminal of any of claims 6 to 9, wherein the processor is specifically configured to:
after the portable system is powered on, according to a monitoring event for inserting the external memory card, whether an interface for starting the portable system is popped up after the external memory card containing the portable system is monitored to be inserted is determined;
and restarting the system after receiving an instruction of selecting to start the portable system by the user.
CN202010923302.1A 2020-09-04 2020-09-04 System starting method and terminal Pending CN114138547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010923302.1A CN114138547A (en) 2020-09-04 2020-09-04 System starting method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010923302.1A CN114138547A (en) 2020-09-04 2020-09-04 System starting method and terminal

Publications (1)

Publication Number Publication Date
CN114138547A true CN114138547A (en) 2022-03-04

Family

ID=80438698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010923302.1A Pending CN114138547A (en) 2020-09-04 2020-09-04 System starting method and terminal

Country Status (1)

Country Link
CN (1) CN114138547A (en)

Similar Documents

Publication Publication Date Title
EP3073379B1 (en) Firmware recovery method, device and terminal
US9367403B2 (en) Terminal and application restoring method
CN109964227B (en) Method and terminal for updating SELinux security policy
US10628588B2 (en) Information processing apparatus and computer readable storage medium
CN110869907B (en) Method and terminal for browsing application page
CN110457894B (en) root authority distribution method and device, storage medium and terminal equipment
CN110442426B (en) Password resetting method, device and storage medium
CN108090345B (en) Linux system external command execution method and device
CN108958807B (en) Terminal system starting method and terminal
US9928134B2 (en) Method and apparatus for repairing dynamic link library file
EP3499365A1 (en) Method and device for use in accessing container
US8621191B2 (en) Methods, apparatuses, and computer program products for providing a secure predefined boot sequence
CN112463199A (en) System upgrading method and terminal
CN115357295B (en) System rollback method, device and storage medium
CN114138547A (en) System starting method and terminal
CN113656148B (en) Container management method, device, electronic equipment and readable storage medium
CN114138344A (en) System checking method and terminal
CN110968852B (en) Virtual machine password management method, system, equipment and computer storage medium
CN113824830A (en) Application management method and device
KR20130120709A (en) Method for managing information for network connection and an electronic device thereof
CN108959955B (en) File processing method and device
CN114138343A (en) Terminal and terminal starting method
US10776490B1 (en) Verifying an operating system during a boot process using a loader
CN111444539A (en) Authority processing method and device, storage medium and terminal
CN110365756B (en) Access method, electronic device and computer 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