Upgrade package production method, device, electronic device and storage medium

By obtaining the whitelist to reset the target file in the upgrade benchmark package, and generating an upgrade custom package that matches the device, it solves the problems of long production time of upgrade packages and large server resource utilization in the existing technology, and achieves fast and efficient upgrade package production.

CN114443089BActive Publication Date: 2025-08-15SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111621536.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-08-15
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

The prior art customization of upgrade packages for different devices takes up a long time and occupies a large amount of server resources.

Method used

By obtaining the whitelist of the upgrade benchmark package and the equipment to be upgraded, obtain the target file from the upgrade benchmark package, reset the target file based on the whitelist, generate the upgrade custom file, and package it into the upgrade custom package.

Benefits of technology

This greatly saves the time for upgrading package production, reduces the consumption of server resources, and realizes the rapid generation of upgraded customized packages that match the device whitelist.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114443089B_ABST
    Figure CN114443089B_ABST
Patent Text Reader

Abstract

This application discloses an upgrade package production method, apparatus, electronic device, and storage medium. The upgrade package production method includes: obtaining an upgrade baseline package for over-the-air (OTA) upgrade and a whitelist of devices to be upgraded; obtaining a target file from the upgrade baseline package; resetting the target file according to the whitelist to obtain a customized upgrade file; and packaging the customized upgrade file to obtain a first customized upgrade package. This application solves the technical problem of the prior art of customizing upgrade packages for different devices, which is time-consuming and consumes a large amount of server resources, significantly saving time and reducing server resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of OTA technology, and in particular to an upgrade package production method, device, electronic device and storage medium. Background Art

[0002] OTA stands for Over The Air, an over-the-air download technology used for Android online downloads and system upgrades. OTA upgrade refers to obtaining upgrade files through the air interface for installation and upgrade. It is the standard software upgrade method provided by the Android system. It mainly downloads upgrade files through wireless networks (such as 5G, 4G, 3G, etc.) and wireless local area networks (Wi-Fi). The upgrade file is a ZIP compressed upgrade package. The Android software system is divided according to country regions (such as Asia Pacific, Europe, South America, North America, etc.). Different customers in the same region have their own unique whitelists. If the customer's whitelist is different, different upgrade packages need to be customized and compiled. The average time to compile an upgrade package is one hour. As the number of customers increases, a lot of time and server resources will be consumed in compiling the upgrade package. Summary of the Invention

[0003] The main purpose of this application is to provide a method, device, electronic device and storage medium for producing an upgrade package, aiming to solve the technical problem that the existing technology takes a long time to customize upgrade packages for different devices and occupies a large amount of server resources.

[0004] To achieve the above objectives, the present application provides a method for preparing an upgrade package, the method comprising:

[0005] Obtain the upgrade baseline package for over-the-air upgrades and a whitelist of devices to be upgraded;

[0006] Obtaining a target file from the upgrade baseline package;

[0007] Resetting the target file according to the whitelist to obtain an upgraded customized file;

[0008] The upgrade customization files are packaged to obtain a first upgrade customization package.

[0009] Preferably, the target file includes a first target file and a second target file, and the step of resetting the target file according to the whitelist includes:

[0010] updating the first target file according to the whitelist;

[0011] The second target file is reset according to the first target file.

[0012] Preferably, the step of updating the first target file according to the whitelist includes:

[0013] Generate a first image file corresponding to the first target file;

[0014] The first image file is reset according to the whitelist, and a new first target file is generated according to the reset first image file.

[0015] Preferably, the step of resetting the second target file according to the first target file includes:

[0016] Generate a second image file corresponding to the second target file;

[0017] Assigning the description information in the first attribute value of the first image file to the second attribute value of the second image file;

[0018] A new second target file is generated according to the second image file.

[0019] Preferably, the step of generating a second image file corresponding to the second target file includes:

[0020] decompressing the second target file into an intermediate file;

[0021] The intermediate file is converted into a second image file by a preset conversion tool.

[0022] Preferably, the step of packaging the upgrade customization file to obtain a first upgrade customization package includes:

[0023] Get the key;

[0024] The upgrade customization file is packaged and signed using the key to obtain a first upgrade customization package.

[0025] Preferably, after the step of obtaining the whitelist of devices to be upgraded, the method further includes:

[0026] Determine whether there is a second upgrade customization package corresponding to the whitelist;

[0027] If the second upgrade customized package corresponding to the whitelist does not exist, the step of obtaining a target file from the upgrade base package is executed.

[0028] The present application also provides an upgrade package production device, which is applied to a dynamic image decomposition device, and includes:

[0029] A whitelist acquisition module is used to obtain an upgrade baseline package for upgrading via over-the-air download technology and a whitelist of devices to be upgraded;

[0030] A target file acquisition module, configured to acquire a target file from the upgrade base package;

[0031] A target file resetting module, configured to reset the target file according to the whitelist to obtain an upgraded customized file;

[0032] The packaging module is used to package the upgrade customization file to obtain a first upgrade customization package.

[0033] The present application also provides an electronic device, which is a physical device, and includes: a memory, a processor, and a program of the upgrade package production method stored in the memory and runnable on the processor. When the program of the upgrade package production method is executed by the processor, the steps of the upgrade package production method as described above can be implemented.

[0034] The present application also provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores a program for implementing the upgrade package production method. When the program of the upgrade package production method is executed by a processor, the steps of the upgrade package production method as described above are implemented.

[0035] The present application provides an upgrade package production method, device, electronic device and storage medium, which obtains an upgrade baseline package and a white list of devices to be upgraded, obtains a target file from the upgrade baseline package, resets the target file according to the white list, obtains an upgrade customized file, packages the upgrade customized file, and obtains a first upgrade customized package, thereby realizing the modification of the information of the corresponding target file in the upgrade baseline package according to the white list, thereby realizing the matching of the system attributes in the upgrade baseline package with the white list of the devices to be upgraded, and then obtaining an upgrade customized package that matches the white list of the devices to be upgraded. It only takes a few minutes to obtain an upgrade customized package through the upgrade package production method of the present application, which overcomes the technical problems of the prior art in that customizing upgrade packages for different devices takes a long time and occupies a large amount of server resources, greatly saving time and reducing the consumption of server resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0038] Figure 1 This is a flow chart of an embodiment of a method for preparing an upgrade package of this application;

[0039] Figure 2This is a flow chart of another embodiment of the method for preparing an upgrade package of the present application;

[0040] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the upgrade package production method in the embodiment of the present application.

[0041] The purpose, features and advantages of this application will be further explained with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0042] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0043] The full name of OTA is Over The Air, which is an air download technology used for Android online download and upgrade system. OTA upgrade refers to obtaining the upgrade file through the air interface for installation and upgrade. It is the standard software upgrade method provided by the Android system. The OTA upgrade process is mainly divided into two parts. One part is the server side. The server side is mainly used to create upgrade packages, deploy upgrade strategies, including upgrade methods, upgrade areas, brands, models, etc., and set up user terminals that need to be upgraded; the other part is the user terminal. The user terminal downloads, verifies, decompresses, synthesizes the upgrade version, and then completes the upgrade. The user terminal mainly downloads the upgrade version from the server through wireless networks (such as 5G, 4G, 3G, etc.) and wireless local area networks (Wi-Fi). Level file, among which the upgrade file is an upgrade package in ZIP compressed format. After the server makes the upgrade package, during the process of downloading the upgrade package and upgrading on the TV side, the system needs to check whether the whitelist of the current version is consistent with the whitelist in the upgrade package. If they are consistent, the system will download the upgrade package and upgrade to update the system. The Android software system is divided according to national regions (such as Asia Pacific, Europe, South America, North America, etc.). There are different customers in the same region, and different customers have their own unique whitelists. If the customers' whitelists are different, different upgrade packages need to be customized and compiled. The average time to compile an upgrade package is one hour. As the number of customers increases, a lot of time and server resources will be consumed in compiling the upgrade package.

[0044] The present application embodiment provides a method for making an upgrade package. In one embodiment of the method for making an upgrade package of the present application, refer to Figure 1 , the upgrade package preparation method includes:

[0045] Step S10, obtaining an upgrade reference package for upgrading via over-the-air technology and a white list of devices to be upgraded;

[0046] In this embodiment, it should be noted that the executor of this embodiment is a server. The server is mainly used to create upgrade packages and deploy upgrade strategies, including upgrade methods, upgrade areas, brands, models, etc., and set user terminals that need to be upgraded so that the user terminals can download, verify, decompress, and synthesize the upgrade packages of the upgraded versions to complete the upgrade. The server and the user terminals are connected through a wireless network (such as 5G, 4G, 3G, etc.) or a wireless local area network (Wi-Fi). The upgrade baseline package is a compressed package in a ZIP format compiled according to an arbitrary whitelist required for upgrading through over-the-air download technology. The whitelist is a simple list of applications approved by the user or administrator. When the device to be upgraded attempts to download and upgrade the upgrade package, the system automatically checks whether the whitelist of the current version is consistent with the whitelist in the upgrade package. If the whitelist of the current version is consistent with the whitelist in the upgrade package, the upgrade package will be allowed to be downloaded and upgraded. If the whitelist of the current version is inconsistent with the whitelist in the upgrade package, the download of the upgrade package and the upgrade process will be prohibited.

[0047] Specifically, obtain the latest version of the upgrade baseline package that has been compiled and uploaded by the server, determine the device to be upgraded, and obtain the whitelist provided by the manufacturer of the device to be upgraded, where the whitelist is the system properties of the device to be upgraded, including ro.product.name (name attribute), ro.product.brand (brand attribute), ro.product.device (device attribute used) and ro.product.board (processor attribute used), etc.

[0048] Preferably, after the step of obtaining the whitelist of devices to be upgraded, the method further includes:

[0049] Step A10, determining whether there is a second upgrade customization package corresponding to the whitelist;

[0050] Step A20: If there is no second upgrade customized package corresponding to the whitelist, then execute the step of obtaining the target file from the upgrade reference package.

[0051] In this embodiment, specifically, based on the mapping relationship between the whitelist and the upgrade customization package, a query is made in the server as to whether there is a second upgrade customization package corresponding to the whitelist; if the second upgrade customization package corresponding to the whitelist does not exist in the server, the following steps are executed: obtaining the target file from the upgrade baseline package to produce an upgrade customization package corresponding to the whitelist; if the second upgrade customization package corresponding to the whitelist exists in the server, the upgrade package production process is terminated, and the second upgrade customization package is used as the upgrade customization package corresponding to the whitelist.

[0052] In this embodiment, for different devices under test with the same whitelist information, only one upgrade customization package needs to be produced, which can be applicable to all devices under test with the same whitelist information, saving unnecessary time and server resources for repeatedly producing the same upgrade customization package.

[0053] Step S20, obtaining a target file from the upgrade reference package;

[0054] In this embodiment, specifically, the upgrade baseline package is decompressed, the target partition where the system attribute file corresponding to the whitelist is stored in the upgrade baseline package is determined, and the target file is obtained from the target partition, wherein the decompression method includes using a decompression tool or an unzip command, etc., the target partition includes a system (system), vendor (factory customization) and / or OEM (original manufacturer) partition, etc., and the target file is a system attribute file corresponding to each system attribute in the whitelist. It is easy to understand that since the whitelist includes one or more system attributes, there will also be one or more target files accordingly.

[0055] Step S30, resetting the target file according to the whitelist to obtain an upgraded customized file;

[0056] In this embodiment, specifically, according to the mapping relationship between each system attribute in the whitelist and each target file, the description information of each system attribute in the whitelist is assigned to the corresponding target file to obtain a target file that matches the description information of the system attribute in the whitelist, and the newly assigned target file is put back to the corresponding target partition, thereby completing the resetting of the target file and obtaining an upgraded customized file that matches the whitelist, wherein the description information is the specific content of each system attribute, for example, ro.product.brand=A, A is the brand of the device to be upgraded, that is, the description information of the ro.product.brand attribute in the whitelist of the device to be upgraded. The description information of the whitelist may be the same or different for different devices to be upgraded.

[0057] Step S40: Pack the upgrade customization file to obtain an upgrade customization package.

[0058] In this embodiment, specifically, the modified upgrade customization file is compressed and packaged using a zip command to obtain an upgrade customization package.

[0059] Preferably, the step of packaging the upgrade customization file to obtain a first upgrade customization package includes:

[0060] Step B10, obtaining a key;

[0061] Step B20: Package the upgrade customization file and sign it using the key to obtain a first upgrade customization package.

[0062] In this embodiment, specifically, a key is obtained, the upgrade customized file is compressed and packaged into a customized package, and the customized package is signed according to the key using a signature tool (such as openjdk and signapk.jar, etc.) to obtain a first upgrade customized package with a signature, so as to ensure that the device to be upgraded can successfully complete the verification during the process of downloading the first upgrade customized package and using the first upgrade customized package for upgrading.

[0063] In one practicable manner, before the step of packaging the upgrade customized file, the method further includes:

[0064] Adding a hash tree to the reset target file and generating a new verification data image file;

[0065] The verification data partition is updated according to the verification data mirror file.

[0066] In this embodiment, the verification data mirror file (vbmeta file) in the verification data partition (vbmeta partition) is synchronously updated to ensure that the verification can be successfully completed during the process of the upgraded device downloading the first upgrade customization package and using the first upgrade customization package for upgrading.

[0067] In this embodiment, by obtaining an upgrade baseline package and a white list of devices to be upgraded, obtaining a target file from the upgrade baseline package, resetting the target file according to the white list to obtain an upgrade customized file, packaging the upgrade customized file to obtain an upgrade customized package, thereby realizing modification of the information of the corresponding target file in the upgrade baseline package according to the white list, thereby realizing matching of the system attributes in the upgrade baseline package with the white list of devices to be upgraded, and then obtaining an upgrade customized package that matches the white list of devices to be upgraded. It only takes a few minutes to obtain an upgrade customized package through the upgrade package production method of the present application, overcoming the technical problems of the prior art in that customizing upgrade packages for different devices takes a long time and occupies a large amount of server resources, greatly saving time and reducing the consumption of server resources.

[0068] Furthermore, in another embodiment of the upgrade package production method of the present application, referring to Figure 2 , the target file includes a first target file and a second target file, and the step of resetting the target file according to the whitelist information includes:

[0069] Step S31, updating the first target file according to the whitelist;

[0070] In this embodiment, it should be noted that the first target file is a system attribute file in the OEM partition of the upgrade benchmark package.

[0071] Specifically, in the OEM partition of the upgrade baseline package, according to the mapping relationship between each system attribute in the whitelist and each first target file in the OEM partition, the description information of each system attribute in the whitelist is assigned to the corresponding first target file to obtain a first target file that matches the description information of the system attribute in the whitelist.

[0072] Preferably, the step of updating the first target file according to the whitelist information includes:

[0073] Step C10, generating a first image file corresponding to the first target file;

[0074] In this embodiment, specifically, a tool is called to convert the first target file into a first image file corresponding to the first target file.

[0075] Step C20: Reset the first image file according to the whitelist, and generate a new first target file according to the reset first image file.

[0076] In this embodiment, specifically, the first image file is mounted, and the description information of each system attribute in the whitelist is assigned to the corresponding first image file to obtain a first image file that matches the description information of the system attributes in the whitelist, and then a new first target file is generated based on the reset first image file.

[0077] Step S32: Reset the second target file according to the first target file.

[0078] In this embodiment, specifically, the description information of the updated first target file is obtained, the second target file is reset according to the description information of the first target file to replace the original description information of the second target file, and the second target file assigned with the description information of the first target file is obtained, and the newly assigned second target file is placed back to the corresponding target partition, thereby completing the resetting of the second target file, wherein the first target file is the system property file in the OEM partition corresponding to each system property in the whitelist, and the second target file is the system property file in the system and vendor partitions corresponding to the first target file. In an implementable manner, the description information of the oem.prop property of the OEM file is assigned to files such as system / build.prop, vendor / build.prop, and vendor / odm / etc / build.prop through the prop() function to reset the description information of files such as system / build.prop, vendor / build.prop, and vendor / odm / etc / build.prop, thereby achieving the resetting of the second target file.

[0079] Preferably, the step of resetting the second target file according to the first target file includes:

[0080] Step D10, generating a second image file corresponding to the second target file;

[0081] In this embodiment, specifically, a tool is called to convert the second target file into a second image file corresponding to the second target file.

[0082] Preferably, the step of generating a second image file corresponding to the second target file includes:

[0083] Step E10, decompressing the second target file into an intermediate file;

[0084] In this embodiment, specifically, the second target file format in the system and vendor partitions is dat.br format, and the brotli command is used to decompress the second target file in dat.br format into an intermediate file in dat format.

[0085] Step E20: Convert the intermediate file into a second image file using a preset conversion tool.

[0086] In this embodiment, specifically, the intermediate file is converted into the second image file by using a preset conversion tool sdat2img.

[0087] Step D20: assigning the description information in the first attribute value of the first image file to the second attribute value of the second image file;

[0088] In this embodiment, specifically, the second image file is mounted, the descriptive information in the updated first attribute value of the first image file is obtained, and the descriptive information in the first attribute value is assigned to the second attribute value of the second image file to replace the original descriptive information of the second image file, thereby obtaining the second image file to which the descriptive information in the first attribute value is assigned.

[0089] Step D30: Generate a new second target file according to the second image file.

[0090] In this embodiment, specifically, a tool is called to convert the reassigned second image file into a third target file in the second target file format, and the third target file is placed back to the target partition corresponding to the second target file to become a new second target file, thereby completing the resetting of the second target file. In an practicable manner, the command img2simg is used to convert system.img and vendor.img into Android sparse image, and then converted into a dat file through img2sdat, and finally compressed through brotli to generate dat.br.

[0091] In this embodiment, through the method of attribute value transfer, it is only necessary to establish a mapping relationship between the whitelist and the target file of a partition. By modifying the description information of the target file of a partition, the description information of all corresponding target files in the entire upgrade package can be completed. The parent-child relationship of attribute value transfer only needs to be established once, thereby saving the matching and modification work of all files in the upgrade package according to the whitelist each time, greatly saving time, reducing the consumption of server resources, and also improving the accuracy and correctness of resetting the target file.

[0092] The embodiment of the present application further provides an upgrade package production device, which is applied to an upgrade package production device, and includes:

[0093] A whitelist acquisition module is used to obtain an upgrade baseline package for upgrading via over-the-air download technology and a whitelist of devices to be upgraded;

[0094] A target file acquisition module, configured to acquire a target file from the upgrade base package;

[0095] A target file resetting module, configured to reset the target file according to the whitelist to obtain an upgraded customized file;

[0096] The packaging module is used to package the upgrade customization file to obtain a first upgrade customization package.

[0097] Optionally, the target file resetting module is further configured to:

[0098] updating the first target file according to the whitelist;

[0099] Reset the second target file according to the description information of the first target file.

[0100] Optionally, the target file resetting module is further configured to:

[0101] Generate a first image file corresponding to the first target file;

[0102] The first image file is reset according to the whitelist, and a new first target file is generated according to the reset first image file.

[0103] Optionally, the target file resetting module is further configured to:

[0104] Generate a second image file corresponding to the second target file;

[0105] Assigning the description information in the first attribute value of the first image file to the second attribute value of the second image file;

[0106] A new second target file is generated according to the second image file.

[0107] Optionally, the target file resetting module is further configured to:

[0108] decompressing the second target file into an intermediate file;

[0109] The intermediate file is converted into a second image file by a preset conversion tool.

[0110] Optionally, the packaging module is further configured to:

[0111] Get the key;

[0112] The upgrade customization file is packaged and signed using the key to obtain a first upgrade customization package.

[0113] Optionally, the whitelist acquisition module is further configured to:

[0114] Determine whether there is a second upgrade customization package corresponding to the whitelist;

[0115] If the second upgrade customized package corresponding to the whitelist does not exist, the step of obtaining a target file from the upgrade base package is executed.

[0116] The upgrade package creation device provided by the present invention utilizes the aforementioned upgrade package creation method, resolving the technical issues of the prior art, which include the lengthy time required to customize upgrade packages for different devices and the significant server resource consumption. Compared to the prior art, the upgrade package creation device provided by the present invention provides the same beneficial effects as the upgrade package creation method provided by the aforementioned embodiment. Other technical features of the upgrade package creation device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0117] An embodiment of the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the upgrade package production method in the above embodiment.

[0118] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 3 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0119] like Figure 3 As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0120] Typically, the following systems can be connected to the I / O interface: input devices such as a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices such as a magnetic tape, hard disk, etc.; and communication devices. The communication device can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figures show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have instead.

[0121] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0122] The electronic device provided by the present invention utilizes the upgrade package creation method of the aforementioned embodiment, resolving the technical issues of the prior art, such as the lengthy time required to customize upgrade packages for different devices and the significant server resource consumption. Compared to the prior art, the electronic device provided by the present invention achieves the same beneficial effects as the upgrade package creation method of the aforementioned embodiment. Other technical features of the electronic device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.

[0123] It should be understood that various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in an appropriate manner.

[0124] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

[0125] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the upgrade package production method in the above embodiment.

[0126] The computer-readable storage medium provided in the embodiment of the present invention can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0127] The computer-readable storage medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0128] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: obtains an upgrade baseline package for upgrading through over-the-air download technology and a white list of devices to be upgraded; obtains a target file from the upgrade baseline package; resets the target file according to the white list to obtain an upgrade customized file; and packages the upgrade customized file to obtain a first upgrade customized package.

[0129] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0130] The flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The modules involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.

[0132] The computer-readable storage medium provided by the present invention stores computer-readable program instructions for executing the aforementioned upgrade package creation method, resolving the technical issues of the prior art, such as the lengthy time required to customize upgrade packages for different devices and the significant server resource consumption. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided by the present invention are similar to those of the upgrade package creation method provided by the aforementioned embodiment, and are not further elaborated here.

[0133] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A method for preparing an upgrade package, characterized in that: The upgrade package preparation method includes: Obtain the upgrade baseline package for over-the-air upgrades and a whitelist of devices to be upgraded; Obtaining a target file from the upgrade baseline package; Resetting the target file according to the whitelist to obtain an upgraded customized file; Packaging the upgrade customization file to obtain a first upgrade customization package; The target file includes a first target file and a second target file, and the step of resetting the target file according to the whitelist includes: updating the first target file according to the whitelist; The second target file is reset according to the first target file.

2. The upgrade package preparation method according to claim 1, characterized in that: The step of updating the first target file according to the whitelist includes: Generate a first image file corresponding to the first target file; The first image file is reset according to the whitelist, and a new first target file is generated according to the reset first image file.

3. The upgrade package preparation as claimed in claim 1, characterized in that: The step of resetting the second target file according to the first target file includes: Generate a second image file corresponding to the second target file; Assigning the description information in the first attribute value of the first image file to the second attribute value of the second image file; A new second target file is generated according to the second image file.

4. The upgrade package preparation as claimed in claim 3, characterized in that: The step of generating a second image file corresponding to the second target file includes: decompressing the second target file into an intermediate file; The intermediate file is converted into a second image file by a preset conversion tool.

5. The upgrade package preparation method according to claim 1, characterized in that: The step of packaging the upgrade customization file to obtain a first upgrade customization package includes: Get the key; The upgrade customization file is packaged and signed using the key to obtain a first upgrade customization package.

6. The upgrade package preparation method according to claim 1, characterized in that: After the step of obtaining the whitelist of devices to be upgraded, the method further includes: Determine whether there is a second upgrade customization package corresponding to the whitelist; If the second upgrade customized package corresponding to the whitelist does not exist, the step of obtaining a target file from the upgrade base package is executed.

7. An upgrade package production device, characterized in that: The upgrade package making device comprises: A whitelist acquisition module is used to obtain an upgrade baseline package for upgrading via over-the-air download technology and a whitelist of devices to be upgraded; A target file acquisition module, configured to acquire a target file from the upgrade base package; a target file resetting module, configured to reset the target file according to the whitelist to obtain an upgraded customized file; the target file includes a first target file and a second target file, and the target file resetting module is further configured to update the first target file according to the whitelist; and reset the second target file according to the first target file; The packaging module is used to package the upgrade customization file to obtain a first upgrade customization package.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the upgrade package production method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which is stored a program for implementing the upgrade package production method. The program for implementing the upgrade package production method is executed by a processor to implement the steps of the upgrade package production method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method for customizing system firmware based on Android platform and Android device

    CN106775723A

  • Methods and apparatus for version aliasing mechanisms and cumulative upgrades for software lifecycle management

    US20200097279A1