File Identification via Header Scanning in APK Installation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The increasing number of applications supported by smart terminals leads to longer boot times and installation times due to the time-consuming process of scanning and decompressing APK files, which contain native library and RenderScript files.
Innovation Solution
A method that identifies files using file header identifiers within the installation file, allowing for a partial scan by determining the start and end tag positions of the file directory, thereby omitting the need to decompress all files, reducing scan time and improving boot and installation efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If all files in the APK file are decompressed to identify native library and RenderScript files, then file identification accuracy is improved, but scan time increases significantly
Solution Approach 1:
The patent extracts only the necessary information (file header identifiers) from the APK file without decompressing all files. By using the file header identifiers directly from the zip structure, the system identifies native library and RenderScript files without the time-consuming full decomposition process, thus resolving the contradiction between identification accuracy and scan time.
Solution Approach 2:
The patent segments the file identification process into two parts: first identifying files through their headers in the zip structure, and only then decompressing specific files if needed. This segmentation allows the system to obtain file identification information without fully decompressing the APK, reducing scan time while maintaining accuracy.
2Measurement precision
If the APK file scanning process is performed completely, then file identification completeness is improved, but boot time and installation time increase
Solution Approach 1:
The patent applies partial action by scanning only the file header identifiers in the APK zip structure rather than completely decompressing and scanning all files. This partial scanning approach provides sufficient file identification information for boot and installation processes without the excessive time cost of full decomposition, thus reducing boot time while maintaining identification completeness.
Data Source
AI summary
A method for identifying a file is provided. The method includes the following operations. An installation file and an end tag position of a file directory of the installation file are acquired. A start tag position of the file directory is determined according to the end tag position of the file directory. A file header identifier in the file directory is queried for according to the start tag position of the file directory and a file indicated by the file header identifier is identified via analyzing the file header identifier.


