Mobile app performance data collection method based on function interception technology

A technology of data acquisition and collection method, applied in the direction of inter-program communication, multi-programming device, etc., can solve the problems of unable to stop normally, unable to identify which process the data comes from, incomplete performance data, etc.

Active Publication Date: 2017-12-08
北京博睿宏远数据科技股份有限公司
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] 1. The stability of TCPDUMP running on various types of mobile phones is very poor, and it often encounters the situation that it cannot stop normally and captures incomplete pcap packets.
[0009] 2. TCPDUMP captures the network communication data on the entire system, and cannot identify which process the data comes from
This will cause DNS, TCP, and UDP data of non-target programs to be entrained during network data analysis, which will lead to errors in data-based analysis
[0010] 3. The data acquisition of TCPDUMP can only observe the data but not modify the data
This leads to a longer initialization time
[0013] 2. ADDRESS HOOK searches for external dependencies based on the function name to match. If there is a function with the same function name as LibC in the custom dynamic library export table, and this function is referenced by other dynamic libraries, then HOOK may cause Program execution crashes
[0015] 4. In Android, ADDRESS HOOK cannot intercept the calling method of using function pointer to call LibC network library
Will result in incomplete performance data
[0016] 5 This method is easy to be blocked and easily bypassed by codes with higher security, so that the effect of hooking cannot be achieved

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Mobile app performance data collection method based on function interception technology
  • Mobile app performance data collection method based on function interception technology
  • Mobile app performance data collection method based on function interception technology

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0035] The specific implementation steps of the present invention are as follows:

[0036] step one:

[0037] Before the target APP starts, use ptrace call to inject your own dynamic library S into the zyogte process, and use ADDRESS HOOK to intercept the fork method, and complete the related network functions in LibC (getaddrinfo, gethostbyname, connect, send) in the fork replacement function. , sendto, write, sendmsg, recv, recvfrom, read, recvmsg, close) and socket event monitoring functions (select, poll, epoll_wait) do the initialization process of Inline Hook; in this way, because the APP process is copied by zygote (copy) Come out, when the APP process is started, the Inline Hook for the APP process has been completed;

[0038] The reason why this method can intercept the process network data is as follows:

[0039] There are two ways to call the network of APP programs under Android: one is to implement by calling java network libraries, such as java.net.Socket and java.net.H...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a mobile phone APP performance data collection method based on function interception technology. The specific implementation of the collection method is divided into three steps: before the target APP starts, use ptrace call to inject its own dynamic library S into the zyogte process, After the Inline Hook is completed; start the app process, and when network interaction occurs, the application will call the intercepted network function; in the part of the alternative function result processing, use the inter-process communication means provided by Android or Linux, UNIX domain socket, or local Socket, send the data to the data collection process; in this way, the network data collection of the target APP is completed. If the present invention needs to intercept network calls, it only needs to process the LibC dynamic library. The method provided by the invention modifies the machine code instruction of the target function, and the interception rate is 100%.

Description

Technical field [0001] The invention relates to a mobile phone APP performance data collection method, in particular to a mobile phone APP performance data collection method based on function interception technology. Background technique [0002] With the vigorous development of the mobile Internet, various mobile phone application clients (hereinafter referred to as APP) appear in our mobile phones. At present, most apps in the application market require network interaction, and the performance of network interaction directly affects the user experience of the APP. Therefore, understanding the network performance data of APPs used in various regions of the country and even the world can find ways to improve APP user experience. This is a concern of many mobile Internet companies. [0003] There are two existing methods for obtaining network performance data: [0004] The first one is obtained by capturing packets from a network card. Specifically, it is obtained on smart phones us...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/54
Inventor 吴少阳
Owner 北京博睿宏远数据科技股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products