Application program interface (API) intercepting method and device and mobile terminal

A technology that is activated and progressed, applied in the direction of program control devices, error judgments, instruments, etc., and can solve problems such as unapplicable function expansion or modification

Active Publication Date: 2013-01-02
TENCENT TECH (SHENZHEN) CO LTD +1
View PDF3 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] At present, when manufacturers produce terminals using the Android system, they can directly build applications in the terminal, and users can also install other applications in the terminal according to their own needs; these a...

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
  • Application program interface (API) intercepting method and device and mobile terminal
  • Application program interface (API) intercepting method and device and mobile terminal
  • Application program interface (API) intercepting method and device and mobile terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] Such as figure 1 As shown, the embodiment of the present invention provides a method for intercepting functions, including:

[0043] Step 101: Real-time monitoring of the API process in the virtual machine corresponding to the system according to the process identifier of the API process;

[0044] Step 102: when the API process is started, obtain the virtual machine instance corresponding to the API process from memory according to the process ID of the API process;

[0045]Step 103: According to the identification information of the API to be intercepted, from the virtual machine instance corresponding to the API process, replace the code pointing address of the first API written in the first computer language to be intercepted with the stored code written in the second computer language and The code of the second API corresponding to the first API points to an address, and the second language is different from the first code;

[0046] The control over the API proces...

Embodiment 2

[0049] The embodiment of the present invention provides a method for intercepting functions.

[0050] Among them, the target application is an application that needs to be extended or modified, and the function of the target application can be extended or modified by modifying one or more steps included in the target application. ; Wherein, the API used to realize these steps is the first API to be intercepted; and the technician has developed the second API in advance, and the second API is used to realize the modified steps, and the method provided by this embodiment is used to run The function to be intercepted called by the API process of the target application is intercepted, so that the API process calls the second API developed by the technician in advance, so that the function of the target application is extended or the function of the target application is modified. see figure 2 , the method includes:

[0051] Step 201: Monitor the API process running the target a...

Embodiment 3

[0075] Such as image 3 As shown, the embodiment of the present invention provides an API interception device, including:

[0076] The monitoring module 301 is used to monitor the API process in real time in the virtual machine corresponding to the system according to the process identification of the API process;

[0077]The obtaining module 302 is used to obtain a virtual machine instance corresponding to the API process from the memory according to the process identification of the API process when the API process is started;

[0078] The interception module 303 is used to replace the code pointing address of the first API written in the first computer language to be intercepted with the stored code in the second computer language from the virtual machine instance corresponding to the API process according to the identification information of the API to be intercepted. The code of the second API written and corresponding to the first API points to the address, and the seco...

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 an application program interface (API) intercepting method, an API intercepting device and a mobile terminal and belongs to the field of mobile terminals. The method comprises the following steps of: monitoring an API progress in a virtual machine corresponding to the system in real time according to a progress identifier of the API progress; acquiring a virtual machine instance which corresponds to the API progress from a memory according to the progress identifier of the API progress when the API progress is started; replacing a code directing address of the intercepted first API written by the first computer language into a code directing address of the stored second API which is written by the second computer language and corresponds to the first API from the virtual machine instance which corresponds to the API progress according to the identification information of the intercepted API, wherein the second language is different from the first code; and controlling the API progress through a second function. The device comprises a monitoring module, an acquisition module and a replacement module. The application function can be expanded or modified.

Description

technical field [0001] The present invention relates to the field of mobile terminals, in particular to an API (Application Programming Interface, Application Programming Interface) interception method, device and mobile terminal. Background technique [0002] With the rapid development of the Android (Android) system, more and more terminals use the Android system. The Android system is an open source system that can install applications in terminals using the Android system. The Android system provides an operating environment for the application. [0003] At present, when manufacturers produce terminals using the Android system, they can directly build applications in the terminal, and users can also install other applications in the terminal according to their own needs; these applications are provided by the corresponding manufacturers, and each application is in the After the development is completed, the functions of each application are fixed, and the functions of th...

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
IPC IPC(8): G06F9/44
CPCG06F9/45558G06F9/45533G06F2009/45591G06F9/44G06F9/4843G06F11/3003G06F11/006G06F11/3093G06F2201/815G06F2201/865
Inventor 张立春
Owner TENCENT TECH (SHENZHEN) CO LTD
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