Automatic packaging method and system for Android application

By designing an automated packaging system, using the combination of web front-end, data storage server and packaging server, the problem of low packaging efficiency of Android applications is solved, and fast and accurate packaging and release are achieved, reducing the work burden of developers.

CN119311311APending Publication Date: 2025-01-14CHENGDOU HUAQIYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411368751.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing technology cannot realize fully automated packaging of Android applications, which causes developers to spend a lot of time when packaging multiple projects, affecting work efficiency.

Method used

An automated packaging system was designed, including a web front-end, a data storage server and a packaging server. Packaging tasks are created through the web front-end, the data storage server stores project information, and the packaging server automatically processes project information to generate APKs to realize the automated packaging process.

Benefits of technology

It realizes the fast and accurate packaging and release of complex projects, reduces developers' waiting time, reduces manual operation errors, and supports batch processing and historical version management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311311A_ABST
    Figure CN119311311A_ABST
Patent Text Reader

Abstract

The invention provides an automatic packaging method and system for Android applications, and relates to the technical field of software development. The system comprises three main components, namely a Web front end, a data storage server and a packaging server, the Web front end is responsible for creating a packaging task, providing project data filling, version management, a project management list, APK distribution and other functions, the packaging server executes an actual packaging task, automatically processes project data and generates an APK file, and the data storage server is used for storing data of an APP project, including pictures, signature files, configuration files and font files; according to the method, a visual user interface can be provided, a user can conveniently manage different versions and data of the APP project, and meanwhile, due to the automatic packaging process, errors caused by manual operation are reduced, and the packaging speed is increased. Through automatic signature and resource replacement, the system ensures the consistency and security of the packaging process; a user can conveniently download and share the generated APK file through the APK distribution page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software development, and in particular to an automated packaging method and system for Android applications. Background Art

[0002] With the advancement of technology and the development of the times, smart phones are increasingly used in our production and life; among them, Android phones and their rich Android application resources occupy a large share of the smart phone market.

[0003] Android applications are updated at a fast pace, requiring software development teams to continuously improve development efficiency to adapt to market demand and pursue profit benefits; however, current Android application packaging work mostly requires manual configuration of packaging parameters, resource files, certificates and other information, and cannot achieve fully automated packaging.

[0004] Manual packaging of APK will take up a lot of waiting time for developers. Depending on the complexity of the project, the time required for packaging ranges from a few minutes to dozens of minutes. If there are multiple projects that need to be packaged, the accumulated time will be very long. Developers repeatedly switch packaging materials and configuration items, which will greatly affect their work efficiency.

[0005] Therefore, it is necessary to provide an automated packaging method and system for Android applications to solve the above technical problems. Summary of the invention

[0006] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an easy-to-operate automated packaging method and system for Android applications, thereby solving the problem of quickly packaging multiple APP projects.

[0007] An automated packaging system for Android applications, used to package APP projects, including a Web front end, a data storage server, and a packaging server;

[0008] The Web front end is used to create packaging tasks for APP projects;

[0009] The data storage server is used to store project data of the APP project;

[0010] The packaging server is used to execute the packaging task and automatically process the project data into APK according to the packaging process.

[0011] As a further solution, the Web front end includes a project information filling page, a version management page, an APP project management list and an APK distribution page;

[0012] The project information filling page is used to select the APP project to be packaged. The user fills in the packaging information according to the page format. The packaging information is used to describe the packaging information;

[0013] The version management page is used to manage the tag number, code version and source code settings of the APP project;

[0014] The APP project management list is used to quickly present APP projects, APP projects to be packaged and APP project historical versions in the form of a list, and can be queried, viewed, modified and downloaded by users;

[0015] The APK distribution page is used to provide the download address of the APK.

[0016] As a further solution, the packaging data includes a package name, a first startup image, a second flow image, a font file, a signature file, signature information, a KEY configuration file, a server Host and encryption parameters.

[0017] As a further solution, the APK distribution page also provides the download address of the historical version APK.

[0018] As a further solution, the data storage server is used to provide APP icon_launcher, image file storage, signature file storage, configuration file storage and font file storage;

[0019] The APP icon_launcher is used to display a first startup image to assist the user in identifying the APP project; wherein the user starts the APP project by clicking the first startup image;

[0020] The picture file storage is used to store the second flowing image;

[0021] The signature file storage is used to store the signature information and signature files of the packaged data;

[0022] The configuration file storage is used to store the third-party SDK service KEY; wherein the third-party SDK service KEY is used to access external cloud services and third-party APIs;

[0023] The font file storage is used to store the font files used by the APP project; wherein the font files are used for internal custom font styles.

[0024] As a further solution, the packaging server is used to provide packaging configuration item acquisition, tag verification, apkbuilder.jar resource replacement, Gradle compilation APK and APK output; wherein,

[0025] The packaging configuration item acquisition is used to obtain packaging data from a data storage server;

[0026] The tag verification is used to obtain the code version and source code settings of the APP project according to the tag number, and to check whether the packaging data matches the code version and source code settings;

[0027] The apkbuilder.jar resource replacement is used to replace each file in the packaged data to the specified path of the resource package;

[0028] The Gradle compile APK is used to compile the resource package through the Gradle compile script to obtain the APK;

[0029] The APK output uploads the compiled APK to the APK distribution page.

[0030] An automated packaging method for Android applications, which implements automated packaging of APP projects through the following steps:

[0031] Step S1: The user logs in to the Web front end;

[0032] Step S2: Check whether there is an APP project that needs to be packaged through the APP project management list; if not, execute step S3; if yes, execute step S4;

[0033] Step S3: Fill in the packaging information of the APP project to be packaged through the project information filling page, send it to the data storage server, and add the corresponding selection item in the APP project management list;

[0034] Step S4: The user selects the APP project that needs to be automatically packaged in the APP project management list, fills in the tag number of the packaging task on the version management page, and generates a self-incrementing version name and version code;

[0035] Step S5: The WEB front end generates a packaging task according to the user settings and sends a packaging request to the packaging server;

[0036] Step S6: After receiving the packaging request, the packaging server downloads the packaging data from the data storage server according to the packaging data information, and caches it locally on the packaging server;

[0037] Step S7: Obtain the code version and source code settings of the APP project according to the tag number, and check whether the packaging data matches the code version and source code settings; if not, end the current automatic packaging;

[0038] Step S8: The packaging server executes apkbuilder.jar resource replacement to replace each file in the packaging data to the specified path of the resource package;

[0039] Step S9: Gradle compiles APK, which is used to compile the resource package through the Gradle compilation script, obtain the APK and automatically sign the APK;

[0040] Step S10: The packaging server uploads the compiled APK to the APK distribution page, ending the current automated packaging.

[0041] As a further solution, the Web front end creates a packaging task for the APP project through the following steps:

[0042] Step S101: Create a packaging task on the Create Project page, select the APP project to be packaged and fill in the packaging information;

[0043] Step S102: managing the tag number, code version and source code settings of the APP project in the version management page;

[0044] Step S103: storing the packaged data information in the APP project management list;

[0045] Step S104: The APP project management list quickly presents the APP projects to be packaged in the form of a list;

[0046] Step S105: The Web front end generates a packaging task according to the user settings and sends a packaging request to the packaging server;

[0047] Step S106: Wait for the packaging server to return the request and output the APK;

[0048] Step S107: Download the APK corresponding to the APP project through the download address provided on the APK distribution page.

[0049] Compared with the related art, the automated packaging method and system for Android applications provided by the present invention has the following advantages:

[0050] (1) The present invention provides an automated packaging system and method, which realizes a simple packaging process for a complex project APP, and can quickly and accurately complete packaging and publishing; and also saves each historical version to facilitate improvement and search of the APP project.

[0051] (2) The present invention can process packaging tasks in batches. For large projects, especially one-to-many APP projects, it can achieve one-click replacement and one-click build in resource management, without the need for developers to wait, greatly reducing the time for developers to switch environments, compile and package APKs.

[0052] (3) The present invention adopts automated execution steps to reduce the error problems caused by manual resource replacement. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of the structure of an automated packaging system for Android applications provided by the present invention;

[0054] Figure 2 A schematic diagram of the steps of an automated packaging method for Android applications provided by the present invention. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0056] Example 1

[0057] An automated packaging system for Android applications. Figure 1 , used to package APP projects, including Web front-end, data storage server and packaging server; among them,

[0058] The Web front end is used to create packaging tasks for APP projects;

[0059] The data storage server is used to store project data of the APP project;

[0060] The packaging server is used to execute the packaging task and automatically process the project data into APK according to the packaging process.

[0061] As a further solution, the Web front end includes a project information filling page, a version management page, an APP project management list and an APK distribution page;

[0062] The project information filling page is used to select the APP project to be packaged. The user fills in the packaging information according to the page format. The packaging information is used to describe the packaging information;

[0063] The version management page is used to manage the tag number, code version and source code settings of the APP project;

[0064] The APP project management list is used to quickly present APP projects, APP projects to be packaged and APP project historical versions in the form of a list, and can be queried, viewed, modified and downloaded by users;

[0065] The APK distribution page is used to provide the download address of the APK.

[0066] It should be noted that: the project information filling page can conveniently and quickly set the packaging information of the APP project, the version management page can intuitively view and manage the data of each version, the APP project management list can quickly query the APP projects that need to be packaged, view or modify the APP information, and download the current or historical version of the APP; the APK distribution page is the acquisition page of the final compiled APK, which provides APK download, historical version viewing and sharing.

[0067] As a further solution, the packaging data includes a package name, a first startup image, a second flow image, a font file, a signature file, signature information, a KEY configuration file, a server Host and encryption parameters.

[0068] It should be noted that: the first startup image is a picture resource file required for one of the identifications of the application on the device. It is displayed in the device's home screen, application drawer, task manager and other locations to help users quickly find and identify applications; the second mobile image is the first picture resource file presented at startup, an attractive startup image, developers can create a positive first impression for users and improve user experience; the signature file is a key security measure required by the APP to ensure the integrity, credibility and security of the application to ensure that the application is signed by a legitimate developer. This helps prevent malicious applications from replacing legitimate applications and ensures that the applications installed by users are safe and reliable; the KEY configuration file is related to a third-party SDK and is used to access cloud services, third-party APIs or other online resources; it can limit access to specific services or functions, while helping service providers track and manage developers' usage; the font file is a file required for custom font styles within the APP, which can add a unique appearance and style to the application while providing a better user experience.

[0069] As a further solution, the APK distribution page also provides the download address of the historical version APK.

[0070] As a further solution, the data storage server is used to provide APP icon_launcher, image file storage, signature file storage, configuration file storage and font file storage;

[0071] The APP icon_launcher is used to display a first startup image to assist the user in identifying the APP project; wherein the user starts the APP project by clicking the first startup image;

[0072] The picture file storage is used to store the second flowing image;

[0073] The signature file storage is used to store the signature information and signature files of the packaged data;

[0074] The configuration file storage is used to store the third-party SDK service KEY; wherein the third-party SDK service KEY is used to access external cloud services and third-party APIs;

[0075] The font file storage is used to store the font files used by the APP project; wherein the font files are used for internal custom font styles.

[0076] As a further solution, the packaging server is used to provide packaging configuration item acquisition, tag verification, apkbuilder.jar resource replacement, Gradle compilation APK and APK output; wherein,

[0077] The packaging configuration item acquisition is used to obtain packaging data from a data storage server;

[0078] The tag verification is used to obtain the code version and source code settings of the APP project according to the tag number, and to check whether the packaging data matches the code version and source code settings;

[0079] The apkbuilder.jar resource replacement is used to replace each file in the packaged data to the specified path of the resource package;

[0080] The Gradle compile APK is used to compile the resource package through the Gradle compile script to obtain the APK;

[0081] The APK output uploads the compiled APK to the APK distribution page.

[0082] It should be noted that when Gradle compiles APK, it starts compiling APK by executing the app:assembleRelease-x lint-xcreateMockableJar-x test-x testDebug-x testRelease command. The generated APK will be automatically signed according to the configuration in the build script; the generated APK will be uploaded to the APK distribution page through the Python script; at the same time, it can be connected to SMS, email or DingTalk robot for notification.

[0083] Example 2

[0084] An automated packaging method for Android applications. For the process, see Figure 2 , implement automatic packaging of APP project through the following steps:

[0085] Step S1: The user logs in to the Web front end;

[0086] Step S2: Check whether there is an APP project that needs to be packaged through the APP project management list; if not, execute step S3; if yes, execute step S4;

[0087] Step S3: Fill in the packaging information of the APP project to be packaged through the project information filling page, send it to the data storage server, and add the corresponding selection item in the APP project management list;

[0088] Step S4: The user selects the APP project that needs to be automatically packaged in the APP project management list, fills in the tag number of the packaging task on the version management page, and generates a self-incrementing version name and version code;

[0089] Step S5: The WEB front end generates a packaging task according to the user settings and sends a packaging request to the packaging server;

[0090] Step S6: After receiving the packaging request, the packaging server downloads the packaging data from the data storage server according to the packaging data information, and caches it locally on the packaging server;

[0091] Step S7: Obtain the code version and source code settings of the APP project according to the tag number, and check whether the packaging data matches the code version and source code settings; if not, end the current automatic packaging;

[0092] Step S8: The packaging server executes apkbuilder.jar resource replacement to replace each file in the packaging data to the specified path of the resource package;

[0093] Step S9: Gradle compiles APK, which is used to compile the resource package through the Gradle compilation script, obtain the APK and automatically sign the APK;

[0094] Step S10: The packaging server uploads the compiled APK to the APK distribution page, ending the current automated packaging.

[0095] As a further solution, the Web front end creates a packaging task for the APP project through the following steps:

[0096] Step S101: Create a packaging task on the Create Project page, select the APP project to be packaged and fill in the packaging information;

[0097] Step S102: managing the tag number, code version and source code settings of the APP project in the version management page;

[0098] Step S103: storing the packaged data information in the APP project management list;

[0099] Step S104: The APP project management list quickly presents the APP projects to be packaged in the form of a list;

[0100] Step S105: The Web front end generates a packaging task according to the user settings and sends a packaging request to the packaging server;

[0101] Step S106: Wait for the packaging server to return the request and output the APK;

[0102] Step S107: Download the APK corresponding to the APP project through the download address provided on the APK distribution page.

[0103] To sum up, the system provided by the present invention is responsible for creating packaging tasks through the Web front-end, providing functions such as project information filling, version management, project management list and APK distribution, executing actual packaging tasks through the packaging server, automatically processing project information and generating APK files, and using the data storage server to store APP project information, including pictures, signature files, configuration files and font files.

[0104] The system, in conjunction with the method steps provided by the present invention, can realize an intuitive user interface, facilitate users to manage different versions and data of APP projects, and at the same time, the automated packaging process reduces manual operation errors and improves packaging speed. Through automatic signing and resource replacement, the system ensures the consistency and security of the packaging process; users can conveniently download and share the generated APK files through the APK distribution page.

[0105] The above embodiments only express preferred implementation modes, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention.

Claims

1. An automated packaging system for Android applications, used to package APP projects, characterized in that: It includes Web front-end, data storage server and packaging server; among them, The Web front end is used to create packaging tasks for APP projects; The data storage server is used to store project data of the APP project; The packaging server is used to execute the packaging task and automatically process the project data into APK according to the packaging process.

2. The automated packaging system for Android applications according to claim 1, characterized in that: The Web front end includes a project information filling page, a version management page, an APP project management list and an APK distribution page; wherein, The project information filling page is used to select the APP project to be packaged. The user fills in the packaging information according to the page format. The packaging information is used to describe the packaging information; The version management page is used to manage the tag number, code version and source code settings of the APP project; The APP project management list is used to quickly present APP projects, APP projects to be packaged and APP project historical versions in the form of a list, and can be queried, viewed, modified and downloaded by users; The APK distribution page is used to provide the download address of the APK.

3. An automated packaging system for Android applications according to claim 2, characterized in that: The packaging data includes a package name, a first startup image, a second mobile image, a font file, a signature file, signature information, a KEY configuration file, a server Host and encryption parameters.

4. The automated packaging system for Android applications according to claim 2, characterized in that: The APK distribution page also provides the download address of the historical version APK.

5. The automated packaging system for Android applications according to claim 1, characterized in that: The data storage server is used to provide APP icon_launcher, image file storage, signature file storage, configuration file storage and font file storage; The APP icon_launcher is used to display a first startup image to assist the user in identifying the APP project; wherein the user starts the APP project by clicking the first startup image; The picture file storage is used to store the second flowing image; The signature file storage is used to store the signature information and signature files of the packaged data; The configuration file storage is used to store the third-party SDK service KEY; wherein the third-party SDK service KEY is used to access external cloud services and third-party APIs; The font file storage is used to store the font files used by the APP project; wherein the font files are used for internal custom font styles.

6. The automated packaging system for Android applications according to claim 5, characterized in that: The packaging server is used to provide packaging configuration item acquisition, tag verification, apkbuilder.jar resource replacement, Gradle compilation APK and APK output; wherein, The packaging configuration item acquisition is used to obtain packaging data from a data storage server; The tag verification is used to obtain the code version and source code settings of the APP project according to the tag number, and to check whether the packaging data matches the code version and source code settings; The apkbuilder.jar resource replacement is used to replace each file in the packaged data to the specified path of the resource package; The Gradle compile APK is used to compile the resource package through the Gradle compile script to obtain the APK; The APK output uploads the compiled APK to the APK distribution page.

7. An automated packaging method for Android applications, characterized in that: The following steps are used to realize automatic packaging of APP projects: Step S1: The user logs in to the Web front end; Step S2: Check whether there is an APP project that needs to be packaged through the APP project management list; if not, execute step S3; if yes, execute step S4; Step S3: Fill in the packaging information of the APP project to be packaged on the project information filling page, send it to the data storage server, and add the corresponding selection item in the APP project management list; Step S4: The user selects the APP project that needs to be automatically packaged in the APP project management list, fills in the tag number of the packaging task on the version management page, and generates a self-incrementing version name and version code; Step S5: The WEB front end generates a packaging task according to the user settings and sends a packaging request to the packaging server; Step S6: After receiving the packaging request, the packaging server downloads the packaging data from the data storage server according to the packaging data information, and caches it locally on the packaging server; Step S7: Obtain the code version and source code settings of the APP project according to the tag number, and check whether the packaging data matches the code version and source code settings; if not, end the current automatic packaging; Step S8: The packaging server executes apkbuilder.jar resource replacement to replace each file in the packaging data to the specified path of the resource package; Step S9: Gradle compiles APK, which is used to compile the resource package through the Gradle compilation script, obtain the APK and automatically sign the APK; Step S10: The packaging server uploads the compiled APK to the APK distribution page, ending the current automated packaging.

8. An automated packaging method based on Android according to claim 7, characterized in that: The Web front end creates a packaging task for the APP project through the following steps: Step S101: Create a packaging task on the Create Project page, select the APP project to be packaged and fill in the packaging information; Step S102: managing the tag number, code version and source code settings of the APP project in the version management page; Step S103: storing the packaged data information in the APP project management list; Step S104: The APP project management list quickly presents the APP projects to be packaged in the form of a list; Step S105: The Web front end generates a packaging task according to the user settings and sends a packaging request to the packaging server; Step S106: Wait for the packaging server to return the request and output the APK; Step S107: Download the APK corresponding to the APP project through the download address provided on the APK distribution page.