CN108762775A - A kind of packaging method and device of installation kit - Google Patents
A kind of packaging method and device of installation kit Download PDFInfo
- Publication number
- CN108762775A CN108762775A CN201810506992.3A CN201810506992A CN108762775A CN 108762775 A CN108762775 A CN 108762775A CN 201810506992 A CN201810506992 A CN 201810506992A CN 108762775 A CN108762775 A CN 108762775A
- Authority
- CN
- China
- Prior art keywords
- installation kit
- files
- written
- blank
- backpack body
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Document Processing Apparatus (AREA)
Abstract
The present invention relates to a kind of packaging method of installation kit and device, the method includes:Obtain the blank backpack body of installation kit;When the blank backpack body is legal installation kit field, de-edit is carried out to the blank backpack body and generates corresponding plain folder;The plain folder is written into preset installation kit resource and generates corresponding resource folder;The blank backpack body repack based on the resource folder and generates the installation kit.The present invention can improve the packing efficiency of installation gadolinium, and avoid the generation for being packaged mistake.
Description
Technical field
The present invention relates to field of computer technology, more particularly to the packaging method and device of a kind of installation kit.
Background technology
Nowadays application product explodes for mobile phone games, large batch of game application constantly restocking various types of flat
Platform, even for some product, user can find large batch of distribution platform, record different channels number and apply and divide
Hair.Therefore, user often faces the backpack body for needing to get that many functions or logic module repeat.
Existing technology often uses the included band packet mode of the Android system of ANT or gradle, it is quick some make
With the script of both packing manners.Compared to ANT's and its complicated script ways of writing, the script ways of writing of gradle
Slightly simpler, but the packing inefficiency of this side of packing in two, it is low to be packaged serious forgiveness, often will appear channel mistake and beats
Or no marking, cause platform user to be lost.
Invention content
Based on this, it is necessary to which the problem of being directed to the packing inefficiency of current installation kit provides a kind of packing of installation kit
Method and apparatus.
A kind of packaging method of installation kit, the method includes:
Obtain the blank backpack body of installation kit;
When the blank backpack body is legal installation kit field, it is corresponding that de-edit generation is carried out to the blank backpack body
Plain folder;
The plain folder is written into preset installation kit resource and generates corresponding resource folder;
The blank backpack body repack based on the resource folder and generates the installation kit.
Preferential, the method further includes:
It is signed again to the installation kit of generation.
Preferential, it is described that the corresponding plain folder of de-edit generation is carried out to the blank backpack body, including:
De-edit is carried out to the blank backpack body by apktool tools and generates corresponding plain folder.
The preferential plain folder includes assets files, smail files, mipmap files and mainfest texts
Part;
It is described that the corresponding resource folder of the plain folder generation is written into preset installation kit resource, including:
The assets files are written into the Resources of the installation kit;
The smail files are written into the function code of the installation kit;
The mipmap files are written into the picture resource of the installation kit;
The mainfest files are written into the channel number of the installation kit.
Preferential, the mainfest files are written in the channel number by the installation kit, including:
The character content of the mark position in the mainfest files for the channel number to be written is read by IO streams;
Based on the channel number, the character content is compiled, the mark position is written into the channel number.
A kind of packing apparatus of installation kit, described device include:
Acquisition module, the blank backpack body for obtaining installation kit;
Generation module, for when the blank backpack body is legal installation kit field, being carried out to the blank backpack body anti-
Editor generates corresponding plain folder;
Writing module generates corresponding resource file for the plain folder to be written in preset installation kit resource
Folder;
Packetization module carries out the blank backpack body to repack the generation installation for being based on the resource folder
Packet.
Preferential, described device further includes:
Signature blocks are signed again for the installation kit to generation.
Preferential, the generation module is used for:
De-edit is carried out to the blank backpack body by apktool tools and generates corresponding plain folder.
The preferential plain folder includes assets files, smail files, mipmap files and mainfest texts
Part;
Said write module is used for:
The assets files are written into the Resources of the installation kit;
The smail files are written into the function code of the installation kit;
The mipmap files are written into the picture resource of the installation kit;
The mainfest files are written into the channel number of the installation kit.
Preferential, said write module is used for:
The character content of the mark position in the mainfest files for the channel number to be written is read by IO streams;
Based on the channel number, the character content is compiled, the mark position is written into the channel number.
It, can be first when it is legal installation kit field for the blank backpack body of installation kit in the embodiment of the present invention
De-edit is carried out to it and generates plain folder, these plain folders then, which are written, in the resource of corresponding installation kit forms pair
The resource folder answered repacks blank backpack body based on these resource folders and produces corresponding installation kit;As a result,
The automation of installation kit packing may be implemented in the present embodiment, and the mode without manually writing code is packaged installation kit,
To improve the efficiency of packing, and avoid the generation for being packaged mistake.
Description of the drawings
Fig. 1 is the flow chart of the packaging method of the installation kit of an embodiment;
Fig. 2 is the structure chart of the packing apparatus of the installation kit of an embodiment.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Fig. 1 is the flow chart of the packaging method of the installation kit of an embodiment.As shown in Figure 1, this method includes:
Step 120, the blank backpack body of installation kit is obtained.
Blank backpack body can be the backpack body for the resource for being fitted without packet.But in some cases, blank backpack body can also
It is the backpack body of intersection part of the input comprising more finished product packets.
Step 140, when the blank backpack body is legal installation kit field, de-edit life is carried out to the blank backpack body
At corresponding plain folder.
Installation kit can be the installation kit of apk forms.Whether the field that blank backpack body can be detected is legal apk words
Section then can carry out de-edit if it is legal apk fields to blank backpack body.
Herein, it is to be understood that for Android installation file, meet the file two of entitled " .apk " format of suffix into
When system requires, as legal installation kit field.
Wherein it is possible to which carrying out de-edit to the blank backpack body by apktool tools generates corresponding plain folder.
Step 160, the plain folder is written into preset installation kit resource and generates corresponding resource folder.
Plain folder usually has the installation kit resource of multiple, different plain folder write-ins different.Typically,
Different types of installation kit resource can be written in the plain folder of corresponding types.
Step 180, the blank backpack body repack based on the resource folder and generate the installation kit.
Wherein it is possible to be repacked to blank backpack body using apktool.After being repacked to blank backpack body,
The installation kit of generation includes corresponding resource folder, these installation kits can open on the terminal device and installation and operation.
It, can be first when it is legal installation kit field for the blank backpack body of installation kit in the embodiment of the present invention
De-edit is carried out to it and generates plain folder, these plain folders then, which are written, in the resource of corresponding installation kit forms pair
The resource folder answered repacks blank backpack body based on these resource folders and produces corresponding installation kit;As a result,
The automation of installation kit packing may be implemented in the present embodiment, and the mode without manually writing code is packaged installation kit,
To improve the efficiency of packing, and avoid the generation for being packaged mistake.
Wherein, the blank backpack body is carried out after repacking the generation installation kit based on the resource folder, it can
It is signed again with the installation kit to generation.Specifically, can again be signed to apk installation kits using jarsinge
Name.
In the present embodiment, the plain folder may include assets files, smail files, mipmap files and
Mainfest files etc..Wherein, step 160 can be implemented as:
The assets files are written into the Resources of the installation kit;
The smail files are written into the function code of the installation kit;
The mipmap files are written into the picture resource of the installation kit;
The mainfest files are written into the channel number of the installation kit.
In applied to the installation kit in Android system, the Resources text for the installation kit usually stored under assets catalogues
The function code of part, installation kit usually deposits in smail files, and the picture resource of installation kit usually deposits in mipmap files.
For the installation kit of user, it usually needs transferring on different platforms, existing for the ease of counting the installation kit
Download in different platform, it will usually corresponding channel number be added in installation kit, for recording the download from corresponding platform
The download of the installation kit.
Mainfest files are registration inventory files, can be used for filling in channel number.But mainfest files are typically
Therefore read-only file when the mainfest files are written in the channel number of the installation kit, can be flowed described in reading by IO
The character content of mark position in mainfest files for the channel number to be written;It is then based on the channel number, to institute
Character content is stated to be compiled the channel number write-in mark position.
Fig. 2 is the structure chart of the packing apparatus of the installation kit of an embodiment.As shown in Fig. 2, the device includes:
Acquisition module 220, the blank backpack body for obtaining installation kit.
Blank backpack body can be the backpack body for the resource for being fitted without packet.But in some cases, blank backpack body can also
It is the backpack body of intersection part of the input comprising more finished product packets.
Generation module 240, for when the blank backpack body is legal installation kit field, being carried out to the blank backpack body
De-edit generates corresponding plain folder.
Installation kit can be the installation kit of apk forms.Whether the field that blank backpack body can be detected is legal apk words
Section then can carry out de-edit if it is legal apk fields to blank backpack body.
Herein, it is to be understood that for Android installation file, meet the file two of entitled " .apk " format of suffix into
When system requires, as legal installation kit field.
Wherein it is possible to which carrying out de-edit to the blank backpack body by apktool tools generates corresponding plain folder.
Writing module 260 generates corresponding resource text for the plain folder to be written in preset installation kit resource
Part presss from both sides.
Plain folder usually has the installation kit resource of multiple, different plain folder write-ins different.Typically,
Different types of installation kit resource can be written in the plain folder of corresponding types.
Packetization module 280 to the blank backpack body repack described in generation for being based on the resource folder
Installation kit.
Wherein it is possible to be repacked to blank backpack body using apktool.After being repacked to blank backpack body,
The installation kit of generation includes corresponding resource folder, these installation kits can open on the terminal device and installation and operation.
It, can be first when it is legal installation kit field for the blank backpack body of installation kit in the embodiment of the present invention
De-edit is carried out to it and generates plain folder, these plain folders then, which are written, in the resource of corresponding installation kit forms pair
The resource folder answered repacks blank backpack body based on these resource folders and produces corresponding installation kit;As a result,
The automation of installation kit packing may be implemented in the present embodiment, and the mode without manually writing code is packaged installation kit,
To improve the efficiency of packing, and avoid the generation for being packaged mistake.
Optionally, as one embodiment, described device further includes:
Signature blocks are signed again for the installation kit to generation.
Optionally, as one embodiment, the generation module 240 is used for:
De-edit is carried out to the blank backpack body by apktool tools and generates corresponding plain folder.
Optionally, as one embodiment, the plain folder includes assets files, smail files, mipmap texts
Part and mainfest files;
Said write module 260 is used for:
The assets files are written into the Resources of the installation kit;
The smail files are written into the function code of the installation kit;
The mipmap files are written into the picture resource of the installation kit;
The mainfest files are written into the channel number of the installation kit.
Optionally, as one embodiment, said write module 260 is used for:
The character content of the mark position in the mainfest files for the channel number to be written is read by IO streams;
Based on the channel number, the character content is compiled, the mark position is written into the channel number.
The detailed process of above method embodiment may be implemented in the packing apparatus of installation kit described above, is specifically referred to
Particular content in above method embodiment.
Each technical characteristic of embodiment described above can be combined arbitrarily, to keep description succinct, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, it is all considered to be the range of this specification record.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (10)
1. a kind of packaging method of installation kit, which is characterized in that the method includes:
Obtain the blank backpack body of installation kit;
When the blank backpack body is legal installation kit field, de-edit is carried out to the blank backpack body and generates corresponding blank
File;
The plain folder is written into preset installation kit resource and generates corresponding resource folder;
The blank backpack body repack based on the resource folder and generates the installation kit.
2. according to the method described in claim 1, it is characterized in that, further including:
It is signed again to the installation kit of generation.
3. according to the method described in claim 1, it is characterized in that, described carry out de-edit generation correspondence to the blank backpack body
Plain folder, including:
De-edit is carried out to the blank backpack body by apktool tools and generates corresponding plain folder.
4. according to the method described in claim 1, it is characterized in that, the plain folder includes assets files, smail texts
Part, mipmap files and mainfest files;
It is described that the corresponding resource folder of the plain folder generation is written into preset installation kit resource, including:
The assets files are written into the Resources of the installation kit;
The smail files are written into the function code of the installation kit;
The mipmap files are written into the picture resource of the installation kit;
The mainfest files are written into the channel number of the installation kit.
5. according to the method described in claim 4, it is characterized in that, described in the channel number write-in by the installation kit
Mainfest files, including:
The character content of the mark position in the mainfest files for the channel number to be written is read by IO streams;
Based on the channel number, the character content is compiled, the mark position is written into the channel number.
6. a kind of packing apparatus of installation kit, which is characterized in that described device includes:
Acquisition module, the blank backpack body for obtaining installation kit;
Generation module, for when the blank backpack body is legal installation kit field, de-edit to be carried out to the blank backpack body
Generate corresponding plain folder;
Writing module generates corresponding resource folder for the plain folder to be written in preset installation kit resource;
Packetization module carries out the blank backpack body to repack the generation installation kit for being based on the resource folder.
7. device according to claim 6, which is characterized in that further include:
Signature blocks are signed again for the installation kit to generation.
8. device according to claim 6, which is characterized in that the generation module is used for:
De-edit is carried out to the blank backpack body by apktool tools and generates corresponding plain folder.
9. device according to claim 6, which is characterized in that the plain folder includes assets files, smail texts
Part, mipmap files and mainfest files;
Said write module is used for:
The assets files are written into the Resources of the installation kit;
The smail files are written into the function code of the installation kit;
The mipmap files are written into the picture resource of the installation kit;
The mainfest files are written into the channel number of the installation kit.
10. device according to claim 9, which is characterized in that said write module is used for:
The character content of the mark position in the mainfest files for the channel number to be written is read by IO streams;
Based on the channel number, the character content is compiled, the mark position is written into the channel number.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810506992.3A CN108762775A (en) | 2018-05-24 | 2018-05-24 | A kind of packaging method and device of installation kit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810506992.3A CN108762775A (en) | 2018-05-24 | 2018-05-24 | A kind of packaging method and device of installation kit |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108762775A true CN108762775A (en) | 2018-11-06 |
Family
ID=64005443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810506992.3A Pending CN108762775A (en) | 2018-05-24 | 2018-05-24 | A kind of packaging method and device of installation kit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108762775A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140157144A1 (en) * | 2012-12-04 | 2014-06-05 | DeNA Co., Ltd. | Network system |
CN104572089A (en) * | 2014-12-26 | 2015-04-29 | 北京京东尚科信息技术有限公司 | Method and device for generating android installation package |
CN105893008A (en) * | 2015-11-16 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Method and device for customizing multi-channel installation package |
CN106326691A (en) * | 2015-06-15 | 2017-01-11 | 中兴通讯股份有限公司 | Encryption and decryption function realization method and device, and server |
CN107479939A (en) * | 2017-09-29 | 2017-12-15 | 厦门天锐科技股份有限公司 | A kind of APK installation kits repeat the implementation method of packing |
CN107748838A (en) * | 2017-10-13 | 2018-03-02 | 东软集团股份有限公司 | The method, apparatus and storage medium and electronic equipment of installation kit generation |
-
2018
- 2018-05-24 CN CN201810506992.3A patent/CN108762775A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140157144A1 (en) * | 2012-12-04 | 2014-06-05 | DeNA Co., Ltd. | Network system |
CN104572089A (en) * | 2014-12-26 | 2015-04-29 | 北京京东尚科信息技术有限公司 | Method and device for generating android installation package |
CN106326691A (en) * | 2015-06-15 | 2017-01-11 | 中兴通讯股份有限公司 | Encryption and decryption function realization method and device, and server |
CN105893008A (en) * | 2015-11-16 | 2016-08-24 | 乐视网信息技术(北京)股份有限公司 | Method and device for customizing multi-channel installation package |
CN107479939A (en) * | 2017-09-29 | 2017-12-15 | 厦门天锐科技股份有限公司 | A kind of APK installation kits repeat the implementation method of packing |
CN107748838A (en) * | 2017-10-13 | 2018-03-02 | 东软集团股份有限公司 | The method, apparatus and storage medium and electronic equipment of installation kit generation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105677777B (en) | Dot matrix encodes document generating method | |
CN104899016B (en) | Allocating stack Relation acquisition method and device | |
US20090150889A1 (en) | Information processing system, information processing method, and device and program used for the information processing system and the information processing method | |
CN106970820A (en) | Code storage method and code storage | |
CN107357929A (en) | File reading, mobile terminal and readable storage medium storing program for executing | |
EP1544708A3 (en) | Subscriber identification module (SIM) emulator | |
CN109471738A (en) | A kind of application program downloads recognition methods and the relevant device of channel | |
CN106960156A (en) | Data encryption and access method based on application program, device | |
CN102880460B (en) | A kind of analysis method and device of note content | |
CN111985202A (en) | Method, equipment and storage medium for generating PDF electronic signature based on template | |
CN108415722A (en) | Update method, device, computer equipment and the storage medium of channel application | |
CN106330788B (en) | Message fragment transmission method and device | |
CN102387120B (en) | File transmission method and network transmission system | |
ES2670439T3 (en) | Method for exchanging data between a secure element and a terminal, secure element, and terminal | |
CN105278971A (en) | Mobile terminal installation package batch generation method and device | |
CN108805507A (en) | A kind of implementation method and device of electronic bill of lading | |
CN109992652A (en) | A kind of information replying method, device, equipment and storage medium | |
CN108762775A (en) | A kind of packaging method and device of installation kit | |
CN107748838A (en) | The method, apparatus and storage medium and electronic equipment of installation kit generation | |
CN105808979A (en) | Improved Android software installation package signature and signature verification method | |
CN107133169A (en) | Using test bag generation method and generating means | |
CN104571969A (en) | Printing processing method, device and system | |
CN101615118B (en) | Method and device for exporting prototype | |
CN107026841A (en) | The method and apparatus for issuing works in a network | |
CN109509467B (en) | Code generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181106 |
|
RJ01 | Rejection of invention patent application after publication |