AIDL Cross-Process Communication via Hash Identifiers
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In Android systems, cross-process communication between applications with different versions of AIDL files often results in errors and unavailable functions due to incompatible interface definitions, leading to poor user experience and reduced reliability in service calling.
Innovation Solution
A method for cross-process communication that involves converting AIDL files into Java files using unique identifiers based on attribute information such as interface names and parameter types, ensuring compatibility and reliability across different versions by using hash values or random values to identify service interfaces.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If AIDL files of different versions are used by the another application and the current application, then cross-process service calling can be implemented, but errors occur and functions become unavailable due to version incompatibility
Solution Approach 1:
The patent changes the identification parameter from version-dependent interface definitions to version-independent hash values. By computing hash values from interface names and parameter types, the system maintains consistent identification across different AIDL file versions, resolving the contradiction between adaptability to version changes and reliability of service calling.
Solution Approach 2:
The patent introduces hash values as an intermediary layer between the another application and the current application. This intermediary enables indirect identification of service interfaces without direct dependency on AIDL file versions, allowing compatible applications to communicate reliably even when version differences exist.
2Ease of operation
If traditional AIDL conversion method is used, then cross-process communication can be established, but interface identification fails when AIDL file versions differ
Solution Approach 1:
The patent replaces the mechanical system of direct AIDL file parsing and interface name matching with a hash-based identification system. This substitution computes cryptographic hash values from interface attributes, providing accurate and version-independent interface identification that resolves the contradiction between communication capability and identification accuracy.
3Adaptability or versatility
If AIDL files are converted using traditional methods, then service interfaces can be accessed, but interface definitions become inconsistent across different versions
Solution Approach 1:
The patent changes the interface definition representation from text-based AIDL files to hash-based identifiers. This parameter change ensures that interface definitions remain consistent across versions by using immutable hash values derived from the original interface signatures, maintaining stability while allowing adaptability to version evolution.
Data Source
AI summary
A terminal device includes a first application and at least one second application. The at least one second application accesses a service in the first application. The at least one second application sends an access request to the first application through cross-process communication. Because the access request includes an identifier uniquely corresponding to a target service interface of the service, the first application determines the target service interface based on the identifier, and executes a method object corresponding to the target service interface to generate an execution result.


