CN114443191A - Method for rapidly extracting application data of Android equipment - Google Patents
Method for rapidly extracting application data of Android equipment Download PDFInfo
- Publication number
- CN114443191A CN114443191A CN202111589273.0A CN202111589273A CN114443191A CN 114443191 A CN114443191 A CN 114443191A CN 202111589273 A CN202111589273 A CN 202111589273A CN 114443191 A CN114443191 A CN 114443191A
- Authority
- CN
- China
- Prior art keywords
- data
- screen
- adb
- text
- android
- 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
- 238000000034 method Methods 0.000 title claims abstract description 17
- 238000005096 rolling process Methods 0.000 claims abstract description 6
- 238000005215 recombination Methods 0.000 claims abstract description 5
- 230000006798 recombination Effects 0.000 claims abstract description 5
- 238000004891 communication Methods 0.000 claims description 4
- 238000004088 simulation Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 abstract description 10
- 238000005516 engineering process Methods 0.000 abstract description 6
- 230000000694 effects Effects 0.000 abstract description 2
- 238000013075 data extraction Methods 0.000 description 2
- 230000008707 rearrangement Effects 0.000 description 2
- DWDGSKGGUZPXMQ-UHFFFAOYSA-N OPPO Chemical compound OPPO DWDGSKGGUZPXMQ-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (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 relates to a method for rapidly extracting application data of Android equipment, which adopts a screen automatic rolling screen capture technology, obtains UI information of a current page through UIAutomator Dump, cooperates with an image OCR recognition technology, and forms a structured data mode through repeated data and data recombination to achieve the effect of rapidly extracting specific data. The invention has single extraction mode and simple operation, can quickly extract the designated data and form the structured data, and is suitable for quick analysis and judgment on site.
Description
Technical Field
The invention relates to the field of data forensics, in particular to a method for rapidly extracting application data of Android equipment.
Background
With the continuous evolution of the Android operating system, the data extraction mode of the Android device is more and more limited, most of the Android devices rely on a backup tool provided by a device manufacturer, and data downloading is performed in a protocol simulation mode and other modes, such as the data migration function of programs such as an OPPO mobile phone moving and a Huacheng mobile phone assistant.
Traditional data extraction, extraction time is long, the extracted data is complete, the extraction mode is various (such as mirror image, OTG backup and the like), and with the development and application of information technology, instant messaging on the mobile phone is more and more, the protection level of the mobile phone is more and more high, and the occupied capacity is more and more. The problems of high extraction difficulty, multiple extraction modes, incapability of extracting, long extraction time, incapability of extracting specified contents and the like become common industrial diseases; and the technical requirements for extractors are relatively high.
Disclosure of Invention
The invention aims to provide a method for rapidly extracting application data of Android equipment, and aims to solve the problems. Therefore, the invention adopts the following specific technical scheme:
a method for rapidly extracting application data of an Android device can comprise the following steps:
s1, establishing communication connection between an Android device and a PC (personal computer) through a USB (universal serial bus) line, and pushing an executable program to the Android device through an adb push command, wherein the executable program simulates a scroll screen depending on a simulation click function supported by an Android system;
s2, performing SCREENCAP screen capture of the current page through adb and downloading the current page to a PC;
s3, executing a shell uiautomator dump command through adb to obtain an xml file and downloading the xml file to a PC;
s4, rolling the screen and capturing the screen, comparing the screen with the previous screen capture to judge whether the screen is finished, if so, entering S5, otherwise, returning to S2;
s5, judging whether a frame in the xml file can obtain an available text, if so, entering S7, and if not, entering S6;
s6, recognizing the screenshot into a text through OCR software;
s7, carrying out duplicate removal on the text according to the similarity to form a container for storing complete data;
and S8, extracting data from the container, and recombining the data according to a recombination type, the cooperation of time, characters, left and right actions and text coordinates to form structured data.
Further, in S1, it is necessary to determine whether the Android device starts USB debugging, if so, the method proceeds to S2, otherwise, the user is guided to start USB debugging.
Further, before executing S2, the page needs to be pulled up to the top.
Further, the screenshot of S2 and the xml file of S3 are downloaded to the PC by executing an adb pull command.
Further, in S4, it is determined whether the screen shots are the same by comparing the picture file sizes.
By adopting the technical scheme, the invention has the beneficial effects that: the invention has single extraction mode and simple operation, can quickly extract the designated data and form the structured data, and is suitable for quick analysis and judgment on site.
Drawings
To further illustrate the various embodiments, the invention provides the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the embodiments. Those skilled in the art will appreciate still other possible embodiments and advantages of the present invention with reference to these figures. Elements in the figures are not drawn to scale and like reference numerals are generally used to indicate like elements.
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The invention will now be further described with reference to the drawings and the detailed description.
As shown in fig. 1, a method for quickly extracting application data of an Android device may include the following steps:
s1, establishing communication connection between the Android equipment and the PC through a USB line. After the Android device is connected with the PC through the USB line, whether the Android device starts USB debugging or not is judged, if yes, S2 is entered, and otherwise, the user is guided to start the USB debugging. After the Android device is in communication connection with the PC, an executable program can be pushed to the Android device through an adb push command, the executable program depends on a simulated click function supported by the Android system, and a system interface function is called to control the actions of sliding up, rolling and the like of a screen, so that the rolling can be simulated.
S2, performing SCREENCAP screen capture of the current page through adb and downloading the current page to the PC. Specifically, the page is firstly pulled up to the top, and then screenshot is performed through the adb self-contained command line SCREENCAP, and the specific operation mode is as follows: and executing adb exec-out scene-p/sdcard/1. png, and outputting the picture to the PC through the adb pull.
And S3, executing a shell uiautomator dump command through the adb to obtain an xml file and downloading the xml file to the PC. Specifically, the UI automation is a tool developed by google for UI automation, and the hierarchical relationship of UI interface elements and the attributes of each element can be obtained through the UI automation viewer. The specific operation mode is as follows: execute the shell uiautomator dump command (default output is/sdcard/window _ dump. xml), and then output xml to the PC via adb pull.
And S4, scrolling and screen-capturing, comparing with the previous screen-capturing to judge whether the screen is finished, if so, entering S5, and otherwise, returning to S2. When the file size of the current screenshot is the same as that of the previous screenshot, the current screenshot and the previous screenshot are the same, namely the two screenshots are the same after three consecutive comparisons, and the current page is completely finished. The comparison method is simple and quick and has high accuracy. It should be understood that other ways of comparing whether the two are the same may be used.
S5, judging whether the frame in the xml file can acquire the available text, if so, entering S7, and if not, entering S6.
And S6, recognizing the screenshot into a text through OCR software. Because part of UI interfaces are specially processed and cannot Dump text information, the OCR recognition technology is used for supplement, extraction of the text information can be completed, and integrity of data is ensured.
And S7, carrying out rearrangement on the text according to the similarity to form a container for storing complete data. Because the height of the context data interfaces of different UI interfaces is different, the UI text information is rolled according to the minimization principle, the extracted UI text information is repeated, the text information is put into a container, data rearrangement is carried out according to a certain similarity rule, and finally the container for storing complete data is formed.
And S8, forming structured data. Specifically, data is extracted from a container, and a UI text is integrated into structured data according to the recombination type (such as an account number type, a chat record type and a dynamic type) and the contents of time, characters, left and right actions, text coordinates and the like.
The method adopts the screen automatic rolling screen capture technology, obtains the UI information of the current page through the UIAutomator Dump, cooperates with the image OCR recognition technology, and performs the duplication elimination and recombination on the data to form the structured data, thereby achieving the effect of quickly extracting the specific data. Under partial scenes, aiming at the conditions that the extraction time of evidence is urgent and the extraction range is clear, the method can quickly extract specified data and form structured data, and is suitable for on-site quick analysis and judgment (such as quick analysis of a certain group of chat records).
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (5)
1. A method for rapidly extracting application data of Android equipment is characterized by comprising the following steps:
s1, establishing communication connection between an Android device and a PC (personal computer) through a USB (universal serial bus) line, and pushing an executable program to the Android device through an adb push command, wherein the executable program simulates scrolling depending on a simulation click function supported by an Android system;
s2, performing SCREENCAP screen capture of the current page through adb and downloading the current page to a PC;
s3, executing a shell uiautomator dump command through adb to obtain an xml file and downloading the xml file to a PC;
s4, rolling the screen and capturing the screen, comparing the screen with the previous screen capture to judge whether the screen is finished, if so, entering S5, otherwise, returning to S2;
s5, judging whether a frame in the xml file can obtain an available text, if so, entering S7, and if not, entering S6;
s6, recognizing the screenshot into a text through OCR software;
s7, carrying out duplicate removal on the text according to the similarity to form a container for storing complete data;
and S8, extracting data from the container, and recombining the data according to a recombination type, the cooperation of time, characters, left and right actions and text coordinates to form structured data.
2. The method according to claim 1, wherein in S1, it is determined whether the Android device starts USB debugging, if so, S2 is entered, otherwise, the user is guided to start USB debugging.
3. The method of claim 1, wherein the page is pulled up to the top prior to performing S2.
4. The method of claim 1, wherein the screenshot of S2 and the xml file of S3 are downloaded to the PC by executing an adb pull command.
5. The method of claim 1, wherein in S4, it is determined whether the screenshots are the same by comparing the sizes of the picture files.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111589273.0A CN114443191A (en) | 2021-12-23 | 2021-12-23 | Method for rapidly extracting application data of Android equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111589273.0A CN114443191A (en) | 2021-12-23 | 2021-12-23 | Method for rapidly extracting application data of Android equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114443191A true CN114443191A (en) | 2022-05-06 |
Family
ID=81364513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111589273.0A Pending CN114443191A (en) | 2021-12-23 | 2021-12-23 | Method for rapidly extracting application data of Android equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114443191A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117494116A (en) * | 2023-11-15 | 2024-02-02 | 上海弘连网络科技有限公司 | Auxiliary evidence obtaining method and device, storage medium and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105005474A (en) * | 2015-07-02 | 2015-10-28 | 盘石软件(上海)有限公司 | Microdevice for secretly extracting information of Android mobile phone and extraction method |
US20160266757A1 (en) * | 2013-11-04 | 2016-09-15 | Zte Corporation | Terminal Screenshot Method and Device |
CN109542788A (en) * | 2018-11-26 | 2019-03-29 | 南京烽火星空通信发展有限公司 | A kind of internal storage data evidence collecting method based on Android platform automated test tool |
CN109710140A (en) * | 2018-12-25 | 2019-05-03 | 清创网御(合肥)科技有限公司 | A kind of smart phone social application automatic data collection method |
CN111639000A (en) * | 2020-06-03 | 2020-09-08 | 公安部第三研究所 | Method for quickly extracting backup data of android mobile terminal and automatic backup system |
WO2021012502A1 (en) * | 2019-07-22 | 2021-01-28 | 平安科技(深圳)有限公司 | Screenshot information control method, device, computer apparatus, and storage medium |
CN112565311A (en) * | 2019-09-10 | 2021-03-26 | 辽宁瑞思科技有限公司 | Rapid evidence obtaining method for telecommunication fraud case victim |
-
2021
- 2021-12-23 CN CN202111589273.0A patent/CN114443191A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160266757A1 (en) * | 2013-11-04 | 2016-09-15 | Zte Corporation | Terminal Screenshot Method and Device |
CN105005474A (en) * | 2015-07-02 | 2015-10-28 | 盘石软件(上海)有限公司 | Microdevice for secretly extracting information of Android mobile phone and extraction method |
CN109542788A (en) * | 2018-11-26 | 2019-03-29 | 南京烽火星空通信发展有限公司 | A kind of internal storage data evidence collecting method based on Android platform automated test tool |
CN109710140A (en) * | 2018-12-25 | 2019-05-03 | 清创网御(合肥)科技有限公司 | A kind of smart phone social application automatic data collection method |
WO2021012502A1 (en) * | 2019-07-22 | 2021-01-28 | 平安科技(深圳)有限公司 | Screenshot information control method, device, computer apparatus, and storage medium |
CN112565311A (en) * | 2019-09-10 | 2021-03-26 | 辽宁瑞思科技有限公司 | Rapid evidence obtaining method for telecommunication fraud case victim |
CN111639000A (en) * | 2020-06-03 | 2020-09-08 | 公安部第三研究所 | Method for quickly extracting backup data of android mobile terminal and automatic backup system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117494116A (en) * | 2023-11-15 | 2024-02-02 | 上海弘连网络科技有限公司 | Auxiliary evidence obtaining method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104636322B (en) | The method and device that a kind of text replicates | |
CN103970516A (en) | Superfluous picture deletion method and device | |
JP2008293486A (en) | Source code analysis device, analysis program, and analysis method | |
JP5779077B2 (en) | Apparatus and method for supporting program generation | |
CN106406913B (en) | Method and system for extracting codes from project | |
WO2017127274A1 (en) | Method and an apparatus for providing a multitasking view | |
CN114443191A (en) | Method for rapidly extracting application data of Android equipment | |
CN112416775A (en) | Software automation testing method and device based on artificial intelligence and electronic equipment | |
CN109542569A (en) | Method, apparatus, terminal and the storage medium of display language are set | |
CN109460236B (en) | Program version construction and checking method and system | |
CN116089256B (en) | Terminal testing method, device and storage medium | |
EP3398186B1 (en) | System and method for automatic creation of step-by-step interactive guide using wearable devices | |
CN110465093B (en) | Method and device for analyzing inclusion redundant resources based on Unity | |
CN114756448A (en) | Automatic testing system and method for reduction degree of user interface | |
CN111767214B (en) | Automatic testing method and device for software UI | |
CN109522187B (en) | Method and device for quickly extracting state information | |
CN101111029A (en) | Method and device for obtaining operating data | |
CN110262856B (en) | Application program data acquisition method, device, terminal and storage medium | |
CN113849118A (en) | Image identification method applied to electronic whiteboard and related device | |
CN109948251B (en) | CAD-based data processing method, device, equipment and storage medium | |
CN103491234A (en) | Data processing method and electronic equipment | |
CN113515280A (en) | Page code generation method and device | |
CN112288835A (en) | Image text extraction method and device and electronic equipment | |
Chu et al. | Automated GUI testing for android news applications | |
CN112752154A (en) | Software upgrading method and device and smart television |
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 |