CN116974586A - Multi-channel application packaging method, device, equipment and storage medium - Google Patents

Multi-channel application packaging method, device, equipment and storage medium Download PDF

Info

Publication number
CN116974586A
CN116974586A CN202311228035.6A CN202311228035A CN116974586A CN 116974586 A CN116974586 A CN 116974586A CN 202311228035 A CN202311228035 A CN 202311228035A CN 116974586 A CN116974586 A CN 116974586A
Authority
CN
China
Prior art keywords
channel
file
application
packaging
compiling
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
CN202311228035.6A
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.)
Shenzhen Chuanqu Network Technology Co ltd
Original Assignee
Shenzhen Chuanqu Network 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 Shenzhen Chuanqu Network Technology Co ltd filed Critical Shenzhen Chuanqu Network Technology Co ltd
Priority to CN202311228035.6A priority Critical patent/CN116974586A/en
Publication of CN116974586A publication Critical patent/CN116974586A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/53Decompilation; Disassembly
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Stored Programmes (AREA)

Abstract

The present application relates to the field of program compilation, and in particular, to a method, apparatus, device, and storage medium for packaging multi-channel applications. The method comprises the following steps: acquiring target channel characteristics of an original application and a channel to be promoted; performing decompilation operation on an original application to obtain a compiled file corresponding to the original application; fusing the target channel characteristics into the compiling file, and packaging the compiling file containing the target channel characteristics into a channel application; and packaging the channel application to obtain a channel installation package which is promoted to the channel to be promoted. According to the application, the resource and the code of the parent package are replaced and combined through the decompilation technology, the resource combination is carried out on the parent package, and channel characteristics are flexibly replaced, so that the packaging efficiency is improved, and the installation packages corresponding to different channels are rapidly generated.

Description

Multi-channel application packaging method, device, equipment and storage medium
Technical Field
The present application relates to the field of program compilation, and in particular, to a method, apparatus, device, and storage medium for packaging multi-channel applications.
Background
In the current application compiling process, because the channels of the application are different, the application corresponding to the target channel needs to be manufactured, in order to be able to intervene in different channels as soon as possible, a developer needs to debug interfaces corresponding to the intervention target channels one by one and correspondingly modify the activity content of the target channel, thereby affecting the update and development progress of the application. However, the common multi-channel application packaging method is to aggregate target channel characteristics of a plurality of target channels, so that the application volume is increased, channel characteristic conflicts exist, and the application cannot be put on shelf in time due to the fact that a plurality of channel characteristics exist and are detected by a single channel.
Disclosure of Invention
The application mainly aims to solve the technical problem that the efficiency is low due to the fact that the existing application is excessively complicated to modify the characteristics of the target channel.
The first aspect of the present application provides a multi-channel application packaging method, which includes: acquiring target channel characteristics of an original application and a channel to be promoted; performing decompilation operation on an original application to obtain a compiled file corresponding to the original application; fusing the target channel characteristics into the compiling file, and packaging the compiling file containing the target channel characteristics into a channel application; and packaging the channel application to obtain a channel installation package which is promoted to the channel to be promoted.
Optionally, in a first implementation manner of the first aspect of the present application, after the performing a decompilation operation on an original application to obtain a compiled file corresponding to the original application, the method further includes: retrieving whether the compiled file is written to a second channel feature; if yes, copying the file corresponding to the second channel characteristic into an empty file, wherein the empty file only comprises a file name, and the content of the empty file is emptied; and extracting key characters of the second channel characteristics, and updating the key characters into characters to be replaced.
Optionally, in a second implementation manner of the first aspect of the present application, the compiling file includes at least one manifest file, and the fusing the target channel feature into the compiling file includes: locating a provider node in the manifest file; retrieving and replacing authenticates in the program node as the target channel feature; and retrieving the character to be replaced in the manifest file, replacing the character to be replaced with the target channel characteristic, and merging all manifest files after replacement.
Optionally, in a third implementation manner of the first aspect of the present application, the compiled file further includes a res file, and the fusing the target channel feature into the compiled file further includes: classifying the res files to obtain a first type file, a second type file and a third type file; merging the first type files based on the target channel characteristic coverage; carrying out xml node merging on the second type file based on the target channel characteristics; merging the third class file based on the target channel characteristics, executing ID reordering after merging, updating the third class file, and updating a first index file based on the merged res file, wherein the res file contains the first index file for indexing the content in the res file.
Optionally, in a fourth implementation manner of the first aspect of the present application, the target channel feature further includes a channel parameter and a channel picture; the fusing the target channel characteristics into the compiled file further comprises: writing the channel parameters into the compiling file; replacing the character to be replaced in the compiling file with a corresponding channel parameter; replacing and updating the propaganda pictures in the compiling file into the channel pictures; updating a second index file containing information directed to the target channel characteristics based on the target channel characteristics by using a compiling tool, wherein the compiling file contains the second index file used for indexing contents in the compiling file.
Optionally, in a fifth implementation manner of the first aspect of the present application, the compiled file further includes a smali file, and the packaging the compiled file including the target channel feature into a channel application includes: performing sub-packaging operation on the smali file based on the target channel characteristics to obtain a sub-packaged smali file, and updating the sub-packaged smali file to the compiling file; and executing compiling operation on the compiling file by adopting a compiling tool to obtain the channel application.
Optionally, in a sixth implementation manner of the first aspect of the present application, the packaging the channel application to obtain a channel installation package promoted to the channel to be promoted includes: determining the version number of the channel installation package based on the channel to be promoted for the channel application, and writing the version number into the channel application; and signing the channel application by adopting a signing tool based on a preset secret key, and aligning the channel application by using an alignment tool to obtain a channel installation package popularized to the channel to be popularized.
The second aspect of the present application provides a multi-channel application packaging apparatus, comprising: the packaging data acquisition module is used for acquiring the original application and the target channel characteristics of the channel to be promoted; the decompilation module is used for executing decompilation operation on the original application to obtain a compiled file corresponding to the original application; the feature fusion module is used for fusing the target channel features into the compiling file and packaging the compiling file containing the target channel features into channel application; and the application packaging module is used for packaging the channel application to obtain a channel installation package popularized to the channel to be popularized.
Optionally, in a first implementation manner of the second aspect of the present application, the multi-channel application packaging device further includes a channel replacement module, where the channel replacement module is specifically configured to: retrieving whether the compiled file is written to a second channel feature; if yes, copying the file corresponding to the second channel characteristic into an empty file, wherein the empty file only comprises a file name, and the content of the empty file is emptied; and extracting key characters of the second channel characteristics, and updating the key characters into characters to be replaced.
Optionally, in a second implementation manner of the second aspect of the present application, the feature fusion module is specifically configured to: locating a provider node in the manifest file; retrieving and replacing authenticates in the program node as the target channel feature; and retrieving the character to be replaced in the manifest file, replacing the character to be replaced with the target channel characteristic, and merging all manifest files after replacement.
Optionally, in a third implementation manner of the second aspect of the present application, the feature fusion module is specifically further configured to: classifying the res files to obtain a first type file, a second type file and a third type file; merging the first type files based on the target channel characteristic coverage; carrying out xml node merging on the second type file based on the target channel characteristics; merging the third class file based on the target channel characteristics, executing ID reordering after merging, updating the third class file, and updating a first index file based on the merged res file, wherein the res file contains the first index file for indexing the content in the res file.
Optionally, in a fourth implementation manner of the second aspect of the present application, the feature fusion module is specifically further configured to: writing the channel parameters into the compiling file; replacing the character to be replaced in the compiling file with a corresponding channel parameter; replacing and updating the propaganda pictures in the compiling file into the channel pictures; updating a second index file containing information directed to the target channel characteristics based on the target channel characteristics by using a compiling tool, wherein the compiling file contains the second index file used for indexing contents in the compiling file.
Optionally, in a fifth implementation manner of the second aspect of the present application, the feature fusion module is specifically further configured to: performing sub-packaging operation on the smali file based on the target channel characteristics to obtain a sub-packaged smali file, and updating the sub-packaged smali file to the compiling file; and executing compiling operation on the compiling file by adopting a compiling tool to obtain the channel application.
Optionally, in a sixth implementation manner of the second aspect of the present application, the application packaging module is specifically configured to: determining the version number of the channel installation package based on the channel to be promoted for the channel application, and writing the version number into the channel application; and signing the channel application by adopting a signing tool based on a preset secret key, and aligning the channel application by using an alignment tool to obtain a channel installation package popularized to the channel to be popularized.
A third aspect of the present application provides a multi-channel application packaging apparatus comprising: a memory and at least one processor, the memory having a request stored therein, the memory and the at least one processor being interconnected by a wire; the at least one processor invokes the request in the memory to cause the multi-channel application packaging device to perform the steps of the multi-channel application packaging method described above.
A fourth aspect of the present application provides a computer readable storage medium having stored therein a request which, when run on a computer, causes the computer to perform the steps of the multi-channel application packaging method described above.
In the technical scheme of the application, the original application and the target channel characteristics of the channel to be promoted are obtained; performing decompilation operation on an original application to obtain a compiled file corresponding to the original application; fusing the target channel characteristics into the compiling file, and packaging the compiling file containing the target channel characteristics into a channel application; and packaging the channel application to obtain a channel installation package which is promoted to the channel to be promoted. According to the application, the resource and the code of the parent package are replaced and combined through the decompilation technology, the resource combination is carried out on the parent package, and channel characteristics are flexibly replaced, so that the packaging efficiency is improved, and the installation packages corresponding to different channels are rapidly generated.
Drawings
FIG. 1 is a schematic diagram of a first embodiment of a multi-channel application packaging method according to an embodiment of the present application;
FIG. 2 is a diagram of a second embodiment of a multi-channel application packaging method in accordance with an embodiment of the present application;
FIG. 3 is a diagram of a third embodiment of a multi-channel application packaging method in accordance with an embodiment of the present application;
FIG. 4 is a schematic diagram of an embodiment of a multi-channel application packaging apparatus according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another embodiment of a multi-channel application packaging apparatus according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an embodiment of a multi-channel application packaging device according to an embodiment of the present application.
Detailed Description
In the technical scheme of the application, the original application and the target channel characteristics of the channel to be promoted are obtained; performing decompilation operation on an original application to obtain a compiled file corresponding to the original application; fusing the target channel characteristics into the compiling file, and packaging the compiling file containing the target channel characteristics into a channel application; and packaging the channel application to obtain a channel installation package which is promoted to the channel to be promoted. According to the application, the resource and the code of the parent package are replaced and combined through the decompilation technology, the resource combination is carried out on the parent package, and channel characteristics are flexibly replaced, so that the packaging efficiency is improved, and the installation packages corresponding to different channels are rapidly generated.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, a specific flow of an embodiment of the present application is described below, referring to fig. 1, where a first embodiment of a multi-channel application packaging method in an embodiment of the present application includes:
101. acquiring target channel characteristics of an original application and a channel to be promoted;
in this embodiment, an original application and a target channel feature corresponding to a channel to be promoted are obtained, where the target channel feature at least includes a channel sdk of the channel to be promoted, a channel script, and an application interface element, and the application interface element includes an icon, a propaganda picture, a splash screen, and the like.
102. Performing decompilation operation on the original application to obtain a compiled file corresponding to the original application;
in this embodiment, decompilation operation is performed on an original application by using apktool to obtain a plurality of compiled files corresponding to the original application, specifically, files for subsequent fusion steps, including at least assets, lib, res, smali, androidManifest, apktool, where an assembly file is used to store a resource file or a game file, a lib file is used to store a system architecture library, a res file is used to store a resource file or a game file, a smali file is used to store assembly language, an android management file is used to store components, permissions, a starter, statements of services and other functions of an application program, and an apktool file is used to store information such as an application version, an api version, and the like.
103. Fusing the target channel characteristics into a compiling file, and packaging the compiling file containing the target channel characteristics into a channel application;
in this embodiment, according to the requirements of the target channel, adding the target channel characteristics to the compiled file in the compiled file, and then packaging the compiled file to obtain the channel application, where the channel application at least includes resource merging and modifying the resource configuration of the compiled file based on the target channel characteristics.
104. And packaging the channel application to obtain a channel installation package which is popularized to the channel to be popularized.
In this embodiment, the channel application is obtained based on the target channel feature fusion and the modification of the compiled file, and then the packing operation is performed on the channel application, so as to obtain the channel installation package that is put on top of the channel to be promoted.
Specifically, the packaging operation includes signing the channel application with the signing application only and performing alignment of the channel application using an alignment tool.
In the embodiment, the original application and the target channel characteristics of the channel to be promoted are obtained; performing decompilation operation on an original application to obtain a compiled file corresponding to the original application; fusing the target channel characteristics into the compiling file, and packaging the compiling file containing the target channel characteristics into a channel application; and packaging the channel application to obtain a channel installation package which is promoted to the channel to be promoted. According to the application, the resource and the code of the parent package are replaced and combined through the decompilation technology, the resource combination is carried out on the parent package, and channel characteristics are flexibly replaced, so that the packaging efficiency is improved, and the installation packages corresponding to different channels are rapidly generated.
Referring to fig. 2, a second embodiment of the multi-channel application packaging method according to the present application includes:
201. acquiring target channel characteristics of an original application and a channel to be promoted;
202. performing decompilation operation on the original application to obtain a compiled file corresponding to the original application;
203. retrieving whether the compiled file is written to the second channel feature;
in this embodiment, there is a case where the obtained original application already contains the second channel feature, and it is necessary to search in advance whether the compiled file contains the second channel feature written in addition to the target channel feature, that is, the original application already is an installation package corresponding to the second popularization channel, and it is necessary to detect the compiled file.
Specifically, an apktool file of the compiled file may be detected, and the judgment is performed by retrieving whether the apktool file includes the second channel feature.
In an aspect, the determining whether to write the second channel feature may also be based on a signature of the original application, and based on the signature of the original application.
204. If yes, copying the file corresponding to the second channel characteristic into an empty file;
in this embodiment, if yes, the file corresponding to the second channel feature is emptied, only the file name is reserved, and here the file name is reserved, so that the generation of the empty file is to prevent the situation that two or more channel features appear simultaneously due to the fact that the installation package is replaced and not fused in place in the actual execution process, so that the file corresponding to the second channel feature needs to be rewritten into the empty file before the target channel feature is fused, and two or more channel features are avoided.
205. Extracting key characters of the second channel characteristics, and updating the key characters into characters to be replaced;
in this embodiment, key characters of a second channel feature in a compiled file are extracted, and replaced with characters to be replaced, which are applied in the step of implementing the fusion, based on the key characters, so that the target channel feature is fused to the compiled file based on the characters to be replaced, and the characters to be replaced in the compiled file are replaced with channel characters corresponding to the target channel feature, wherein the channel characters include channel names, channel feature characters, target channel features and the like corresponding to the channels to be promoted.
206. Locating the provider node in the manifest file;
in this embodiment, the manifest file is an android management file, the program node is a provider node, and the authors attribute in the provider node in the android management file is modified to be a target channel feature, where the specific target channel feature is $ { application }.
207. Retrieving and replacing authenticates in the program node as target channel features;
208. retrieving characters to be replaced in the manifest file, replacing the characters to be replaced with target channel characteristics, and merging all the manifest files after replacement;
in this embodiment, the character to be replaced in the manifest file is retrieved, and replaced with the target channel feature, where the target channel feature is $ { application ld }, and the manifest file is merged after replacement.
Specifically, the manifest files are merged by means of xml node merging.
In the practical application process, the XML node merging mode may be that an XML file is traversed: and traversing the whole XML file by using an XML parsing library (such as DOM, SAX and the like) to locate nodes needing to be merged. Selecting nodes to be combined: nodes that need to be merged are determined and their references saved. Information such as the node's label name, attribute value, etc. can be used for matching and screening. Merging node content: and combining the contents of the selected nodes needing to be combined. The specific merging method depends on the structure and requirements of the node content. For example, the content of the text node may be spliced or child nodes may be added to the target node. Updating the parent node: if the merge results in a node being removed or changed structure, the parent node's reference may need to be updated. Deleting redundant nodes: the merged nodes may be deleted as needed to clean up the XML structure. Outputting a result: and outputting the merged XML structure as a file or a character string to finish merging.
209. Writing channel parameters into a compiling file;
in this embodiment, the target channel feature further includes channel parameters, and the original parameters in the compiled file are modified based on the channel parameters, so that the modified compiled file can be operated based on the channel parameters.
Specifically, the channel parameters include an api interface, a payment channel, a data transmission channel and the like, and the application is adapted to be a channel to be promoted by modifying the original parameters into the channel parameters.
In practical application, taking game application as an example, there are official and channel service, wherein the channel service has a channel special server, a payment channel, an api interface, a version number, a version activity and the like of the corresponding channel service, and the modified game application independently runs on the channel special server of the channel service by replacing channel parameters and can be influenced by the official service or partially influenced by the official service or not.
210. Replacing the character to be replaced in the compiling file with the corresponding channel parameter;
in the actual application process, placeholders and propaganda pictures in the compiled file are replaced by corresponding target channel characteristics, wherein the propaganda pictures comprise but are not limited to icons, splash screens, interfaces and the like. 211. Replacing and updating the propaganda pictures in the compiled file into channel pictures;
212. updating, with a compilation tool, a second index file containing information directed to the target channel feature based on the target channel feature;
in this embodiment, the compiling tool AAPT2 is applied to regenerate the second index file, where the second index file is an R file.
Specifically, the application runs the./ gradlew clean command to clean up the R file of the project build and runs the./ gradlew assembleDebug command after cleaning up to regenerate the R file.
In practical application, the compiled file further comprises an R file for indexing each file in the compiled file, the R file originally included in the compiled file is removed by running a first command, namely a/gradlew clean command, and after the R file is removed, the R file for indexing each file in the compiled file after updating is regenerated based on the updated compiled file.
213. And packaging the channel application to obtain a channel installation package which is popularized to the channel to be popularized.
This embodiment describes in detail, on the basis of the previous embodiment, whether the compiled file is retrieved to be written to the second channel feature; if yes, copying the file corresponding to the second channel characteristic into an empty file, wherein the empty file only comprises a file name, and the content of the empty file is emptied; and extracting key characters of the second channel characteristics, and updating the key characters into characters to be replaced. Compared with the traditional method, the file name is clearly reserved, the empty file is generated to prevent the situation that two or more channel features appear simultaneously due to the fact that the installation package is not replaced and fused in place in the actual execution process, and therefore the file corresponding to the second channel feature needs to be copied into the empty file before the target channel feature is fused, and the situation that two or more channel features appear simultaneously is avoided.
Referring to fig. 3, a third embodiment of a multi-channel application packaging method according to an embodiment of the present application includes:
301. acquiring target channel characteristics of an original application and a channel to be promoted;
302. performing decompilation operation on the original application to obtain a compiled file corresponding to the original application;
303. classifying res files to obtain a first type file, a second type file and a third type file;
in this embodiment, the res files are classified to obtain a first type file, a second type file and a third type file, where the first type file is a file that does not contain value characters, the second type file is a file that contains value characters and is not public, and the third type file is a file that contains value characters and is public.
304. Merging the first type files based on the target channel characteristic coverage;
in this embodiment, the target channel feature further includes a channel res file corresponding to the target channel feature, after classification, the first class of files are covered and combined based on the channel res file, xml node combination is performed on the second class of files, after third class of files are combined, the combined third class of files are reordered based on the ID, a combined res file is obtained, and a first index file is updated for the combined res file, where the first index file is an R file, and the first index file is used for indexing contents in the combined res file.
In practical application, the res file includes a first index file for indexing each file in the res file, where an index range of the first index file is limited to an internal file of the res file, after the merging and overlaying steps are performed on the first type file, the second type file and the third type file in the res file, the original first index file needs to be removed due to a change of contents in the res file, and the first index file needs to be regenerated based on the updated res file.
305. Carrying out xml node merging on the second class files based on the target channel characteristics;
306. merging the third class files based on the target channel characteristics, performing ID reordering after merging, updating the third class files, and updating the first index file based on the merged res files;
307. performing sub-packaging operation on the smali file based on the target channel characteristics to obtain a sub-packaged smali file, and updating the sub-packaged smali file to a compiling file;
in this embodiment, the packetizing operation is performed on the smali file, so as to obtain a packetized smali file, and the packetized file is updated to the compiled file.
Specifically, it is required to obtain all the subfile directories under the smali file first, calculate whether the number of code methods in the first subfile exceeds a limit value, where the limit value is 65535, place the number of code methods exceeding the limit value in the second subfile, and calculate whether the number of code methods in the second subfile exceeds the limit value until the number of code methods is placed, and then obtain the packetized smali file.
308. A compiling tool is adopted to execute compiling operation on the compiling file, so that channel application is obtained;
specifically, a compiling tool is used for executing compiling operation on the updated compiling file to obtain the channel application containing the target channel characteristics, wherein the compiling tool can be apktool.
309. Determining the version number of a channel installation package based on a channel to be promoted for channel application, and writing the version number into the channel application;
in this embodiment, the channel identification is determined: first, the identification of the channel to be promoted, such as the name or code of the channel to be promoted, needs to be determined. Configuration channel information: channel information may be defined by a configuration file or script during the construction of an application. Such information may include channel identification, channel version number, etc. Generating a channel application: installation packages for different channels are generated from the channel information using a build tool (e.g., gradle). Different channel variables can be defined in the Gradle configuration file, and different version numbers can be dynamically generated according to channel information in the construction process. Channel information is written: in generating the channel application, the channel information may be written to the application by modifying the Manifest file of the APK or otherwise. This functionality may be implemented using a third party library or custom scripts. For example, the channel identification may be written by modifying the meta-data tag in the Manifest file, wherein the target channel characteristics further include the channel identification. Testing and publishing: after the writing of the channel information is completed, a test can be performed to ensure that the channel application operates normally on each channel.
310. And signing the channel application by adopting a signing tool based on a preset secret key, and aligning the channel application by using an alignment tool to obtain a channel installation package popularized to the channel to be popularized.
In the actual application process, the channel application obtained after the step 309 is completed can be normally operated, but the problems of larger memory space, untimely calling command and the like often exist, and a zipalign tool in the Android SDK needs to be used. The tool can rearrange the resource files in the APK files according to fixed positions and sequences, so that the resources can be loaded and called more quickly, and channel installation packages which are promoted to channels to be promoted are obtained after the resources are aligned.
The embodiment describes the detailed description of the channel application based on the channel to be promoted to determine the version number of the channel installation package and write the version number into the channel application on the basis of the previous embodiment; and signing the channel application by adopting a signing tool based on a preset secret key, and aligning the channel application by using an alignment tool to obtain a channel installation package popularized to the channel to be popularized. Is a process of (2). By comparing this embodiment with the conventional method, the signature step and the alignment step are clarified, wherein the application signature is generated based on the key pair of the developer, and by digitally signing the application, it can be ensured that the application is constructed by a legitimate developer and has not been tampered with. When a user installs an application, the operating system verifies that the signature of the application is consistent with the developer signature to confirm the authenticity of the application.
The method for packaging multi-channel applications in the embodiment of the present application is described above, and the device for packaging multi-channel applications in the embodiment of the present application is described below, referring to fig. 4, where an embodiment of the device for packaging multi-channel applications in the embodiment of the present application includes:
a package data obtaining module 401, configured to obtain target channel characteristics of an original application and a channel to be promoted;
a decompilation module 402, configured to perform a decompilation operation on an original application, to obtain a compiled file corresponding to the original application;
the feature fusion module 403 is configured to fuse the target channel feature into the compiled file, and encapsulate the compiled file containing the target channel feature into a channel application;
and the application packaging module 404 is used for packaging the channel application to obtain a channel installation package promoted to the channel to be promoted.
In the embodiment of the application, the multi-channel application packaging device runs the multi-channel application packaging method, which comprises the steps of obtaining the original application and the target channel characteristics of the channels to be promoted; performing decompilation operation on an original application to obtain a compiled file corresponding to the original application; fusing the target channel characteristics into the compiling file, and packaging the compiling file containing the target channel characteristics into a channel application; and packaging the channel application to obtain a channel installation package which is promoted to the channel to be promoted. According to the application, the resource and the code of the parent package are replaced and combined through the decompilation technology, the resource combination is carried out on the parent package, and channel characteristics are flexibly replaced, so that the packaging efficiency is improved, and the installation packages corresponding to different channels are rapidly generated.
Referring to fig. 5, a second embodiment of a multi-channel application packaging apparatus according to an embodiment of the present application includes:
a package data obtaining module 401, configured to obtain target channel characteristics of an original application and a channel to be promoted;
a decompilation module 402, configured to perform a decompilation operation on an original application, to obtain a compiled file corresponding to the original application;
the feature fusion module 403 is configured to fuse the target channel feature into the compiled file, and encapsulate the compiled file containing the target channel feature into a channel application;
and the application packaging module 404 is used for packaging the channel application to obtain a channel installation package promoted to the channel to be promoted.
In this embodiment, the multi-channel application packaging apparatus further includes a channel replacement module 405, where the channel replacement module 405 is specifically configured to:
retrieving whether the compiled file is written to a second channel feature; if yes, copying the file corresponding to the second channel characteristic into an empty file, wherein the empty file only comprises a file name, and the content of the empty file is emptied; and extracting key characters of the second channel characteristics, and updating the key characters into characters to be replaced.
In this embodiment, the feature fusion module 403 is specifically configured to:
locating a provider node in the manifest file; retrieving and replacing authenticates in the program node as the target channel feature; and retrieving the character to be replaced in the manifest file, replacing the character to be replaced with the target channel characteristic, and merging all manifest files after replacement.
In this embodiment, the feature fusion module 403 is specifically further configured to:
classifying the res files to obtain a first type file, a second type file and a third type file; merging the first type files based on the target channel characteristic coverage; carrying out xml node merging on the second type file based on the target channel characteristics; merging the third class file based on the target channel characteristics, executing ID reordering after merging, updating the third class file, and updating a first index file based on the merged res file, wherein the res file contains the first index file for indexing the content in the res file.
In this embodiment, the feature fusion module 403 is specifically further configured to:
writing the channel parameters into the compiling file; replacing the character to be replaced in the compiling file with a corresponding channel parameter; replacing and updating the propaganda pictures in the compiling file into the channel pictures; updating a second index file containing information directed to the target channel characteristics based on the target channel characteristics by using a compiling tool, wherein the compiling file contains the second index file used for indexing contents in the compiling file.
In this embodiment, the feature fusion module 403 is specifically further configured to:
performing sub-packaging operation on the smali file based on the target channel characteristics to obtain a sub-packaged smali file, and updating the sub-packaged smali file to the compiling file; and executing compiling operation on the compiling file by adopting a compiling tool to obtain the channel application.
In this embodiment, the application packaging module 404 is specifically configured to:
determining the version number of the channel installation package based on the channel to be promoted for the channel application, and writing the version number into the channel application; and signing the channel application by adopting a signing tool based on a preset secret key, and aligning the channel application by using an alignment tool to obtain a channel installation package popularized to the channel to be popularized.
The embodiment describes the specific functions of each module and the unit constitution of part of the modules in detail based on the previous embodiment, and improves the operation of the multi-channel application packaging device, improves the reliability of the multi-channel application packaging device during operation, defines the actual logic among each step and improves the practicability of the device through the specific functions of the original modules.
The multi-channel application packaging device in the embodiment of the present application is described in detail above in terms of the modularized functional entity in fig. 4 and fig. 5, and the multi-channel application packaging device in the embodiment of the present application is described in detail below in terms of hardware processing.
Fig. 6 is a schematic structural diagram of a multi-channel application packaging device according to an embodiment of the present application, where the multi-channel application packaging device 600 may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 610 (e.g., one or more processors) and a memory 620, and one or more storage media 630 (e.g., one or more mass storage devices) storing application programs 633 or data 632. Wherein the memory 620 and the storage medium 630 may be transitory or persistent storage. The program stored on the storage medium 630 may include one or more modules (not shown), each of which may include a series of requested operations in the multi-channel application packaging apparatus 600. Still further, the processor 610 may be configured to communicate with the storage medium 630 to execute a series of requested operations in the storage medium 630 on the multi-channel application packaging apparatus 600 to implement the steps of the multi-channel application packaging method described above.
The multi-channel application packaging apparatus 600 may also include one or more power supplies 640, one or more wired or wireless network interfaces 650, one or more input/output interfaces 660, and/or one or more operating systems 631, such as Windows Serve, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the multi-channel application packaging apparatus structure shown in fig. 6 is not limiting of the multi-channel application packaging apparatus provided by the present application and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
The present application also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, or a volatile computer readable storage medium, in which a request is stored, which when run on a computer, causes the computer to perform the steps of the multi-channel application packaging method.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a storage medium, comprising several requests for a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A multi-channel application packaging method, characterized in that the multi-channel application packaging method comprises:
acquiring target channel characteristics of an original application and a channel to be promoted;
performing decompilation operation on an original application to obtain a compiled file corresponding to the original application;
fusing the target channel characteristics into the compiling file, and packaging the compiling file containing the target channel characteristics into a channel application;
and packaging the channel application to obtain a channel installation package which is promoted to the channel to be promoted.
2. The multi-channel application packaging method according to claim 1, further comprising, after said performing a decompilation operation on an original application to obtain a compiled file corresponding to the original application:
retrieving whether the compiled file is written to a second channel feature;
if yes, copying the file corresponding to the second channel characteristic into an empty file, wherein the empty file only comprises a file name, and the content of the empty file is emptied;
and extracting key characters of the second channel characteristics, and updating the key characters into characters to be replaced.
3. The multi-channel application packaging method as claimed in claim 2, wherein the compiled file includes at least one manifest file,
the fusing the target channel features into the compiled file includes:
locating a provider node in the manifest file;
retrieving and replacing authenticates in the program node as the target channel feature;
and retrieving the character to be replaced in the manifest file, replacing the character to be replaced with the target channel characteristic, and merging all manifest files after replacement.
4. The multi-channel application packaging method as claimed in claim 3, wherein the compiled file further comprises res file,
the fusing the target channel characteristics into the compiled file further comprises:
classifying the res files to obtain a first type file, a second type file and a third type file;
merging the first type files based on the target channel characteristic coverage;
carrying out xml node merging on the second type file based on the target channel characteristics;
merging the third class file based on the target channel characteristics, executing ID reordering after merging, updating the third class file, and updating a first index file based on the merged res file, wherein the res file contains the first index file for indexing the content in the res file.
5. The multi-channel application packaging method of claim 4, wherein the target channel characteristics further comprise channel parameters, channel pictures;
the fusing the target channel characteristics into the compiled file further comprises:
writing the channel parameters into the compiling file;
replacing the character to be replaced in the compiling file with a corresponding channel parameter;
replacing and updating the propaganda pictures in the compiling file into the channel pictures;
updating a second index file containing information directed to the target channel characteristics based on the target channel characteristics by using a compiling tool, wherein the compiling file contains the second index file used for indexing contents in the compiling file.
6. The multi-channel application packaging method as claimed in claim 1, wherein the compiled file further comprises a smali file,
the packaging of the compiled file containing the target channel characteristics into a channel application comprises the following steps:
performing sub-packaging operation on the smali file based on the target channel characteristics to obtain a sub-packaged smali file, and updating the sub-packaged smali file to the compiling file;
and executing compiling operation on the compiling file by adopting a compiling tool to obtain the channel application.
7. The method for packaging multiple channel applications according to claim 1, wherein said packaging the channel applications to obtain a channel installation package promoted to the channel to be promoted comprises:
determining the version number of the channel installation package based on the channel to be promoted for the channel application, and writing the version number into the channel application;
and signing the channel application by adopting a signing tool based on a preset secret key, and aligning the channel application by using an alignment tool to obtain a channel installation package popularized to the channel to be popularized.
8. A multi-channel application packaging apparatus, comprising:
the packaging data acquisition module is used for acquiring the original application and the target channel characteristics of the channel to be promoted;
the decompilation module is used for executing decompilation operation on the original application to obtain a compiled file corresponding to the original application;
the feature fusion module is used for fusing the target channel features into the compiling file and packaging the compiling file containing the target channel features into channel application;
and the application packaging module is used for packaging the channel application to obtain a channel installation package popularized to the channel to be popularized.
9. An electronic device comprising a memory and at least one processor, the memory having instructions stored therein; the at least one processor invoking the instructions in the memory to cause the electronic device to perform the steps of the multi-channel application packaging method of any of claims 1-7.
10. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the steps of the multi-channel application packaging method of any of claims 1-7.
CN202311228035.6A 2023-09-22 2023-09-22 Multi-channel application packaging method, device, equipment and storage medium Pending CN116974586A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311228035.6A CN116974586A (en) 2023-09-22 2023-09-22 Multi-channel application packaging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311228035.6A CN116974586A (en) 2023-09-22 2023-09-22 Multi-channel application packaging method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116974586A true CN116974586A (en) 2023-10-31

Family

ID=88477071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311228035.6A Pending CN116974586A (en) 2023-09-22 2023-09-22 Multi-channel application packaging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116974586A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293085A1 (en) * 2016-11-14 2018-10-11 Ping An Technology (Shenzhen) Co., Ltd. Plug-in packaging method, device, terminal and storage media
CN110083367A (en) * 2019-03-21 2019-08-02 平安普惠企业管理有限公司 Optimized treatment method, device and the computer equipment of application installation package
CN111078223A (en) * 2018-10-22 2020-04-28 腾讯科技(深圳)有限公司 Application program packaging method and device
CN112052013A (en) * 2020-08-03 2020-12-08 完美世界(北京)软件科技发展有限公司 Software package generation method and device, storage medium and electronic device
CN116755713A (en) * 2023-08-16 2023-09-15 深圳传趣网络技术有限公司 Application program generation method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180293085A1 (en) * 2016-11-14 2018-10-11 Ping An Technology (Shenzhen) Co., Ltd. Plug-in packaging method, device, terminal and storage media
CN111078223A (en) * 2018-10-22 2020-04-28 腾讯科技(深圳)有限公司 Application program packaging method and device
CN110083367A (en) * 2019-03-21 2019-08-02 平安普惠企业管理有限公司 Optimized treatment method, device and the computer equipment of application installation package
CN112052013A (en) * 2020-08-03 2020-12-08 完美世界(北京)软件科技发展有限公司 Software package generation method and device, storage medium and electronic device
CN116755713A (en) * 2023-08-16 2023-09-15 深圳传趣网络技术有限公司 Application program generation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林慈桥: "Andriod逆向开发合并res目录到apk中,处理values目录的values.xml文件", Retrieved from the Internet <URL:https://blog.csdn.net/qq_19942717/article/details/124035304> *

Similar Documents

Publication Publication Date Title
US5617533A (en) System and method for determining whether a software package conforms to packaging rules and requirements
CN106559438B (en) Program uploading method and device based on target network platform
US6892382B1 (en) Method and apparatus for implementing deployment descriptors in an enterprise environment
CN105657191B (en) Application increment upgrading method and system based on Android system
CN107506221B (en) Application program upgrading method, device and equipment
WO2010041467A2 (en) USING TRANSIENT PCRs TO REALISE TRUST IN APPLICATION SPACE OF A SECURE PROCESSING SYSTEM
KR20210152624A (en) Method and apparatus for providing visibility of security into container images
CN110321131B (en) Service component packaging method, system and server
CN108614702B (en) Byte code optimization method and device
CN107783766B (en) Method and device for cleaning files of application program
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
CN110806873A (en) Target control determining method and device, electronic equipment and storage medium
CN112256359A (en) Micro-service merging method and device, electronic equipment and readable storage medium
US8473936B2 (en) System and method for runtime class extracting
CN115237631A (en) Easily-extensible data sharing system and method based on data sharing plug-in
EP1050813A2 (en) Method and apparatus for implementing deployment descriptions in an enterprise environment
CN110688147A (en) Method for packing and analyzing metadata
KR102380434B1 (en) Docker image vulnerability inspection device and method for performing docker file analysis
CN110941443A (en) Method and device for modifying file name in SDK and electronic equipment
CN106778270B (en) Malicious application detection method and system
CN116540994A (en) Method, control device and storage medium for generating route by configuring reaction item
CN116974586A (en) Multi-channel application packaging method, device, equipment and storage medium
CN116029526A (en) Scheduling method, device, equipment and storage medium of experimental resources
US20030204525A1 (en) Application control method, and implementation device and processing program for the same
CN114936030A (en) Software package management method and system based on authority control

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