Android Seed Process IPC Isolation for Linux
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for building an Android running environment on a Linux system using container tools like LXC result in resource-intensive and bloated systems, with slow startup times and inadequate control over individual processes.
Innovation Solution
A method and device that create a lightweight Android running environment by initiating a creation request for an Android environment seed process via an IPC interface, separating and mounting file systems, and creating basic service processes or threads, allowing for efficient resource usage and fast service startup through a fork-based inheritance mechanism.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If container tools like LXC are used to build Android running environment, then the Android service can be isolated and managed, but the system becomes resource-intensive and bloated with slow startup times
Solution Approach 1:
The patent extracts only the essential Android runtime components and file systems needed for specific services, rather than using a complete Android environment in a container. This selective extraction reduces resource consumption and startup time while maintaining service isolation through the seed process mechanism.
Solution Approach 2:
The Android file system is segmented into multiple mounted file systems (e.g., /system, /vendor, /data) that are selectively mounted based on service requirements. The seed process is also segmented into basic services that can be independently managed, allowing partial Android environment initialization rather than full system startup.
2Reliability
If container tools like LXC are used to build Android running environment, then the Android service can be isolated and managed, but the system complexity increases
Solution Approach 1:
The seed process acts as an intermediary between the Linux service and the Android runtime environment. It receives service startup requests, prepares the necessary Android file systems and basic services, and launches the target service. This intermediary simplifies the overall system architecture compared to full containerization while maintaining service isolation.
3Adaptability or versatility
If a complete Android file system is mounted for every service, then all Android functionalities are available, but resource consumption increases
Solution Approach 1:
Different file systems are mounted with different permissions and accessibility levels based on service requirements. The seed process mounts only the specific file systems needed for each service (e.g., /system for system services, /vendor for hardware abstraction layer), rather than mounting the complete Android file system for all services. This localizes file system access to what is actually needed.
Solution Approach 2:
The patent implements partial action by mounting only the necessary portions of the Android file system hierarchy required for specific services. Instead of mounting the entire Android file system tree, only relevant directories and file systems are mounted, reducing resource consumption while providing sufficient functionality for the targeted service.
Data Source
AI summary
Disclosed in the present application are a method and apparatus for constructing an Android running environment. The method in the present application includes: when a Linux service needs to start an Android service, the Linux service initiating a creation request for an Android environment seed process by means of an inter-process communication (IPC) interface, wherein the creation request includes a path and a running parameter of a program corresponding to the Android service that needs to be started; and after receiving the creation request, the Android environment seed process running the Android service in the manner of deriving a fork process.

