CN106484719B - Method and terminal for expanding mobile phone storage - Google Patents

Method and terminal for expanding mobile phone storage Download PDF

Info

Publication number
CN106484719B
CN106484719B CN201510541083.XA CN201510541083A CN106484719B CN 106484719 B CN106484719 B CN 106484719B CN 201510541083 A CN201510541083 A CN 201510541083A CN 106484719 B CN106484719 B CN 106484719B
Authority
CN
China
Prior art keywords
memory card
external memory
block device
file system
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510541083.XA
Other languages
Chinese (zh)
Other versions
CN106484719A (en
Inventor
邓超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing ZTE New Software Co Ltd
Original Assignee
Nanjing ZTE New Software 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 Nanjing ZTE New Software Co Ltd filed Critical Nanjing ZTE New Software Co Ltd
Priority to CN201510541083.XA priority Critical patent/CN106484719B/en
Priority to PCT/CN2016/075541 priority patent/WO2016177067A1/en
Publication of CN106484719A publication Critical patent/CN106484719A/en
Application granted granted Critical
Publication of CN106484719B publication Critical patent/CN106484719B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a terminal for expanding mobile phone storage, wherein the method is applied to a terminal with an external memory card identification device, the terminal is provided with an expandable block device for mounting a file system of the terminal, and the file system is mounted on a mounting point of the expandable block device, wherein the method comprises the following steps: after the external memory card is inserted, identified and registered, judging whether the external memory card is inserted for the first time; if the external memory card is inserted for the first time, suspending and uninstalling a file system running on a mount point of the expandable block device; adding the external storage card into a record table of the expandable block device; and re-mounting the file system to a mounting point of the extensible block device. According to the scheme, the external memory card is added to the partition where the file system operates, a mounting point cannot be newly added on the path of the file system, and the flexibility of the system is improved.

Description

Method and terminal for expanding mobile phone storage
Technical Field
The invention relates to the technical field of terminals, in particular to a method and a terminal for expanding mobile phone storage.
Background
Android is a Linux-based operating system with free and open source codes, which is led and developed by Google corporation and the open mobile alliance, and is mainly used for mobile devices such as smart phones and tablet computers. There is no unified Chinese name, and more people in mainland China use "android" or "Andenos". Android is already the smartphone operating system with the largest global market share.
For a user, the data correspond to different pictures, videos, application programs and the like; however, for a computer, these are sequences of 0 and 1, which are divided into different groups on the medium on which they are stored according to what they represent, and such a group of data is a file of the computer. If the data can only be organized as files, but cannot be classified, the files are cluttered. Each time we search for a certain file, it is too cumbersome to check file by file. A file system is a logically organized form of files that stores individual files in a more clear manner.
The file system of Linux locates the location of the file in the file system by a pathname like "/mnt/sdcard/userfile". The file system of Linux is a tree structure. The root directory of Linux is "/", i.e. the topmost part of the tree structure, and the branches of the tree are denoted by "/", and the different branches are divided by directories (directory, which is equivalent to the folders we see in windows interface). The very end of the bifurcation of this tree represents a file. Linux manages everything in the system as files. Hardware devices, disk partitions and the like which are common in Windows are regarded as files in Linux, and access to the devices and the partitions is to read and write the corresponding files.
The mount point is actually an entry directory of a disk file system in Linux, and is similar to disk identifiers such as C, D, E and the like used for accessing different partitions in Windows; selecting a mount point is an essential step for installing the application program of the mobile phone. In order to meet the data storage requirement of the system, the Android devices all have a built-in memory card, and the default mounting point of the built-in memory card is/mnt/sdcard. The memory space of the built-in memory card is large and small due to differentiation competition and cost. When the built-in storage space is small, in order to meet the requirement of large file storage of a user, some Android devices also provide an extended storage card slot. An external memory card inserted into an expansion memory card slot generally requires additional purchase by a user, and the storage space thereof is generally large. Since the external storage card can be recognized as a newly added independent storage device in the Android system, the mount point of the external storage card is different from the default mount point of the built-in space, and the newly added mount point is generally/mnt/extdcard or/mnt/extcard.
In the Android system, only the application installed on the memory card with the default mounting point of/mnt/sdcard can normally run, and for the Android system with the external memory card, only the application installed on the internal memory card can normally run. The space provided by the external memory card is usually only used for storing some smaller applications or files, such as video and pictures. Some external large application programs, such as a kelidd GPS navigation program, cannot be installed in an internal user storage partition with a small space due to a large data volume; and because of the reason of the mount point, the application program can not be installed on the extrapolated large-capacity expansion memory card, and the situation can cause that the mobile phone can not meet the requirements of the user, thereby causing the problem of poor user experience effect.
Disclosure of Invention
The invention provides a method and a terminal for expanding mobile phone storage, and aims to solve the problems that when some larger application programs cannot run in an internal memory card and the mounting path of an external memory card cannot meet the running conditions of the application programs, the application programs cannot be normally used and the use experience effect of a user is influenced because the mounting path of an external memory card is different from that of an internal memory card in the conventional terminal.
In order to solve the above technical problem, an embodiment of the present invention provides a method for extending a mobile phone storage, which is applied to a terminal having an external memory card identification device, and an extensible block device for mounting a file system of the terminal is disposed on the terminal, where the file system is mounted on a mounting point of the extensible block device, where the method includes:
after the external memory card is inserted, identified and registered, judging whether the external memory card is inserted for the first time;
if the external memory card is inserted for the first time, suspending and uninstalling a file system running on a mount point of the expandable block device;
adding the external storage card into a record table of the expandable block device;
and re-mounting the file system to a mounting point of the extensible block device.
Further, the step of determining whether the external memory card is inserted for the first time after the external memory card is inserted, identified and registered includes:
acquiring a record table of the expandable block device, wherein the record table comprises identification information of storage devices on the terminal;
searching whether the identification information of the external storage card exists in a record table of the expandable block device;
if the record table does not have the identification information of the external memory card, the external memory card is indicated to be inserted for the first time;
and if the record table contains the identification information of the external memory card, indicating that the external memory card is not inserted for the first time.
Further, when the external memory card is not inserted for the first time, the method further includes:
suspending and uninstalling a file system running on a mount point of the scalable block device;
and running the file system on the mounting point of the extensible block device again.
Further, before the step of adding the external memory card to the record table of the expandable block device, the method further comprises:
and formatting the external memory card.
Further, the step of adding the external memory card to the record table of the expandable block device specifically includes:
and storing the identification information of the external memory card and the sector starting address and the size of the external memory card into a record table of the expandable block device.
Further, before the step of suspending and uninstalling the file system running on the mount point of the scalable block device, the method further comprises:
acquiring a selection instruction whether to expand the storage space or not, which is input by a user;
and if the selection instruction indicates that the user needs to expand the storage space, the steps of stopping and uninstalling the file system running on the mounting point of the expandable block device are carried out.
The embodiment of the invention provides a terminal, which comprises an external memory card identification device and an expandable block device used for mounting a file system of the terminal, wherein the file system is mounted on a mounting point of the expandable block device, and the terminal further comprises:
the judging module is used for judging whether the external memory card is inserted for the first time after the external memory card is inserted, identified and registered;
the first stopping and unloading module is used for stopping and unloading the file system running on the mounting point of the expandable block device if the external memory card is inserted for the first time;
the adding module is used for adding the external storage card into a record table of the expandable block device;
and the mounting module is used for re-mounting the file system to a mounting point of the extensible block device.
Further, the judging module comprises:
an obtaining unit, configured to obtain a record table of an extensible block device, where the record table includes identification information of a storage device on a terminal;
a searching unit, configured to search, in a record table of the expandable block device, whether the identification information of the external memory card exists;
the judging unit is used for indicating that the external memory card is inserted for the first time if the identification information of the external memory card does not exist in the record table;
and if the record table contains the identification information of the external memory card, indicating that the external memory card is not inserted for the first time.
Further, the terminal further includes:
the second suspension and uninstallation module is used for suspending and uninstalling the file system running on the mounting point of the expandable block device when the external memory card is not inserted for the first time;
and the operation module is used for operating the file system on the mounting point of the expandable block device again.
Further, the terminal further includes:
and the formatting module is used for formatting the external memory card.
Further, the adding module specifically comprises:
and storing the identification information of the external memory card and the sector starting address and the size of the external memory card into a record table of the expandable block device.
Further, the terminal further includes:
and the acquisition module is used for acquiring a selection instruction whether to expand the storage space or not, which is input by a user when the external memory card is inserted for the first time, and triggering the first suspension and uninstallation module when the selection instruction indicates that the user needs to expand the storage space.
The invention has the beneficial effects that:
according to the scheme, the external memory card is added to the partition where the file system operates, a mounting point cannot be newly added on the path of the file system, and the flexibility of the system is improved.
Drawings
FIG. 1 is a schematic flow chart of the method according to the first embodiment of the present invention;
FIG. 2 is a schematic flow chart of the method according to the second embodiment of the present invention;
fig. 3 is a schematic structural diagram of the terminal according to a third embodiment of the present invention;
FIG. 4 is a diagram illustrating a mapping relationship between an external storage device and an internal storage device and an extensible block device according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
The invention provides a method for expanding mobile phone storage and a terminal, aiming at the problems that when some larger application programs cannot run in an internal memory card due to the fact that a mounting path of an external memory card is different from a mounting path of an internal memory card, the mounting path of the external memory card cannot meet the running conditions of the application programs, the application programs cannot be normally used, and the use experience effect of a user is influenced in the existing terminal.
As shown in fig. 1, the method for expanding mobile phone storage according to the first embodiment of the present invention is applied to a terminal having an external memory card identification device, and an expandable block device for mounting a file system of the terminal is disposed on the terminal, where the file system is mounted on a mounting point of the expandable block device, and the method includes:
step 100, after the external memory card is inserted, identified and registered, judging whether the external memory card is inserted for the first time;
it should be noted that, when the terminal detects that the external memory card is inserted into the external memory card identification device, the driver of the external memory card drives and identifies the external memory card, and registers the external memory card.
Step 200, if the external memory card is inserted for the first time, suspending and uninstalling a file system running on a mount point of the expandable block device;
since the dynamic expansion operation to be performed by the scalable block device changes its attributes, it is necessary to first uninstall the file system that has been mounted to the mount point of the scalable block device.
It should be noted that when the file system is suspended and unloaded, in order to ensure the integrity of the data, the file system is usually suspended first, and then the file system on the mount point is unloaded.
Step 300, adding the external memory card into a record table of the expandable block device;
it should be noted that the record table of the expandable block device stores the identification information of all block devices (in the present invention, the terminal internal memory card is mapped to an internal memory block device, and the external memory card is mapped to an external memory block device), and the corresponding sector start offset and size of the block device. When the external file system initiates read-write operation to the block device, its driver will look up the table, so as to obtain the actual read-write operation real block device and the corresponding offset on the real block device.
Step 400, re-mount the file system to a mount point of the scalable block device.
According to the scheme, the external memory card which is inserted for the first time is added into the record table of the expandable block device, so that the external memory card has the same mounting point as the internal memory card, and is not used as an independent storage device for mounting, but is added onto the existing expandable block device, and the mounting point is prevented from being added on a file system path. Therefore, the storage space is expanded, and the user is not limited when using the system, like using the original built-in storage space of the system; and the mode of additionally adding the external storage card also ensures that the data stored in the internal storage space is not influenced during expansion.
It should be noted that the extensible block device is a special block device that can be dynamically extended and added to the Linux system. When only the built-in memory card is present, the scalable block device only contains the built-in memory block device, and the mount point/mnt/sdcard of the file system is mounted on the scalable block device.
It should be noted that, in the embodiment of the present invention, the step 100 includes:
acquiring a record table of the expandable block device, wherein the record table comprises identification information of storage devices on the terminal;
searching whether the identification information of the external storage card exists in a record table of the expandable block device;
if the record table does not have the identification information of the external memory card, the external memory card is indicated to be inserted for the first time;
and if the record table contains the identification information of the external memory card, indicating that the external memory card is not inserted for the first time.
After the external memory card is expanded on the expandable block device, the record of the external memory card is stored in the record table of the expandable block device, which proves that the external memory card is expanded. It should be noted that the external memory card is regarded as the first insertion as long as the external memory card is not expanded.
It should be noted that, when the external memory card is not inserted for the first time, the method further includes:
suspending and uninstalling a file system running on a mount point of the scalable block device;
the file system is re-run on the mount point of the scalable block device.
When the external memory card is verified to be expanded, the expansion is not required to be carried out again, and only the file system needs to be directly operated (the process can be regarded as a process for restarting the file system of the terminal).
It should be noted that, in this embodiment, in order to ensure that the external memory card can be used normally after being expanded, before the step 300, the method further includes:
and formatting the external memory card.
The external storage card is formatted according to the format of the mounted file system of the internal storage card, so that the external storage card can meet the operation requirement of the file system after being expanded, and the condition of operation error is avoided.
Specifically, the specific implementation manner of step 300 is as follows:
and storing the identification information of the external memory card and the sector starting address and the size of the external memory card into a record table of the expandable block device.
In the first embodiment, the newly added external storage device can be directly added to the partition where the current internal storage device is located without being mounted in other partitions, so that the use limitation caused by different partitions is overcome, and the use experience effect of a user is improved; compared with a terminal with a large built-in storage space, the flexibility of the system is improved, and the production cost of the terminal is reduced.
In order to ensure that the external memory card is inserted to avoid the situation of misoperation, when formatting the external memory card and suspending and uninstalling the file system, operation confirmation of a user needs to be performed, so in the second embodiment of the present invention, as shown in fig. 1, the method for expanding the storage of the mobile phone includes:
step 100, after the external memory card is inserted, identified and registered, judging whether the external memory card is inserted for the first time;
step 200, if the external memory card is inserted for the first time, suspending and uninstalling a file system running on a mount point of the expandable block device;
step 300, adding the external memory card into a record table of the expandable block device;
step 400, re-mount the file system to a mount point of the scalable block device.
It should be noted that, when the external memory card is not inserted for the first time, the method further includes:
suspending and uninstalling a file system running on a mount point of the scalable block device;
the file system is re-run on the mount point of the scalable block device.
Specifically, before the step 300, the method further comprises:
and formatting the external memory card.
Before performing step 200, the method further comprises:
acquiring a selection instruction whether to expand the storage space or not, which is input by a user;
if the selection instruction indicates that the user needs to perform storage space expansion, step 200 is entered to perform the steps of suspending and uninstalling the file system running on the mount point of the expandable block device.
The concrete implementation process of the scheme is as follows: when the external memory card is detected not to be expanded in the storage space, a dialog box is displayed on a terminal display interface to prompt a user whether to expand the storage space and format the external memory card, and then subsequent operation is performed according to an operation command input by the user.
It should be noted that, in the second embodiment, other implementation manners are the same as those of the first embodiment except that the obtaining user selection instruction is added.
In the second embodiment, the user is confirmed during the expansion, so that the problem that the user data is lost due to the fact that the external memory card is mistakenly expanded when the user mistakenly inserts the external memory card is solved, and the second embodiment ensures the operation safety of the user.
As shown in fig. 2, for the second embodiment, the detailed implementation flow of the method is as follows:
step 11, the external memory card identification equipment detects whether an external memory card is inserted into an expansion memory card slot in real time;
step 12, when detecting that the external memory card is inserted, identifying and registering the external memory card;
step 13, judging whether the external memory card carries out storage space expansion; if the storage space expansion is performed, performing step 14, otherwise, performing step 20;
step 14, inquiring whether the user performs storage space expansion; if the user expands the storage space, then step 15 and step 17 are carried out;
step 15, suspending the file system operation running on/mnt/sdcard;
step 16, unloading the file system on the mount point of the mdnt/sdcard;
step 17, formatting the external memory card, it should be noted that step 17, step 15 and step 16 are usually performed simultaneously because step 17, step 15 and step 16 are parallel processes.
Step 18, adding an external memory card into a record table of the expandable block device;
step 19, mounting the file system to the mounting point/mnt/sdcard of the expandable block device again in an expansion mode;
step 20, suspending the file system operation running on/mnt/sdcard;
step 21, unloading the file system on the mnt/sdcard mount point;
and step 22, mounting the file system to the mounting point/mnt/sdcard of the expandable block device again in an expansion mode.
It should be noted that steps 20 and 15, steps 21 and 16, and steps 22 and 19 are the same implementation, and when running, the terminal executes a certain branch step according to the execution condition.
In the embodiment, the external memory card and the internal memory card are set as the same mounting point in an expansion mode, so that the external memory card has the same function as the internal memory card, and the terminal can be regarded as a memory card of the terminal when using the external memory card, thereby improving the flexibility of a terminal system; meanwhile, after the external memory card is expanded, the expansion is not needed, and only the file system of the terminal needs to be restarted; meanwhile, before the expansion of the external memory card, the user is confirmed whether the external memory card is expanded or not, so that the misoperation of the user is effectively avoided.
As shown in fig. 3, a third embodiment of the present invention provides a terminal, including an external memory card identification device and an extensible block device for mounting a file system of the terminal, where the file system is mounted on a mounting point of the extensible block device, and the terminal further includes:
the judging module 31 is configured to judge whether the external memory card is inserted for the first time after the external memory card is inserted, identified and registered;
a first suspending and unloading module 32, configured to suspend and unload a file system running on a mount point of the scalable block device if the external memory card is first inserted;
an adding module 33, configured to add the external memory card to a record table of the scalable block device;
a mount module 34 for re-mounting the file system to a mount point of the scalable block device.
Further, the determining module 31 includes:
an obtaining unit, configured to obtain a record table of an extensible block device, where the record table includes identification information of a storage device on a terminal;
a searching unit, configured to search, in a record table of the expandable block device, whether the identification information of the external memory card exists;
the judging unit is used for indicating that the external memory card is inserted for the first time if the identification information of the external memory card does not exist in the record table;
and if the record table contains the identification information of the external memory card, indicating that the external memory card is not inserted for the first time.
Further, the terminal further includes:
the second suspension and uninstallation module is used for suspending and uninstalling the file system running on the mounting point of the expandable block device when the external memory card is not inserted for the first time;
and the operation module is used for operating the file system on the mounting point of the extensible block device again.
Further, the terminal further includes:
and the formatting module is used for formatting the external memory card.
Further, the adding module 33 specifically includes:
and storing the identification information of the external memory card and the sector starting address and the size of the external memory card into a record table of the expandable block device.
It should be noted that the terminal embodiment is a terminal corresponding to the method in the first embodiment, and all implementation manners of the method are applicable to the terminal embodiment, and the same technical effect as the method in the first embodiment can also be achieved.
Continuing as shown in fig. 3, a fourth embodiment of the present invention provides a terminal, including an external memory card identification device and an extensible block device for mounting a file system of the terminal, where the file system is mounted on a mounting point of the extensible block device, and the terminal further includes:
the judging module 31 is configured to judge whether the external memory card is inserted for the first time after the external memory card is inserted, identified and registered;
a first suspending and unloading module 32, configured to suspend and unload a file system running on a mount point of the scalable block device if the external memory card is first inserted;
an adding module 33, configured to add the external memory card to a record table of the scalable block device;
a mount module 34 for re-mounting the file system to a mount point of the scalable block device.
Further, the determining module 31 includes:
an obtaining unit, configured to obtain a record table of an extensible block device, where the record table includes identification information of a storage device on a terminal;
a searching unit, configured to search, in a record table of the expandable block device, whether the identification information of the external memory card exists;
the judging unit is used for indicating that the external memory card is inserted for the first time if the identification information of the external memory card does not exist in the record table;
and if the record table contains the identification information of the external memory card, indicating that the external memory card is not inserted for the first time.
Further, the terminal further includes:
the second suspension and uninstallation module is used for suspending and uninstalling the file system running on the mounting point of the expandable block device when the external memory card is not inserted for the first time;
and the operation module is used for operating the file system on the mounting point of the extensible block device again.
Further, the terminal further includes:
and the formatting module is used for formatting the external memory card.
Further, the adding module 33 specifically includes:
and storing the identification information of the external memory card and the sector starting address and the size of the external memory card into a record table of the expandable block device.
Further, the terminal further includes:
an obtaining module, configured to obtain a selection instruction whether to perform storage space expansion or not, which is input by a user, when the external memory card is first inserted, and trigger the first suspend and unload module 32 when the selection instruction indicates that the user needs to perform storage space expansion.
It should be noted that this terminal embodiment is a terminal corresponding to the method in the second embodiment, and all implementation manners of the method are applicable to this terminal embodiment, and the same technical effect as the method in the second embodiment can also be achieved.
The following is a detailed description of the practical implementation of the present invention with reference to the above embodiments:
it should be noted that, the scalable block device in the terminal (the external use mode of the scalable block device is completely the same as that of a general block device) is specifically implemented as follows:
as shown in fig. 4, the internal memory card and the external memory card are respectively mapped in the expandable block device as an internal memory block device and an external memory block device, and both devices belong to the same default mounting point/mnt/sdcard.
A record table is included inside the scalable block device, and the record table stores the block device (usually, identification information of the block device, such as a block device number), and a sector start offset and a sector start size corresponding to the block device. When the external file system initiates read-write operation to the block device, its driver will query the record table, so as to obtain the actual read-write operation of the real block device and the corresponding offset on the real block device.
Meanwhile, the scalable block device provides a block device addition interface through which a new block device can be added to the record table.
In a specific implementation, a user notification program added by the extensible block device and a background management program of the extensible block device are also needed to be provided.
The specific processing steps of adding the notification program by the expandable block device are as follows:
linux provides a NETLINK _ KOBJECT _ UEVENT notification mechanism for hot plug operation of external devices. And a user notification program added by the user-mode expandable block device detects the insertion of the external memory card through the socket interface. If the external memory card is inserted and the external memory card is not expanded, the user notification program sends an inquiry whether to expand the system space to a user through a user graphical interface (GUI), and gives a prompt for performing formatting operation of the external memory card and interrupting current file system operation to the user; after the user is affirmed, the user notification program provides the existing communication mechanism (special system call, special file or signal, etc.) through Linux to notify the background management program of the expandable block device to start the addition of the external block device.
The specific processing steps of the background management program of the expandable block device are as follows:
when the system initializes the expandable block device, scanning the built-in storage block device which is already owned in the system and the block device corresponding to the external storage card which is possibly owned, and combining the owned block devices through an adding interface of the expandable block device to generate a special block device for mounting a file system; it should be noted that a kernel daemon thread needs to be newly created for the expandable block device on the terminal, and the kernel daemon thread runs a background management program of the expandable block device. The background management program waits for the notification of the user notification program added by the extensible block device, and formats the external memory card to the file system corresponding to the existing built-in memory (such as ext3) after the notification is obtained; stopping all ongoing file operations on the current built-in memory card, closing all opened files, and then unloading the file system; calling an adding interface of the expandable block device, and adding the block device corresponding to the formatted external memory card into the expandable block device; and finally, re-mounting the file system in an extended mounting mode of the file system to complete the extension of the whole file system.
While the preferred embodiments of the present invention have been described, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.

Claims (12)

1. A method for expanding mobile phone storage is applied to a terminal with an external memory card identification device, and the terminal is provided with an expandable block device for mounting a file system of the terminal, wherein the file system is mounted on a mounting point of the expandable block device, and the method comprises the following steps:
after the external memory card is inserted, identified and registered, judging whether the external memory card is inserted for the first time;
if the external memory card is inserted for the first time, suspending and uninstalling a file system running on a mount point of the expandable block device;
adding the external memory card into a record table of an expandable block device so as to add the external memory card onto the expandable block device;
and re-mounting the file system to a mounting point of the extensible block device.
2. The method as claimed in claim 1, wherein the step of determining whether the external memory card is inserted for the first time after the external memory card is inserted, identified and registered includes:
acquiring a record table of the expandable block device, wherein the record table comprises identification information of storage devices on the terminal;
searching whether the identification information of the external storage card exists in a record table of the expandable block device;
if the record table does not have the identification information of the external memory card, the external memory card is indicated to be inserted for the first time;
and if the record table contains the identification information of the external memory card, indicating that the external memory card is not inserted for the first time.
3. The method of claim 2, wherein when the external memory card is not first inserted, the method further comprises:
suspending and uninstalling a file system running on a mount point of the scalable block device;
and running the file system on the mounting point of the extensible block device again.
4. The method according to any of claims 1-3, wherein prior to the step of adding the external memory card to the log table of the scalable block device, the method further comprises:
and formatting the external memory card.
5. The method according to claim 4, wherein the step of adding the external memory card to the record table of the scalable block device is specifically:
and storing the identification information of the external memory card and the sector starting address and the size of the external memory card into a record table of the expandable block device.
6. The method of claim 5, wherein prior to the step of suspending and unmounting the file system running on the mount point of the scalable block device, the method further comprises:
acquiring a selection instruction whether to expand the storage space or not, which is input by a user;
and if the selection instruction indicates that the user needs to expand the storage space, the steps of stopping and uninstalling the file system running on the mounting point of the expandable block device are carried out.
7. A terminal, comprising an external memory card identification device and an expandable block device for mounting a file system of the terminal, wherein the file system is mounted on a mounting point of the expandable block device, the terminal further comprising:
the judging module is used for judging whether the external memory card is inserted for the first time after the external memory card is inserted, identified and registered;
the first stopping and unloading module is used for stopping and unloading the file system running on the mounting point of the expandable block device if the external memory card is inserted for the first time;
the adding module is used for adding the external storage card into a record table of the expandable block device so as to add the external storage card to the expandable block device;
and the mounting module is used for re-mounting the file system to a mounting point of the extensible block device.
8. The terminal of claim 7, wherein the determining module comprises:
an obtaining unit, configured to obtain a record table of an extensible block device, where the record table includes identification information of a storage device on a terminal;
a searching unit, configured to search, in a record table of the expandable block device, whether the identification information of the external memory card exists;
the judging unit is used for indicating that the external memory card is inserted for the first time if the identification information of the external memory card does not exist in the record table;
and if the record table contains the identification information of the external memory card, indicating that the external memory card is not inserted for the first time.
9. The terminal of claim 8, wherein the terminal further comprises:
the second suspension and uninstallation module is used for suspending and uninstalling the file system running on the mounting point of the expandable block device when the external memory card is not inserted for the first time;
and the operation module is used for operating the file system on the mounting point of the expandable block device again.
10. The terminal according to any of claims 7-9, characterized in that the terminal further comprises:
and the formatting module is used for formatting the external memory card.
11. The terminal according to claim 10, wherein the adding module is specifically:
and storing the identification information of the external memory card and the sector starting address and the size of the external memory card into a record table of the expandable block device.
12. The terminal of claim 11, further comprising:
and the acquisition module is used for acquiring a selection instruction whether to expand the storage space or not, which is input by a user when the external memory card is inserted for the first time, and triggering the first suspension and uninstallation module when the selection instruction indicates that the user needs to expand the storage space.
CN201510541083.XA 2015-08-28 2015-08-28 Method and terminal for expanding mobile phone storage Active CN106484719B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510541083.XA CN106484719B (en) 2015-08-28 2015-08-28 Method and terminal for expanding mobile phone storage
PCT/CN2016/075541 WO2016177067A1 (en) 2015-08-28 2016-03-03 Mobile phone memory expanding method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510541083.XA CN106484719B (en) 2015-08-28 2015-08-28 Method and terminal for expanding mobile phone storage

Publications (2)

Publication Number Publication Date
CN106484719A CN106484719A (en) 2017-03-08
CN106484719B true CN106484719B (en) 2020-10-16

Family

ID=57217536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510541083.XA Active CN106484719B (en) 2015-08-28 2015-08-28 Method and terminal for expanding mobile phone storage

Country Status (2)

Country Link
CN (1) CN106484719B (en)
WO (1) WO2016177067A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107832235A (en) * 2017-11-28 2018-03-23 苏州佳世达电通有限公司 A kind of method and apparatus of automatically formatting storage device
CN108769368A (en) * 2018-04-20 2018-11-06 Oppo广东移动通信有限公司 A kind of electronic equipment and information processing method
CN110941843B (en) * 2019-11-22 2022-03-29 北京明略软件系统有限公司 Encryption implementation method, device, equipment and storage medium
CN111352772A (en) * 2020-02-24 2020-06-30 Oppo(重庆)智能科技有限公司 External memory card processing method and related product
CN111625193A (en) * 2020-05-22 2020-09-04 浪潮电子信息产业股份有限公司 Configuration method, device, equipment and medium of multipath alias
CN112114900A (en) * 2020-09-18 2020-12-22 北京金山云网络技术有限公司 Formatting method and related equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100034856A (en) * 2008-09-25 2010-04-02 엘지전자 주식회사 Mobile terminal and method of providing search function using same

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI387879B (en) * 2008-09-05 2013-03-01 Acer Inc Storage managing method and computer system using the same
US9235583B2 (en) * 2009-07-15 2016-01-12 Aten International Co., Ltd. Virtual media with folder-mount function
CN102722444A (en) * 2012-05-23 2012-10-10 北京百纳威尔科技有限公司 Method and device for extending internal storage space and terminal
CN102722342A (en) * 2012-05-23 2012-10-10 北京百纳威尔科技有限公司 Method and device for expanding internal storage space and terminal
CN102831173B (en) * 2012-07-27 2016-09-07 Tcl集团股份有限公司 Memory expanding method based on android system, device and terminal device
WO2014026343A1 (en) * 2012-08-16 2014-02-20 华为终端有限公司 Terminal and file access method therefor
CN104679544A (en) * 2013-11-29 2015-06-03 中兴通讯股份有限公司 Application program managing method and device
CN104408053A (en) * 2014-10-29 2015-03-11 上海斐讯数据通信技术有限公司 Mobile-terminal storage-card extending method
CN104391657A (en) * 2014-11-24 2015-03-04 上海盈方微电子有限公司 Method for mounting multi-partition storage device in Android system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100034856A (en) * 2008-09-25 2010-04-02 엘지전자 주식회사 Mobile terminal and method of providing search function using same

Also Published As

Publication number Publication date
CN106484719A (en) 2017-03-08
WO2016177067A1 (en) 2016-11-10

Similar Documents

Publication Publication Date Title
CN106484719B (en) Method and terminal for expanding mobile phone storage
US8954805B2 (en) Computer booting method and computer system
WO2016061978A1 (en) Mobile storage mounting method and device
EP2704041B1 (en) Method for storing application data and terminal device
US9239725B2 (en) System and method for installing an OS via a network card supporting PXE
US20120198133A1 (en) Electronic device with expandable memory capacity and an expansion method thereof
US8180930B2 (en) Information processing device, and device initialization method in the information processing device
CN103412822A (en) Operation method of non-volatile RAM, data operation method and relevant device
CN103593281A (en) Test system and test method
CN107135462B (en) Bluetooth pairing method of UEFI firmware and computing system thereof
CN111258666A (en) Reading method and device of computer file, computer system and storage medium
US8732390B2 (en) Distribution with dynamic partitions
CN103064767B (en) Drive backup, the method recovered and device
CN104866388B (en) Data processing method and device
CN104461622A (en) system updating method and device of intelligent terminal
CN107436761B (en) UEFI (unified extensible firmware interface) system and traditional system coexistence management method based on UEFI mainboard
US9009430B2 (en) Restoration of data from a backup storage volume
CN116719670B (en) Data processing method, electronic device and readable storage medium
KR20150072963A (en) Multisystem, and method of booting the same
US20180032351A1 (en) Information processing method and storage device
CN112650713A (en) File system operation method, device, equipment and storage medium
US9436408B2 (en) Direct hinting for a memory device
CN102591691A (en) Hard disc starting method and operation system starting and loading method based on basic input/output system (BIOS)
WO2017076034A1 (en) Method and device for formatting memory of mobile terminal
CN108563552B (en) Method, equipment and storage medium for recording peripheral operation behaviors

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200911

Address after: Yuhuatai District of Nanjing City, Jiangsu province 210012 Bauhinia Road No. 68

Applicant after: Nanjing Zhongxing New Software Co.,Ltd.

Address before: 518057 Nanshan District science and Technology Industrial Park, Guangdong high tech Industrial Park, ZTE building

Applicant before: ZTE Corp.

GR01 Patent grant
GR01 Patent grant