APK Compression Using Embedded Runtime Decompression

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing compression algorithms for APK files in Android systems, such as the deflate algorithm, have limitations that prevent the use of higher compression rates, making it difficult to reduce the size of APK applications effectively.

Innovation Solution

A method that compresses invoked files using a higher compression algorithm like LZMA, modifies the invoking files to invoke a decompression function, and encapsulates these files to create a compressed application, allowing for decompression during runtime, thus overcoming the limitations of the default compression algorithm.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If the default deflate compression algorithm is used for SO files in APK applications, then the Android system can recognize and run the application, but the compression rate is limited and the APK file size cannot be reduced effectively

Engineering Contradiction:
ImproveAPK file sizeVSAvoidsystem compatibility
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent segments the APK file into multiple components: compressed resources (using high-rate compression), decompression function files (providing runtime decompression capability), and invoking files (containing invocation logic). This segmentation allows the use of higher compression rates for resources while maintaining system compatibility through the decompression function files.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary compression of resource files using high compression rate algorithms before packaging the APK. The decompression function files are also prepared in advance and embedded in the APK, enabling runtime decompression without requiring system-level modifications.

Inventive Principle:
Principle #10Preliminary action

2Quantity of substance

If a higher compression rate algorithm is used to compress invoked files, then the APK file size is reduced, but the Android system cannot directly decompress and load the files

Engineering Contradiction:
ImproveAPK file sizeVSAvoiddecompression capability
Core Design Contradiction:
Quantity of substanceVSEase of manufacture

Solution Approach 1:

The patent introduces decompression function files as intermediaries between the compressed invoked files and the Android system. These function files contain the necessary decompression logic and act as a bridge, enabling the system to load and execute compressed files without requiring system-level changes or native support for the compression algorithm.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements self-service by embedding the decompression capability directly within the APK through decompression function files. The APK becomes self-sufficient, carrying its own decompression logic, eliminating the need for external system support or additional software components.

Inventive Principle:
Principle #25Self-service

3Quantity of substance

If the APK application is modified to include decompression function files and compressed invoked files, then the compression rate improves, but the application structure becomes more complex

Engineering Contradiction:
ImproveAPK file sizeVSAvoidapplication structure
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent makes the decompression function files multi-functional: they serve as both executable code (providing runtime decompression capability) and as embedded libraries (containing decompression algorithms). This universality reduces the need for separate dedicated decompression components, thereby limiting the increase in structural complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent merges multiple components into the APK structure: compressed resources, decompression function files, and invoking files with modified logic. By combining these elements into a unified APK package with a standardized structure, the patent avoids the complexity that would arise from separate distributed components or external decompression systems.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS10579592B2Method and apparatus for compressing an application
Publication Date: 2020.03.03 ALIBABA GROUP HOLDING LTD
  • US10579592B2 patent drawing
  • US10579592B2 patent drawing
  • US10579592B2 patent drawing

AI summary

The size of a source application is reduced by compressing a plurality of invoked files, such as SO files, in the source application with a compression algorithm that has a higher compression rate compared to a default compression rate. A decompression file that corresponds with the compression algorithm is inserted into a plurality of invoking files in the source application so that the source application itself can decompress the invoked files that were compressed with the compression algorithm.