CN105892940A - Method for acquiring mobile phone partition mounting information on basis of Android platform - Google Patents
Method for acquiring mobile phone partition mounting information on basis of Android platform Download PDFInfo
- Publication number
- CN105892940A CN105892940A CN201610188485.0A CN201610188485A CN105892940A CN 105892940 A CN105892940 A CN 105892940A CN 201610188485 A CN201610188485 A CN 201610188485A CN 105892940 A CN105892940 A CN 105892940A
- Authority
- CN
- China
- Prior art keywords
- line
- value
- result
- name
- perform
- 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
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method for acquiring mobile phone partition mounting information on the basis of an Android platform. The method is characterized by comprising the following steps of 1 partition information entity constructing; 2 partition size and partition mounting path acquiring; 3 partition name acquiring mode determining; 4 partition logic name and actual mounting path matching. The method has the following advantages that partition mounting information can be acquired by depending on a smart phone, the mobility of the mobile phone can be adapted, evidence is obtained on site to be prevented from being destroyed, and the complete partition mounting information of the smart phone can be accurately acquired.
Description
Technical field
The present invention relates to field of information security technology, obtain mobile phone subregion particularly to one based on Android platform
The method of carry information.
Background technology
Electronic evidence-collecting refers to utilize computer hardware technique, to criminal behavior in the way of meeting legal norm
Carry out evidence acquisition, the process preserving, analyze and showing;Wherein in offender or victim smart mobile phone
There may be a large amount of available electron evidence, therefore the extractive technique for smart mobile phone information increases at quick
Exhibition.
At present when extracting smartphone data in order to not pollute the data in mobile phone, it is the most all to use mirror image
The mode of smart mobile phone subregion carries out data backup, such that it is able to mobile phone mirror image is performed data analysis operation,
Carrying out work of collecting evidence, a most important step of this kind of mode is to obtain the subregion mount point letter of smart mobile phone
Breath, if current smart mobile phone subregion carry information spinner is completed by PC end software, but PC end software must
So relying on PC, its portability is the poorest, it has not been convenient to in-situ FTIR spectroelectrochemitry data.
Summary of the invention
The present invention is directed to the defect of prior art, it is provided that a kind of based on Android platform acquisition mobile phone subregion carry
The method of information, can effectively solve the problem that the problem that above-mentioned prior art exists.
A kind of method obtaining mobile phone subregion carry information based on Android platform, comprises the following steps:
One, partition information entity is built;
The structure of this entity class is used for describing partition information, and it includes most basic three attribute: zone name,
Partition size and district location;
Wherein, zone name is the subregion title at logical layer;District location is the carry in systems of subregion
Path;
The establishment mode of entity class is directly to be beneficial to system approach, new partition information entity, newly-built entity
Method is new;
Create the division information entity set L, and this set is specifically designed to preservation partition information entity, when parsing terminates
Afterwards, set L preserves the complete partition information of this smart mobile phone;
Two, partition size, subregion carry path are obtained;
Three, confirm that zone name obtains mode;
Four, zoned logic title and the coupling in actual carry path.
As preferably, obtain partition size, subregion carry path detailed step as follows:
2.1: call primary excuse, open PROCESS process;
2.2: perform SHELL and instruct cat/proc/partitions, and preserve the result performing instruction, record
For S1;
2.3: reading S1 by row, record result is line, if line does not performs 2.4 for null, if line is
Null, represents result and resolves end execution step 3;
2.4: remove the null character string of line so that result becomes valid data;
2.5: judge whether line comprises " major ", if then representing one's own profession is not valid data, again hold
Row 2.3 operates;
2.6: utilize canonical formula " s* ", it is judged that one's own profession is spcial character the most entirely.If performing 2.3 behaviour
Make, if not performing then 2.7 operation;
2.7: according to canonical formula " s+ ", split line, segmentation result is the regular length for 4, result is protected
Exist in array A1 of a length of 4;
2.8: create the division information entity, and concrete to partition information entity setting up according to the above data obtained
Value.Wherein partition size A1 the 3rd value, the entitled A1 in carry path the 4th value, this entity is added
In L;The first of A1 value a1_1 and second a1_2 value are merged, merges mode a1_1+ ": "+a1_2;
As key, partitioning entity information is saved in MAP_P as value;
2.9: perform 2.3 operations.
As preferably, confirm that the detailed step of zone name acquisition mode is as follows:
3.1:BY_NAME mode reads zone name information;
3.1.1: obtaining All Files title under root, root is /dev/block/platform/;
3.1.2: judge whether there is catalogue under this catalogue, if there is performing 3.1.3, if there is no so
Perform 3.2;
3.1.3: traversing directories, at "/the by_name " added behind of each catalogue, and judge that this catalogue is
No existence.If it does, storing path is designated as P1, record BY_NAME reading manner F1 is TURE,
And perform step 4.It is FALSE if there is no then recording mark F1, so performs 3.2;
3.2:BY_NUM mode reads zone name information;
3.2.1: obtaining All Files title under root, root is /dev/block/platform/;
3.2.2: judge whether there is catalogue under this catalogue.If there is performing 3.2.3, if there is no so
Perform 3.3 operations;
3.2.3: traversing directories, at "/the by_num " added behind of each catalogue, and judge that this catalogue is
No existence, if it does, storing path is designated as P2, record BY_NAME reading manner flag F 2 is
TRUE, and perform step 4;If there is no, then recording mark F2 is FALSE, so performs 3.3 behaviour
Make;
3.3:DEFALUT mode reads zone name information;
When BY_NAME and BY_NUM mode is all false, i.e. F1, F2 are during FALSE the most straight
Connect execution step 4.
As preferably, zoned logic title and the coupling in actual carry path, obtain according to after step 3 execution
Mark F1, F2, F3 mark carries out zoned logic name and the coupling in subregion carry path;
Situation has three kinds, if the first F1 is TRUE performs 4.1 operations;If the second F1 is FALSE, F2
For TRUE, perform 4.2 operations;If the third F1, F2 are FALSE, then perform 4.3 operations;
4.1:NAME matching way performs coupling zoned logic and actual carry path, and detailed step is as follows:
4.1.1: call primary excuse, PROCESS process is opened;
4.1.2: perform SHELL and instruct ls lP1, and to preserve result be S2;
4.1.3: reading S2 by row, record result is line, if line does not performs 4.1.4 for null, if line
For null, represent result parsing and terminate, and perform 4.3;
4.1.4: remove the null character string of line so that result is for becoming valid data;
4.1.5: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A2 of a length of 8;
4.1.6:A2 the 6th value represents zoned logic name, and the 8th value of A2 represents subregion carry name;
4.1.7: traversal L, the partition information entity of coupling is found according to carry name, if finding, to therein
Zoned logic name carries out setting value;
4.1.8: repeat 4.1.3.
4.2:NUM matching way performs coupling zoned logic and actual carry path, and detailed step is as follows:
4.2.1: judge whether literary composition catalogue/proc/emmc exists, performing 4.2.2 if existing, holding if not existing
Row 4.3;
4.2.2: create dictionary MAP, perform SHELL and instruct cat/proc/emmc, and to preserve result be S3;
4.2.3: reading S3 by row, record result is line, if line does not performs 4.2.4 for null, if line
For null, represent result parsing and terminate, and perform 4.2.9;
4.2.4: remove the null character string of line so that result is for becoming valid data;
4.2.5: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A3 of a length of 8;
4.2.6: if A3 the 3rd comprises " fat " character string, be then replaced with " internal_sdcard ";
4.2.7:A3 the 1st value and A3 the 4th value are for preserving in the map as key and value;
4.2.8: repeat 4.2.3;
4.2.9: perform SHELL and instruct ls l P2, and to preserve result be S4;
4.2.10: reading S4 by row, record result is line, if line does not performs 4.2.11 for null, if line
For null, represent result parsing and terminate, and perform 4.3;
4.2.11: remove the null character string of line so that result is for becoming valid data;
4.2.12: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A4 of a length of 8;
4.2.13:A4 the 6th value represents zoned logic name, and the 8th value of A4 represents subregion carry name and write a Chinese character in simplified form;
4.2.14: traversal L, find the partition information entity of coupling according to carry name, and build KEY:
" emmc_ "+carry name+": ", finds concrete zoned logic name from MAP according to KEY, and believes subregion
Zoned logic name in breath entity carries out setting value, repeats 4.2.10;
4.3: complementary matching mode performs to mate zoned logic and actual carry path, and detailed step is as follows:
4.3.1:LS mode carries out obtaining virtual name and the mapping relations of subregion actual name;
4.3.1.1: create dictionary MAP_LS, perform SHELL instruction " ls-l ", and to preserve result be S5;
4.3.1.2: reading S5 by row, record result is line, if line does not performs 4.3.1.3 for null, if line
For null, represent result parsing and terminate, and perform 4.3.2;
4.3.1.3: remove the null character string of line, and judge whether line comprises "/dev/block ", if wrapping
Containing then performing 4.3.1.4, if not comprising, perform 4.3.1.2;
4.3.1.4: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A5 of a length of 8;
4.3.1.5:A5 the 6th value and A3 the 8th value are for preserving in the map as key and value;
4.3.1.6: repeat 4.3.1.2;
4.3.2:MOUNT mode obtains subregion actual name and the mapping relations in subregion carry path;
4.3.2.1: create dictionary MAP_MOUNT, perform SHELL instruction " mount ", and preserve result
For S6;
4.3.2.2: reading S6 by row, record result is line, if line does not performs 4.2.4 for null, if line
For null, represent result parsing and terminate, and perform 4.3.2;
4.3.2.3: remove line null character string, and judge line whether comprise " ext4 ", " vfat ",
" yaffs2 ", if comprising, performs 4.3.2.4, if not comprising execution 4.3.2.2;
4.3.2.4: if first value of A6 is to start with "/dev/block/vold ", perform 4.3.2.4.1,
If otherwise performing 4.3.2.5;
4.3.2.4.1: according to canonical formula " s+ ", splitting line, result is saved in array A6;
4.3.2.4.2: by the first of A6 value, the place finally comprising "/" starts segmentation, and as KEY;
4.3.2.4.3: obtain partition information entity from MAP_P according to KEY, the most then representing should
Entity is that sd card entity performs 4.3.2.4.4, the most then perform 4.3.2.5;
4.3.2.4.4: judge whether the carry path whether sd card entity is is mmcblk1p1, if then will
" ext_sdcard ", as value, "/dev/block/mmcblk1p1 ", as key, is saved in MAP_MOUNT,
If otherwise performing A6 second value conduct value, "/dev/block/mmcblk1p1 ", as key, is saved in
In MAP_MOUNT;
4.3.2.5: judge that whether first value of A6 start with "/dev/block/ ", if then by A6 the
One value is as key, and A6 second value, as value, is saved in MAP_MOUNT, if not by A6 the
One value a6_1, as value, is saved in MAP_MOUNT as key, A6 second value using "/"+a6_1
In;
4.3.2.6: traversal partition information entity sets L, the carry path p_index in partitioning entity is obtained,
And with "/dev/block/ "+p_index as key in MAP_MOUNT acquired value, when obtaining be successfully
Change the zone name of this partitioning entity into this value.
Compared with prior art it is an advantage of the current invention that: rely on the smart mobile phone just can the obtaining of subregion carry information
Take, be adapted to the mobility of mobile phone, scene evidence taking, prevent evidence to be destroyed, it is possible to accurately to obtain intelligence
The complete subregion carry information of mobile phone.
Detailed description of the invention
For making the purpose of the present invention, technical scheme and advantage clearer, by the following examples, to this
Invention is described in further details.
A kind of method obtaining mobile phone subregion carry information based on Android platform, comprises the following steps:
One, partition information entity is built;
Two, partition size, subregion carry path are obtained;
Three, confirm that zone name obtains mode;
Four, zoned logic title and the coupling in actual carry path.
One, partition information entity class, the entitled C1 of class are built.
The structure of this entity class is used for describing partition information, and it includes most basic three attribute: zone name,
Partition size and district location;
Wherein, zone name is the subregion title at logical layer;District location is the carry in systems of subregion
Path.
The establishment mode of entity class is directly to be beneficial to system approach, new partition information entity, newly-built entity
Method is new.
Create the division information entity set L, and this set is specifically designed to preservation partition information entity, when parsing terminates
Afterwards, set L preserves the complete partition information of this smart mobile phone.
Two, partition size, subregion carry path are obtained.
Confirm that then partition size can process SHELL in the way of directly being instructed by execution SHELL
Instruction returns the mode of result and carries out.
Create MAP_P set to be used for preserving all of partition information entity.
2.1: call primary excuse, open PROCESS process;
2.2: perform SHELL and instruct cat/proc/partitions, and preserve the result performing instruction, record
For S1;
2.3: reading S1 by row, record result is line, if line does not performs 2.4 for null, if line is
Null, represents result and resolves end execution step 3;
2.4: remove the null character string of line so that result becomes valid data;
2.5: judge whether line comprises " major ", if then representing one's own profession is not valid data, again hold
Row 2.3 operates;
2.6: utilize canonical formula " s* ", it is judged that one's own profession is spcial character the most entirely.If performing 2.3 behaviour
Make, if not performing then 2.7 operation;
2.7: according to canonical formula " s+ ", split line, segmentation result is the regular length for 4, result is protected
Exist in array A1 of a length of 4;
2.8: create the division information entity, and concrete to partition information entity setting up according to the above data obtained
Value.Wherein partition size A1 the 3rd value, the entitled A1 in carry path the 4th value, this entity is added
In L;The first of A1 value a1_1 and second a1_2 value are merged, merges mode a1_1+ ": "+a1_2;
As key, partitioning entity information is saved in MAP_P as value;
2.9: perform 2.3 operations.
Three, confirm that zone name obtains mode.
The information of subregion is saved among MAP_P by step 2, but step 2 does not obtain
Getting the logical name of subregion, zoned logic name and actual carry route matching have to be got up by we.And
The acquisition methods of zone name information is that the mode obtaining filename has three by reading the acquisition of the method for file
Kind, first is that BY_NUM mode reads, and second is that BY_NAME mode reads, the third
DEFALUT mode reading manner.Mode BY_NAME that these three kinds of partition names obtain is override side
Formula, and this kind of zone name reading manner is the most simple and efficient, next to that perform BY_NUM, finally
For performing DEFAULT mode.
3.1:BY_NAME mode reads zone name information;
3.1.1: obtaining All Files title under root, root is /dev/block/platform/;
3.1.2: judge whether there is catalogue under this catalogue, if there is performing 3.1.3, if there is no so
Perform 3.2 operations;
3.1.3: traversing directories, at "/the by_name " added behind of each catalogue, and judge that this catalogue is
No existence.If it does, storing path is designated as P1, record BY_NAME reading manner F1 is TURE,
And perform to operate four.It is FALSE if there is no then recording mark F1, so performs 3.2 operations.
3.2:BY_NUM mode reads zone name information;
3.2.1: obtaining All Files title under root, root is /dev/block/platform/;
3.2.2: judge whether there is catalogue under this catalogue.If there is performing 3.2.3, if there is no so
Perform 3.3 operations;
3.2.3: traversing directories, at "/the by_num " added behind of each catalogue, and judge that this catalogue is
No existence, if it does, storing path is designated as P2, record BY_NAME reading manner flag F 2 is
TRUE, and perform to operate four;If there is no, then recording mark F2 is FALSE, so performs 3.3 behaviour
Make.
3.3:DEFALUT mode reads zone name information;
When BY_NAME and BY_NUM mode is all false, i.e. F1, F2 are during FALSE the most straight
Connect execution step 4.
Four, zoned logic title and the coupling in actual carry path, the mark obtained after performing according to the 3rd step
F1, F2, F3 mark carries out zoned logic name and the coupling in subregion carry path;
If situation has three kinds of the first F1 to be that TRUE performs 4.1 operations, if the second F1 is FALSE, F2
For TRUE, performing 4.2 operations, if the third F1, F2 is FALSE, then perform 4.3 operations.
4.1:NAME matching way performs coupling zoned logic and actual carry path, and detailed step is as follows:
4.1.1: call primary excuse, PROCESS process is opened;
4.1.2: perform SHELL and instruct ls lP1, and to preserve result be S2;
4.1.3: reading S2 by row, record result is line, if line does not performs 4.1.4 for null, if line
For null, represent result parsing and terminate, and perform 4.3;
4.1.4: remove the null character string of line so that result is for becoming valid data;
4.1.5: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A2 of a length of 8;
4.1.6:A2 the 6th value represents zoned logic name, and the 8th value of A2 represents subregion carry name;
4.1.7: traversal L, the partition information entity of coupling is found according to carry name, if finding, to therein
Zoned logic name carries out setting value;
4.1.8: repeat 4.1.3.
4.2:NUM matching way performs coupling zoned logic and actual carry path, and detailed step is as follows:
4.2.1: judge whether literary composition catalogue/proc/emmc exists, performing 4.2.2 if existing, holding if not existing
Row 4.3;
4.2.2: create dictionary MAP, perform SHELL and instruct cat/proc/emmc, and to preserve result be S3;
4.2.3: reading S3 by row, record result is line, if line does not performs 4.2.4 for null, if line
For null, represent result parsing and terminate, and perform 4.2.9;
4.2.4: remove the null character string of line so that result is for becoming valid data;
4.2.5: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A3 of a length of 8;
4.2.6: if A3 the 3rd comprises " fat " character string, be then replaced with " internal_sdcard ";
4.2.7:A3 the 1st value and A3 the 4th value are for preserving in the map as key and value;
4.2.8: repeat 4.2.3;
4.2.9: perform SHELL and instruct ls l P2, and to preserve result be S4;
4.2.10: reading S4 by row, record result is line, if line does not performs 4.2.11 for null, if line
For null, represent result parsing and terminate, and perform 4.3;
4.2.11: remove the null character string of line so that result is for becoming valid data;
4.2.12: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A4 of a length of 8;
4.2.13:A4 the 6th value represents zoned logic name, and the 8th value of A4 represents subregion carry name and write a Chinese character in simplified form;
4.2.14: traversal L, find the partition information entity of coupling according to carry name, and build KEY:
" emmc_ "+carry name+": ", finds concrete zoned logic name from MAP according to KEY, and believes subregion
Zoned logic name in breath entity carries out setting value, repeats 4.2.10;
4.3: complementary matching mode performs to mate zoned logic and actual carry path, and detailed step is as follows:
When NUM and NAME mode all cannot get the coupling of zoned logic name and actual carry name,
Perform last arbitrary way coupling.
4.3.1:LS mode carries out obtaining virtual name and the mapping relations of subregion actual name;
4.3.1.1: create dictionary MAP_LS, perform SHELL instruction " ls-l ", and to preserve result be S5;
4.3.1.2: reading S5 by row, record result is line, if line does not performs 4.3.1.3 for null, if line
For null, represent result parsing and terminate, and perform 4.3.2;
4.3.1.3: remove the null character string of line, and judge whether line comprises "/dev/block ", if wrapping
Containing then performing 4.3.1.4, if not comprising, perform 4.3.1.2;
4.3.1.4: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A5 of a length of 8;
4.3.1.5:A5 the 6th value and A3 the 8th value are for preserving in the map as key and value;
4.3.1.6: repeat 4.3.1.2.
4.3.2:MOUNT mode obtains subregion actual name and the mapping relations in subregion carry path;
4.3.2.1: create dictionary MAP_MOUNT, perform SHELL instruction " mount ", and preserve result
For S6;
4.3.2.2: reading S6 by row, record result is line, if line does not performs 4.2.4 for null, if line
For null, represent result parsing and terminate, and perform 4.3.2;
4.3.2.3: remove line null character string, and judge line whether comprise " ext4 ", " vfat ",
" yaffs2 ", if comprising, performs 4.3.2.4, if not comprising execution 4.3.2.2;
4.3.2.4: if first value of A6 is to start with "/dev/block/vold ", perform 4.3.2.4.1,
If otherwise performing 4.3.2.5;
4.3.2.4.1: according to canonical formula " s+ ", splitting line, result is saved in array A6;
4.3.2.4.2: by the first of A6 value, the place finally comprising "/" starts segmentation, and as KEY;
4.3.2.4.3: obtain partition information entity from MAP_P according to KEY, the most then representing should
Entity is that sd card entity performs 4.3.2.4.4, the most then perform 4.3.2.5;
4.3.2.4.4: judge whether the carry path whether sd card entity is is mmcblk1p1, if then will
" ext_sdcard ", as value, "/dev/block/mmcblk1p1 ", as key, is saved in MAP_MOUNT,
If otherwise performing A6 second value conduct value, "/dev/block/mmcblk1p1 ", as key, is saved in
In MAP_MOUNT.
4.3.2.5: judge that whether first value of A6 start with "/dev/block/ ", if then by A6 the
One value is as key, and A6 second value, as value, is saved in MAP_MOUNT, if not by A6 the
One value a6_1, as value, is saved in MAP_MOUNT as key, A6 second value using "/"+a6_1
In.
4.3.2.6: traversal partition information entity sets L, the carry path p_index in partitioning entity is obtained,
And with "/dev/block/ "+p_index as key in MAP_MOUNT acquired value, when obtaining be successfully
Change the zone name of this partitioning entity into this value.
Those of ordinary skill in the art is it will be appreciated that embodiment described here is to aid in reader's reason
Solve the implementation of the present invention, it should be understood that protection scope of the present invention is not limited to such the oldest
State and embodiment.Those of ordinary skill in the art can make according to these technology disclosed by the invention enlightenment
Various other various concrete deformation and combinations without departing from essence of the present invention, these deformation and combination are still at this
In the protection domain of invention.
Claims (4)
1. the method obtaining mobile phone subregion carry information based on Android platform, it is characterised in that include following
Step:
One, partition information entity is built;
The structure of this entity class is used for describing partition information, and it includes most basic three attribute: zone name,
Partition size and district location;
Wherein, zone name is the subregion title at logical layer;District location is the carry in systems of subregion
Path;
The establishment mode of entity class is directly to be beneficial to system approach, new partition information entity, newly-built entity
Method is new;
Create the division information entity set L, and this set is specifically designed to preservation partition information entity, when parsing terminates
Afterwards, set L preserves the complete partition information of this smart mobile phone;
Two, partition size, subregion carry path are obtained;
Three, confirm that zone name obtains mode;
Four, zoned logic title and the coupling in actual carry path.
A kind of side obtaining mobile phone subregion carry information based on Android platform the most according to claim 1
Method, it is characterised in that step 2 obtain partition size, subregion carry path detailed step as follows:
2.1: call primary excuse, open PROCESS process;
2.2: perform SHELL and instruct cat/proc/partitions, and preserve the result performing instruction, record
For S1;
2.3: reading S1 by row, record result is line, if line does not performs 2.4 for null, if line is
Null, represents result and resolves end execution step 3;
2.4: remove the null character string of line so that result becomes valid data;
2.5: judge whether line comprises " major ", if then representing one's own profession is not valid data, again hold
Row 2.3 operates;
2.6: utilize canonical formula " s* ", it is judged that one's own profession is spcial character the most entirely.If performing 2.3 behaviour
Make, if not performing then 2.7 operation;
2.7: according to canonical formula " s+ ", split line, segmentation result is the regular length for 4, result is protected
Exist in array A1 of a length of 4;
2.8: create the division information entity, and concrete to partition information entity setting up according to the above data obtained
Value.Wherein partition size A1 the 3rd value, the entitled A1 in carry path the 4th value, this entity is added
In L;The first of A1 value a1_1 and second a1_2 value are merged, merges mode a1_1+ ": "+a1_2;
As key, partitioning entity information is saved in MAP_P as value;
2.9: perform 2.3 operations.
A kind of side obtaining mobile phone subregion carry information based on Android platform the most according to claim 2
Method, it is characterised in that step 3 confirms that the detailed step of zone name acquisition mode is as follows:
3.1:BY_NAME mode reads zone name information;
3.1.1: obtaining All Files title under root, root is /dev/block/platform/;
3.1.2: judge whether there is catalogue under this catalogue, if there is performing 3.1.3, if there is no so
Perform 3.2;
3.1.3: traversing directories, at "/the by_name " added behind of each catalogue, and judge that this catalogue is
No existence.If it does, storing path is designated as P1, record BY_NAME reading manner F1 is TURE,
And perform step 4.It is FALSE if there is no then recording mark F1, so performs 3.2;
3.2:BY_NUM mode reads zone name information;
3.2.1: obtaining All Files title under root, root is /dev/block/platform/;
3.2.2: judge whether there is catalogue under this catalogue.If there is performing 3.2.3, if there is no so
Perform 3.3 operations;
3.2.3: traversing directories, at "/the by_num " added behind of each catalogue, and judge that this catalogue is
No existence, if it does, storing path is designated as P2, record BY_NAME reading manner flag F 2 is
TRUE, and perform step 4;If there is no, then recording mark F2 is FALSE, so performs 3.3 behaviour
Make;
3.3:DEFALUT mode reads zone name information;
When BY_NAME and BY_NUM mode is all false, i.e. F1, F2 are during FALSE the most straight
Connect execution step 4.
A kind of side obtaining mobile phone subregion carry information based on Android platform the most according to claim 3
Method, it is characterised in that: step 4 zoned logic title and the coupling in actual carry path, need to be according to step 3
The mark F1 obtained after execution, F2, F3 mark carries out zoned logic name and the coupling in subregion carry path;
Situation has three kinds, if the first F1 is TRUE performs 4.1 operations;If the second F1 is FALSE, F2
For TRUE, perform 4.2 operations;If the third F1, F2 are FALSE, then perform 4.3 operations;
4.1:NAME matching way performs coupling zoned logic and actual carry path, and detailed step is as follows:
4.1.1: call primary excuse, PROCESS process is opened;
4.1.2: perform SHELL and instruct ls lP1, and to preserve result be S2;
4.1.3: reading S2 by row, record result is line, if line does not performs 4.1.4 for null, if line
For null, represent result parsing and terminate, and perform 4.3;
4.1.4: remove the null character string of line so that result is for becoming valid data;
4.1.5: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A2 of a length of 8;
4.1.6:A2 the 6th value represents zoned logic name, and the 8th value of A2 represents subregion carry name;
4.1.7: traversal L, the partition information entity of coupling is found according to carry name, if finding, to therein
Zoned logic name carries out setting value;
4.1.8: repeat 4.1.3.
4.2:NUM matching way performs coupling zoned logic and actual carry path, and detailed step is as follows:
4.2.1: judge whether literary composition catalogue/proc/emmc exists, performing 4.2.2 if existing, holding if not existing
Row 4.3;
4.2.2: create dictionary MAP, perform SHELL and instruct cat/proc/emmc, and to preserve result be S3;
4.2.3: reading S3 by row, record result is line, if line does not performs 4.2.4 for null, if line
For null, represent result parsing and terminate, and perform 4.2.9;
4.2.4: remove the null character string of line so that result is for becoming valid data;
4.2.5: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A3 of a length of 8;
4.2.6: if A3 the 3rd comprises " fat " character string, be then replaced with " internal_sdcard ";
4.2.7:A3 the 1st value and A3 the 4th value are for preserving in the map as key and value;
4.2.8: repeat 4.2.3;
4.2.9: perform SHELL and instruct ls l P2, and to preserve result be S4;
4.2.10: reading S4 by row, record result is line, if line does not performs 4.2.11 for null, if line
For null, represent result parsing and terminate, and perform 4.3;
4.2.11: remove the null character string of line so that result is for becoming valid data;
4.2.12: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A4 of a length of 8;
4.2.13:A4 the 6th value represents zoned logic name, and the 8th value of A4 represents subregion carry name and write a Chinese character in simplified form;
4.2.14: traversal L, find the partition information entity of coupling according to carry name, and build KEY:
" emmc_ "+carry name+": ", finds concrete zoned logic name from MAP according to KEY, and believes subregion
Zoned logic name in breath entity carries out setting value, repeats 4.2.10;
4.3: complementary matching mode performs to mate zoned logic and actual carry path, and detailed step is as follows:
4.3.1:LS mode carries out obtaining virtual name and the mapping relations of subregion actual name;
4.3.1.1: create dictionary MAP_LS, perform SHELL instruction " ls-l ", and to preserve result be S5;
4.3.1.2: reading S5 by row, record result is line, if line does not performs 4.3.1.3 for null, if line
For null, represent result parsing and terminate, and perform 4.3.2;
4.3.1.3: remove the null character string of line, and judge whether line comprises "/dev/block ", if wrapping
Containing then performing 4.3.1.4, if not comprising, perform 4.3.1.2;
4.3.1.4: according to canonical formula " s+ ", splitting line, segmentation result is the regular length for 8, by result
It is saved in array A5 of a length of 8;
4.3.1.5:A5 the 6th value and A3 the 8th value are for preserving in the map as key and value;
4.3.1.6: repeat 4.3.1.2;
4.3.2:MOUNT mode obtains subregion actual name and the mapping relations in subregion carry path;
4.3.2.1: create dictionary MAP_MOUNT, perform SHELL instruction " mount ", and preserve result
For S6;
4.3.2.2: reading S6 by row, record result is line, if line does not performs 4.2.4 for null, if line
For null, represent result parsing and terminate, and perform 4.3.2;
4.3.2.3: remove line null character string, and judge line whether comprise " ext4 ", " vfat ",
" yaffs2 ", if comprising, performs 4.3.2.4, if not comprising execution 4.3.2.2;
4.3.2.4: if first value of A6 is to start with "/dev/block/vold ", perform 4.3.2.4.1,
If otherwise performing 4.3.2.5;
4.3.2.4.1: according to canonical formula " s+ ", splitting line, result is saved in array A6;
4.3.2.4.2: by the first of A6 value, the place finally comprising "/" starts segmentation, and as KEY;
4.3.2.4.3: obtain partition information entity from MAP_P according to KEY, the most then representing should
Entity is that sd card entity performs 4.3.2.4.4, the most then perform 4.3.2.5;
4.3.2.4.4: judge whether the carry path whether sd card entity is is mmcblk1p1, if then will
" ext_sdcard ", as value, "/dev/block/mmcblk1p1 ", as key, is saved in MAP_MOUNT,
If otherwise performing A6 second value conduct value, "/dev/block/mmcblk1p1 ", as key, is saved in
In MAP_MOUNT;
4.3.2.5: judge that whether first value of A6 start with "/dev/block/ ", if then by A6 the
One value is as key, and A6 second value, as value, is saved in MAP_MOUNT, if not by A6 the
One value a6_1, as value, is saved in MAP_MOUNT as key, A6 second value using "/"+a6_1
In;
4.3.2.6: traversal partition information entity sets L, obtain the carry path p_index in partitioning entity, and use
"/dev/block/ "+p_index in MAP_MOUNT acquired value, is successfully by this when obtaining as key
The zone name of partitioning entity changes this value into.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610188485.0A CN105892940A (en) | 2016-03-29 | 2016-03-29 | Method for acquiring mobile phone partition mounting information on basis of Android platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610188485.0A CN105892940A (en) | 2016-03-29 | 2016-03-29 | Method for acquiring mobile phone partition mounting information on basis of Android platform |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105892940A true CN105892940A (en) | 2016-08-24 |
Family
ID=57013968
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610188485.0A Pending CN105892940A (en) | 2016-03-29 | 2016-03-29 | Method for acquiring mobile phone partition mounting information on basis of Android platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105892940A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847101A (en) * | 2009-03-24 | 2010-09-29 | Tcl集团股份有限公司 | Method for automatically mounting USB storage device under embedded Linux |
CN102664929A (en) * | 2012-04-05 | 2012-09-12 | 福兴达科技实业(深圳)有限公司 | Mobile terminal and method for managing mass storage device |
US20130332698A1 (en) * | 2012-06-07 | 2013-12-12 | Askey Computer Corp. | Data preservation method |
CN104391657A (en) * | 2014-11-24 | 2015-03-04 | 上海盈方微电子有限公司 | Method for mounting multi-partition storage device in Android system |
CN105302473A (en) * | 2014-06-23 | 2016-02-03 | 四川效率源信息安全技术有限责任公司 | System and method for carrying out physical mirroring extraction on phone body data of Android mobile phone |
-
2016
- 2016-03-29 CN CN201610188485.0A patent/CN105892940A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847101A (en) * | 2009-03-24 | 2010-09-29 | Tcl集团股份有限公司 | Method for automatically mounting USB storage device under embedded Linux |
CN102664929A (en) * | 2012-04-05 | 2012-09-12 | 福兴达科技实业(深圳)有限公司 | Mobile terminal and method for managing mass storage device |
US20130332698A1 (en) * | 2012-06-07 | 2013-12-12 | Askey Computer Corp. | Data preservation method |
CN105302473A (en) * | 2014-06-23 | 2016-02-03 | 四川效率源信息安全技术有限责任公司 | System and method for carrying out physical mirroring extraction on phone body data of Android mobile phone |
CN104391657A (en) * | 2014-11-24 | 2015-03-04 | 上海盈方微电子有限公司 | Method for mounting multi-partition storage device in Android system |
Non-Patent Citations (1)
Title |
---|
卫兵等: ""一种提高嵌入式系统UBI分区挂载速度的设计方案与研究"", 《计算机科学》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10795812B1 (en) | Virtual copy forward method and system for garbage collection in cloud computing networks | |
Ohana et al. | Do private and portable web browsers leave incriminating evidence? a forensic analysis of residual artifacts from private and portable web browsing sessions | |
CN102567427B (en) | Method and device for processing object data | |
KR101456757B1 (en) | Method and Apparatus for recovering deleted data for SQLite database | |
CN102902672B (en) | Method and device for cleaning file system | |
CN106445476B (en) | Code change information determination method and device and electronic equipment | |
CN108255638B (en) | Snapshot rollback method and device | |
Wahyudi et al. | Virtual machine forensic analysis and recovery method for recovery and analysis digital evidence | |
CN102331957A (en) | File backup method and device | |
CN111125298A (en) | Method, equipment and storage medium for reconstructing NTFS file directory tree | |
CN104298766B (en) | A kind of method of data in removing SQLite databases | |
CN107992763B (en) | Power failure protection method and device for file system | |
CN106372080A (en) | File clearing method, apparatus and system | |
CN106547823A (en) | Without drive crime scene investigation device data acquisition unit and method | |
CN106096447A (en) | A kind of document protection method and device | |
CN101228509A (en) | Device, method, and program for generating and executing execution binary image, and computer-readable recording medium containing the execution binary image execution program | |
D'Orazio et al. | Forensic collection and analysis of thumbnails in android | |
CN112800007B (en) | Directory entry expansion method and system suitable for FAT32 file system | |
CN113448946A (en) | Data migration method and device and electronic equipment | |
CN106909542A (en) | The method and device of information erasing is carried out on the terminal device | |
CN107220146B (en) | File scanning recovery method and device | |
CN111176901B (en) | HDFS deleted file recovery method, terminal device and storage medium | |
CN108629026A (en) | A kind of update method of full-text index, device, equipment and storage medium | |
CN105892940A (en) | Method for acquiring mobile phone partition mounting information on basis of Android platform | |
CN106446681B (en) | Checking and killing virus method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160824 |
|
WD01 | Invention patent application deemed withdrawn after publication |