API Interception for Android Application Extension
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Device complexity
If applications are built-in with fixed functions, then device complexity is reduced, but ease of operation and user customization deteriorate
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.
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.
3Adaptability or versatility
If API functions are replaced with custom functions, then adaptability and function extension are improved, but device complexity increases
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.
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.
Data Source
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.


