APK file compression method and system based on Android system

An Android system and file compression technology, applied in the direction of program control devices, etc., can solve problems such as low efficiency, and achieve the effect of improving security and efficiency

Active Publication Date: 2015-12-09
BEIJING BAOFENG TECH
View PDF4 Cites 15 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the technical problem to be solved in this application is to provide a method and system for compressing APK files based on the Android system, which solves the problem that the traditional APK packaging method adopts a similar Zip compression method for all files included, and the efficiency is improved. relatively low issue

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • APK file compression method and system based on Android system
  • APK file compression method and system based on Android system
  • APK file compression method and system based on Android system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0019] see figure 1 Shown is the specific embodiment of the method for APK file compression based on the Android system described in this application, and the method described in this embodiment includes the following steps:

[0020] Step 101: Obtain the files to be packaged into APK;

[0021] Step 102: Judging whether each file in the APK file to be packaged meets the screening conditions, if it meets, go to step 103, if not, go to step 104; if it meets, go to step 104;

[0022] Step 103: Using the first algorithm to perform first compression on the conforming files;

[0023] Step 104: storing the first compressed file in the res directory as a resource file, and keeping the non-compliant files in the original directory;

[0024] Step 105: Using a second algorithm to perform a second compression on the files stored as resource files and files that do not meet the filtering conditions to generate an APK installation package;

[0025] Step 106: When the APK installation pack...

Embodiment 2

[0031] see figure 2 Shown is another specific embodiment of the method for APK file compression based on the Android system described in the present application, and the method described in this embodiment includes the following steps:

[0032] Step 201: Obtain the files to be packaged into APK;

[0033] Step 202: Judging whether each file in the APK file to be packaged meets the screening conditions, if yes, proceed to step 203, if not, proceed to step 204; if yes, proceed to step 204;

[0034] Step 203: Using the LZMA2 algorithm to first compress the conforming files;

[0035] Step 204: store the first compressed file in the res directory as a resource file, and keep the non-compliant files in the original directory, such as META-INFO, lib, asserts directory, etc.;

[0036] Step 205: Using the Zip algorithm to perform second compression on the files stored as resource files and files that do not meet the filtering conditions, to generate an APK installation package;

[0...

Embodiment 3

[0042] combined with image 3 As shown, a system for compressing APK files based on the Android system in the present invention includes: an installation file storage module 301, a judgment module 302, a first compression module 303, a resource file storage module 304, and a second compression module 305 ;in,

[0043] The installation file storage module 301 is coupled with the judging module 302, and is used to store files to be packaged into APK;

[0044] The judging module 302 is coupled with the installation file storage module 301 and the first compression module 303, and is used to judge whether each file in the file to be packaged into APK meets the screening condition, if not, then Retain the non-conforming files in the installation file storage module 301, and if they are in conformity, send the conforming files to the first compression module 303;

[0045] The first compression module 303 is coupled to the judging module 302 and the resource file storage module 304...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an APK file compression method and system based on an Android system. The method comprises the steps that files which need to be packed into APK files are acquired; whether the files which need to be packed into the APK files are matched with screening conditions is judged, if not, the unmatched files are retained in an original directory, and if yes, first compression is performed on the matched files by utilizing a first algorithm; the files processed through first compression are stored in a res directory in a resource file mode; second compression is performed on the files which are processed through first compression and stored in the resource file mode and the unmatched files by utilizing a second algorithm to generate an installation package; the res directory is one of directory structures of the APK files and is used for storing resource files, the compression efficiency of the first algorithm is higher than that of the second algorithm, and the screening conditions are set as needed by a user. According to the APK file compression method and system based on the Android system, a mixed compression package mode is performed on the APK files, the packaging efficiency is improved, compression encryption on important files is achieved, and the safety degree is improved.

Description

technical field [0001] The present application relates to file compression processing technology, in particular, to a method and system for compressing APK files based on the Android system. Background technique [0002] The so-called APK is the abbreviation of Android Package, that is, the Android installation package, which can be installed by directly transferring the APK file to the Android emulator or Android mobile phone for execution. The APK file is actually in the zip format, but the suffix is ​​changed to APK. After decompressing through UnZip, you can see the approximate directory structure of the APK: lib (stores Native library files); META-INF (you can often see it in Jar files); res (directory for storing resource files); AndroidManifest.xml program global configuration file; classes.dex (Dalvik bytecode); resources.arsc (compiled binary resource file). [0003] In the prior art, the Native library, classes.dex, and res resource files contained in the APK are ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 冷志勇高上李凤山卢述奇
Owner BEIJING BAOFENG TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products