APK Shared Object Compression With 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 while ensuring compatibility and normal operation.

Innovation Solution

The method involves compressing shared object files using a higher compression algorithm like LZMA, modifying the invoking files to invoke a decompression function, and encapsulating these files into a new APK application, allowing for decompression during runtime, thus overcoming the limitations of the default compression algorithm.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the default deflate compression algorithm is used for SO files in APK applications, then compatibility with the Android system is maintained and normal operation is ensured, but the compression rate is limited and the APK file size cannot be reduced effectively

Engineering Contradiction:
ImprovecompatibilityVSAvoidcompression rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-compressing SO files using higher compression algorithms (like LZMA) before packaging them into the APK, and preparing decompression functionality in advance so that the system can operate with compressed files from the start without requiring runtime compression operations

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary decompression mechanism that acts as a bridge between the highly compressed SO files and the Android system's expected input format. This intermediary layer handles the decompression transparently, allowing the system to work with highly compressed files while maintaining compatibility with the Android runtime environment

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If a higher compression algorithm like LZMA is used to compress SO files, then the compression rate is improved and APK file size is reduced, but the Android system's default decompression algorithm cannot directly decompress these files

Engineering Contradiction:
Improvecompression rateVSAvoiddecompression compatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent applies parameter changes by modifying the compression algorithm parameter from the default deflate to higher compression algorithms like LZMA or bzip2. This changes the compression characteristics to achieve better compression ratios, while simultaneously introducing corresponding decompression capabilities to handle the new compression format

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent segments the compression and decompression functions into separate components. The compression function uses high-ratio algorithms independently, while the decompression function is implemented as a separate module that can be selectively activated. This segmentation allows the system to use optimal compression algorithms without being constrained by the system's default decompression capabilities

Inventive Principle:
Principle #1Segmentation

3Weight of stationary object

If the APK application is recompressed after optimizing service logic and resources, then the file size may be further reduced, but the operation system's limitations prevent changing the default compression algorithm

Engineering Contradiction:
ImproveAPK file sizeVSAvoidcompression algorithm flexibility
Core Design Contradiction:
Weight of stationary objectVSEase of manufacture

Solution Approach 1:

The patent extracts the compression algorithm selection from the operating system's fixed defaults and moves it to the application packaging stage. By extracting this freedom of choice, developers can select optimal compression algorithms during APK creation, and the extracted decompression capability is embedded in the APK itself, bypassing the system's algorithm limitations

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP3563247B1Method for compressing an application
Publication Date: 2024.04.10 ALIBABA GROUP HOLDING LTD
  • EP3563247B1 patent drawingFigure 1A
  • EP3563247B1 patent drawingFigure 1B
  • EP3563247B1 patent drawingFigure 1C

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.