Method, device, mobile terminal and medium for restoring factory settings of mobile terminal

By setting the flag bits of factory mode and ordinary user mode on the mobile terminal and using memory space as virtual user storage space, the problem of long-term factory reset in the existing technology is solved, and the factory reset is restored by power outage efficient production process.

CN113505105BActive Publication Date: 2025-02-14HUIZHOU TCL CLOUD INTERNET CORP TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110699745.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2025-02-14
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

In the prior art, when the mobile terminal is restored to factory settings, formatting user partitioning operations takes a long time, affecting production efficiency.

Method used

Set the flag bits of factory mode and ordinary user mode on the mobile terminal in advance, and read the flag bit information when the system starts, initialize the file system after judging the mode, use the memory space as the virtual user storage space, and when the system is powered off, , the data in the virtual user storage space is automatically cleared.

Benefits of technology

It realizes that the factory reset is completed when the electronic product is powered off, significantly improving production efficiency and reducing the time for factory reset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113505105B_ABST
    Figure CN113505105B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, mobile terminal and medium for processing a mobile terminal to restore factory settings. The method includes: setting the flags of factory mode and ordinary user mode on the mobile terminal in advance, and saving the flags on the memory of the mobile terminal; reading the mode flag information from the memory when the mobile terminal system is started; when the flag information is judged to be factory mode, mapping the memory space to virtual user storage space when initializing the file system to store user data; when the mobile terminal is in factory mode and the system detects shutdown or power failure, the data in the virtual user storage space is automatically cleared. The present invention is applicable to the manufacturing process of electronic products. From the perspective of time consumption, it only needs to shut down the system or power off, which is greatly improved in efficiency compared with the several minutes to more than ten minutes required for ordinary factory restoration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mobile terminal production and manufacturing, and in particular to a method and device for restoring factory settings of a mobile terminal, a mobile terminal and a storage medium. Background Art

[0002] With the development of science and technology and the continuous improvement of people's living standards, the use of various mobile terminals such as mobile phones is becoming more and more popular, and mobile phones have become an indispensable communication tool in people's lives.

[0003] In the manufacturing process of existing mobile terminals such as mobile phones, the mobile phone needs to be tested. After the test, the factory settings function needs to be restored to restore the electronic product to the factory state. The main purpose of this operation is to erase the user's usage records and user data during the test and restore the system configuration to the factory default state.

[0004] In order to achieve factory reset, the current common practice is to format the user partition to erase all data generated by the user, such as data and configurations generated by applications, system configuration data, etc. This process clears the user data and the system restarts to load the system default configuration because no user data is found, thus achieving the purpose of restoring the factory settings.

[0005] From the above process, we can see that this process involves formatting the user partition, which is usually time-consuming. As the storage capacity continues to increase, this process usually takes several minutes to more than ten minutes. For factory batch production, each mobile phone needs to spend several minutes to more than ten minutes to restore the factory settings in order to clear the production test records before leaving the factory, which is time-consuming and laborious.

[0006] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0007] In order to reduce the time spent on restoring factory settings of electronic products before leaving the factory and improve production efficiency, the present invention provides a method and device for restoring factory settings of a mobile terminal, a mobile terminal and a storage medium, which can restore factory settings of electronic products when power is turned off, thereby greatly improving production efficiency.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:

[0009] A method for restoring factory settings of a mobile terminal, wherein the method comprises:

[0010] Pre-setting the factory mode and the common user mode flags on the mobile terminal, and saving the flags in the memory of the mobile terminal;

[0011] When the mobile terminal system starts, the mode flag information is read from the memory;

[0012] When the flag bit information is judged as factory mode, the memory space is mapped as virtual user storage space to store user data when the file system is initialized; when the flag bit information is judged as ordinary user mode, the user partition on the memory is mapped as user storage space to store user data when the file system is initialized;

[0013] When the mobile terminal is in factory mode and the system detects shutdown or power failure, the data in the virtual user storage space is automatically cleared.

[0014] The method for restoring the factory settings of a mobile terminal, wherein the step of presetting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal comprises:

[0015] Pre-set the factory mode and the common user mode on the mobile terminal;

[0016] The factory mode is set to use the memory space as a virtual user storage space, and all user data will be stored in the virtual user storage space;

[0017] The normal user mode is configured such that user data is stored in the memory.

[0018] The method for restoring the factory settings of a mobile terminal, wherein the step of pre-setting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal comprises:

[0019] The mobile terminal is pre-set to the factory mode by default before leaving the factory, and the flag of the default mode is set to the factory mode flag.

[0020] The method for restoring the factory settings of a mobile terminal, wherein the step of pre-setting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal comprises:

[0021] When the mobile terminal is burning or downloading system software, when the mobile terminal is set to factory mode, this flag bit is set to factory mode.

[0022] The method for restoring factory settings of a mobile terminal, wherein the step of reading mode flag information from a memory when the mobile terminal system is started includes:

[0023] Before leaving the factory, the system starts up and reads the mode flag information from the memory during the boot loader stage;

[0024] Determine whether the currently read mode flag information is factory mode or normal user mode.

[0025] The method for restoring the factory settings of a mobile terminal, wherein when the flag information is judged to be the factory mode, the memory space is mapped as the virtual user storage space when the file system is initialized, and the step of storing user data includes:

[0026] When the flag information is determined to be the factory mode, the memory space is mapped to the virtual user storage space when the file system is initialized, and all user data is stored in the virtual user storage space.

[0027] The method for restoring factory settings of a mobile terminal, wherein when the flag information is judged to be a normal user mode, the user partition on the memory is mapped as a user storage space when the file system is initialized, and the step of storing user data includes:

[0028] When the flag information is judged to be the normal user mode, the user partition on the memory is mapped as the user storage space when the file system is initialized;

[0029] Store all user data running in the current mode in the user storage space of the memory;

[0030] The step of automatically clearing data in the virtual user storage space when the system detects shutdown or power failure in the mobile terminal in the factory mode includes:

[0031] When the mobile terminal detects that the flag is a factory mode flag, when the mobile terminal detects shutdown or power failure in factory mode, the data in the virtual user storage space is automatically cleared.

[0032] A mobile terminal factory reset processing device, wherein the device comprises:

[0033] A presetting module, used to pre-set the flags of the factory mode and the ordinary user mode on the mobile terminal, and save the flags in the memory of the mobile terminal;

[0034] The startup reading module is used to control the mobile terminal system to read the mode flag information from the memory when starting;

[0035] The working mode control module is used to map the memory space to the virtual user storage space when initializing the file system to store user data when the flag information is judged to be the factory mode;

[0036] The normal mode control module is used to map the user partition on the memory as the user storage space to store user data when the flag information is judged to be the normal user mode when initializing the file system;

[0037] The factory settings automatic recovery module is used to automatically clear the data in the virtual user storage space when the system detects shutdown or power failure in the mobile terminal in factory mode.

[0038] A mobile terminal, wherein the mobile terminal includes a memory, a processor, and an image display program stored in the memory and executable on the processor, and when the processor executes the image display program, the steps of any one of the methods for restoring the factory settings of the mobile terminal are implemented.

[0039] A computer-readable storage medium, wherein an image display program is stored on the computer-readable storage medium, and when the image display program is executed by a processor, the steps of any one of the methods for restoring factory settings of a mobile terminal are implemented.

[0040] Beneficial effect: Compared with the prior art, the present invention provides a method for restoring factory settings of a mobile terminal. The present invention is only applicable to the production and manufacturing process of electronic products. An automatic factory reset mode (hereinafter referred to as factory mode) is set. When the electronic product is in this mode, the memory space is used as a virtual user space. Therefore, all user data will be stored in the virtual user space. Once the system is shut down or powered off, the data in the virtual space will be cleared to achieve the purpose of restoring factory settings. A factory reset implementation based on the Android system is invented. From the effect point of view, it is no different from the ordinary factory reset. From the time point of view, it only needs to shut down the system or power off. Compared with the ordinary factory reset that takes several to more than ten minutes, the efficiency is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 The present invention provides a flowchart of a method for restoring factory settings of a mobile terminal according to a specific implementation manner.

[0042] Figure 2 The present invention is a schematic diagram of a mobile terminal startup process according to a specific application example of the method for restoring factory settings of a mobile terminal provided in an embodiment of the present invention.

[0043] Figure 3 A principle block diagram of a mobile terminal factory setting restoration processing device provided by an embodiment of the present invention.

[0044] Figure 4 A schematic diagram of the internal structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0046] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0047] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0048] With the development of science and technology and the continuous improvement of people's living standards, the use of various mobile terminals such as mobile phones is becoming more and more popular, and mobile phones have become an indispensable communication tool in people's lives.

[0049] As we all know, almost all electronic products have a factory reset function, which is used to restore the electronic products to the factory state. The main purpose of this operation is to erase user usage records, user data, etc., and restore the system configuration to the factory default state.

[0050] In the manufacturing process of existing mobile terminals such as mobile phones, the mobile phone needs to be tested. After the test, the factory settings function needs to be restored to restore the electronic product to the factory state. The main purpose of this operation is to erase the user's usage records and user data during the test and restore the system configuration to the factory default state.

[0051] In order to achieve factory reset, the current common practice is to format the user partition to erase all data generated by the user, such as data and configurations generated by applications, system configuration data, etc. This process clears the user data and the system restarts to load the system default configuration because no user data is found, thus achieving the purpose of restoring the factory settings.

[0052] From the above process, we can see that this process involves formatting the user partition, which is usually time-consuming. As the storage capacity continues to increase, this process usually takes several minutes to more than ten minutes. For factory batch production, each mobile phone needs to spend several minutes to more than ten minutes to restore the factory settings in order to clear the production test records before leaving the factory, which is time-consuming and laborious.

[0053] In order to solve the above problems, an embodiment of the present invention provides a method for restoring factory settings of a mobile terminal. According to the method for restoring factory settings of a mobile terminal of this embodiment, it can automatically identify whether the current working mode of the mobile terminal is factory mode or ordinary user mode. When various usage tests of the mobile terminal before leaving the factory are set to factory mode by default; the automatic factory reset mode (hereinafter referred to as factory mode) is set. When the electronic product is in this mode, the memory space is used as a virtual user space. Therefore, all user data will be stored in the virtual user space. Once the system is shut down or powered off, the data in the virtual space will be cleared to achieve the purpose of restoring factory settings. The present invention can effectively solve the above problems and greatly improve production efficiency.

[0054] Exemplary Methods

[0055] First embodiment

[0056] like Figure 1 As shown in the embodiment of the present invention, a method for processing a mobile terminal to restore factory settings is provided, and the method for processing a mobile terminal to restore factory settings can be used in mobile devices such as mobile phones and tablet computers. In the embodiment of the present invention, the method comprises the following steps:

[0057] Step S100: pre-set the factory mode and common user mode flags on the mobile terminal, and save the flags in the memory of the mobile terminal;

[0058] In the embodiment of the present invention, the factory mode and the ordinary user mode need to be set in advance on the mobile terminal before specific implementation; wherein, the factory mode (also called the automatic factory reset mode in this embodiment) is set to use the memory space as a virtual user storage space, and all user data will be stored in the virtual user storage space; and the ordinary user mode is set to store user data in the memory. That is, in the embodiment of the present invention, the factory mode is set to use the memory space to store user data. The ordinary user mode uses the mobile terminal memory to store user data.

[0059] The present invention will set the factory mode and ordinary user mode flags on the mobile terminal in advance, and save the flags in the memory of the mobile terminal. In the embodiment of the present invention, when the working mode is set to the factory mode, the factory mode flag will be automatically displayed, which is convenient for the system to read and obtain the factory mode.

[0060] In a preferred embodiment, in order to facilitate various tests and debugging of the mobile terminal before leaving the factory, the mobile terminal is pre-set to the factory mode by default before leaving the factory, and the flag of the default mode is set to the factory mode flag.

[0061] In the embodiment of the present invention, when the mobile terminal is burning or downloading system software, when the mobile terminal is set to the factory mode, the flag bit is set to the factory mode.

[0062] In the embodiment of the present invention, the flags of the factory mode and the common user mode are set, and the flags are stored in the memory (Flash) of the electronic product.

[0063] 1.1. For example, when the electronic product mobile terminal is burning or downloading system software, or when you want to set it to factory mode, set the flag bit to factory mode;

[0064] 1.1. Before the electronic product mobile terminal leaves the factory, the flag is set to the normal user mode (reading and writing the Flash flag is simple and easy to operate, and the time consumption is almost negligible).

[0065] Step S200, reading mode flag information from the memory when the mobile terminal system is started;

[0066] In the embodiment of the present invention, when the mobile terminal system is started, the mode flag information is read from the memory.

[0067] For example, before leaving the factory, the system starts up and reads the mode flag information from the Flash memory during the boot loader stage;

[0068] Determine whether the currently read mode flag information is the factory mode or the ordinary user mode. When the factory mode flag information is identified, the current working mode is determined to be the factory mode. Otherwise, it is the ordinary user mode.

[0069] Among them, Boot Loader is a small program that runs before the operating system kernel runs. Through this small program, hardware devices can be initialized and a mapping of memory space can be established, so as to bring the system's hardware and software environment to a suitable state, so as to prepare the correct environment for the final call to the operating system kernel. Usually, Boot Loader is heavily dependent on hardware implementation, especially in the embedded world. Therefore, it is almost impossible to build a universal Boot Loader in the embedded world. Despite this, some general concepts of Boot Loader can still be summarized to guide the design and implementation of user-specific Boot Loader.

[0070] For example, when the mobile terminal system starts up, the boot loader stage reads the mode flag information from the Flash and passes it to the Android kernel. When the Android kernel initializes the file system, if the flag information is the factory mode flag, it determines that the current working mode is the factory mode.

[0071] Step S300: when the flag information is determined to be factory mode, the memory space is mapped as a virtual user storage space to store user data when the file system is initialized; when the flag information is determined to be ordinary user mode, the user partition on the memory is mapped as a user storage space to store user data when the file system is initialized;

[0072] In an embodiment of the present invention, when it is determined that the current flag information is factory mode, the memory space is mapped to the virtual user storage space when the file system is initialized to store user data. For example, when a mobile terminal needs to do various usage tests before leaving the factory, the embodiment of the present invention can be set to perform various usage tests in the factory mode. When it is determined that the flag information is factory mode, the memory space is mapped to the virtual user storage space when the file system is initialized, and all user data is stored in the virtual user storage space, so that the initial factory settings can be automatically restored after the usage test is completed.

[0073] Of course, the flag bit can also be used to determine the normal user mode. When the flag bit information is determined to be the normal user mode, the user partition on the memory is mapped as the user storage space when the file system is initialized; all user data running in the current mode is stored in the user storage space of the memory, so that the stored user data is retained even when the power is off.

[0074] The embodiment of the present invention can be set to normal user mode when it is judged that it is not factory mode. The use of a two-choice judgment method can save judgment steps. When the flag information is judged to be normal user mode, the user partition on the memory is mapped as user storage space when the file system is initialized to store user data.

[0075] Step S400: When the mobile terminal is in factory mode and the system detects shutdown or power failure, the data in the virtual user storage space is automatically cleared.

[0076] In the embodiment of the present invention, when the system detects that the mobile terminal is turned off or powered off in the factory mode, the step of automatically clearing the data in the virtual user storage space includes:

[0077] When the mobile terminal detects that the flag is the factory mode flag, it is considered that the current working mode of the mobile terminal is in the factory mode. When the flag of the mobile terminal in factory mode detects shutdown or power failure, the data in the virtual user storage space is automatically cleared.

[0078] Reference to specific application examples of the present invention Figure 2 As shown:

[0079] Android system boot process The Android system boot process of the mobile terminal:

[0080] Preloader Preloader - Enter - A small program that runs before the operating system kernel runs. Through this small program, you can initialize hardware devices and establish a memory space mapping map, so as to bring the system's hardware and software environment to a suitable state. In an embedded operating system, BootLoader runs before the operating system kernel runs. You can initialize hardware devices and establish a memory space mapping map, so as to bring the system's hardware and software environment to a suitable state, so as to prepare the correct environment for the final call to the operating system kernel. At this time, the working mode Readmode: factory mode factory mode, or normal mode normal mode-------kernel operating system kernel------File system (rootfs) init file (root) system initialization (rootfs--->Root File System When the system starts, Uinx needs to open up a special file system rootfs in the memory to help the real file system successfully mount.) For example, Mount RAM to user space installs ram to user space.

[0081] In the embodiment of the present invention, the system starts up and reads the mode flag information from the Flash at the boot loader stage and passes it to the Android kernel; when the Android kernel initializes the file system, if the flag information is factory mode, the memory space is mapped as the virtual user storage space; if it is in normal mode, the user partition on the Flash is mapped as the user storage space.

[0082] As can be seen from the above, the present invention sets an automatic factory reset mode (hereinafter referred to as factory mode). When the electronic product is in this mode, the memory space is used as a virtual user space. Therefore, all user data will be stored in the virtual user space. Once the system is shut down or powered off, the data in the virtual space will be cleared to achieve the purpose of restoring the factory settings.

[0083] The present invention provides an implementation of factory reset based on the Android system, which is suitable for the production and manufacturing process of electronic products. From the perspective of effect, the method is no different from the ordinary factory reset. From the perspective of time consumption, it only requires the system to be shut down or powered off, which greatly improves the efficiency compared to the ordinary factory reset which takes several minutes to more than ten minutes.

[0084] Exemplary Devices

[0085] like Figure 3 As shown in , an embodiment of the present invention provides a mobile terminal factory reset processing device, the device comprising:

[0086] The presetting module 610 is used to pre-set the flags of the factory mode and the ordinary user mode on the mobile terminal, and store the flags in the memory of the mobile terminal;

[0087] The startup reading module 620 is used to control the mobile terminal system to read the mode flag information from the memory when starting;

[0088] The working mode control module 630 is used to map the memory space as a virtual user storage space to store user data when the file system is initialized when the flag information is determined to be a factory mode;

[0089] The normal mode control module 640 is used to map the user partition on the memory as the user storage space to store user data when the flag information is determined to be the normal user mode when initializing the file system;

[0090] The factory setting automatic recovery module 650 is used to automatically clear the data in the virtual user storage space when the system detects that the mobile terminal is turned off or powered off in the factory mode, as described above.

[0091] Based on the above embodiments, the present invention further provides a terminal device, whose principle block diagram can be shown as follows: Figure 4 As shown. The terminal device includes a processor, a memory, a network interface, a display screen and a camera connected via a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a mobile terminal factory reset process is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen.

[0092] Those skilled in the art will understand that Figure 4 The principle block diagram is only a block diagram of a partial structure related to the solution of the present invention, and does not constitute a limitation on the terminal device to which the solution of the present invention is applied. The specific terminal device may include more or fewer components than those in the figure, or combine certain components or have a different component arrangement.

[0093] In one embodiment, a terminal device is provided, the terminal device comprising a memory, a processor, and a mobile terminal factory reset processing program stored on the processor and executable on the processor, the processing executing the following steps:

[0094] Pre-setting the factory mode and the common user mode flags on the mobile terminal, and saving the flags in the memory of the mobile terminal;

[0095] When the mobile terminal system starts, the mode flag information is read from the memory;

[0096] When the flag bit information is judged as factory mode, the memory space is mapped as virtual user storage space to store user data when the file system is initialized; when the flag bit information is judged as ordinary user mode, the user partition on the memory is mapped as user storage space to store user data when the file system is initialized;

[0097] When the mobile terminal is in factory mode and the system detects shutdown or power failure, the data in the virtual user storage space is automatically cleared.

[0098] The step of presetting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal includes:

[0099] Pre-set the factory mode and the common user mode on the mobile terminal;

[0100] The factory mode is set to use the memory space as a virtual user storage space, and all user data will be stored in the virtual user storage space;

[0101] The normal user mode is configured such that user data is stored in the memory.

[0102] The step of presetting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal includes:

[0103] The mobile terminal is pre-set to the factory mode by default before leaving the factory, and the flag of the default mode is set to the factory mode flag.

[0104] The step of presetting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal includes:

[0105] When the mobile terminal is burning or downloading system software, when the mobile terminal is set to factory mode, this flag bit is set to factory mode.

[0106] The step of reading the mode flag information from the memory when the mobile terminal system is started includes:

[0107] Before leaving the factory, the system starts up and reads the mode flag information from the memory during the boot loader stage;

[0108] Determine whether the currently read mode flag information is factory mode or normal user mode.

[0109] Wherein, when it is determined that the flag information is the factory mode, the memory space is mapped as the virtual user storage space when the file system is initialized, and the step of storing user data includes:

[0110] When the flag information is determined to be the factory mode, the memory space is mapped to the virtual user storage space when the file system is initialized, and all user data is stored in the virtual user storage space.

[0111] Wherein, when it is determined that the flag information is a normal user mode, the user partition on the memory is mapped as a user storage space when the file system is initialized, and the step of storing user data includes:

[0112] When the flag information is judged to be the normal user mode, the user partition on the memory is mapped as the user storage space when the file system is initialized;

[0113] Store all user data running in the current mode in the user storage space of the memory;

[0114] The step of automatically clearing data in the virtual user storage space when the system detects shutdown or power failure in the mobile terminal in the factory mode includes:

[0115] When the mobile terminal detects that the flag is a factory mode flag, when the mobile terminal detects shutdown or power failure in factory mode, the data in the virtual user storage space is automatically cleared.

[0116] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0117] In summary, the present invention discloses a method, device, mobile terminal and storage medium for restoring factory settings of a mobile terminal. The present invention is only applicable to the production and manufacturing process of electronic products, and an automatic factory reset mode (hereinafter referred to as factory mode) is set. When the electronic product is in this mode, the memory space is used as a virtual user space. Therefore, all user data will be stored in the virtual user space. Once the system is shut down or powered off, the data in the virtual space will be cleared to achieve the purpose of restoring factory settings. A factory reset implementation based on the Android system is invented. From the effect point of view, there is no difference from the ordinary factory reset. From the time-consuming point of view, it only needs to shut down the system or power off. Compared with the ordinary factory reset that takes several to more than ten minutes, the efficiency is greatly improved.

[0118] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for restoring factory settings of a mobile terminal, characterized in that: The method comprises: Pre-setting the factory mode and the common user mode flags on the mobile terminal, and saving the flags on the memory of the mobile terminal; wherein the factory mode is set to use the memory space as a virtual user storage space, and all user data will be stored in the virtual user storage space; the flags are saved on the memory of the electronic product; When the mobile terminal system starts, the mode flag information is read from the memory; When the flag bit information is judged as factory mode, the memory space is mapped as virtual user storage space to store user data when the file system is initialized; when the flag bit information is judged as ordinary user mode, the user partition on the memory is mapped as user storage space to store user data when the file system is initialized; When the mobile terminal is in factory mode and the system detects shutdown or power failure, the data in the virtual user storage space is automatically cleared.

2. The method for restoring factory settings of a mobile terminal according to claim 1, characterized in that: The step of presetting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal includes: Pre-set the factory mode and the common user mode on the mobile terminal; The normal user mode is configured such that user data is stored in the memory.

3. The method for restoring factory settings of a mobile terminal according to claim 1, characterized in that: The step of presetting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal comprises: The mobile terminal is pre-set to the factory mode by default before leaving the factory, and the flag of the default mode is set to the factory mode flag.

4. The method for restoring factory settings of a mobile terminal according to claim 1, characterized in that: The step of presetting the flags of the factory mode and the ordinary user mode on the mobile terminal and storing the flags in the memory of the mobile terminal comprises: When the mobile terminal is burning or downloading system software, when the mobile terminal is set to factory mode, this flag bit is set to factory mode.

5. The method for restoring factory settings of a mobile terminal according to claim 1, characterized in that: The step of reading mode flag information from the memory when the mobile terminal system is started includes: Before leaving the factory, the system starts up in the bootloader stage and reads the mode flag information from the memory; Determine whether the currently read mode flag information is factory mode or normal user mode.

6. The method for restoring factory settings of a mobile terminal according to claim 1, characterized in that: When the flag information is judged to be the factory mode, the memory space is mapped as the virtual user storage space when the file system is initialized, and the step of storing user data includes: When the flag information is determined to be the factory mode, the memory space is mapped to the virtual user storage space when the file system is initialized, and all user data is stored in the virtual user storage space.

7. The method for restoring factory settings of a mobile terminal according to claim 1, characterized in that: When the flag information is judged to be a normal user mode, the user partition on the memory is mapped as a user storage space when the file system is initialized, and the step of storing user data includes: When the flag information is judged to be the normal user mode, the user partition on the memory is mapped as the user storage space when the file system is initialized; Store all user data running in the current mode in the user storage space of the memory; The step of automatically clearing data in the virtual user storage space when the system detects shutdown or power failure in the mobile terminal in the factory mode includes: When the mobile terminal detects that the flag is a factory mode flag, when the mobile terminal detects shutdown or power failure in factory mode, the data in the virtual user storage space is automatically cleared.

8. A mobile terminal factory reset processing device, characterized in that: The device comprises: A presetting module is used to pre-set the flags of the factory mode and the ordinary user mode on the mobile terminal, and store the flags in the memory of the mobile terminal; wherein the factory mode is set to use the memory space as a virtual user storage space, and all user data will be stored in the virtual user storage space; the flags are stored in the memory of the electronic product; The startup reading module is used to control the mobile terminal system to read the mode flag information from the memory when starting; The working mode control module is used to map the memory space to the virtual user storage space when initializing the file system to store user data when the flag information is judged to be the factory mode; The normal mode control module is used to map the user partition on the memory as the user storage space to store user data when the flag information is judged to be the normal user mode when initializing the file system; The factory settings automatic recovery module is used to automatically clear the data in the virtual user storage space when the system detects shutdown or power failure in the mobile terminal in factory mode.

9. A mobile terminal, characterized in that: The mobile terminal includes a memory, a processor, and an image display program stored in the memory and executable on the processor. When the processor executes the image display program, the steps of the method for restoring factory settings of a mobile terminal as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an image display program, and when the image display program is executed by the processor, the steps of the method for restoring factory settings of a mobile terminal as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • System recovery method and system recovery device

    CN103699420A

  • Factory setting restoration method and system

    CN105159703A