CN112306374A - Data clearing method, mobile terminal and storage medium - Google Patents

Data clearing method, mobile terminal and storage medium Download PDF

Info

Publication number
CN112306374A
CN112306374A CN201910704082.0A CN201910704082A CN112306374A CN 112306374 A CN112306374 A CN 112306374A CN 201910704082 A CN201910704082 A CN 201910704082A CN 112306374 A CN112306374 A CN 112306374A
Authority
CN
China
Prior art keywords
partition
mounting
starting
physical
production mode
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
CN201910704082.0A
Other languages
Chinese (zh)
Inventor
高允沛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN201910704082.0A priority Critical patent/CN112306374A/en
Publication of CN112306374A publication Critical patent/CN112306374A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a data clearing method, a mobile terminal and a storage medium, wherein the data clearing method comprises the following steps: when the mobile terminal is started, selecting to enter a production mode according to a starting parameter in a system file of the mobile terminal; when entering a production mode, mapping and mounting the system file and the physical partition in the mobile terminal according to the production mode partition mounting parameters in the system file; generating a corresponding mapping mounting relation table according to the mapping mounting of the system file and the physical partitions, wherein the mapping mounting relation table records the mounting states of the physical partitions respectively; and formatting the physical partitions which are not mounted according to the mapping mounting relation table. The invention sets the physical partition corresponding to the data partition in the conventional mode to be in an uninstalled state, and can directly format the uninstalled physical partition in the production mode, thereby reducing the time consumption of resetting the user data link during production and improving the production line efficiency.

Description

Data clearing method, mobile terminal and storage medium
Technical Field
The present invention relates to the field of mobile terminal applications, and in particular, to a data clearing method, a mobile terminal, and a storage medium.
Background
When mass production is carried out by adopting equipment of an android system, production is usually carried out in a mode of pre-copying a software patch; in order to meet production requirements, the pre-copying software contains data and information required by production line detection; therefore, before the device leaves the factory, the data and information need to be cleared to ensure that the device purchased by the user is in a clean state.
At present, manufacturers have several ways to clear user data and information during production, one of which is to reset data by adopting a factory setting function of equipment, but the way needs to consume a large amount of time, resulting in low production efficiency; secondly, an application level data recovery mode is adopted, namely, during reset operation, the data needing to be recovered are cleared one by the application, but the mode is complex in operation and easy to miss when the data are cleared; and the other method adopts a mode of directly deleting the related database, which is simple and rough, has low deletion reliability and is easy to cause deletion failure.
Accordingly, the prior art is yet to be improved and developed.
Disclosure of Invention
The present invention provides a data erasing method, a mobile terminal and a storage medium, which are used for solving the technical problem, and by setting a partition mounting parameter different from a conventional mode, a physical partition belonging to a data partition in the conventional mode is set to be in an unmounted state, so that the mobile terminal can directly format the unmounted physical partition in a production mode, and the data erasing efficiency in the production mode is improved.
The technical scheme adopted by the invention for solving the technical problem is as follows:
the invention provides a data clearing method, wherein the data clearing method comprises the following steps:
when the mobile terminal is started, acquiring a starting parameter in a system file of the mobile terminal, and selecting to enter a production mode according to the starting parameter;
when the mobile terminal enters the production mode, obtaining production mode partition mounting parameters in the system file, and mapping and mounting the system file and a physical partition in the mobile terminal according to the production mode partition mounting parameters;
generating a corresponding mapping mounting relation table according to the mapping mounting of the system file and the physical partitions, wherein the mapping mounting relation table records the mounting states of the physical partitions respectively;
and searching the physical partition in the uninstalled state according to the mapping mounting relation table, and formatting the physical partition in the uninstalled state.
Further, when the mobile terminal is started, the method for starting the mobile terminal further comprises the following steps before the starting parameters in the system file of the mobile terminal are obtained and the mobile terminal enters the production mode according to the starting parameters:
setting a starting parameter for starting the production mode, and setting a production mode partition mounting parameter for mapping and mounting the system file and the physical partition in the production mode.
Further, when the mobile terminal is started, acquiring a starting parameter in a system file of the mobile terminal, and selecting to enter a production mode according to the starting parameter specifically includes the following steps:
when the mobile terminal is started, acquiring a starting parameter in a system file of the mobile terminal;
judging whether a starting mark in the starting parameter is a starting mark for starting the production mode;
and entering a production mode when the starting mark in the starting parameters is a starting mark for starting the production mode.
Further, the step of determining whether the start mark in the start parameter is a start mark for starting the production mode specifically includes the following steps:
judging whether a starting mark in the starting parameter is a preset mark or not;
and when the starting mark in the starting parameters is a preset mark, judging that the starting mark in the starting parameters is a starting mark for starting the production mode.
Further, the obtaining a production mode partition mounting parameter in the system file when entering a production mode, and mapping and mounting the system file in the mobile terminal and the physical partition according to the production mode partition mounting parameter specifically includes the following steps:
when the production mode is entered, transmitting the starting parameter to a starting process through a kernel command line in the system file;
when the starting process receives the starting parameters, acquiring the production mode partition mounting parameters in the system file;
and mapping and mounting the system file and the physical partition according to the production mode partition mounting parameters.
Further, the system file comprises a starting partition, a system partition, a repairing partition, a data partition and a system cache partition, and the physical partition comprises a first partition, a second partition, a third partition, a fourth partition and a fifth partition;
the mapping and mounting the system file and the physical partition according to the production mode partition mounting parameter specifically includes the following steps:
mounting a starting partition in the system file to a first partition of the physical partition;
mounting the system partition in the system file to a second partition of the physical partition;
mounting the repair partition in the system file to a third partition of the physical partition;
mounting the data partition in the system file to a fifth partition of the physical partition;
and setting a fourth partition of the physical partition to be in an uninstalled state.
Further, the generating a mapping mount relationship table according to the mapping mount of the system file and the physical partition, where the mapping mount relationship table describes mount states respectively corresponding to the physical partitions specifically includes the following steps:
generating a corresponding mapping mounting relation table by mapping mounting the system file and the physical partition; the mapping mounting relation table records mounting states respectively corresponding to the physical partitions;
marking the physical partition in the unmounted state in the mapping mounting relation table;
and storing the mapping mounting relation table.
Further, the searching the physical partition in the unmounted state according to the mapping mount relationship table, and the formatting the unmounted physical partition specifically includes the following steps:
searching the physical partition which is not mounted according to the mark in the mapping mounting relation table;
and carrying out formatting operation on the unmounted physical partition through a formatting command.
Further, the steps of searching the physical partition in the unmounted state according to the mapping mount relationship table, and formatting the unmounted physical partition further include:
restarting the mobile terminal, and entering a conventional mode according to the starting parameters of the conventional mode;
and when the mobile terminal enters the normal mode, carrying out partition mounting on the system file and the physical partition of the mobile terminal according to the normal mode partition mounting parameters in the normal mode.
The invention also provides a mobile terminal, which comprises a processor and a memory connected with the processor, wherein the memory stores a data clearing program, and the data clearing program is used for realizing the data clearing method when being executed by the processor.
The invention also provides a storage medium, wherein the storage medium stores a data clearing program, and the data clearing program is used for realizing the data clearing method when being executed by a processor.
The invention provides a data clearing method, a mobile terminal and a storage medium, wherein a partition mounting parameter different from a conventional mode is set, a physical partition belonging to a data partition in the conventional mode is set to be in an unmounted state, and the physical partition in the unmounted state can be directly formatted, so that the aim of quickly clearing user data is fulfilled; by setting the physical partition without mounting, the time consumed for resetting the user data link during production is reduced, the production line efficiency is improved, and the phenomenon of failure in deleting the user data is avoided.
Drawings
FIG. 1 is a flow chart of a data purging method according to a preferred embodiment of the present invention.
Fig. 2 is a mapping relation diagram of partition mount in a conventional mode.
FIG. 3 is a mapping diagram of partition mount in production mode according to the present invention.
Fig. 4 is a functional schematic diagram of the mobile terminal of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Example one
In the production stage of the android device, the android device is usually produced in a pre-copying software patch mode; in order to meet production requirements, the pre-transcription software comprises necessary data and information required by production line detection; therefore, in the last step of the production phase, the user data and information generated by the production line detection need to be cleared to ensure that the equipment taken by the user is in a clean state.
Fig. 1 shows a data clearing method according to a preferred embodiment of the present invention, and fig. 1 is a flowchart of the data clearing method according to the preferred embodiment of the present invention.
The data clearing method comprises the following steps:
step S100, when the mobile terminal is started, obtaining a starting parameter in a system file of the mobile terminal, and selecting to enter a production mode according to the starting parameter.
In the android System, System files mainly include a Boot partition (a Boot partition), a System partition (a System partition), a Recovery partition (a repair partition), a Data partition (a Data partition), and a Cache partition (a System Cache partition); each partition in the system file has a corresponding physical partition, and each partition in the system file has a function realized by the partition; the physical partition may be understood as dividing the memory of the mobile terminal into a plurality of partitions, such as: a first partition, a second partition, a third partition, a fourth partition, and a fifth partition; each physical partition corresponds to one file partition in the android system file, such as: the first partition corresponds to a Boot partition in the system file; therefore, the corresponding relationship between the system file in the android system and the physical partition is similar to the corresponding relationship between the system in the computer and the system disk; the corresponding system file can be searched through the physical partition, such as: the Boot files in the Boot partition can be searched in the first partition; that is, when the mobile terminal is started, only the first partition needs to be read.
In the android system, the partitions and corresponding functions in the system file are:
Figure BDA0002151604250000051
Figure BDA0002151604250000061
it can be seen that the Cache partition (system Cache partition) is only used for caching, and does not store important data, and deleting data in the partition or removing data from the partition does not affect the normal operation of the android system.
In this embodiment, when the mobile terminal is started, the mobile terminal may obtain a start parameter of a Boot partition in a system file, and select to enter different modes according to the start parameter, for example: a normal mode, a repair mode, a production mode, and the like; the system comprises a normal mode, a repair mode and a production mode, wherein the normal mode is mainly used for daily use of a user, the repair mode is mainly used for system repair of a maintenance worker, and the production mode is used for detection and data removal of the mobile terminal in the production stage; therefore, before the mobile terminal is started, corresponding starting parameters are set according to the use requirements of the production mode, so that the mobile terminal can enter the production mode when being started.
After selecting to enter different modes, the mobile terminal can perform partition mounting on a physical partition on the memory and a partition in the file system by starting an init process in the partition (the init process is a first process for starting up the android system and is used for initializing a driving program, a data structure and the like of the android device); such as: as shown in fig. 2, in the normal mode, the physical Partition mounted by the Data Partition is Partition 3 (i.e. the fourth Partition in the physical Partition), that is, the user Data is stored in this Partition of Partition 3; in the embodiment, in order to adopt the partition mounting parameters different from those in the conventional mode, the production mode partition mounting parameters used in the production mode need to be preset; the production mode partition mounting parameter may be used to map and mount the system file and the physical partition according to the production mode partition mounting parameter when the mobile terminal is started in the production mode, for example: and mounting the Boot partition to a first partition of the physical partition.
Namely, the following steps are also included before the step S100:
and S001, setting a starting parameter for starting the production mode and setting a production mode partition mounting parameter for mapping and mounting the system file and the physical partition in the production mode.
The starting parameters and the partition mounting parameters can be set in the mobile terminal directly or through a pre-copying software patch used in a production stage.
In this embodiment, when the mobile terminal is started, the mobile terminal may obtain a preset starting parameter for starting the production mode from the system file, that is, the mobile terminal reads a first partition in the physical partition when starting, and reads the starting parameter in the Boot partition from the first partition; then, selecting to enter a production mode according to the starting parameters; specifically, a start mark is set in the start parameter, and the start mark represents a preset value, such as: in a normal mode, the value of the starting mark is 0; in the production mode, the value of the starting mark is 1; in the repair mode, the value of the start flag is 2.
When the mobile terminal obtains the start parameter, the mobile terminal may determine whether the start parameter is a start flag for starting the production mode according to the start flag in the start parameter, for example: judging whether a starting mark in the starting parameter is a value 1 or not, and when the starting mark in the starting parameter is the value 1, judging that the starting mark in the starting parameter is a starting mark for starting the production mode; at this time, the mobile terminal may enter a production mode according to the start mark, so that in the production mode, mapping mount of the system file and the physical partition is completed according to the production mode partition mount parameter.
Namely, the step S100 specifically includes the following steps:
step S110, when the mobile terminal is started, acquiring a starting parameter in a system file of the mobile terminal;
step S120, judging whether a starting mark in the starting parameter is a starting mark for starting the production mode;
step S130, when the start mark in the start parameters is a start mark for starting the production mode, entering the production mode.
Wherein, in the step S120, the method specifically includes the following steps:
step S121, judging whether a starting mark in the starting parameter is a preset mark;
and step S122, when the starting mark in the starting parameters is a preset mark, judging that the starting mark in the starting parameters is a starting mark for starting the production mode.
In this embodiment, by presetting a start parameter and a partition mounting parameter for use in a production mode, when the mobile terminal is started, the mobile terminal can select a production mode required to enter according to the start parameter, so that mapping mounting of the system file and the physical partition can be completed subsequently according to the production mode partition mounting parameter.
Step S200, when entering the production mode, obtaining the production mode partition mounting parameters in the system file, and mapping and mounting the system file and the physical partition in the mobile terminal according to the production mode partition mounting parameters.
When the mobile terminal enters the production mode, the mobile terminal transmits the starting parameters to a starting process through a kernel command line in the system file; the Kernel Command Line is a Linux Kernel Command Line and refers to input parameters of a Linux Kernel; generally, the kernel command line is written in menu.lst of grub, and then various boot loaders (grub, lilo, pxloader, etc.) are responsible for copying to a specified memory location, and under the specified location, the linux kernel can acquire kernel input parameters by using a pointer (cmdline pointer) transmitted by the boot loaders.
The starting process, namely the init process, is the first process operated by the android basic level system; and after receiving the starting parameters, the init process uses partition mounting parameters different from those in a conventional mode according to starting marks in the starting parameters.
In this embodiment, since the production mode partition mount parameter used in the production mode is preset, the init process uses the production mode partition mount parameter to complete the mapping mount of the system file and the physical partition.
In the normal mode, the init process performs mapping mount according to the partition mount parameter in the normal mode, as shown in fig. 2, which is specifically represented as:
mounting a boot Partition (boot shown in FIG. 2) in the system file to a first Partition (Partition 0 shown in FIG. 2) of the physical partitions; mounting a System Partition (System shown in fig. 2) in the System file to a second Partition (Partition 1 shown in fig. 2) of the physical partitions; mounting a repair Partition (Recovery shown in FIG. 2) in the system file to a third Partition (Partition 2 shown in FIG. 2) of the physical partitions; mounting a Data Partition (Data shown in FIG. 2) in the system file to a fourth Partition (Partition 3 shown in FIG. 2) of the physical partitions; mounting a system Cache Partition (the Cache shown in fig. 2) in the system file to a fifth Partition (Partition 4 shown in fig. 2) of the physical Partition; therefore, in the mount mode of the conventional mode, the system files correspond to the physical partitions one by one, and all the physical partitions are in a mount state; in the normal mode, the user data in the fourth Partition (Partition 3 shown in fig. 2) needs to be cleared, and the recovery mode needs to be adopted.
In this embodiment, in the production mode, the init process performs mapping mount according to the production mode partition mount parameter, as shown in fig. 3, which is specifically represented as:
mounting a boot Partition (boot shown in FIG. 3) in the system file to a first Partition (Partition 0 shown in FIG. 3) of the physical partitions; mounting a System Partition (System shown in fig. 3) in the System file to a second Partition (Partition 1 shown in fig. 3) of the physical partitions; mounting a repair Partition (Recovery shown in FIG. 3) in the system file to a third Partition (Partition 2 shown in FIG. 3) of the physical partitions; the Data Partition (Data shown in FIG. 3) in the system file is mounted to a fifth Partition (Partition 4 shown in FIG. 3) of the physical partitions.
In the production mode, after the map is mounted, the difference from the conventional mode is that: the mounting mapping relation of the Data subarea and the Cache subarea is different from the conventional mode, namely the mounting mapping relation of the Data subarea and the Cache subarea is adjusted; that is, in the production mode, the Partition 4 of the physical Partition belonging to the Cache Partition in the conventional mode is mounted as the Data Partition, and the Partition 3 of the physical Partition is not mounted; at this time, since the Partition 3 is in an unloaded idle state, that is, the fourth Partition of the physical Partition is in an unloaded state, the user data in the fourth Partition can be cleared through the clearing command at this time, so that a recovery mode is avoided, and the efficiency of clearing the user data is improved on the premise of ensuring the system security.
That is, the step S200 specifically includes the following steps:
step S210, when entering the production mode, transmitting the starting parameter to a starting process through a kernel command line in the system file;
step S220, when the starting process receives the starting parameters, acquiring the mounting parameters of the production mode partitions in the system file;
and step S230, mapping and mounting the system file and the physical partition according to the production mode partition mounting parameters.
In this embodiment, a kernel command line in the system file is used to transfer a preset startup parameter, so that a startup process can call a preset production mode partition mounting parameter according to the startup process, and thus, in a startup phase of the mobile terminal, the system file and the physical partition are mapped and mounted, so as to facilitate subsequent searching for a fourth partition in the physical partition, and remove user data on the fourth partition that is not mounted.
Step S300, generating a corresponding mapping mounting relation table according to the mapping mounting of the system file and the physical partition, wherein the mapping mounting relation table records the mounting state of each physical partition respectively.
In this embodiment, after the start process maps and mounts the system file and the physical partition, the mobile terminal may generate a corresponding mapping and mounting relationship table according to the mapping and mounting of the system file and the physical partition, for example: in the mapping mounting relation table identification, Boot corresponds to Partition 0, System corresponds to Partition 1, Recovery corresponds to Partition 2, and Data corresponds to Partition 4; while generating the corresponding mapping mounting relation table, identifying the physical partition in the unmounted state, such as: identifying an unmounted physical Partition 3 by a specific numerical value; and after the marking is finished, storing the mapping mounting relation table so that the mobile terminal can inquire the physical partition which is not mounted from the mapping mounting relation table when the mobile terminal clears the user data.
Namely, the step S300 specifically includes the following steps:
step S310, generating a corresponding mapping mounting relation table by mapping mounting the system file and the physical partitions, wherein the mapping mounting relation table describes mounting states respectively corresponding to the physical partitions;
step S320, marking the physical partition in the unmounted state in the mapping mounting relation table;
and step S330, storing the mapping mounting relation table.
In this embodiment, the mapping mount relation table corresponding to the mapping mount of the system file and the physical partition is generated, so that the mobile terminal can accurately find the physical partition which is not mounted when the user data is subsequently removed, thereby avoiding removing other mounted physical partitions and ensuring the security of the mobile terminal; meanwhile, the physical partitions which are not mounted are identified in the mapping mounting relation table, so that the physical partitions which are not mounted can be conveniently and quickly found when the user data is subsequently cleared, and the searching efficiency can be improved.
And step S400, searching the physical partition in the uninstalled state according to the mapping mounting relation table, and performing formatting operation on the physical partition in the uninstalled state.
In this embodiment, after the mobile terminal generates the mapping mounting relationship table, the mobile terminal searches the physical Partition that is not mounted, that is, the Partition 3, according to the mark in the mapping mounting relationship table; then, the unmounted physical partition is formatted through a format command, such as: the Partition 3 physical Partition can be formatted directly by using an mkfs command (i.e., mkfs. ext3, a formatting command) of Linux; when the formatting operation is completed, indicating that the user data on the Partition 3 physical Partition has been cleared; when the mobile terminal is restarted again, the Partition 3 physical Partition is in a clean state.
That is, the step S400 specifically includes the following steps:
step S410, searching the physical partition which is not mounted according to the mark in the mapping mounting relation table;
and step S420, carrying out formatting operation on the unmounted physical partition through a formatting command.
In this embodiment, after the format operation is performed on the unmounted physical partition, in order to ensure normal use of the user, the mobile terminal may perform a restart once and enter the normal mode according to the starting parameters of the normal mode; when entering a conventional mode, according to the conventional mode partition mounting parameters in the conventional mode, carrying out partition mounting on the system file and the physical partition of the mobile terminal; namely, the Data Partition (Data Partition) in the system file is mounted to the fourth Partition (Partition 3) of the physical Partition.
Namely, the step S400 is followed by the steps of:
step S430, restarting the mobile terminal, and entering a conventional mode according to the starting parameters of the conventional mode;
step S440, when entering the normal mode, according to the normal mode partition mounting parameters in the normal mode, the system file and the physical partition of the mobile terminal are mounted in a partition manner.
In this embodiment, the physical partition that is not mounted is obtained by searching the mark in the mapping mounting relationship table, and the physical partition that is not mounted is removed by using formatting operation, so that the user data on the mobile terminal is completely removed.
In summary, in this embodiment, by setting a partition mount manner different from the conventional manner, the physical partition originally belonging to the data partition is in an idle state, so that the physical partition can be completely formatted.
Example two
Referring to fig. 4, fig. 4 is a functional block diagram of a mobile terminal according to a preferred embodiment of the invention.
As shown in fig. 4, an embodiment of the present invention provides a mobile terminal, which may be a mobile phone (or a tablet computer) according to an embodiment of the present invention, where the mobile terminal of the present embodiment includes a processor 10 and a memory 20 connected to the processor 10;
the memory 20 stores a data erasing program for implementing the above data erasing method when the data erasing program is executed by the processor 10; as described above.
EXAMPLE III
The embodiment of the invention provides a storage medium, wherein the storage medium stores a data clearing program, and the data clearing program is used for realizing the data clearing method when being executed by a processor; as described above.
In summary, the present invention provides a data purging method, a mobile terminal and a storage medium, where a production mode start flag is set in pre-copy software in advance, when entering a production mode, a partition mount parameter different from a normal mode is set according to the preset production mode start flag, and a physical partition belonging to a system cache in the normal mode is mounted on a data partition, so that the physical partition corresponding to the data partition is in an unmounted state; therefore, the physical partition in the uninstalled state can directly carry out formatting operation so as to achieve the purpose of quickly clearing user data; by setting the physical partition without mounting, the time consumed for resetting the user data link during production is reduced, the production line efficiency is improved, and the phenomenon of failure in deleting the user data is avoided.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (11)

1. A data clearing method, characterized in that the data clearing method comprises the steps of:
when the mobile terminal is started, acquiring a starting parameter in a system file of the mobile terminal, and selecting to enter a production mode according to the starting parameter;
when the mobile terminal enters the production mode, obtaining production mode partition mounting parameters in the system file, and mapping and mounting the system file and a physical partition in the mobile terminal according to the production mode partition mounting parameters;
generating a corresponding mapping mounting relation table according to the mapping mounting of the system file and the physical partitions, wherein the mapping mounting relation table records the mounting states of the physical partitions respectively;
and searching the physical partition in the uninstalled state according to the mapping mounting relation table, and formatting the physical partition in the uninstalled state.
2. The data clearing method according to claim 1, wherein the method further comprises the following steps before the mobile terminal is started, acquiring a starting parameter in a system file of the mobile terminal, and selecting to enter a production mode according to the starting parameter:
setting a starting parameter for starting the production mode, and setting a production mode partition mounting parameter for mapping and mounting the system file and the physical partition in the production mode.
3. The data removing method according to claim 2, wherein the step of obtaining the start parameter in the system file of the mobile terminal when the mobile terminal is started, and selecting to enter the production mode according to the start parameter specifically comprises the steps of:
when the mobile terminal is started, acquiring a starting parameter in a system file of the mobile terminal;
judging whether a starting mark in the starting parameter is a starting mark for starting the production mode;
and entering a production mode when the starting mark in the starting parameters is a starting mark for starting the production mode.
4. The data clearing method according to claim 3, wherein the step of determining whether the start flag in the start parameter is a start flag for starting the production mode specifically comprises the steps of:
judging whether a starting mark in the starting parameter is a preset mark or not;
and when the starting mark in the starting parameters is a preset mark, judging that the starting mark in the starting parameters is a starting mark for starting the production mode.
5. The data removing method according to claim 1, wherein the obtaining of the production mode partition mounting parameter in the system file when entering the production mode, and the mapping and mounting of the system file and the physical partition in the mobile terminal according to the production mode partition mounting parameter specifically comprises the following steps:
when the production mode is entered, transmitting the starting parameter to a starting process through a kernel command line in the system file;
when the starting process receives the starting parameters, acquiring the production mode partition mounting parameters in the system file;
and mapping and mounting the system file and the physical partition according to the production mode partition mounting parameters.
6. A data purging method as claimed in any one of claims 1 to 5, wherein the system file includes a boot partition, a system partition, a repair partition, a data partition, and a system cache partition, and the physical partitions include a first partition, a second partition, a third partition, a fourth partition, and a fifth partition;
the mapping and mounting the system file and the physical partition according to the production mode partition mounting parameter specifically includes the following steps:
mounting a starting partition in the system file to a first partition of the physical partition;
mounting the system partition in the system file to a second partition of the physical partition;
mounting the repair partition in the system file to a third partition of the physical partition;
mounting the data partition in the system file to a fifth partition of the physical partition;
and setting a fourth partition of the physical partition to be in an uninstalled state.
7. A data removal method as claimed in any one of claims 1 to 5, wherein generating a mapping mount relationship table corresponding to the mapping mount of the system file and the physical partition comprises:
generating a corresponding mapping mounting relation table by mapping mounting the system file and the physical partition;
marking the physical partition in the unmounted state in the mapping mounting relation table;
and storing the mapping mounting relation table.
8. The method according to claim 7, wherein the step of searching the physical partition in the unmounted state according to the mapping mount relationship table and formatting the unmounted physical partition specifically includes the steps of:
searching the physical partition which is not mounted according to the mark in the mapping mounting relation table;
and carrying out formatting operation on the unmounted physical partition through a formatting command.
9. A data purging method as claimed in any one of claims 1 to 5, wherein the step of looking up the physical partition in the unmounted state according to the mapping mount relation table and formatting the unmounted physical partition further comprises the following steps:
restarting the mobile terminal, and entering a conventional mode according to the starting parameters of the conventional mode;
and when the mobile terminal enters the normal mode, carrying out partition mounting on the system file and the physical partition of the mobile terminal according to the normal mode partition mounting parameters in the normal mode.
10. A mobile terminal comprising a processor, and a memory coupled to the processor, the memory storing a data clearing program, the data clearing program when executed by the processor being configured to implement the data clearing method of any of claims 1-9.
11. A storage medium storing a data clearing program, the data clearing program when executed by a processor being configured to implement the data clearing method according to any one of claims 1 to 9.
CN201910704082.0A 2019-07-31 2019-07-31 Data clearing method, mobile terminal and storage medium Pending CN112306374A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910704082.0A CN112306374A (en) 2019-07-31 2019-07-31 Data clearing method, mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910704082.0A CN112306374A (en) 2019-07-31 2019-07-31 Data clearing method, mobile terminal and storage medium

Publications (1)

Publication Number Publication Date
CN112306374A true CN112306374A (en) 2021-02-02

Family

ID=74485727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910704082.0A Pending CN112306374A (en) 2019-07-31 2019-07-31 Data clearing method, mobile terminal and storage medium

Country Status (1)

Country Link
CN (1) CN112306374A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256526A (en) * 2008-03-10 2008-09-03 清华大学 Method for implementing document condition compatibility maintenance in inspection point fault-tolerant technique
CN102682088A (en) * 2012-04-23 2012-09-19 Tcl集团股份有限公司 Mount method and mount system of storage equipment, and television
CN104572387A (en) * 2015-01-30 2015-04-29 青岛海信移动通信技术股份有限公司 Method and device for debugging terminal in engineering mode
CN106155589A (en) * 2016-06-30 2016-11-23 数普金通数据技术有限公司 A kind of virtual dynamic partition image file generates method and system
CN106557384A (en) * 2015-09-25 2017-04-05 中兴通讯股份有限公司 Based on the data processing method of Linux, device and system
CN107544744A (en) * 2016-06-27 2018-01-05 中兴通讯股份有限公司 A kind of dynamic fixing method of system data, device and terminal
CN107943414A (en) * 2017-10-16 2018-04-20 积成电子股份有限公司 The file partition of built-in Linux and data read-write method
CN108228388A (en) * 2018-01-10 2018-06-29 青岛海信移动通信技术股份有限公司 A kind of method and terminal for restoring setting
CN109284270A (en) * 2018-11-14 2019-01-29 郑州云海信息技术有限公司 A kind of disposition optimization method and device of distributed file system memory module
CN109542676A (en) * 2018-10-26 2019-03-29 歌尔科技有限公司 Method, apparatus, equipment and the storage medium of factory reset

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256526A (en) * 2008-03-10 2008-09-03 清华大学 Method for implementing document condition compatibility maintenance in inspection point fault-tolerant technique
CN102682088A (en) * 2012-04-23 2012-09-19 Tcl集团股份有限公司 Mount method and mount system of storage equipment, and television
CN104572387A (en) * 2015-01-30 2015-04-29 青岛海信移动通信技术股份有限公司 Method and device for debugging terminal in engineering mode
CN106557384A (en) * 2015-09-25 2017-04-05 中兴通讯股份有限公司 Based on the data processing method of Linux, device and system
CN107544744A (en) * 2016-06-27 2018-01-05 中兴通讯股份有限公司 A kind of dynamic fixing method of system data, device and terminal
CN106155589A (en) * 2016-06-30 2016-11-23 数普金通数据技术有限公司 A kind of virtual dynamic partition image file generates method and system
CN107943414A (en) * 2017-10-16 2018-04-20 积成电子股份有限公司 The file partition of built-in Linux and data read-write method
CN108228388A (en) * 2018-01-10 2018-06-29 青岛海信移动通信技术股份有限公司 A kind of method and terminal for restoring setting
CN109542676A (en) * 2018-10-26 2019-03-29 歌尔科技有限公司 Method, apparatus, equipment and the storage medium of factory reset
CN109284270A (en) * 2018-11-14 2019-01-29 郑州云海信息技术有限公司 A kind of disposition optimization method and device of distributed file system memory module

Similar Documents

Publication Publication Date Title
US10002054B2 (en) Method and system for performing automatic system recovery
EP2998861B1 (en) Implementing and deleting method and device for intelligent terminal multi-operation system
CN109542682B (en) Data backup method, device, equipment and storage medium
CN111142911B (en) Embedded system with abnormal recovery function and upgrading method thereof
CN106484719B (en) Method and terminal for expanding mobile phone storage
CN106843947B (en) Method and device for processing code defects
CN113824815B (en) Intelligent port mapping method for WSL2 system
CN114089915B (en) File additional writing operation method and device based on FLASH memory
CN105868047A (en) Repairing method and device of data partition, and terminal
CN109408282B (en) Application program backup recovery method and device and computer readable storage medium
CN103544151A (en) Method and system for processing data in linux system
CN105426544B (en) Method and device for monitoring database state
CN116107807B (en) Method and device for acquiring global consistency point positions during data backup in database
CN112306374A (en) Data clearing method, mobile terminal and storage medium
CN102722378B (en) A kind of method of non intelligent mobile phone and its system program of upgrading
CN112286559A (en) Upgrading method and device for vehicle-mounted intelligent terminal
CN110765125B (en) Method and device for storing data
CN108959548B (en) Service request processing method and device
CN108268285B (en) BIOS version upgrading method, device, equipment and readable storage medium
CN115373882A (en) Storage system fault recovery method, system, computer equipment and storage medium
CN113687920A (en) Object strategy operation method, device and equipment of distributed system
CN114710963A (en) Unmanned aerial vehicle positioning method and device, unmanned aerial vehicle and mobile platform
CN113190244A (en) Method and device for upgrading wireless module, computer equipment and storage medium
CN110209351B (en) Distributed storage data processing method and device
CN107247642B (en) Method and device for determining executable mapping file during system startup

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