CN106648977A - Recovery method and device of Android system file - Google Patents
Recovery method and device of Android system file Download PDFInfo
- Publication number
- CN106648977A CN106648977A CN201611100657.0A CN201611100657A CN106648977A CN 106648977 A CN106648977 A CN 106648977A CN 201611100657 A CN201611100657 A CN 201611100657A CN 106648977 A CN106648977 A CN 106648977A
- Authority
- CN
- China
- Prior art keywords
- file
- file destination
- destination
- deleted
- path
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1448—Management of the data involved in backup or backup restore
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a recovery method and device of an Android system file. The method comprises the steps of establishing a temporary catalog when recovering the deleted target file; recovering the target file to the temporary catalog according to the file reading streams and file size contained in prestored original state information in the target file, wherein the original state information further contains the original file path of the target file; recovering the target file of the temporary catalog to the position which the original file path points to. According to the recovery method and device of the Android system file, the technical problems in the prior art that file recovery method and operation are complicated and the file cannot be recovered specifically are solved, the deleted file can be recovered effectively and specifically, and the efficiency of file recovery is improved.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of Android system file access pattern method and device.
Background technology
Android (Android) exploitation in, various files be typically stored in correspondence application program catalogue under or
In sdcard, wherein, these files include some temporary files, and such as image cache, network-caching etc. are also important including some
File, for example, be related to the file of state, the database of application program etc, with all kinds of cleaning softwares in current Android
Widely use, and the principle that each cleaning software is realized is not quite similar, and often goes out to be currently stored in some of application catalog
The phenomenon that the cleaned software of vital document is removed as garbage files.
In prior art, when needing to recover deleted file, need to carry out root operations to Android to locate
Reason, or need the whole disk to being deleted file to carry out process recovery.
Present inventor has found exist in prior art during the embodiment of the present application technical scheme is realized, at least
Following technical problem:
In prior art when recovering to deleted file, due to need to carry out Android root operations or
Person needs the whole disk to being deleted file to carry out processing recovery and there is complex operation, targetedly can not carry out file
The problem of recovery.
The content of the invention
The present invention provides a kind of restoration methods and device of Android system file, can solve file access pattern in prior art
Method complex operation, the technical problem that targetedly file can not be recovered.
In a first aspect, a kind of restoration methods of Android system file are embodiments provided, including:When recovering quilt
During the file destination of deletion, temp directory is created;The text included in preprocessed original state information according to the file destination for prestoring
Part reading flow and file size, the file destination is recovered to the temp directory, wherein, the preprocessed original state information is also wrapped
Include the original document path of the file destination;The file destination in the temp directory is restored into the original document
The position that path is pointed to.
Optionally, it is described to recover the file destination to the temp directory, including:Obtain the text of the file destination
Part reading flow;Obtain the file size of the file destination;Institute is write in the temp directory according to the file reading flow
State the data of file destination;According to the file size, the size of data of the control write file destination.
Optionally, before file destination is recovered, also include:Whether detection file destination is deleted.
Optionally, whether the detection file destination is deleted, including:Obtain the current file road of the file destination
Footpath;Obtain the original document path of the file destination;If the current file path is inconsistent with the original document path,
Then determine that the file destination is deleted.
Optionally, before the original document path for obtaining the file destination, also include:The text deposited according to prestoring
Part identification code determines the original document path of the file destination.
On the other hand, a kind of device of Android system file access pattern is embodiments provided, including:Creation module,
For to recover during deleted file destination, temp directory is created;Recovery module, for according to the file destination for prestoring
Preprocessed original state information in the file reading flow that includes and file size, the file destination is recovered to the temp directory,
Wherein, the preprocessed original state information also includes original document path;Recovery module, for by the mesh in the temp directory
Mark file is restored to the position that the original document path is pointed to.
Optionally, the recovery module includes that first acquisition unit, the file for obtaining the file destination reads
Stream;Second acquisition unit, for obtaining the file size of the file destination;Writing unit, for being read according to the file
Stream writes the data of the file destination in the temp directory;Control unit, for according to the file size, control to be write
Enter the size of data of the file destination.
Optionally, described device also includes detection module, and the detection module is used to detect whether file destination is deleted.
Optionally, the detection module, including:3rd acquiring unit, for obtaining the current file path of file destination;
4th acquiring unit, for obtaining the original document path of file destination;First determining unit, for when the current file road
When footpath is inconsistent with the original document path, determine that the file destination is deleted.
Optionally, the detection module also includes:Second determination subelement, in the original document for obtaining file destination
Before path, the original document path of the file destination is determined according to the document identifier code for prestoring.
Compared with prior art, one or more technical schemes for providing in the embodiment of the present invention, at least with following skill
Art effect or advantage:
A kind of restoration methods and device of Android system file that the embodiment of the present application is provided, deposit in android system
The preprocessed original state information of All Files has been stored up, when file destination is deleted, can be according in the preprocessed original state information of file
File reading flow and file size, in restoring it into temp directory, and according to original document path, by the mesh in temp directory
Mark file carries out path reduction, so as to realize the recovery of file destination, and without the need for root operations are carried out to system or by file institute
Whole disk recovered, solve existing file access pattern method complex operation, it is impossible to targetedly to being deleted text
The problem that part is recovered, effectively, targetedly can recover to deleted file, improve the effect of file access pattern
Rate.
Description of the drawings
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are these
Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow chart of android system file access pattern method in the embodiment of the present invention;
Fig. 2 is the structural representation of android system file restoring device in the embodiment of the present invention.
Specific embodiment
Restoration methods and device that the embodiment of the present application passes through a kind of Android system file of offer, can solve prior art
Middle file restoration methods complex operation, the technical problem that targetedly file can not be recovered, can effectively, have pin
Property is recovered to deleted file, the efficiency of file access pattern is improved.
Technical scheme in the embodiment of the present application, general thought is as follows:When to recover deleted file destination, create
Temp directory, and the file reading flow and file size in the preprocessed original state information of the file destination for prestoring, by institute
State file destination to recover to the temp directory, and the preprocessed original state information is also including the original document of the file destination
Path;Again the file destination in the temp directory is restored into the position that the original document path is pointed to.
In above-mentioned file access pattern method, the preprocessed original state information due to storing All Files in android system is former
Beginning status information includes file reading flow, file size and original document path, when file destination is deleted, can be according to mesh
The file reading flow and file size of mark file is restored it into temp directory, and according to original document path by temp directory
In file destination be restored to original document path sensing position, and without the need for system is carried out root operations or will delete text
Part be located whole disk recovered, solve file restoration methods complex operation in prior art, can not be targetedly
The technical problem recovered to file, effectively, targetedly can recover to deleted file, improve file extensive
Multiple efficiency.
In order to be better understood from above-mentioned technical proposal, below by accompanying drawing and specific embodiment to technical solution of the present invention
It is described in detail, it should be understood that the specific features in the embodiment of the present invention and embodiment are to the detailed of technical solution of the present invention
Thin explanation, rather than to the restriction of technical solution of the present invention, in the case where not conflicting, the embodiment of the present invention and embodiment
In technical characteristic can be mutually combined.
Embodiment one
The present embodiment provides a kind of method of android system file access pattern, refer to Fig. 1, and methods described includes:
Step S101, when to recover deleted file destination, creates temp directory;
Step S102, the file reading flow included in the preprocessed original state information according to the file destination for prestoring and file
Size, the file destination is recovered to the temp directory, wherein, the preprocessed original state information also includes the file destination
Original document path;
Step S103, by the file destination in the temp directory position that the original document path is pointed to is restored to
Put;
For example, said method can apply in the various devices of Android system, such as smart mobile phone, flat board electricity
Brain, Intelligent bracelet etc..
Specifically, user, in order to improve the performance of system, can usually utilize cleaning software pair when using Android system
File in Android system is cleared up, and in scale removal process, a part of vital document is taken as garbage files deletion, the present invention
A kind of method for describing to recover after file is deleted in android, when to recover deleted file destination, creates interim
Catalogue;, and the file reading flow and file size in the preprocessed original state information of the file destination for prestoring, by the mesh
Then the file destination in the temp directory is restored to the original document by mark file access pattern to the temp directory
The position that path is pointed to, so need not carry out root operations to android equipment, also should not be separately through to disk
Reason is recovered, it is only necessary to can just recover deleted file in application layer process, solve file access pattern in prior art
Method complex operation, the technical problem that targetedly file can not be recovered, can effectively, targetedly to quilt
Delete file to be recovered, improve the efficiency of file access pattern.
Next, the method for the android system file access pattern provided the application with reference to Fig. 1 describes in detail:
First, execution step S101, when to recover deleted file destination, creates temp directory.
Specifically, when to recover deleted file destination, a temp directory is created first, the temp directory is
One empty list, can be used to store the file destination for being deleted and then being recovered.
Then, execution step S102:
Step S102, the file reading flow included in the preprocessed original state information according to the file destination for prestoring and file
Size, the file destination is recovered to the temp directory, wherein, the preprocessed original state information also includes the file destination
Original document path;
Specifically, the preprocessed original state information of All Files is stored in Android system, these status informations include file
The information such as identification code, file reading flow, file size, original document path, wherein, the identification code of file is to refer to unique knowledge
The feature of other this document, for example, can be filename and md5 check codes, and file reading flow is the reading manner of file, file
Size is the memory capacity of file, and original document path can be used as judging the foundation whether file destination is deleted, and will
The path of file destination carries out the operation such as reducing.
In specific implementation process, in Android system, the file stored in system can be monitored, each waits to supervise
The file listened has its FileObserver object, can be by the preprocessed original state information of file:Document identifier code, file read
Stream, file size and original document path are placed in the realizing in class of FileObserver classes as attribute, wherein, document identifier code
Including filename and md5 check codes, the MessageDigest tool-class that can be provided using system that obtains of md5 check codes is come
Realize, and the file reading flow of original document is preserved by creating FileInputStream objects, it is above-mentioned
The parameter of FileInputStream objects is exactly the original document path of this document, then by FileInputStream objects
Available methods conveniently can subsequently find the hard disk position for being deleted file to obtain, such a band needs to be monitored text
The FileObserver Object Creations of each attribute of part complete, that is, the preprocessed original state information for completing All Files is deposited
Storage.Then above-mentioned object can be stored by a Hash table, it should be noted that Hash table is direct according to key (Key)
Access the data structure in memory storage locations.That is, it is by calculating a function with regard to key assignments, by required inquiry
Data be mapped in table a position to access record, so can accelerate to search speed, this mapping function then referred to as dissipates
Array function, the array for storage record is referred to as hash table.It is stored with by Hash table and know beneficial to locating file during follow-up recovery
The range of information such as other code, file reading flow, file size, in specific application process, Hash table can pass through HashMap
The put methods of class are created.
In addition to the storage that the attribute above by FileObserver objects carries out file preprocessed original state information, may be used also
So that by setting up an association catalogue or other modes come the preprocessed original state information of storage file, the present invention does not do concrete limit to this
It is fixed.
It should be noted that the file system format that various systems are adopted is not quite similar, but the file system of various systems
System has a common ground, is exactly that it individually opens up one piece of region as storing the note such as path of file in whole disk on hard disk
Record, for managing file, its most basic function is exactly the address of log file, for operating system reading, Android system
File system is the path indexing for deleting its file when file is deleted, all, and the storage content of this document is not carried out
Change, i.e., notify operating system when file is deleted, the position can write new data.
Specifically, the file destination deleted can be recovered by following steps:Obtain the file destination
File reading flow;Obtain the file size of the file destination;In specific implementation process, obtain the file reading flow and obtain
Two steps of file size order in no particular order is taken, the file reading flow can be first obtained, it is also possible to first obtains described
File size, can also simultaneously obtain the file reading flow and the file size.Due to file reading flow and file size
It is saved in document creation in the preprocessed original state information of file, file destination can be obtained in preprocessed original state information
File reading flow and file size, then write the file destination according to the file reading flow in the temp directory
Data;The index record of file is wherein contained in file reading flow, when file destination is deleted, can be read by file
Stream is read out to file destination, and is written in temp directory, i.e., file destination is recovered, then according to the file
The size of data of the size control write file destination, due to keep the data in temp directory consistent with original document
Property, need to be controlled the data for writing by the file size of original document.
Alternatively, deleted file destination is managed and operation for convenience, after temp directory is created, can be with
An empty file with the filename of file destination as title is created in temp directory, so as to follow-up file access pattern and each
The one-to-one corresponding of individual file.
In specific implementation process, the attribute of FileObserver objects is read first, and create a temp directory, use
To deposit the file for being deleted and then recovering, temp directory is referred to tmp here, first with the file of deleted file
Name creates an empty file under tmp, then the read methods of recursive call flow object, while recurrent wrIting is to the sky for creating
In file, till the size of the data for writing reaches original document size, specifically, creating one first to be deleted
The filename of file is the empty file object of title, and the empty file object is located under tmp catalogues, the entitled tmpfile of object, then
Create its write stream fs (to be exactly the FileOutputStream objects for creating tmpfile files, be by the object naming here
Fs), the object buffer that data are read in an interim storage stream is then defined, buffer types are byte arrays, are then followed
Ring reads fileinput, that is, calls its read method, and using buffer as parameter, when each time, buffer is assigned
When call the write method of fs to be write, such a complete file just under tmp catalogues recover.
Then, execution step S103, by the file destination in the temp directory original document road is restored to
The position that footpath is pointed to.
It should be noted that deleted file is recovered to temp directory, it is simply by the former file deleted
Content recovery, in addition it is also necessary to further reduce in the path of file.
In specific implementation process, the file under temp directory tmp is read first, first tmp catalogues are traveled through, obtain
The filename of each file under the catalogue, then by its File object of file name creation, then calculates each under tmp catalogues
The md5 effect codes of file, it should be noted that md5 verifications and (checksum) are to perform to dissipate by the transmission data to receiving
Column operations is checking the correctness of data.The hashed value for calculating is brought and is compared with the hashed value of data transfer.If two
Value is identical, illustrates that the data transmitted are completely errorless, was not tampered, and in the present embodiment, can pass through original document md5 schools
Whether the file for testing code with the comparison of the md5 check codes of the file for recovering to check recovery is consistent with original, that is, be used for
Reliability and accuracy that checking file recovers.And made a look up in the Hash table for creating before by filename, if looking into
The FileObserver objects of this document are have found, then the file md5 values by its preservation previous are imitated with current md5 values
Test and compare, be if the same shown to be same file, then the renameTo methods for directly invoking File objects move file
To script position, the reduction for having seen file path is thus completed, the file under whole tmp is performed successively all be resumed and expire
Script position.
Alternatively, before file destination is recovered, also include:Whether detection file destination is deleted, specifically, detection
Whether file destination is deleted comprises the steps:Obtain the current file path of the file destination;Obtain the target text
The original document path of part;If the current file path and the original document path are inconsistent, it is determined that the target text
Whether part is deleted.It should be noted that in specific implementation process, and when the original document path of file destination is obtained,
Also need to be determined file destination, can be determined by document identifier code in the present embodiment, the identification code of file is
The feature of unique identification this document is referred to, for example, can be filename, wherein filename may be used to determine file destination, and
Used as the basis for creating empty file under a temp directory, in embodiments herein, document identifier code is also verified including md5
Code, the md5 check codes then can be used to check recover file it is whether consistent with original, i.e., for checking file recovery can
By property and accuracy.
In specific implementation process, FileObserver classes are provided in Android system to be used to monitor specified file path
Change, so as to monitor the deletion action of this document, during FileObserver Object Creations receive a path as parameter, and
The change of the path specified file or catalogue is monitored by its startWatching method, path here can pass through
Outside carries out incoming, can be catalogue or file, if catalogue needs exist for recurrence and creates FileObserver objects, this
Sample can pass through the purpose that FileObserver objects can just reach the change in monitoring file path, in order to further enter to file
Row recovers and convenient management, will create one FileObserver pair to the file that each needs is monitored in the present embodiment
As after FileObserver object reference startWatching method file opening shapes body is monitored, rewriteeing its onEvent
Method is used for monitoring the event for wanting to monitor, and FileObserver.DELETE events will be monitored here
FileObserver.DELETE is the constant of the deletion file message defined inside FileObserver, when in onEvent side
Have received FileObserver.DELETE message tables prescribed paper in method to be deleted.
The present invention is identified by filename and md5 check codes in implementing to file, in specific implementation process, can
To be identified to file by other features, can be examined by the change in the path of file destination in the embodiment of the present invention
Survey whether file destination is deleted, in specific implementation process can also by the change of the file content of file destination or other
Mode detecting, to this invention is not limited in this regard.
Embodiment two
A kind of Android system file restoring device is present embodiments provided, Fig. 2 is refer to, described device includes:
Creation module 201, for recover during deleted file destination, creates temp directory;
Recovery module 202, for being read according to the file included in the preprocessed original state information of the file destination for prestoring
Stream and file size, the file destination is recovered to the temp directory, wherein, the preprocessed original state information includes the mesh
Mark file reading flow, file size and the original document path of file;
Recovery module 203, for the file destination in the temp directory to be restored into the original document path
The position of sensing.
In the embodiment of the present application, the recovery module 202, including:
First acquisition unit, for obtaining the file reading flow of the file destination;
First acquisition unit, for obtaining the file size of the file destination;
Writing unit, for writing the number of the file destination in the temp directory according to the file reading flow
According to;
Control unit, for according to the file size, the size of data of the control write file destination.
In the embodiment of the present application, described device also includes detection module, and the detection module is used to detect file destination
Whether it is deleted.
In the embodiment of the present application, the detection module includes:
3rd acquiring unit, for obtaining the current file path of file destination;
4th acquiring unit, for obtaining the original document path of file destination;
Determining unit, for when the current file path and the inconsistent original document path, determining the mesh
Mark file is deleted.
In the embodiment of the present application, the detection module also includes:
Second determination subelement, for before the original document path of file destination is obtained, being known according to the file for prestoring
Other code determines the original document path of the file destination.
The various change mode and instantiation of the Android system file access pattern method in previous embodiment is equally applicable to
The Android system file restoring device of the present embodiment, by the aforementioned detailed description to Android system file access pattern method, ability
Field technique personnel are clear that the file restoring device in the present embodiment, so succinct for specification, here is not
Describe in detail again.
Compared with prior art, one or more technical schemes for providing in the embodiment of the present invention, at least with following skill
Art effect or advantage:
A kind of restoration methods and device of Android system file that the embodiment of the present application is provided, deposit in android system
The preprocessed original state information of All Files has been stored up, when file destination is deleted, can be according in the preprocessed original state information of file
File reading flow and file size, in restoring it into temp directory, and according to original document path, by the mesh in temp directory
Mark file carries out path reduction, so as to realize the recovery of file destination, and without the need for root operations are carried out to system or by file institute
Whole disk recovered, solve existing file access pattern method complex operation, it is impossible to targetedly to being deleted text
The problem that part is recovered, effectively, targetedly can recover to deleted file, improve the effect of file access pattern
Rate.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or with reference to the reality in terms of software and hardware
Apply the form of example.And, the present invention can be adopted and wherein include the computer of computer usable program code at one or more
The computer program implemented in usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) is produced
The form of product.
The present invention is the flow process with reference to method according to embodiments of the present invention, equipment (system) and computer program
Figure and/or block diagram are describing.It should be understood that can be by computer program instructions flowchart and/or each stream in block diagram
The combination of journey and/or square frame and flow chart and/or the flow process in block diagram and/or square frame.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced for reality by the instruction of computer or the computing device of other programmable data processing devices
The device of the function of specifying in present one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy
In determining the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory is produced to be included referring to
Make the manufacture of device, the command device realize in one flow process of flow chart or one square frame of multiple flow processs and/or block diagram or
The function of specifying in multiple square frames.
These computer program instructions also can be loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented process, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow process of flow chart or multiple flow processs and/or block diagram one
The step of function of specifying in individual square frame or multiple square frames.
, but those skilled in the art once know basic creation although preferred embodiments of the present invention have been described
Property concept, then can make other change and modification to these embodiments.So, claims are intended to be construed to include excellent
Select embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out various changes and modification without deviating from this to the embodiment of the present invention
The spirit and scope of bright embodiment.So, if these modifications of the embodiment of the present invention and modification belong to the claims in the present invention
And its within the scope of equivalent technologies, then the present invention is also intended to comprising these changes and modification.
Claims (10)
1. a kind of restoration methods of Android system file, it is characterised in that methods described includes:
When to recover deleted file destination, temp directory is created;
The file reading flow included in preprocessed original state information according to the file destination for prestoring and file size, by the mesh
File access pattern is marked to the temp directory, wherein, the preprocessed original state information is also including the original document road of the file destination
Footpath;
The file destination in the temp directory is restored into the position that the original document path is pointed to.
2. restoration methods of Android system file according to claim 1, it is characterised in that described by the file destination
Recover to the temp directory, including:
Obtain the file reading flow of the file destination;
Obtain the file size of the file destination;
The data of the file destination are write in the temp directory according to the file reading flow;
According to the file size, the size of data of the control write file destination.
3. restoration methods of Android system file according to claim 1 and 2, it is characterised in that recovering file destination
Before, also include:Whether detection file destination is deleted.
4. restoration methods of Android system file according to claim 3, it is characterised in that the detection file destination is
It is no to be deleted, including:
Obtain the current file path of the file destination;
Obtain the original document path of the file destination;
If the current file path is inconsistent with the original document path, it is determined that the file destination is deleted.
5. restoration methods of Android system file according to claim 4, it is characterised in that obtain the target described
Before the original document path of file, also include:
Document identifier code according to prestoring determines the original document path of the file destination.
6. a kind of recovery device of Android system file, it is characterised in that include:
Creation module, for recover during deleted file destination, creates temp directory;
Memory module, for storing the preprocessed original state information of All Files, wherein, the preprocessed original state information includes the target
The file reading flow of file, file size and original document path;
Recovery module, for according to the file reading flow and file included in the preprocessed original state information of the file destination for prestoring
Size, the file destination is recovered to the temp directory;
Recovery module, for the file destination in the temp directory to be restored into the position that the original document path is pointed to
Put.
7. the recovery device of Android system file according to claim 6, it is characterised in that the recovery module, including,
First acquisition unit, for obtaining the file reading flow of the file destination;
Second acquisition unit, for obtaining the file size of the file destination;
Writing unit, for writing the data of the file destination in the temp directory according to the file reading flow;
Control unit, for according to the file size, the size of data of the control write file destination.
8. the recovery device of the Android system file according to claim 6 or 7, it is characterised in that described device also includes
Detection module, the detection module is used to detect whether file destination is deleted.
9. the recovery device of Android system file according to claim 8, it is characterised in that the detection module, including:
3rd acquiring unit, for obtaining the current file path of file destination;
4th acquiring unit, for obtaining the original document path of file destination;
First determining unit, for when the current file path is inconsistent with the original document path, determining the mesh
Mark file is deleted.
10. the recovery device of Android system file according to claim 8, it is characterised in that the detection module, also wraps
Include:
Second determination subelement, for the original document path for determining the file destination according to the document identifier code for prestoring.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611100657.0A CN106648977A (en) | 2016-12-05 | 2016-12-05 | Recovery method and device of Android system file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611100657.0A CN106648977A (en) | 2016-12-05 | 2016-12-05 | Recovery method and device of Android system file |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106648977A true CN106648977A (en) | 2017-05-10 |
Family
ID=58819025
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611100657.0A Pending CN106648977A (en) | 2016-12-05 | 2016-12-05 | Recovery method and device of Android system file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106648977A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144786A (en) * | 2018-08-28 | 2019-01-04 | 天阳宏业科技股份有限公司 | The restoration methods and recovery system of small documents in packaging file |
CN109408473A (en) * | 2018-10-30 | 2019-03-01 | 深圳市理奥网络技术有限公司 | A kind of method, apparatus for preventing file from accidentally deleting, equipment and storage medium |
CN110659254A (en) * | 2019-09-27 | 2020-01-07 | 浪潮电子信息产业股份有限公司 | Deleted file recovery method, device, equipment and readable storage medium |
CN111324483A (en) * | 2018-12-13 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Data recovery method and device and related equipment |
CN113010481A (en) * | 2021-03-18 | 2021-06-22 | 成都欧珀通信科技有限公司 | File capture method, device, terminal and storage medium |
CN113986617A (en) * | 2021-11-03 | 2022-01-28 | 厦门市美亚柏科信息股份有限公司 | Data recovery method and system based on MMKV file format |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030126163A1 (en) * | 2001-12-28 | 2003-07-03 | Hong-Yeon Kim | Method for file deletion and recovery against system failures in database management system |
CN102520878A (en) * | 2011-10-25 | 2012-06-27 | 深圳市江波龙电子有限公司 | Method and system for visiting intelligent secure digital (SD) card |
CN104199967A (en) * | 2014-09-22 | 2014-12-10 | 广东欧珀移动通信有限公司 | Cellphone file recovery method and device |
CN105045686A (en) * | 2015-08-28 | 2015-11-11 | 小米科技有限责任公司 | File recovery method and apparatus |
CN105912540A (en) * | 2015-12-11 | 2016-08-31 | 乐视移动智能信息技术(北京)有限公司 | Method and device for synchronizing file system |
-
2016
- 2016-12-05 CN CN201611100657.0A patent/CN106648977A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030126163A1 (en) * | 2001-12-28 | 2003-07-03 | Hong-Yeon Kim | Method for file deletion and recovery against system failures in database management system |
CN102520878A (en) * | 2011-10-25 | 2012-06-27 | 深圳市江波龙电子有限公司 | Method and system for visiting intelligent secure digital (SD) card |
CN104199967A (en) * | 2014-09-22 | 2014-12-10 | 广东欧珀移动通信有限公司 | Cellphone file recovery method and device |
CN105045686A (en) * | 2015-08-28 | 2015-11-11 | 小米科技有限责任公司 | File recovery method and apparatus |
CN105912540A (en) * | 2015-12-11 | 2016-08-31 | 乐视移动智能信息技术(北京)有限公司 | Method and device for synchronizing file system |
Non-Patent Citations (3)
Title |
---|
包佳敏、胡爱群: "Android 系统文件监听技术的研究", 《NETINFO SECURITY技术研究》 * |
杨育斌、程丽明: "一种细粒度的移动数据安全保护模型", 《研究与开发》 * |
黄佳洲: "基于Android平台的应用程序权限管理模型", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109144786A (en) * | 2018-08-28 | 2019-01-04 | 天阳宏业科技股份有限公司 | The restoration methods and recovery system of small documents in packaging file |
CN109408473A (en) * | 2018-10-30 | 2019-03-01 | 深圳市理奥网络技术有限公司 | A kind of method, apparatus for preventing file from accidentally deleting, equipment and storage medium |
WO2020087665A1 (en) * | 2018-10-30 | 2020-05-07 | 深圳市理奥网络技术有限公司 | Method for avoiding mistaken deletion of file, apparatus, device, and storage medium |
CN111324483A (en) * | 2018-12-13 | 2020-06-23 | 腾讯科技(深圳)有限公司 | Data recovery method and device and related equipment |
CN111324483B (en) * | 2018-12-13 | 2023-04-18 | 腾讯科技(深圳)有限公司 | Data recovery method and device and related equipment |
CN110659254A (en) * | 2019-09-27 | 2020-01-07 | 浪潮电子信息产业股份有限公司 | Deleted file recovery method, device, equipment and readable storage medium |
CN110659254B (en) * | 2019-09-27 | 2022-04-22 | 浪潮电子信息产业股份有限公司 | Deleted file recovery method, device, equipment and readable storage medium |
CN113010481A (en) * | 2021-03-18 | 2021-06-22 | 成都欧珀通信科技有限公司 | File capture method, device, terminal and storage medium |
CN113010481B (en) * | 2021-03-18 | 2023-06-09 | 成都欧珀通信科技有限公司 | File capturing method, device, terminal and storage medium |
CN113986617A (en) * | 2021-11-03 | 2022-01-28 | 厦门市美亚柏科信息股份有限公司 | Data recovery method and system based on MMKV file format |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106648977A (en) | Recovery method and device of Android system file | |
KR100622801B1 (en) | Rapid restoration of file system usage in very large file systems | |
US9367598B2 (en) | Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation | |
US8290994B2 (en) | Obtaining file system view in block-level data storage systems | |
US9802124B2 (en) | Apparatus and method for cloning and snapshotting in multi-dimensional to linear address space translation | |
CN108021337B (en) | Storage container for streamlined access and migration of data packaging | |
CN104423961B (en) | A kind of method and system for generating test script | |
CN110659254B (en) | Deleted file recovery method, device, equipment and readable storage medium | |
CN109710185A (en) | Data processing method and device | |
US20160034201A1 (en) | Managing de-duplication using estimated benefits | |
JP2014507022A (en) | Position-based image organization | |
CN104346384A (en) | Method and device for processing small files | |
CN106155832A (en) | Method, device and the Android device that a kind of data are recovered | |
CN110990346A (en) | File data processing method, device, equipment and storage medium based on block chain | |
CN110008197A (en) | A kind of data processing method, system and electronic equipment and storage medium | |
CN109657167B (en) | Data acquisition method, device, server and storage medium | |
US20190384754A1 (en) | In-place updates with concurrent reads in a decomposed state | |
CN109471901B (en) | Data synchronization method and device | |
CN111625853B (en) | Snapshot processing method, device and equipment and readable storage medium | |
CN109460312A (en) | Request the processing method and processing device of failure | |
CN106557572A (en) | A kind of extracting method and system of Android application program file | |
CN112000971A (en) | File permission recording method, system and related device | |
CN110928945A (en) | Data processing method and device for database and data processing system | |
CN108140047B (en) | Data processing apparatus and method, and data container structure | |
CN112632211A (en) | Semantic information processing method and equipment for mobile robot |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170510 |
|
RJ01 | Rejection of invention patent application after publication |