A decoupled development method of system firmware and computer storage medium

By decoupling the underlying development of the Android system from the APP layer development, and using the OTA master package for partitioned compressed file management, parallel development was achieved, solving the problem of frequent SDK compilation affecting efficiency and improving development efficiency.

CN118012457BActive Publication Date: 2025-11-18FUJIAN STAR NET EVIDEO INFORMATION SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311832257.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-11-18
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

When developing Android applications, the collaboration between the underlying development and the APP layer development leads to frequent SDK compilation and packaging, which affects development efficiency.

Method used

By decoupling the underlying development of the Android system from the APP layer development, and using the OTA master package for partitioned compressed file management, parallel development and independent updates of application data are achieved.

Benefits of technology

It achieves independence between underlying development and APP layer development, improves development efficiency, reduces the problem of low work efficiency caused by frequent packaging, and allows APP layer development to be updated at any time without waiting for the underlying layer to be recompiled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118012457B_ABST
    Figure CN118012457B_ABST
Patent Text Reader

Abstract

The application provides a system firmware decoupling development method and a computer storage medium, and the method comprises the following steps: obtaining an OTA package generated by compiling an Android underlying system and taking the OTA package as an OTA mother package; unpacking the OTA mother package to obtain compressed files of each partition, at least comprising a first compressed file used for storing underlying system data and a second compressed file; when receiving application update data each time, decompressing the second compressed file, converting the second compressed file into an image file, mounting the image file to a preset directory, and copying the obtained application update data to the preset directory; generating a new image file of the preset directory storing the application update data, compressing the new image file to obtain an updated second compressed file; and combining the updated second compressed file and the remaining partition compressed files including the first compressed file, re-compressing the combined files to obtain an updated OTA package. The application decouples the underlying development of the Android system and the development of the APP layer, realizes parallel development, and does not affect each other, thereby greatly improving the development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software development technology, and in particular to a decoupled development method for system firmware and a computer storage medium. Background Technology

[0002] Developing new Android applications often requires collaboration between the underlying development team and the app layer development team. New Android applications need to be tested before leaving the factory, and during testing, numerous bugs are often discovered. At this point, the app layer development team needs to continuously fix and update these bugs. Each time the app layer fixes a bug, it provides updated data to the underlying development team. Each time the underlying team receives the updated data, it needs to embed it into the SDK and compile the entire SDK to generate an OTA (Over-The-Air) package. Because the app layer updates frequently, the underlying team needs to frequently compile and package the entire SDK, severely impacting the efficiency of the underlying system development. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a decoupled development method for system firmware and a computer-readable storage medium, which decouples the development of the underlying Android system from the development of the APP layer, realizes parallel development, and ensures that the development of the underlying system and the development of the APP layer do not affect each other, thus greatly improving development efficiency.

[0004] In a first aspect, the present invention provides a decoupled development method for system firmware, comprising the following steps:

[0005] Obtain the OTA package generated by the Android underlying system and use it as the OTA master package;

[0006] After unpacking the OTA master package, each partition compressed file is obtained; each partition compressed file includes at least a first compressed file for storing underlying system data and an empty second compressed file for storing application update data;

[0007] Each time application update data is obtained, the second compressed file is decompressed, converted into an image file, and mounted to a preset directory. The obtained application update data is then copied to the preset directory.

[0008] A new image file is generated from the preset directory containing application update data and compressed to obtain the updated second compressed file.

[0009] The updated second compressed file and the remaining partition compressed file including the first compressed file are merged and recompressed to obtain the updated OTA package.

[0010] In a second aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0011] The one or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: The present invention decouples the development of the Android system's underlying layer from the development of the APP layer, realizes parallel development, and ensures that the development of the underlying layer and the APP layer do not affect each other. This greatly reduces the low work efficiency caused by frequent packaging in the system's underlying development. Moreover, the APP layer development can replace the built-in APP application data in the SDK master package at any time without waiting for the underlying development to recompile the SDK source code containing application update data, saving waiting time and improving development efficiency.

[0012] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0013] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0014] Figure 1 This is a flowchart of the method in Embodiment 1 of the present invention;

[0015] Figure 2 This is a schematic diagram of the structure of the computer-readable storage medium in Embodiment 2 of the present invention. Detailed Implementation

[0016] This application provides a decoupled development method, apparatus, device, and medium for system firmware, which decouples the development of the Android system's underlying layer from the development of the APP layer, enabling parallel development and ensuring that the development of the underlying layer and the APP layer do not affect each other, thus greatly improving development efficiency.

[0017] The technical solution in this application embodiment has the following general idea: This invention decouples the development of the Android system's underlying layer from the development of the APP layer, enabling parallel development. Based on the OTA package before Android upgrade, a secondary automatic reconstruction is performed to ensure that the development of the underlying layer and the APP layer do not affect each other. Moreover, the APP layer development can replace the application update data in the SDK master package packaged at the underlying layer at any time without waiting for the underlying development to recompile the SDK source code containing the application update data, thereby improving development efficiency.

[0018] Example 1

[0019] like Figure 1 As shown, this embodiment provides a decoupled development method for system firmware, including the following steps:

[0020] The OTA package generated by compiling the Android underlying system is obtained and used as the OTA master package. Once the underlying system development is complete, an OTA master package is generated, which stores the underlying system data. Therefore, this underlying system data can be separated for later application data updates.

[0021] After unpacking the OTA master package, each partition compressed file is obtained. Each partition compressed file includes at least a first compressed file for storing underlying system data and an empty second compressed file for storing application update data. Since the OTA master package contains partition compressed files for storing underlying system data (e.g., the first compressed file) and also contains an empty second compressed file for storing application update data, each subsequent application update can be updated to the second compressed file. Each application data update can be performed based on the second compressed file in the OTA master package. By storing underlying system data and application update data separately, independent updates of application update data can be achieved, thereby decoupling underlying system development from application layer development.

[0022] Each time application update data is obtained, the second compressed file is decompressed, converted into an image file, and mounted to a preset directory. The obtained application update data is then copied to the preset directory. During testing, the APP layer sends the updated application data to the underlying system with each update. After receiving the application update data, the underlying system stores the application update data in the second compressed file of the OTA master package and then regenerates the updated OTA. Each update by the APP layer generates an updated OTA based on the corresponding OTA master package.

[0023] After generating an image file from the preset directory containing application update data and compressing it, an updated second compressed file is obtained. Specifically, after generating a new image file from the preset directory containing application update data, the new image file will automatically overwrite the previously generated image file. Then, the new image file will be compressed using Brotli to obtain the updated second compressed file.

[0024] The updated second compressed file and the remaining partition compressed file including the first compressed file are merged and recompressed. After recompression, a re-signing is performed to obtain the updated OTA package.

[0025] It should be noted that since the first compressed file, which stores the underlying system data, will not be updated during subsequent application updates, it is possible to make customized modifications based on a stable version of the application software in principle. However, when updating the second compressed file, the second compressed file before the update needs to be deleted or replaced, which is a rather cumbersome operation. Therefore, to facilitate application updates, a dedicated OTA master package can be used. The OTA master package contains an empty second compressed file, which makes it easy to directly store application update data during application updates, greatly simplifying the operation.

[0026] Furthermore, the first compressed file includes at least a compressed file of system partition data and a compressed file of original design manufacturer data, both of which are used to store underlying system data.

[0027] The second compressed file includes at least a compressed file containing data from a third-party vendor, and the preset directory includes an app directory;

[0028] Copying the received application update data to the preset directory includes copying the application update data to the app directory.

[0029] The preset directories also include a lib directory and a lib64 directory. When the application update data includes third-party library files, these third-party library files are copied to the lib directory and / or lib64 directory respectively, depending on the platform architecture. For platform architectures such as armeabi-v7a, the third-party library files are copied to the lib directory; for platform architectures such as arm64-v8a, the third-party library files are copied to the lib64 directory, or both the lib and lib64 directories are copied simultaneously.

[0030] The app directory of the third-party vendor data serves as the directory for pre-installed applications. When application update data is obtained, the application update data will be copied to the app directory of the third-party vendor data so that the pre-installed applications in the app directory of the third-party vendor data can be automatically installed when the Android system boots up. The lib directory and lib64 directory are used to store the library files of the third-party vendor data for the applications within the third-party vendor data to call.

[0031] The process of generating an image file from the updated preset directory and compressing it specifically involves generating an image file from the updated preset directory and then compressing it using Brotli.

[0032] The step of recompressing the updated second compressed file and the remaining partition compressed file including the first compressed file to obtain the updated OTA package includes: merging the updated second compressed file and the remaining partition compressed file including the first compressed file, recompressing them, and performing a re-signing to obtain the updated OTA package.

[0033] Before obtaining the OTA package generated by the Android underlying system and using it as the OTA master package, the method further includes the step of setting up an automatic build server, and the decoupled development method is executed through the script of the automatic build server.

[0034] The step of obtaining the OTA package compiled by the Android underlying system and using it as the OTA master package includes: obtaining the OTA package compiled by the Android underlying system from the local area network online repository. After the underlying system is developed, it will compile and generate the OTA master package and push it to the local area network online repository.

[0035] After receiving the updated OTA package, the process includes pushing the updated OTA package to an online repository connected to the internet. The online repository is an HTTP server.

[0036] Once the Android underlying system is developed, an OTA master package is generated. The Android underlying system only generates one initial OTA master package. Subsequent times when application update data is received, updates are performed based on the initially generated OTA master package from the Android underlying system. Each update generates a new OTA package and pushes it to an online repository, allowing devices running the app to directly obtain the latest OTA package from the internet for upgrades.

[0037] Based on the same inventive concept, this application provides a storage medium corresponding to Embodiment 1, as detailed in Embodiment 2.

[0038] Example 2

[0039] like Figure 2 As shown, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.

[0040] The technical solution provided in this application embodiment has at least the following technical effects or advantages: This invention decouples the underlying development of the Android system from the development of the APP layer, realizing parallel development. This ensures that the underlying development and APP layer development do not affect each other, greatly reducing the low work efficiency caused by frequent packaging in the underlying system development. Furthermore, the APP layer development can replace the application data in the OTA master package at any time without waiting for the underlying development to recompile the SDK source code containing application update data, saving waiting time and improving development efficiency.

[0041] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A decoupled development method for system firmware, characterized in that: Includes the following steps: Obtain the OTA package generated by the Android underlying system and use it as the OTA master package; After unpacking the OTA master package, compressed files for each partition are obtained; Each partition compressed file includes at least a first compressed file for storing underlying system data and an empty second compressed file for storing application update data; Each time application update data is obtained, the second compressed file is decompressed, converted into an image file, and mounted to a preset directory. The obtained application update data is then copied to the preset directory. A new image file is generated from the preset directory containing application update data and compressed to obtain the updated second compressed file. The updated second compressed file and the remaining partition compressed file including the first compressed file are merged and recompressed to obtain the updated OTA package.

2. The decoupled development method for system firmware according to claim 1, characterized in that: The first compressed file includes at least a compressed file of system partition data and a compressed file of original design manufacturer data.

3. The decoupled development method for system firmware according to claim 1, characterized in that: The second compressed file includes at least a compressed file containing data from a third-party vendor, and the preset directory includes an app directory; Copying the obtained application update data to the preset directory includes copying the application update data to the app directory.

4. The decoupled development method for system firmware according to claim 3, characterized in that: The preset directory also includes a lib directory and a lib64 directory. When the application update data also includes third-party library files, the third-party library files are copied to the lib directory and / or lib64 directory respectively according to the platform architecture.

5. The decoupled development method for system firmware according to claim 1, characterized in that: The step of generating a new image file from the preset directory containing application update data and compressing it specifically involves generating a new image file from the preset directory containing application update data, and then compressing the new image file using Brotli.

6. The decoupled development method for system firmware according to claim 1, characterized in that: The step of merging the updated second compressed file and the remaining partition compressed file including the first compressed file and then recompressing them includes: merging the updated second compressed file and the remaining partition compressed file including the first compressed file and then recompressing them, and then performing a re-signing to obtain an updated OTA package.

7. The decoupled development method for system firmware according to claim 1, characterized in that: Before obtaining the OTA package generated by the Android underlying system and using it as the OTA master package, the method further includes the step of setting up an automatic build server, and the decoupled development method is executed through the script of the automatic build server.

8. The decoupled development method for system firmware according to claim 1, characterized in that: The step of obtaining the OTA package compiled by the Android underlying system and using it as the OTA master package includes: obtaining the OTA package compiled by the Android underlying system from the local area network online repository and using it as the OTA master package.

9. The decoupled development method for system firmware according to claim 1, characterized in that: After obtaining the updated OTA package, the process further includes the step of pushing the updated OTA package to an online repository.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Upgrade package processing method and device, electronic equipment and storage medium

    CN111949303A

  • Upgrading method of operating system, electronic equipment and storage medium

    CN114661322A