$ show WaxMoon/MultiApp
MultiApp is an Android application that provides a virtual container for running multiple instances of the same application simultaneously. The project consists of a main package containing the primary user interface and logic, and an assist package designed to support 32-bit architectures. Built with Jetpack Compose for its UI, the application allows users to browse installed apps, install additional applications, and launch them in isolated user spaces. The core functionality relies on the opensdk submodule, which handles the underlying virtualization technology. Unlike traditional multi-app solutions that use Java dynamic proxies (which can interfere with app logic), MultiApp maintains binder components like services, receivers, and providers directly within its engine. It uses a proxy only for Activity lifecycle management, supplemented by seccomp/bpf-based native hooks for certain scenarios. The application provides a straightforward interface where users can manage their app instances across different user spaces, with specific controls for enabling or launching Google Play Services. Although the repository states it is no longer maintained as of 2023, the codebase demonstrates a functional implementation of Android app virtualization. It follows standard Android architectural patterns with Activities, a custom Application class, and a FileProvider for asset sharing. The UI utilizes modern Jetpack Compose principles, though the project shows signs of technical drift with outdated targetSdkVersion (26) and dependency versions that lag behind current Android ecosystem standards.
The LLM identified 2 files worth highlighting for reuse:
Encapsulates APK metadata (label, package name, version, icon) and provides methods to initialize from installed apps or APK files, validate the data, and convert drawables to Compose-compatible ImageBitmap. This self-contained data model could be extracted for use in any Android app needing to display application information, particularly when using Jetpack Compose.
Demonstrates a complete pattern for bundling and installing helper APKs within an Android application. It uses a custom ActivityResultContract to extract an APK from assets, share it via FileProvider with appropriate permissions, and handle the installation result. This pattern solves the common problem of distributing helper APKs (like the assist package for 32-bit support) and could be adapted for bundling any auxiliary APK with an application.