CN106648643A - Method and device for generating channel package, terminal and server - Google Patents

Method and device for generating channel package, terminal and server Download PDF

Info

Publication number
CN106648643A
CN106648643A CN201611140288.8A CN201611140288A CN106648643A CN 106648643 A CN106648643 A CN 106648643A CN 201611140288 A CN201611140288 A CN 201611140288A CN 106648643 A CN106648643 A CN 106648643A
Authority
CN
China
Prior art keywords
channel
apk
bag
channel data
data
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
Application number
CN201611140288.8A
Other languages
Chinese (zh)
Inventor
袭建帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201611140288.8A priority Critical patent/CN106648643A/en
Publication of CN106648643A publication Critical patent/CN106648643A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation

Abstract

The invention provides a method and device for generating a channel package, a terminal and a server. The method comprises the steps that channel data is generated; the channel data is written in a target position in an Android installation package APK program package, and the channel package is obtained, wherein the target position is the position where the channel data corresponding to a channel data identifier in an APK signature area in the APK program package is located. Even though the signature scheme of an Android system protects a whole APK file, the channel package can still be generated. Signing does not need to be carried out again, the time for generating the channel package is shortened, and the channel package can be obtained faster and more simply.

Description

Channel bag generation method and device, terminal and server
Technical field
It relates to channel bag process field, more particularly to channel bag generation method and device, terminal and server.
Background technology
In correlation technique, can be by unsigned in Android installation kit (Android Package, APK) program bag The region of protection writes the mode of channel data, generates channel bag;Or can also pass through the side signing again or repack Formula generates the channel bag for including channel data.
But, the new Android system issued increased a large amount of protection schemes for platform, and signature scheme therein is to whole The corresponding APK file of APK program bags is protected, therefore cannot generate channel bag using above-mentioned first kind of way.And adopt The process that the above-mentioned second way generates channel bag is slower, and elapsed time is longer.
The content of the invention
In view of this, the application provides one kind and provides channel bag generation method and device, terminal and server, to solve Deficiency in correlation technique.
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of channel bag generation method, methods described be used for terminal or Server, including:
Generate channel data;
Target location in Android installation kit APK program bags, writes the channel data, obtains channel bag;
Wherein, the target location be the APK program bags APK signature areas in corresponding to channel Data Identification channel Data position.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of channel bag generating means, described device be used for terminal or Server, including:
Channel data generation module, for generating channel data;
Channel bag generation module, for the target location in Android installation kit APK program bags, writes the channel number According to acquisition channel bag;
Wherein, the target location be the APK program bags APK signature areas in corresponding to channel Data Identification channel Data position.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of computer-readable recording medium, the storage medium is deposited Computer program is contained, the computer program is used to perform the channel bag generation method described in above-mentioned first aspect.
According to the fourth aspect of the embodiment of the present disclosure, there is provided a kind of terminal, including:
Processor;
For storing the memory of processor executable;
Wherein, the processor, for performing the channel bag generation method described in above-mentioned first aspect.
According to the 5th aspect of the embodiment of the present disclosure, there is provided a kind of server, including:
Processor;
For storing the memory of processor executable;
Wherein, the processor, for performing the channel bag generation method described in above-mentioned first aspect.
From above technical scheme, can be by correspondence in the APK signature areas of the channel data write APK program bags for generating In the channel data position of channel Data Identification, i.e. target location, so as to obtain channel bag.Accordingly even when Android system Signature scheme is that whole APK file is protected, and still can generate channel bag.Simultaneously without the need for signing again or beating again Bag, shortens the time for generating channel bag, can more quick, simply obtain channel bag.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The disclosure can be limited.
Description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the enforcement for meeting the disclosure Example, and be used to explain the principle of the disclosure together with specification.
Fig. 1 is a kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 2 is another kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 3 is another kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 4 is another kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 5 is another kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 6 is another kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 7 is another kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 8 is another kind of channel bag generation method flow chart of the disclosure according to an exemplary embodiment;
Fig. 9 is a kind of channel bag generating means block diagram of the disclosure according to an exemplary embodiment;
Figure 10 is another kind of channel bag generating means block diagram of the disclosure according to an exemplary embodiment;
Figure 11 is another kind of channel bag generating means block diagram of the disclosure according to an exemplary embodiment;
Figure 12 is another kind of channel bag generating means block diagram of the disclosure according to an exemplary embodiment;
Figure 13 is the structural representation of terminal of the disclosure according to an exemplary embodiment;
Figure 14 is the structural representation of server of the disclosure according to an exemplary embodiment.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Explained below is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.Conversely, they be only with it is such as appended The example of the consistent apparatus and method of some aspects described in detail in claims, the disclosure.
It is, only merely for the purpose of description specific embodiment, and to be not intended to be limiting the disclosure in the term of disclosure operation. " one kind ", " described " and " being somebody's turn to do " for the singulative run in disclosure and the accompanying claims book is also intended to include majority Form, unless context clearly shows that other implications.It is also understood that herein the term "and/or" of operation is referred to and wrapped Containing one or more associated any or all possible combinations for listing project.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the disclosure A little information should not necessarily be limited by these terms.These terms are only used for that same type of information is distinguished from each other out.For example, without departing from In the case of disclosure scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, as word that this is run " if " can be construed to " and ... when " or " when ... When " or " in response to determining ".
The channel bag generation method that the embodiment of the present disclosure is provided can be used for terminal or server.Wherein, the server Can be using the server of HTTP (HyperText Transfer Protocol, http).Fig. 1 is this Shen A kind of channel bag generation method that please be shown in an exemplary embodiment, comprises the following steps:
In a step 101, channel data are generated;
In a step 102, the target location in Android installation kit APK program bags, writes the channel data, obtains canal Road bag;
Wherein, the target location be the APK program bags APK signature areas in corresponding to channel Data Identification channel Data position.
The embodiment of the present disclosure is by the channel data in the APK signature areas of APK program bags corresponding to channel Data Identification The channel data that the write of position, i.e. target location is generated, it is hereby achieved that channel bag.Even if signature scheme is to whole APK file is protected, and the method that the embodiment of the present disclosure is provided still can be adopted to guarantee to generate channel bag.In addition, above-mentioned Process is not related to the process signed again or repack, and therefore, it can solve the side by signing again or repacking When formula generates channel bag, process is slow and problem of elapsed time length.
In correlation technique, channel bag refers to the APK program bags issued in each big application market, can band in APK program bags There is the information for identifying the application market.The information of mark 360 is for example carried in the 360 channel bags issued;The canal that pea pods is issued The information of mark pea pods is carried in road bag.By counting the value, user can be counted and downloaded accordingly from which platform Application program, so as to preferably grasp the operating habit of user.
In above-mentioned steps 101, as shown in Fig. 2 Fig. 2 is illustrate on the basis of aforementioned embodiment illustrated in fig. 1 another Channel bag generation method is planted, step 101 is comprised the following steps:
In step 101-1, channel numbering is obtained;
Terminal or server can obtain the default channel corresponding with each application market and compile according to correlation technique Number.For example, 360 corresponding default channel numberings are 001, and the corresponding default channel numbering of pea pods is 002 etc..
In step 101-2, channel data are generated according to channel numbering.
Alternatively, as shown in figure 3, Fig. 3 is another kind of channel Bao Sheng illustrated on the basis of aforementioned embodiment illustrated in fig. 2 Into method, step 101-2 is comprised the following steps:
In step 101-21, the APK signature areas are searched in the APK program bags;
In the embodiment of the present disclosure, APK signature areas are the parts that APK signatures are carried out in APK program bags.If necessary to generate canal Track data, then need first APK signature areas position to be navigated in whole APK program bags, that is, need first in the APK journeys The APK signature areas are searched in sequence bag.
In this step, the APK program bags are opened according to correlation technique.It is possible to further according to the APK The preset data form of the default file form of program bag and the APK signature areas is searching the APK signature areas.
Wherein, the default file form of the APK program bags is zip forms, at present the APK signature scheme (APK of announcement Signature Scheme) the data form of the APK signature areas is defined in V2.Therefore, it can according to upper The default file form of the APK program bags stated and the preset data form of APK signature areas, accurately look in the APK program bags Find the APK signature areas.
In step 101-22, the preset data corresponding to the channel Data Identification is obtained in the APK signature areas Form;
In the embodiment of the present disclosure, data form is the formatting during data are stored in file or record.Can be numerical value, word The form such as symbol or binary number.Described by data type and data length.Each data has corresponding data form.
In this step, the preset data form corresponding to channel Data Identification can be obtained in the APK signature areas. In the file destination content, there is the predefined label for representing channel data, it is alternatively possible to by the label Name is referred to as channel Data Identification.
For example, the predefined label for representing channel data, title is channel, then channel is channel Data Identification.
Because each data has corresponding data form, then terminal or server can obtain the canal according to correlation technique The corresponding preset data form of track data mark.
In step 101-23, numbered according to the channel, generation meets the channel data of the preset data form.
In this step, terminal or server can according to correlation technique, according to the channel numbering for getting before come Generation meets the channel data of above-mentioned preset data form.
For example, the preset data form is character format, and the channel numbering is 2, i.e., corresponding channel source is pea Beanpod, then the channel data of generation are wandoujia.
In above-mentioned steps 102, the above-mentioned channel data for generating can be write and correspond in the APK signature areas channel The channel data position of Data Identification, i.e. target location.
In this step, after above-mentioned channel data are write into target location, just obtain meeting the channel of signature area The channel data of the form corresponding to Data Identification.So as to obtain carrying the APK program bags of channel data, i.e. channel bag.
In above-described embodiment, channel can will be corresponded in the APK signature areas of the channel data write APK program bags for generating The channel data position of Data Identification, i.e. target location, so as to obtain channel bag.Accordingly even when the signer of Android system Case is that whole APK file is protected, and still can generate channel bag.Simultaneously without the need for signing or repacking again, contract The short time for generating channel bag, can more quick, simply obtain channel bag.
In one embodiment, it is contemplated that editor may be carried out to channel data value before, then channel data value can It can not be null value.When the channel data value is not null value, it is impossible to which the channel data are write into the target location, because This, above-mentioned channel bag generation method is as shown in figure 4, Fig. 4 is another kind of canal illustrated on the basis of aforementioned embodiment illustrated in fig. 1 Road bag generation method, it is further comprising the steps of after step 101 is completed:
In step 201, confirm whether channel data value is null value in the APK signature areas;
In this step, directly the channel data value can be confirmed in the APK signature areas whether according to correlation technique For null value.
For example, the channel Data Identification is channel, then require to look up the corresponding data values of channel, i.e. channel number Whether it is null value according to value.Then can determine that the channel data value is null value, otherwise can determine that the channel data value is not Null value.
When the channel data value is not null value, step 202 is continued executing with;If the channel data value is null value, Then the channel data for generating are write above-mentioned target location by direct execution step 102.
In step 202., the channel data value is set to into null value.
In this step, null value can be set to when the channel data value is not null value.
After step 202 is completed, step 102 can be continued executing with, the channel data for generating are write into above-mentioned target position Put.
In above-described embodiment, editor was carried out to channel data before can avoiding and was led to not newly-generated channel number According to the problem of write target location, the time for generating channel bag is equally shortened.
In another embodiment, APK file is zip forms, and due to being written with channel data, the content of zip file is sent out It is raw to change, data-bias are generated, may result in whole APK file format error, it is impossible to the problem of normal mounting.In order to keep away Exempt from the problems referred to above, alternatively, above-mentioned channel bag generation method is as shown in figure 5, Fig. 5 is on the basis of aforementioned embodiment illustrated in fig. 1 On another kind of channel bag generation method that illustrates, it is further comprising the steps of after step 102 is completed:
In step 301, the data length value of relatively more described channel data and the write channel data as described before canal The length value of track data value, obtains the data length changing value of the APK signature areas;
In this step, can compare the channel data of generation data length value and write the channel data it The length value of the corresponding channel data value of the front channel Data Identification, so as to obtain the data length changing value.
For example, the channel data of generation are wandoujia, each character accounts for 2 bytes, then the channel data Data length value is 18 bytes, and is writing the corresponding channel data value of the channel data as described before channel Data Identification For 360, then the length value of the channel data value is 6 bytes.I.e. described data length changing value is to increased 12 bytes. Certainly, the data length changing value is also likely to be to reduce some bytes.
If it should be noted that the channel data value is not null value, need statistics is by the channel data Value is set to the length value of the channel data value before null value.
In step 302, using the data length changing value as target value in the APK program bags changing value, Update the target value.
Wherein, the target value is the numerical value of the center catalogue starting location offset amount recorded in the APK program bags.
In the embodiment of the present disclosure, APK program bags are zip forms, must be had and only one of which ZIP in each zip file EOCD (End of central directory record), for representing core catalogue end of identification.In have recorded in EOCD The concrete numerical value in mind record starting location offset amount (Offset of start of central directory).
In this step, the center catalogue starting location offset amount can be updated according to the data length changing value Numerical value.Will the numerical value of the center catalogue original position increase or decrease the data length changing value.Guarantee to be written with The file format of the APK program bags after the channel data remains correct zip forms.
For example, the data length changing value is to increased 12 bytes, then the focus target starting location offset amount Numerical value also accordingly increase by 12 bytes.If the data length changing value reduces 6 characters, the focus target rises The numerical value of beginning position offset also accordingly reduces by 6 bytes.
In above-described embodiment, after the channel data to be write the target location in Android installation kit APK program bags, really The file format for protecting APK program bags remains correct zip forms, such that it is able to normal mounting, while shortening generation channel The time of bag.
In another embodiment, when above-mentioned channel bag generation method is used for server, said method is as shown in fig. 6, Fig. 6 It is another kind of channel bag generation method illustrated on the basis of aforementioned embodiment illustrated in fig. 1, before execution step 101, also Comprise the following steps:
In step 100, the acquisition request of the acquisition request channel bag that client sends is received;
In this step, client obtains if desired program bag, then client can be initiated according to correlation technique to server It is described to obtain request.After the server receives the acquisition request, execution step 101 can be started.
Certainly, after channel bag is obtained, that is, complete after step 102, it is further comprising the steps of:
In step 103, after the channel bag is closed, the channel bag is sent to into the client.
In this step, the server is obtained after channel bag according to the mode that above-described embodiment is provided, and closes the canal Road bag, and then the channel bag is returned the client for initiating the acquisition request according to correlation technique.Now, client The APK program bags of the complete channel information of carrying, i.e. channel bag are just got.
In above-described embodiment, server can be obtained request and generated channel bag with client-based, and then by the channel Bag returns the client, even if the signature scheme of Android system is that whole APK file is protected, still can generate Channel bag.Simultaneously without the need for sign again, shorten the time that server generates channel bag so that client can it is more quick, Simply obtain channel bag.
The detailed process that channel bag is generated in terminal and server is introduced separately below.
As shown in fig. 7, Fig. 7 is another kind of channel bag generation method according to an exemplary embodiment, methods described For terminal, comprise the following steps:
In step 401, APK program bags are opened.
In step 402, channel numbering is obtained.
In this step, the terminal can obtain the default canal corresponding with each application market according to correlation technique Number in road.
In step 403, according to the default file form and the preset data of the APK signature areas of the APK program bags Form, searches the APK signature areas.
In the embodiment of the present disclosure, can be according to the default of the default file form of above-mentioned APK program bags and APK signature areas Data form, accurately finds the APK signature areas in the APK file.
In step 404, the preset data lattice corresponding to the channel Data Identification are obtained in the APK signature areas Formula.
In step 405, confirm whether channel data value is null value in the APK signature areas.
If the channel data value is not null value, execution step 406, otherwise execution step 407.
In a step 406, the channel data value is set to into null value.
In step 407, numbered according to the channel, generation meets the channel data of the preset data form.
In this step, terminal meets above-mentioned according to the channel numbering for getting before according to correlation technique to generate The channel data of preset data form.
In a step 408, the target location in APK program bags, writes the channel data, obtains channel bag.
Wherein, the target location be APK program bags APK signature areas in corresponding to channel Data Identification channel data Position.
In above-described embodiment, even if the signature scheme of Android system is that whole APK file is protected, terminal is still Channel bag can be automatically generated.Simultaneously without the need for signing again, the time for generating channel bag is shortened, can be more quick, simple Obtain channel bag.
As shown in figure 8, Fig. 8 is another kind of channel bag generation method according to an exemplary embodiment, methods described For server, comprise the following steps:
In step 501, the acquisition request of the acquisition request channel bag that client sends is obtained.
In step 502, APK program bags are opened.
In step 503, channel numbering is obtained.
In this step, the server can obtain default corresponding with each application market described according to correlation technique Channel is numbered.
In step 504, according to the default file form and the preset data of the APK signature areas of the APK program bags Form, searches the APK signature areas.
In the embodiment of the present disclosure, can be according to the default of the default file form of above-mentioned APK program bags and APK signature areas Data form, accurately finds the APK signature areas in the APK file.
In step 505, the preset data lattice corresponding to the channel Data Identification are obtained in the APK signature areas Formula.
In step 506, confirm whether channel data value is null value in the APK signature areas.
If the channel data value is not null value, execution step 507, otherwise execution step 508.
In step 507, the channel data value is set to into null value.
In step 508, numbered according to the channel, generation meets the channel data of the preset data form.
In this step, the server generates symbol according to correlation technique according to the channel numbering for getting before Close and state the channel data of preset data form.
In step 509, the target location in APK program bags, writes the channel data, obtains channel bag.
Wherein, the target location be APK program bags APK signature areas in corresponding to channel Data Identification channel data Position.
In step 510, after the channel bag is closed, the channel bag is sent to into the client.
In above-described embodiment, even if the signature scheme of Android system is that whole APK file is protected, server is still So channel bag can be automatically generated with client-based acquisition request, and the channel bag is returned into the client.While nothing Need to again sign, shorten the time for generating channel bag so that client can more quick, simply obtain channel bag.
It is corresponding with the embodiment of preceding method, present invention also provides the embodiment of related device.
Fig. 9 is a kind of structural representation of the channel bag generating means according to one example embodiment of the present invention; As shown in figure 9, the channel bag generating means can include:
Channel data generation module 610, for generating channel data;
Channel bag generation module 620, for the target location in Android installation kit APK program bags, writes the channel Data, obtain channel bag;
Wherein, the target location be the APK program bags APK signature areas in corresponding to channel Data Identification channel Data position.
In one embodiment, the channel data generation module 610 specifically for:
Obtain channel numbering;
Channel data are generated according to channel numbering.
In one embodiment, the channel data generation module 610 is specifically additionally operable to:
The APK signature areas are found in the APK program bags;
The preset data form corresponding to the channel Data Identification is obtained in the APK signature areas;
Numbered according to the channel, generation meets the channel data of the preset data form.
In one embodiment, the channel data generation module 610 is specifically additionally operable to:
According to the default file form and the preset data form of the APK signature areas of the APK program bags, search described APK signature areas.
Figure 10 is the structural representation of another kind of channel bag generating means according to Fig. 9 exemplary embodiments of the present invention Figure;As shown in Figure 10, the channel bag generating means can also include:
Module 630 is confirmed, for confirming whether channel data value is null value in the APK signature areas;
Performing module 640, when being not null value for the channel data value described in the APK program bags, by the channel Data value is set to null value;
First control module 650 for being set to null value or described when the performing module 6450 by the channel data value Confirm module 630 find the channel data value for null value when, control the channel bag generation module in Android installation kit APK Target location in program bag, writes the channel data, obtains channel bag.
Figure 11 is the structural representation of another kind of channel bag generating means according to Fig. 9 exemplary embodiments of the present invention Figure;As shown in figure 11, the channel bag generating means can also include:
Comparison module 660, institute before the data length value and the write channel data for relatively more described channel data The length value of channel data value is stated, the data length changing value of the APK signature areas is obtained;
Update module 670, for using the data length changing value as target value in the APK program bags change Value, updates the target value;
Wherein, the target value is the numerical value of the center catalogue starting location offset amount recorded in the APK program bags.
Figure 12 is the structural representation of another kind of channel bag generating means according to Fig. 9 exemplary embodiments of the present invention Figure;As shown in figure 12, when the channel bag generating means are used for server, can also include:
Receiver module 680, for receiving the acquisition request of the acquisition request channel bag of client transmission;
Second control module 690, for obtaining request according to described, controls the channel numbering acquisition module and obtains channel Numbering;
Sending module 710, after obtaining channel bag in the channel bag generation module 620, closes the channel bag, The channel bag is sent to into the client.
The embodiment of the present disclosure additionally provides another kind of computer-readable recording medium, and the storage medium is stored with computer journey Sequence, computer program can be used to perform the channel bag generation method that above-mentioned Fig. 8 embodiments are provided.
Figure 13 shows the structural representation of the terminal of an exemplary embodiment of the invention;Corresponding to above-mentioned canal Road bag generation method, the embodiment of the present disclosure also proposed the terminal of the exemplary embodiment of the invention shown in Figure 13 Schematic configuration diagram.Figure 13 is refer to, in hardware view, the computing device includes processor, internal bus, network interface, internal memory And nonvolatile memory, the hardware being also possible that certainly required for other business.Processor is from nonvolatile memory It is middle to read corresponding computer program in internal memory and then run, channel bag generating means are formed on logic level.Certainly, remove Outside software realization mode, the application is not precluded from other implementations, such as the side of logical device or software and hardware combining Formula etc., that is to say, that the executive agent of following handling process is not limited to each logical block, or hardware or patrols Collect device.
Figure 14 shows the structural representation of the server of an exemplary embodiment of the invention;Corresponding to above-mentioned Channel bag generation method, the embodiment of the present disclosure also proposed the service of the exemplary embodiment of the invention shown in Figure 14 The schematic configuration diagram of device.Refer to Figure 14, in hardware view, the computing device include processor, internal bus, network interface, Internal memory and nonvolatile memory, the hardware being also possible that certainly required for other business.Processor is deposited from non-volatile Corresponding computer program is read in reservoir in internal memory and then is run, channel bag generating means are formed on logic level.When So, in addition to software realization mode, the application is not precluded from other implementations, such as logical device or software and hardware combining Mode etc., that is to say, that the executive agent of following handling process is not limited to each logical block, or hardware Or logical device.
Those skilled in the art will readily occur to its of the application after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the application, these modifications, purposes or Person's adaptations follow the general principle of the application and including the undocumented common knowledge in the art of the application Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the application and spirit are by following Claim is pointed out.
Also, it should be noted that term " including ", "comprising" or its any other variant are intended to nonexcludability Comprising so that a series of process, method, commodity or equipment including key elements not only includes those key elements, but also wrapping Other key elements being not expressly set out are included, or also includes intrinsic for this process, method, commodity or equipment wanting Element.In the absence of more restrictions, the key element for being limited by sentence "including a ...", it is not excluded that wanting including described Also there is other identical element in process, method, commodity or the equipment of element.
The preferred embodiment of the disclosure is the foregoing is only, not to limit the disclosure, all essences in the disclosure Within god and principle, any modification, equivalent substitution and improvements done etc. should be included within the scope of disclosure protection.

Claims (12)

1. a kind of channel bag generation method, it is characterised in that methods described is used for terminal or server, including:
Generate channel data;
Target location in Android installation kit APK program bags, writes the channel data, obtains channel bag;
Wherein, the target location be the APK program bags APK signature areas in corresponding to channel Data Identification channel data Position.
2. method according to claim 1, it is characterised in that the generation channel data, including:
Obtain channel numbering;
Channel data are generated according to channel numbering.
3. method according to claim 2, it is characterised in that described that channel data, bag are generated according to channel numbering Include:
The APK signature areas are searched in the APK program bags;
The preset data form corresponding to the channel Data Identification is obtained in the APK signature areas;
Numbered according to the channel, generation meets the channel data of the preset data form.
4. the method according to any one of claim 1-3, it is characterised in that described to search institute in the APK program bags APK signature areas are stated, including:
According to the default file form and the preset data form of the APK signature areas of the APK program bags, the APK is searched Signature area.
5. method according to claim 1, it is characterised in that after the generation channel data, also include:
Confirm whether channel data value is null value in the APK signature areas;
When the channel data value described in the APK program bags is not null value, the channel data value is set to after null value, is performed The step of target location in Android installation kit APK program bags, the write channel data, acquisition channel bag;
When the channel data value described in the APK program bags is null value, perform described in Android installation kit APK program bags The step of target location, the write channel data, acquisition channel bag.
6. method according to claim 1, it is characterised in that described after channel bag is obtained, also includes:
The data length value of the comparison channel data and the length value of the write channel data as described before channel data value, Obtain the data length changing value of the APK signature areas;
Using the data length changing value as the changing value of target value in the APK program bags, the target value is updated;
Wherein, the target value is the numerical value of the center catalogue starting location offset amount recorded in the APK program bags.
7. method according to claim 1, it is characterised in that when methods described is used for server, also include:
Receive the acquisition request of the acquisition request channel bag that client sends;
According to it is described obtain request, perform it is described generation channel data the step of
After the acquisition channel bag, also include:
After the channel bag is closed, the channel bag is sent to into the client.
8. a kind of channel bag generating means, it is characterised in that described device is used for terminal or server, including:
Channel data generation module, for generating channel data;
Channel bag generation module, for the target location in Android installation kit APK program bags, writes the channel data, obtains Obtain channel bag;
Wherein, the target location be the APK program bags APK signature areas in corresponding to channel Data Identification channel data Position.
9. device according to claim 8, it is characterised in that when described device is used for server, also include:
Receiver module, for receiving the acquisition request of the acquisition request channel bag of client transmission;
Second control module, for obtaining request according to described, controls the channel numbering acquisition module and obtains channel numbering;
Sending module, after obtaining channel bag in the channel bag generation module, closes the channel bag, by the channel Bag is sent to the client.
10. a kind of computer-readable recording medium, it is characterised in that the storage medium is stored with computer program, the meter Calculation machine program is used to perform the channel bag generation method described in the claims 1.
11. a kind of terminals, it is characterised in that include:
Processor;
For storing the memory of processor executable;
Wherein, the processor, for performing the channel bag generation method described in the claims 1.
12. a kind of servers, it is characterised in that include:
Processor;
For storing the memory of processor executable;
Wherein, the processor, for performing the channel bag generation method described in the claims 1.
CN201611140288.8A 2016-12-12 2016-12-12 Method and device for generating channel package, terminal and server Pending CN106648643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611140288.8A CN106648643A (en) 2016-12-12 2016-12-12 Method and device for generating channel package, terminal and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611140288.8A CN106648643A (en) 2016-12-12 2016-12-12 Method and device for generating channel package, terminal and server

Publications (1)

Publication Number Publication Date
CN106648643A true CN106648643A (en) 2017-05-10

Family

ID=58824752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611140288.8A Pending CN106648643A (en) 2016-12-12 2016-12-12 Method and device for generating channel package, terminal and server

Country Status (1)

Country Link
CN (1) CN106648643A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213497A (en) * 2017-06-30 2019-01-15 武汉斗鱼网络科技有限公司 A kind of moving game channel packet generation method and device
CN109298869A (en) * 2018-08-23 2019-02-01 武汉斗鱼网络科技有限公司 A kind of generation method and relevant apparatus of target channel packet
CN109522030A (en) * 2018-11-29 2019-03-26 北纬通信科技南京有限责任公司 Platform contract-out party's method of multiple game channel packets is generated based on a key
CN109558164A (en) * 2018-11-21 2019-04-02 北京小米移动软件有限公司 Android installation kit packaging method and device, electronic equipment, readable storage medium storing program for executing
CN110401717A (en) * 2019-07-26 2019-11-01 上海优扬新媒信息技术有限公司 A kind of application program installation kit generation method and device
CN111198692A (en) * 2018-11-16 2020-05-26 北京奇虎科技有限公司 Installation package generation method and device
CN112698842A (en) * 2019-10-22 2021-04-23 北京国双科技有限公司 Method and device for acquiring additional information of application program
CN112788084A (en) * 2019-11-11 2021-05-11 腾讯科技(深圳)有限公司 Application program installation package downloading method, application program installation package pushing device and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899025A (en) * 2015-05-18 2015-09-09 北京奇虎科技有限公司 Method and device for generating channel package
CN105487876A (en) * 2015-12-30 2016-04-13 武汉手盟网络科技有限公司 Real-time and multi-channel packaging method for android
CN105631361A (en) * 2014-10-28 2016-06-01 中国移动通信集团终端有限公司 Application program channel source identification method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631361A (en) * 2014-10-28 2016-06-01 中国移动通信集团终端有限公司 Application program channel source identification method and device
CN104899025A (en) * 2015-05-18 2015-09-09 北京奇虎科技有限公司 Method and device for generating channel package
CN105487876A (en) * 2015-12-30 2016-04-13 武汉手盟网络科技有限公司 Real-time and multi-channel packaging method for android

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHIHU: "美团Android自动化之旅—生成渠道包", 《HTTPS://TECH.MEITUAN.COM/MT-APK-PACKAGING.HTML》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213497A (en) * 2017-06-30 2019-01-15 武汉斗鱼网络科技有限公司 A kind of moving game channel packet generation method and device
CN109298869A (en) * 2018-08-23 2019-02-01 武汉斗鱼网络科技有限公司 A kind of generation method and relevant apparatus of target channel packet
CN111198692A (en) * 2018-11-16 2020-05-26 北京奇虎科技有限公司 Installation package generation method and device
CN109558164A (en) * 2018-11-21 2019-04-02 北京小米移动软件有限公司 Android installation kit packaging method and device, electronic equipment, readable storage medium storing program for executing
CN109522030A (en) * 2018-11-29 2019-03-26 北纬通信科技南京有限责任公司 Platform contract-out party's method of multiple game channel packets is generated based on a key
CN109522030B (en) * 2018-11-29 2021-07-30 北纬通信科技南京有限责任公司 Platform package outlet method for generating multiple game channel packages based on one key
CN110401717A (en) * 2019-07-26 2019-11-01 上海优扬新媒信息技术有限公司 A kind of application program installation kit generation method and device
CN112698842A (en) * 2019-10-22 2021-04-23 北京国双科技有限公司 Method and device for acquiring additional information of application program
CN112788084A (en) * 2019-11-11 2021-05-11 腾讯科技(深圳)有限公司 Application program installation package downloading method, application program installation package pushing device and computer equipment
CN112788084B (en) * 2019-11-11 2022-05-27 腾讯科技(深圳)有限公司 Application program installation package downloading method, application program installation package pushing device and computer equipment

Similar Documents

Publication Publication Date Title
CN106648643A (en) Method and device for generating channel package, terminal and server
CN107516038A (en) A kind of method and device for determining device-fingerprint
CN107122258A (en) Method and apparatus for the state code check of test interface
CN110113393B (en) Message pushing method and device, electronic equipment and medium
CN109471738A (en) A kind of application program downloads recognition methods and the relevant device of channel
CN106293782A (en) A kind of method for upgrading system and terminal
US8543528B2 (en) Exploitation of transition rule sharing based on short state tags to improve the storage efficiency
CN109144548A (en) A kind of multicompartment software upgrade method, device and server realized based on git
CN106802817A (en) The upgrade method and device of SQLite databases
CN107590870A (en) Fiduciary high speed charging method and device
CN108416212A (en) Method for identifying application program and device
CN102346925B (en) Electronic ticket storage equipment, electronic ticket checking system and method
CN108491715A (en) Generation method, device and the server in Terminal fingerprints library
CN111258756A (en) Load balancing method and device, computer equipment and readable storage medium
CN110460686B (en) Block chain address registration method and device
CN110046509B (en) Method and device for hiding transaction written into block chain
CN104462392B (en) Share the statistical method and device of capacity of returns
CN110059087A (en) Data attribute identification method, device and equipment in a kind of piece of chain type account book
KR102146356B1 (en) System and method for collecting a point of interest, apparatus and computer readable medium having computer program recorded therefor
CN110866380A (en) Method and terminal for filling in information field content
CN102930200B (en) Progress recognizing method, device and terminal device
CN111198692A (en) Installation package generation method and device
CN102945342B (en) Progress recognizing method, device and terminal device
CN110008733A (en) The method and device that the transaction of a kind of pair of write-in block chain is hidden
CN111371818B (en) Data request verification method, device and equipment

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: 20170510

RJ01 Rejection of invention patent application after publication