API Interception for Android Application Extension

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing Android system applications have fixed functions that cannot be extended or modified, limiting user customization and functionality enhancement.

Innovation Solution

An API interception method and device that monitors API processes in a virtual machine, replaces API addresses written in one computer language with equivalent functions written in another language, such as C or C++, to enable control and modification of API processes in real-time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If applications are directly built into the terminal with fixed functions, then system stability and reliability are improved, but adaptability and ease of modification deteriorate

Engineering Contradiction:
Improvesystem stabilityVSAvoidfunction extension capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent segments the application function into original API functions and extension API functions. The original application code remains unchanged and built into the terminal, ensuring stability. Extension functions are separated as independent modules that can be dynamically loaded and installed, providing adaptability without affecting the core system.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an API interception mechanism as an intermediary layer between the original application APIs and the extension functions. This interception layer detects API calls, matches them with corresponding extension functions, and redirects execution to the appropriate function, allowing dynamic function extension while maintaining the integrity of the original built-in application.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Device complexity

If applications are built-in with fixed functions, then device complexity is reduced, but ease of operation and user customization deteriorate

Engineering Contradiction:
Improveapplication structure complexityVSAvoiduser customization capability
Core Design Contradiction:
Device complexityVSEase of operation

Solution Approach 1:

The patent divides application functions into core built-in components and user-installed extension components. This segmentation allows the base system to remain simple while enabling users to customize functionality by installing additional extension modules according to their needs.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The API interception mechanism serves as an intermediary that transparently handles the complexity of function extension. Users can install custom functions without understanding the underlying complexity, as the interception layer automatically manages the integration between original and extended functions.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Adaptability or versatility

If API functions are replaced with custom functions, then adaptability and function extension are improved, but device complexity increases

Engineering Contradiction:
ImproveAPI function customizationVSAvoidAPI interception mechanism complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces an API interception mechanism as an intermediary layer between the original application APIs and the extension functions. This interception layer detects API calls, matches them with corresponding extension functions, and redirects execution to the appropriate function, allowing dynamic function extension while maintaining the integrity of the original built-in application.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a virtual copy of the API calling process through the interception mechanism. Instead of modifying the original application code, the system creates a virtual interception layer that copies the API call flow and redirects it to extension functions, avoiding direct modification and reducing the complexity of managing changes.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8863157B2Method, device, and mobile terminal for API interception
Publication Date: 2014.10.14 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US8863157B2 patent drawing
  • US8863157B2 patent drawing
  • US8863157B2 patent drawing

AI summary

The present invention discloses an application programming interface interception method and device, and a mobile terminal. The method includes: monitoring, based on a process identifier of an API process, the API process in a virtual machine corresponding to a system in real time; when the API process is activated, obtaining a virtual machine instance corresponding to the API process from a memory according to the process identifier; according to identifier information of an API to be intercepted, replacing an address pointing to the code of a first API written in a first computer language corresponding to the API process with a stored address pointing to the code of a second API (or a replacement function) corresponding to the first API and written in a second computer language different from the first language; and implementing control on the API process through a second API function.