CN108833668B - Shutdown method and related product - Google Patents

Shutdown method and related product Download PDF

Info

Publication number
CN108833668B
CN108833668B CN201810395767.7A CN201810395767A CN108833668B CN 108833668 B CN108833668 B CN 108833668B CN 201810395767 A CN201810395767 A CN 201810395767A CN 108833668 B CN108833668 B CN 108833668B
Authority
CN
China
Prior art keywords
shutdown
mobile terminal
vold
storage
mount
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
CN201810395767.7A
Other languages
Chinese (zh)
Other versions
CN108833668A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810395767.7A priority Critical patent/CN108833668B/en
Publication of CN108833668A publication Critical patent/CN108833668A/en
Application granted granted Critical
Publication of CN108833668B publication Critical patent/CN108833668B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/442Shutdown
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72406User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by software upgrading or downloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a shutdown method and a related product. The method is applied to a mobile terminal, a mounting daemon service Vold and at least one application program are operated on the mobile terminal, and the method comprises the following steps: the mobile terminal firstly sets a shutdown mark through the Vold, sets a storage unloading strategy as a delayed unloading strategy according to the shutdown mark, secondly sets the mounting point as a read-only mode according to the delayed unloading strategy, informs a system to remove the mounting point, and finally extinguishes a display screen and vibrates to prompt a user to complete shutdown. The embodiment of the application is beneficial to improving the efficiency and the accuracy of the mobile terminal when the mobile terminal is powered off.

Description

Shutdown method and related product
Technical Field
The application relates to the technical field of mobile terminals, in particular to a shutdown method and a related product.
Background
With the rapid development of related technologies of smart phones, more and more applications are installed in user mobile phones, such as reading applications, payment applications, game applications, music applications, and the like, and people's clothes and eating habits are inseparable from mobile phones.
However, the mobile phone will be jammed after a long time, the system will generate a lot of garbage, and many background programs will run, because of some defects of the application and the system itself, sometimes the system resources cannot be released thoroughly, so the response speed of the whole mobile phone will be slow along with the increase of the service time, so the mobile phone needs to be powered off for rest, and the problem of slow power-off speed may be caused by various reasons in the process of power-off for rest.
Disclosure of Invention
The embodiment of the application provides a shutdown method and a related product, which can improve the efficiency and accuracy of the mobile terminal during shutdown.
In a first aspect, an embodiment of the present application provides a shutdown method, which is applied to a mobile terminal, where a mount daemon service Vold and at least one application program run on the mobile terminal, and the method includes:
setting a shutdown mark through the Vold, and setting a storage unloading strategy as a delayed unloading strategy according to the shutdown mark;
setting the mounting point to be in a read-only mode according to the delay unloading strategy, and informing a system of removing the mounting point;
and turning off the display screen and vibrating to prompt the user to finish the shutdown.
In a second aspect, an embodiment of the present application provides a shutdown device, which is applied to a mobile terminal, where a mount daemon service Vold and at least one application program run on the mobile terminal, the shutdown device includes a setting unit, a removing unit, and a prompting unit,
the setting unit is used for setting a shutdown mark through the Vold and setting a storage unloading strategy as a delayed unloading strategy according to the shutdown mark;
the removing unit is used for setting the mounting point to be in a read-only mode according to the delay unloading strategy and informing a system of removing the mounting point;
and the prompting unit is used for turning off the display screen and vibrating to prompt the user to finish shutdown.
In a third aspect, an embodiment of the present application provides a mobile terminal, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps of any method in the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in any one of the methods of the first aspect of the present application, and the computer includes a mobile terminal.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package, the computer comprising a mobile terminal.
It can be seen that, in the embodiment of the present application, the mobile terminal first sets the shutdown flag through the Vold, sets the storage offloading policy as the delayed offloading policy according to the shutdown flag, then sets the mount point as the read-only mode according to the delayed offloading policy, and notifies the system to remove the mount point, and finally turns off the display screen and vibrates to prompt the user to complete shutdown. The mobile terminal can flexibly adjust the storage strategy according to the shutdown identifier, the read-write mode of the mounting point is set to be the read-only mode by adopting a new unloading strategy, and the mounting point of the read-only mode cannot be occupied by the applied process, so that the mobile terminal does not need to execute the process of traversing and searching the occupied process of the mounting point and closing the process, the unloading speed of the mounting point is accelerated, and the shutdown speed is improved.
Drawings
Reference will now be made in brief to the accompanying drawings, to which embodiments of the present application relate.
FIG. 1A is a schematic diagram of a program runtime space of a smart phone;
FIG. 1B is a schematic flow chart of a related art shutdown;
fig. 2 is a schematic flowchart of a shutdown method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart illustrating a shutdown method according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart illustrating a shutdown method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of a mobile terminal according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a smart phone disclosed in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The Mobile terminal according to the embodiment of the present application may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like. For convenience of description, the above-mentioned devices are collectively referred to as a mobile terminal. The operating system related to the embodiment of the invention is a software system which performs unified management on hardware resources and provides a service interface for a user.
As shown in fig. 1A, a current mobile terminal such as a smart phone is generally provided with a program running space, where the program running space includes a user space and an operating system space, where the user space runs one or more application programs, the one or more application programs are third-party application programs installed on the mobile terminal, and the operating system space runs an operating system of the mobile terminal. The mobile terminal can specifically run an Android system, a mobile operating system iOS developed by apple Inc., and the like, and the mobile terminal is not limited herein. The storage system of the Android system mainly comprises: MountService in the System Server process and volumeManager in the Vold process. They manage the storage devices of the system, performing various operations, such as: mount (mount), unmount (unmount), format (format), and the like. Vold is an abbreviation of Volume Daemon, is a management and control center of an external storage system in an Android platform, and is a background process for managing and controlling external storage equipment of the Android platform. The method comprises the steps that Vold serves as a management and control center of a storage device and needs to receive an operation command from an upper storage service MountService, the MountService resides in a SystemServer process, the Vold serves as two different processes, socket communication is adopted as a communication mode between the MountService and the Vold, and a storage manager, namely, a kernel scheduling of a whole Android disk mount Vold mechanism and a transfer station connected up and down.
The related art to which the present application relates is described in detail below.
As shown in fig. 1B, for example, when the mobile terminal runs with an Android system, in the related art, the mobile terminal needs to traverse the program directory once for each mount point, and then determines whether a background process occupies the current mount point. If yes, the background occupation process is deleted firstly. When the external memory card is inserted into the mobile phone, the number of the mount points required to traverse the background process is generally 3 by adding the mount points for unloading the internal memory of the mobile phone. The existing flow needs to traverse 3 times of program directories, the number of the contexts of the program directories is about 700 generally, and the problems of time consumption, high error rate, low transmission speed and the like caused by executing iop calls such as open and the like are also needed.
In view of the above technical problem, the following solutions are proposed, which will be described in detail with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a schematic flow chart of a shutdown method provided in an embodiment of the present application, and is applied to a mobile terminal, where a mount daemon service Vold and at least one application program run on the mobile terminal, as shown in fig. 2, the shutdown method includes:
s201, the mobile terminal sets a shutdown mark through the Vold, and sets a storage unloading strategy as a delayed unloading strategy according to the shutdown mark.
The shutdown identifier is set by the volume manager in the Vold, and the shutdown process is distinguished from normal unloading.
The storage unloading policy refers to a policy for canceling the occupation state of the storage resource by the application program.
S202, the mobile terminal sets the mounting point to be a read-only mode according to the delay unloading strategy and informs a system to remove the mounting point.
The read-only mode is a mode in which a document or an attribute can only be read, and cannot be modified or stored.
When the mounting point is removed, the application program can be removed when the application program exists in the mounting point.
S203, the mobile terminal extinguishes the display screen and vibrates to prompt the user to complete shutdown.
It can be seen that, in the embodiment of the present application, the mobile terminal first sets the shutdown flag through the Vold, sets the storage offloading policy as the delayed offloading policy according to the shutdown flag, then sets the mount point as the read-only mode according to the delayed offloading policy, and notifies the system to remove the mount point, and finally turns off the display screen and vibrates to prompt the user to complete shutdown. The mobile terminal can flexibly adjust the storage strategy according to the shutdown identifier, the read-write mode of the mounting point is set to be the read-only mode by adopting a new unloading strategy, and the mounting point of the read-only mode cannot be occupied by the applied process, so that the mobile terminal does not need to execute the process of traversing and searching the occupied process of the mounting point and closing the process, the unloading speed of the mounting point is accelerated, and the shutdown speed is improved.
In one possible example, a storage service mount is further running on the mobile terminal, and before the shutdown flag is set by the Vold, the method further includes: and broadcasting a storage unloading completion message to the at least one application program through the mount services when a shutdown request is received through the mount services, wherein the storage unloading completion message is used for indicating the at least one application program to cancel the occupation of the mount point of the mobile terminal.
Wherein, the version of the storage service at android 7.1 and before is MountService, and at andnoroid 8.0 and above is StorageManagerService. In Vold, mount service is equivalent to providing a service interface to the outside.
Wherein the communication service commandliener sends a notification to Vold in Vlod.
The shutdown request may be a shutdown request formed by a user through self-operation, or a shutdown request triggered by a shutdown time specified by a manufacturer when the manufacturer leaves a factory.
Therefore, in this example, the mobile terminal broadcasts to the system in advance through the received shutdown request, so that the android application completes the relevant processing of storage and unloading in advance, and the high efficiency and convenience of the mobile terminal during shutdown are facilitated.
In one possible example, the Vold includes a storage module, the storage module is divided into an internal storage sub-module emulated volume and an external storage sub-module public volume, and the mobile terminal sets the mount point to a read-only mode according to the deferred offload policy, including: calling a preset parameter, wherein the preset parameter is MNT DETACH parameter; and updating a first mounting point and a second mounting point into a read-only mode according to the preset parameters, wherein the first mounting point is located in the emulated volume, and the second mounting point is located in the public volume.
And the internal storage submodule organized volume is used for storing the mobile terminal.
The public volume of the external storage submodule is external storage such as a T card.
Optionally, the mobile terminal calls a preset parameter, where the preset parameter is an MNT DETACH parameter; and updating a first mounting point into a read-only mode according to the preset parameters, and then updating a second mounting point into the read-only mode, wherein the first mounting point is located in the emulated volume, and the second mounting point is located in the public volume.
Optionally, the mobile terminal calls a preset parameter, where the preset parameter is an MNT DETACH parameter; and updating a first mounting point into a read-only mode according to the preset parameters, and then updating a second mounting point into the read-only mode, wherein the first mounting point is located in the public volume, and the second mounting point is located in the organized volume.
Therefore, in this example, the mobile terminal calls the preset parameters to make all the mount points stored in the memory and the mount points stored outside the memory more read-only, and at this time, the background process cannot occupy the mount points, so that the shutdown speed of the mobile terminal can be increased, and the timeliness and the accuracy of the mobile terminal during shutdown are improved.
In one possible example, the setting, by the Vold, a shutdown flag, and the setting, by the mobile terminal, a storage offload policy to a deferred offload policy according to the shutdown flag includes: and querying a preset strategy database, and determining a delayed unloading strategy corresponding to the shutdown identifier, wherein the strategy database comprises a corresponding relation between the shutdown identifier and the delayed unloading strategy.
Therefore, in this example, the mobile terminal can determine the currently applicable delay unloading strategy according to the preset strategy database, so that the accuracy of selecting the unloading strategy is further improved, and the high efficiency and the accuracy of the mobile terminal during shutdown are facilitated.
In one possible example, the at least one application cannot occupy the mount point in the read-only mode; the shutdown operation includes closing mountain and the Vold.
As can be seen, in this example, since the writing mode of the application program is limited, the readable and writable mode is changed into the read-only mode, processes of traversing and searching for the process occupied by the mount point and closing the process are eliminated, the storage and unloading speed is increased, and the shutdown speed is increased.
Referring to fig. 3, fig. 3 is a schematic flow chart of a shutdown method provided in an embodiment of the present application, and is applied to a mobile terminal, where a mount daemon service Vold and at least one application program run on the mobile terminal, as shown in the figure, the shutdown method includes:
s301, the mobile terminal sets a shutdown mark through the Vold, and sets a storage unloading strategy as a delayed unloading strategy according to the shutdown mark.
S302, the mobile terminal calls preset parameters, wherein the preset parameters are MNT DETACH parameters.
And S303, the mobile terminal updates the first mounting point and the second mounting point to be in a read-only mode according to the preset parameters and informs a system of removing the mounting points.
S304, the mobile terminal extinguishes the display screen and vibrates to prompt the user to complete shutdown.
It can be seen that, in the embodiment of the present application, the mobile terminal first sets the shutdown flag through the Vold, sets the storage offloading policy as the delayed offloading policy according to the shutdown flag, then sets the mount point as the read-only mode according to the delayed offloading policy, and notifies the system to remove the mount point, and finally turns off the display screen and vibrates to prompt the user to complete shutdown. The mobile terminal can flexibly adjust the storage strategy according to the shutdown identifier, the read-write mode of the mounting point is set to be the read-only mode by adopting a new unloading strategy, and the mounting point of the read-only mode cannot be occupied by the applied process, so that the mobile terminal does not need to execute the process of traversing and searching the occupied process of the mounting point and closing the process, the unloading speed of the mounting point is accelerated, and the shutdown speed is improved.
In addition, the mobile terminal calls the preset parameters to enable all the mounting points stored in the memory and the mounting points stored outside to be in a read-only mode, and at the moment, the background process cannot occupy the mounting points, so that the shutdown speed of the mobile terminal can be increased, and the timeliness and the accuracy of the mobile terminal during shutdown are improved.
Referring to fig. 4, fig. 4 is a schematic flowchart of a shutdown method provided in an embodiment of the present application, and the shutdown method is applied to a mobile terminal, where a mount daemon service Vold and at least one application program run on the mobile terminal. As shown in the figure, the shutdown method includes:
s401, when the mobile terminal receives a shutdown request through the mount services, the mobile terminal broadcasts a storage unloading completion message to the at least one application program through the mount services.
S402, the mobile terminal queries a preset strategy database and determines a delayed unloading strategy corresponding to the shutdown identifier.
S403, the mobile terminal calls preset parameters, wherein the preset parameters are MNT DETACH parameters.
S404, the mobile terminal updates the first mounting point and the second mounting point to be in a read-only mode according to the preset parameters, and informs a system of removing the mounting points.
S405, the mobile terminal extinguishes the display screen and vibrates to prompt the user to complete shutdown.
It can be seen that, in the embodiment of the present application, the mobile terminal first sets the shutdown flag through the Vold, sets the storage offloading policy as the delayed offloading policy according to the shutdown flag, then sets the mount point as the read-only mode according to the delayed offloading policy, and notifies the system to remove the mount point, and finally turns off the display screen and vibrates to prompt the user to complete shutdown. The mobile terminal can flexibly adjust the storage strategy according to the shutdown identifier, the read-write mode of the mounting point is set to be the read-only mode by adopting a new unloading strategy, and the mounting point of the read-only mode cannot be occupied by the applied process, so that the mobile terminal does not need to execute the process of traversing and searching the occupied process of the mounting point and closing the process, the unloading speed of the mounting point is accelerated, and the shutdown speed is improved.
In addition, the mobile terminal can determine the currently applicable delay unloading strategy according to the preset strategy database, so that the accuracy of selecting the unloading strategy is further improved, and the high efficiency and the accuracy of the mobile terminal during shutdown are facilitated.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the mobile terminal includes hardware structures and/or software modules for performing the respective functions in order to implement the above-described functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the mobile terminal may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a mobile terminal provided in an embodiment of the present application, where the mobile terminal runs a mount daemon service Vold and at least one application program, and as shown in the figure, the mobile terminal includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are different from the one or more application programs, and the one or more programs are stored in the memory and configured to be executed by the processor, and include instructions for performing the following steps;
setting a shutdown mark through the Vold, and setting a storage unloading strategy as a delayed unloading strategy according to the shutdown mark;
setting the mounting point to be in a read-only mode according to the delay unloading strategy, and informing a system of removing the mounting point;
and turning off the display screen and vibrating to prompt the user to finish the shutdown.
It can be seen that, in the embodiment of the present application, the mobile terminal first sets the shutdown flag through the Vold, sets the storage offloading policy as the delayed offloading policy according to the shutdown flag, then sets the mount point as the read-only mode according to the delayed offloading policy, and notifies the system to remove the mount point, and finally turns off the display screen and vibrates to prompt the user to complete shutdown. The mobile terminal can flexibly adjust the storage strategy according to the shutdown identifier, the read-write mode of the mounting point is set to be the read-only mode by adopting a new unloading strategy, and the mounting point of the read-only mode cannot be occupied by the applied process, so that the mobile terminal does not need to execute the process of traversing and searching the occupied process of the mounting point and closing the process, the unloading speed of the mounting point is accelerated, and the shutdown speed is improved.
In a possible example, a storage service mount is further running on the mobile terminal, and before the shutdown flag is set by the Vold, the instructions in the foregoing procedure are further configured to:
and when a shutdown request is received through the mount services, broadcasting a storage unloading completion message to the at least one application program through the mount services, wherein the storage unloading completion message is used for indicating the at least one application program to cancel the occupation of the mount point of the mobile terminal.
In one possible example, the Vold includes a storage module, where the storage module is divided into an embedded volume and a public volume, and in the aspect that the mount point is set to the read-only mode according to the delayed offload policy, the instruction in the foregoing program is specifically configured to perform the following operations: controlling and calling a preset parameter, wherein the preset parameter is MNT DETACH parameter; and controlling to update a first mounting point and a second mounting point into a read-only mode according to the preset parameters, wherein the first mounting point is located in the emulated volume, and the second mounting point is located in the public volume.
In one possible example, in the aspect that the shutdown flag is set by the Vold, and the storage offload policy is set as the deferred offload policy according to the shutdown flag, the instruction in the foregoing program is specifically configured to perform the following operations: and querying a preset strategy database, and determining a delayed unloading strategy corresponding to the shutdown identifier, wherein the strategy database comprises a corresponding relation between the shutdown identifier and the delayed unloading strategy.
In one possible example, the at least one application cannot occupy the mount point in the read-only mode; the shutdown operation includes closing mountain and the Vold. .
Fig. 6 shows a block diagram of a possible functional unit of the shutdown device according to the above embodiment. The shutdown apparatus 600 is applied to a mobile terminal on which a mount daemon service Vold and at least one application program run, the shutdown apparatus 600 includes a setting unit 601, a mobile unit 602, and a prompting unit 603, wherein,
the setting unit 601 is configured to set a shutdown flag through the Vold, and set a storage offloading policy as a delayed offloading policy according to the shutdown flag;
the removing unit 602 is configured to set the mount point to a read-only mode according to the deferred offload policy, and notify a system to remove the mount point;
the prompting unit 603 is configured to turn off the display screen and vibrate to prompt the user that the shutdown is completed.
In a possible example, a storage service mount is further run on the mobile terminal, and the shutdown apparatus further includes a broadcasting unit 604, where before the setting unit 601 sets the shutdown flag through the Vold, the broadcasting unit 604 is further configured to: and when a shutdown request is received through the mount services, broadcasting a storage unloading completion message to the at least one application program through the mount services, wherein the storage unloading completion message is used for indicating the at least one application program to cancel the occupation of the mount point of the mobile terminal.
In a possible example, the Vold includes a storage module, the storage module is divided into an internal storage sub-module emulated volume and an external storage sub-module public volume, and in the aspect that the mount point is set to the read-only mode according to the delay offload policy, the removing unit 602 is specifically configured to: calling a preset parameter, wherein the preset parameter is MNT DETACH parameter; and updating a first mounting point and a second mounting point into a read-only mode according to the preset parameters, wherein the first mounting point is located in the emulated volume, and the second mounting point is located in the public volume.
In one possible example, in the aspect that the shutdown flag is set by the Vold, and the storage offload policy is set as the deferred offload policy according to the shutdown flag, the setting unit 601 is specifically configured to: and controlling and inquiring a preset strategy database, and determining a delayed unloading strategy corresponding to the shutdown identifier, wherein the strategy database comprises a corresponding relation between the shutdown identifier and the delayed unloading strategy.
In one possible example, the at least one application cannot occupy the mount point in the read-only mode; the shutdown operation includes closing mountain and the Vold.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a smart phone 700 according to an embodiment of the present application, where the smart phone 700 includes: the portable electronic device comprises a shell 710, a touch display screen 720, a main board 730, a battery 740 and a sub-board 750, wherein a front camera 731, a processor 732, a memory 733, a power management chip 734 and the like are arranged on the main board 730, and a vibrator 751, an integral sound cavity 752 and a VOOC flash charging interface 753 are arranged on the sub-board.
The mobile terminal sets a shutdown mark through the Vold, and sets a storage unloading strategy as a delayed unloading strategy according to the shutdown mark; setting the mounting point to be in a read-only mode according to the delay unloading strategy, and informing a system of removing the mounting point; and turning off the display screen and vibrating to prompt the user to finish the shutdown.
The processor 732 is a control center of the smart phone, connects various parts of the entire smart phone through various interfaces and lines, and executes various functions and processes data of the smart phone by operating or executing software programs and/or modules stored in the memory 733 and calling data stored in the memory 733, thereby integrally monitoring the smart phone. Alternatively, processor 732 may include one or more processing units; preferably, the processor 732 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 732. The Processor 732 may be, for example, a Central Processing Unit (CPU), a general purpose Processor, a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor described above may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
The memory 733 may be used to store software programs and modules, and the processor 732 may execute various functional applications and data processing of the smart phone by operating the software programs and modules stored in the memory 733. The memory 733 may mainly include a program storage area that may store an operating system, an application program required for at least one function, and the like, and a data storage area; the storage data area may store data created according to the use of the smartphone, and the like. Further, the memory 733 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. The Memory 733 may be, for example, a Random Access Memory (RAM), a flash Memory, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a register, a hard disk, a removable hard disk, a compact disc Read Only Memory (CD-ROM), or any other form of storage medium known in the art.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes a mobile terminal.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising a mobile terminal.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (14)

1. A shutdown method is applied to a mobile terminal, and a mount daemon service Vold and at least one application program run on the mobile terminal, and is characterized by comprising the following steps:
setting a shutdown mark through the Vold, and setting a storage unloading strategy as a delayed unloading strategy according to the shutdown mark;
setting the mounting point to be in a read-only mode according to the delay unloading strategy, and informing a system of removing the mounting point;
and turning off the display screen and vibrating to prompt the user to finish the shutdown.
2. The method of claim 1, wherein a storage service mount is further running on the mobile terminal, and wherein before the shutdown flag is set by Vold, the method further comprises:
and broadcasting a storage unloading completion message to the at least one application program through the mount services when a shutdown request is received through the mount services, wherein the storage unloading completion message is used for indicating the at least one application program to cancel the occupation of the mount point of the mobile terminal.
3. The method according to claim 1 or 2, wherein the Vold includes a storage module, the storage module is divided into an internal storage sub-module emulated volume and an external storage sub-module public volume, and the setting the mount point to the read-only mode according to the deferred offload policy includes:
calling a preset parameter, wherein the preset parameter is MNT DETACH parameter;
and updating a first mounting point and a second mounting point into a read-only mode according to the preset parameters, wherein the first mounting point is located in the emulated volume, and the second mounting point is located in the public volume.
4. The method of claim 1, wherein the setting a shutdown flag by the Vold, and setting a storage offload policy to a deferred offload policy according to the shutdown flag comprises:
and querying a preset strategy database, and determining a delayed unloading strategy corresponding to the shutdown mark, wherein the strategy database comprises a corresponding relation between the shutdown mark and the delayed unloading strategy.
5. The method according to any of claims 1-2 or 4, wherein said at least one application cannot occupy said mount point in said read-only mode; the shutdown includes closing mountain and the Vold.
6. The method of claim 3, wherein the mount point in read-only mode cannot be occupied by the at least one application; the shutdown includes closing mountain and the Vold.
7. A shutdown device is applied to a mobile terminal, a mounting daemon service Vold and at least one application program run on the mobile terminal, and is characterized by comprising a setting unit, a removing unit and a prompting unit,
the setting unit is used for setting a shutdown mark through the Vold and setting a storage unloading strategy as a delayed unloading strategy according to the shutdown mark;
the removing unit is used for setting the mounting point to be in a read-only mode according to the delay unloading strategy and informing a system of removing the mounting point;
and the prompting unit is used for turning off the display screen and vibrating to prompt the user to finish shutdown.
8. The apparatus of claim 7, wherein the mobile terminal further runs a storage service mount; the shutdown device further comprises a broadcasting unit, and before the setting unit sets the shutdown flag through the Vold, the broadcasting unit is further configured to:
and broadcasting a storage unloading completion message to the at least one application program through the mount services when a shutdown request is received through the mount services, wherein the storage unloading completion message is used for indicating the at least one application program to cancel the occupation of the mount point of the mobile terminal.
9. The apparatus according to claim 7 or 8, wherein the Vold includes a storage module, the storage module is divided into an internal storage sub-module emulated volume and an external storage sub-module public volume, and in terms of setting the mount point to the read-only mode according to the deferral offload policy, the removing unit is specifically configured to: calling a preset parameter, wherein the preset parameter is MNT DETACH parameter; and updating a first mounting point and a second mounting point into a read-only mode according to the preset parameters, wherein the first mounting point is located in the emulated volume, and the second mounting point is located in the public volume.
10. The apparatus according to claim 7, wherein in the aspect that the shutdown flag is set by the Vold, and the storage offload policy is set as the deferred offload policy according to the shutdown flag, the setting unit is specifically configured to:
and querying a preset strategy database, and determining a delayed unloading strategy corresponding to the shutdown mark, wherein the strategy database comprises a corresponding relation between the shutdown mark and the delayed unloading strategy.
11. The apparatus according to any of claims 7-8 or 10, wherein said at least one application cannot occupy said mount point in said read-only mode; the shutdown includes closing mountain and the Vold.
12. The apparatus of claim 9, wherein the mount point in read-only mode cannot be occupied by the at least one application; the shutdown includes closing mountain and the Vold.
13. A mobile terminal comprising a processor, memory, a communications interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1-6.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method according to any one of claims 1-6, the computer comprising a mobile terminal.
CN201810395767.7A 2018-04-27 2018-04-27 Shutdown method and related product Active CN108833668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810395767.7A CN108833668B (en) 2018-04-27 2018-04-27 Shutdown method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810395767.7A CN108833668B (en) 2018-04-27 2018-04-27 Shutdown method and related product

Publications (2)

Publication Number Publication Date
CN108833668A CN108833668A (en) 2018-11-16
CN108833668B true CN108833668B (en) 2020-12-15

Family

ID=64155761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810395767.7A Active CN108833668B (en) 2018-04-27 2018-04-27 Shutdown method and related product

Country Status (1)

Country Link
CN (1) CN108833668B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609406A (en) * 2009-07-17 2009-12-23 浪潮电子信息产业股份有限公司 A kind of method of multi-BIOS mapping parallel initialization
CN102830996A (en) * 2012-08-08 2012-12-19 广东欧珀移动通信有限公司 Fast boot method of handheld device
CN105049936A (en) * 2015-08-13 2015-11-11 海信集团有限公司 Startup-shutdown method and device
CN106033362A (en) * 2015-03-13 2016-10-19 北京视联动力国际信息技术有限公司 Method and device for processing flash memory partition
CN106126272A (en) * 2016-06-15 2016-11-16 北京小米移动软件有限公司 File system discharging method and device
CN107870968A (en) * 2016-09-23 2018-04-03 苹果公司 Real-time update is performed to file system volume

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6061632B2 (en) * 2012-11-13 2017-01-18 キヤノン株式会社 Information processing device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101609406A (en) * 2009-07-17 2009-12-23 浪潮电子信息产业股份有限公司 A kind of method of multi-BIOS mapping parallel initialization
CN102830996A (en) * 2012-08-08 2012-12-19 广东欧珀移动通信有限公司 Fast boot method of handheld device
CN106033362A (en) * 2015-03-13 2016-10-19 北京视联动力国际信息技术有限公司 Method and device for processing flash memory partition
CN105049936A (en) * 2015-08-13 2015-11-11 海信集团有限公司 Startup-shutdown method and device
CN106126272A (en) * 2016-06-15 2016-11-16 北京小米移动软件有限公司 File system discharging method and device
CN107870968A (en) * 2016-09-23 2018-04-03 苹果公司 Real-time update is performed to file system volume

Also Published As

Publication number Publication date
CN108833668A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
CN107861816B (en) Resource allocation method and device
CN107547746B (en) Resource allocation method and related product
CN107635078B (en) Game control method and device
CN107547745B (en) Resource allocation method and related product
CN107273160A (en) A kind of method and device of edition upgrading
CN110825563B (en) System recovery method and device and electronic equipment
CN107450988B (en) Resource allocation method and related product
CN106095458A (en) The management method of plug-in unit and device in a kind of application program
CN107807852B (en) Application program performance control method, device and computer readable storage medium
CN108536480B (en) Input method configuration method and related product
CN104572819A (en) Clearing method and system for junk data
CN109375937A (en) Method for upgrading system, device, terminal device and storage medium
CN103049287A (en) Mobile terminal and method for installing application programs of mobile terminal
CN109564598A (en) A kind of endpoint detection methods and terminal
CN110543321A (en) OTA (over the air) upgrading method, device, terminal and computer readable storage medium
US9588757B2 (en) Data update method, user terminal, and data update system
AU2021202098B2 (en) Multimedia data playing method and terminal device
CN107832142B (en) Resource allocation method and equipment for application program
CN107517306B (en) Resource allocation method and related product
CN103763112A (en) User identity protection method and apparatus
CN108984339B (en) Data recovery method and related product
CN105224421A (en) Data backup method and device and electronic equipment
CN103532802A (en) Method and device for network sharing, and terminal equipment
CN103607431B (en) Mobile terminal resource processing method, device and equipment
CN106022108A (en) Synchronous management method and terminal device

Legal Events

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