CN114003266B - Method and device for generating multiple differential packets based on Android flash firmware - Google Patents

Method and device for generating multiple differential packets based on Android flash firmware Download PDF

Info

Publication number
CN114003266B
CN114003266B CN202111196256.0A CN202111196256A CN114003266B CN 114003266 B CN114003266 B CN 114003266B CN 202111196256 A CN202111196256 A CN 202111196256A CN 114003266 B CN114003266 B CN 114003266B
Authority
CN
China
Prior art keywords
file
differential
version
compiling
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111196256.0A
Other languages
Chinese (zh)
Other versions
CN114003266A (en
Inventor
韩黎光
陈威东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongshi Sunshine Shenzhen Technology Co ltd
Original Assignee
Hongshi Sunshine Shenzhen Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hongshi Sunshine Shenzhen Technology Co ltd filed Critical Hongshi Sunshine Shenzhen Technology Co ltd
Priority to CN202111196256.0A priority Critical patent/CN114003266B/en
Publication of CN114003266A publication Critical patent/CN114003266A/en
Application granted granted Critical
Publication of CN114003266B publication Critical patent/CN114003266B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention provides a method and a device for generating a plurality of differential packets based on Android flash firmware, wherein the method comprises the following steps: s1: acquiring a first version of flashing firmware, an initial differential intermediate packet, a compiling environment file and a plurality of target version differential intermediate packets; s2: extracting a corresponding upgrading configuration file from the initial differential tundish; s3: extracting an upgrading file corresponding to a first version from the firmware of the flash machine; s4: restoring a corresponding differential intermediate packet based on the upgrading file, the upgrading configuration file and the compiling environment file; s5: and differentiating the restored differential intermediate packet with all the target version differential intermediate packets in sequence to generate OTA upgrade packets from the first version to a plurality of target versions. The differential package can be made by using the upgrade configuration file, the lost version updating file and the new version differential package under the condition that the differential package is lost.

Description

Method and device for generating multiple differential packets based on Android flash firmware
Technical Field
The invention relates to the technical field of differential packet generation, in particular to a method and a device for generating a plurality of differential packets based on Android flash firmware.
Background
At present, in the conventional OTA differential packet generation method for Android system upgrade, a differential intermediate packet is compiled first in a system compiling process, then an upgrade packet is compiled, and then a differential command is run to differentiate the differential intermediate packet of a first version and a second version into a differential packet of the first version upgraded to the second version.
The differential environment and the differential intermediate package are placed in a specified directory, and the python automation script is used for controlling the first version to be differentiated with the target versions respectively, so that the multi-version differential tool for differentiating the differential package from the first versions to the target versions at one time can be manufactured.
The current difference tool is used for manufacturing OTA difference packages based on difference middle packages, if a difference middle package is lost due to the fact that a client compiles a flow or is improperly stored, the difference packages cannot be manufactured, the existing mode can only be used for whole package upgrading, the whole package is large in size, compared with the difference package, the difference package has the defects that for example, the whole package upgrading consumes more flow and downloading time of a user, equipment needs to have larger storage space, the risk of upgrading failure due to downloading and space is increased, and user experience is poorer compared with the difference upgrading. Therefore, it is necessary to research a differential tool capable of making a differential package using an upgrade configuration file and a lost version flush file and a new version differential package in case of a loss of the differential package.
Therefore, the invention provides a method and a device for generating a plurality of differential packets based on Android flash firmware.
Disclosure of Invention
The invention provides a method and a device for generating a plurality of differential packages based on Android flashing firmware, which are used for manufacturing the differential packages by using an upgrade configuration file, a lost version flashing file and a new version differential package under the condition that the differential packages are lost.
The invention provides a method for generating a plurality of differential packets based on Android flash firmware, which comprises the following steps:
s1: acquiring a first version of flashing firmware, an initial differential intermediate packet, a compiling environment file and a plurality of target version differential intermediate packets;
s2: extracting a corresponding upgrading configuration file from the initial differential tundish;
s3: extracting an upgrading file corresponding to a first version from the firmware of the flash machine;
s4: restoring a corresponding differential intermediate packet based on the upgrading file, the upgrading configuration file and the compiling environment file;
s5: and differentiating the restored differential intermediate packet with all the target version differential intermediate packets in sequence to generate OTA upgrade packets from the first version to a plurality of target versions.
Preferably, in the method for generating a plurality of differential packets based on the Android flash firmware, the step S1: the method for acquiring the flashing firmware of the first version, the initial differential intermediate packet, the compiling environment file and the plurality of target version differential intermediate packets comprises the following steps:
s101: acquiring a first compiling environment file corresponding to a current terminal to be upgraded and a second compiling environment file of an updating management system terminal;
s102: detecting a current software version corresponding to a terminal to be upgraded, and taking the current software version as a first version;
s103: calling the flashing firmware and the first system source code corresponding to the first version from the updating management system terminal, and generating a corresponding initial differential intermediate packet based on the first system source code, the first compiling environment file and the second compiling environment file;
s104: acquiring a second system source code corresponding to the target version from the update management system terminal, and compiling to generate a corresponding target version differential intermediate packet based on the second system source code, the first compiling environment file and the second compiling environment file;
wherein, the target version can be one or more.
Preferably, in the method for generating a plurality of differential packets based on the Android flash firmware, the step S2: extracting a corresponding upgrade configuration file from the initial differential tundish, including:
s201: performing data identification on the initial differential tundish;
s202: determining the file size corresponding to the upgrade configuration file and the storage position of the upgrade configuration file in the initial differential intermediate packet based on the identification result;
s203: determining a corresponding first preset command based on the storage position, the file size and a preset reading command mapping table;
s204: and extracting a corresponding upgrading configuration file from the initial differential tundish based on the first preset command.
Preferably, in the method for generating a plurality of differential packets based on the Android flash firmware, the step S3: extracting an upgrade file corresponding to a first version from the firmware of the flash device, including:
s301: carrying out file identification on the firmware to determine the partition file type contained in the firmware;
s302: determining a corresponding second preset command based on all partition file types and a preset read command mapping table contained in the firmware of the flash machine;
s303: and extracting an upgrade file corresponding to the first version from the firmware of the flash machine based on the second preset command.
Preferably, in the method for generating a plurality of differential packets based on the Android flash firmware, the step S4: restoring a corresponding differential intermediate packet based on the upgrade file, the upgrade configuration file and the compiling environment file, including:
s401: determining a mirror image file corresponding to each partition file type in the upgrade files;
s402: generating a corresponding kernel symbol table file based on each mirror image file;
s403: and packaging the upgrade file, the upgrade configuration file and the kernel symbol table file to restore a differential intermediate packet corresponding to the first version.
Preferably, in the method for generating a plurality of differential packets based on the Android firmware, S402: generating a corresponding kernel symbol table file based on each mirror image file, comprising:
carrying out format conversion on the mirror image file based on a preset file format template to obtain a corresponding first file;
and reading the current symbol attribute in each first file based on a third preset command, and determining a kernel symbol table file corresponding to each first file based on the current symbol attribute.
Preferably, in the method for generating a plurality of differential packets based on the Android flash firmware, the step S5: and differentiating the restored differential intermediate packet with all the target version differential intermediate packets in sequence to generate an OTA upgrade packet from a first version to each target version, wherein the differential intermediate packet comprises:
s501: judging whether all target version differential intermediate packets have differential intermediate packets corresponding to different versions of the same software, if so, sending an update version confirmation instruction to an update management system terminal, receiving a corresponding feedback instruction, and deleting the target version differential intermediate packets which do not need to be updated based on the feedback instruction;
s502: determining the software attribute and upgrading difficulty degree corresponding to the reserved target version differential intermediate packets, and determining a corresponding differential execution sequence table based on the software attribute and upgrading difficulty degree corresponding to each target version differential intermediate packet and a preset differential sequence mapping table;
s503: and differentiating the restored differential intermediate packet with all the reserved target version differential intermediate packets in sequence based on the differential execution sequence table to generate an OTA upgrade packet from the first version to each target version.
Preferably, the method for generating a plurality of differential packets based on the Android flash firmware, which generates corresponding initial differential intermediate packets based on the first system source code and all the compilation environment files, includes:
obtaining a corresponding compiling instruction based on the first system source code;
determining corresponding first compilation environment data and second compilation environment data based on the first compilation environment file and the second compilation environment file;
acquiring a corresponding compiling task and a corresponding file to be compiled based on the compiling instruction, determining a sub-compiling file root directory in the file to be compiled, dividing the file to be compiled into a plurality of task file packages based on the sub-compiling file root directory and the compiling task, and determining a compiling sequence of the task file packages based on a compiling sequence in the compiling task;
determining a first timestamp based on the compilation task and the compilation order;
acquiring a first compiling script corresponding to the first compiling environment data and a second compiling script corresponding to the second compiling environment data;
dividing the first compiling script and the second compiling script based on the first time stamp to obtain a plurality of first compiling sub scripts and a plurality of second compiling sub scripts;
meanwhile, each first compiling sub-script and the corresponding second compiling sub-script are subjected to difference comparison based on the first timestamp, the first compiling sub-script is modified based on a comparison result, and the first compiling environment data is updated based on the first timestamp and the modified first compiling sub-script to obtain third compiling environment data;
acquiring a first dependent file package corresponding to the third compiling environment data and a second dependent file package corresponding to the second compiling environment data;
adding a dependent file which is contained in the second dependent file package and is not contained in the first dependent file package into the first dependent file package to generate a third dependent file package, and updating the third compiling environment data based on the third dependent file package to generate corresponding fourth compiling environment data;
and compiling and packaging all task file packages based on the fourth compiling environment data and the compiling tasks to generate corresponding initial differential intermediate packages.
Preferably, in the method for generating a plurality of differential packets based on the Android flash firmware, S503: and differentiating the restored differential intermediate packet with all the reserved target version differential intermediate packets in sequence based on the differential execution sequence table to generate an OTA upgrade packet from a first version to each target version, wherein the differential execution sequence table comprises the following steps:
acquiring a first kernel symbol table file corresponding to each reserved target version differential intermediate packet, and determining a corresponding first symbol sequence and first symbol attributes and target data contained in a data space corresponding to each first kernel symbol based on the first kernel symbol table file;
determining the corresponding current symbol attribute and current symbol sequence and the current data contained in the data space corresponding to each second kernel symbol based on the kernel symbol table file in the restored differential intermediate packet;
taking a first kernel symbol and a second kernel symbol of which the current data and the target data are equal as a first group of symbols, and determining a first address corresponding to the first kernel symbol and a second address corresponding to the second kernel symbol in each first group of symbols based on the first symbol sequence and the current symbol sequence;
taking a first kernel symbol and a second kernel symbol which correspond to a first symbol attribute and correspond to a current symbol attribute and are consistent in the first kernel symbol and the second kernel symbol except the first group of symbols as a second group of symbols, and determining a third address corresponding to the first kernel symbol and a fourth address corresponding to the second kernel symbol in each second group of symbols based on the first symbol sequence and the current symbol sequence;
deleting the first kernel symbols except the first group of symbols and the second group of symbols, generating corresponding first differential data based on a corresponding deleting instruction and a deleting path, copying target data corresponding to the second kernel symbols except the first group of symbols and the second group of symbols to obtain copied data, and determining a corresponding fifth address before copying;
taking the restored kernel symbol table file in the differential intermediate packet as a second kernel symbol table file;
determining a difference arrangement space which is the same as a first kernel symbol table file to be differentiated, and dividing a subspace corresponding to the first symbol sequence based on the first kernel symbol table file;
transferring current data corresponding to a second address in the second kernel symbol table file to a subspace corresponding to the first address, and generating corresponding second differential data based on a corresponding transfer instruction and a transfer path;
storing the replication data to a subspace corresponding to the fifth address, and generating corresponding third differential data based on a corresponding replication instruction and a replication path;
dividing target data corresponding to a first kernel symbol and current data corresponding to a second kernel symbol contained in the second group of symbols according to a preset separator to obtain a corresponding target sub-character string and a current sub-character string;
comparing each target substring with the corresponding current substring, and obtaining fourth differential data corresponding to a second kernel symbol contained in each second group of symbols based on the comparison result;
updating the differential data on the fourth address to a subspace corresponding to the third address, and generating corresponding fifth differential data based on a corresponding update instruction and an update path;
and packaging the first differential data, the second differential data, the third differential data, the fourth differential data and the fifth differential data to obtain an OTA upgrade patch for generating a first version to each target version.
The invention provides a device for generating a plurality of differential packets based on Android flash firmware, which comprises the following steps:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a first version of flashing firmware, an initial differential tundish, a system compiling environment file and a plurality of target version differential tundishes;
the first extraction module is used for extracting a corresponding upgrading configuration file from the initial differential tundish;
the second extraction module is used for extracting the upgrade file corresponding to the first version from the firmware of the flash machine;
the restoring module is used for restoring a corresponding differential tundish based on the upgrading file, the upgrading configuration file and the system compiling environment file;
and the generation module is used for differentiating the restored differential intermediate packets with all the target version differential intermediate packets in sequence to generate OTA upgrade packets from the first version to a plurality of target versions.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
fig. 1 is a flowchart of a method for generating a plurality of differential packets based on Android flash firmware in embodiment 1 of the present invention;
fig. 2 is a flowchart of a method for generating a plurality of differential packets based on Android flash firmware in embodiment 2 of the present invention;
fig. 3 is a flowchart of a method for generating a plurality of differential packets based on Android flash firmware in embodiment 2 of the present invention;
fig. 4 is a flowchart of a method for generating a plurality of differential packets based on Android flash firmware in embodiment 2 of the present invention;
fig. 5 is a flowchart of a method for generating a plurality of differential packets based on Android flash firmware in embodiment 2 of the present invention;
fig. 6 is a flowchart of a method for generating a plurality of differential packets based on Android flash firmware in embodiment 2 of the present invention;
fig. 7 is a device structure diagram for generating a plurality of differential packets based on Android flash firmware in an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
Example 1:
the invention provides a method for generating a plurality of differential packets based on Android flash firmware, which comprises the following steps of referring to fig. 1:
s1: acquiring a first version of flashing firmware, an initial differential intermediate packet, a compiling environment file and a plurality of target version differential intermediate packets;
s2: extracting a corresponding upgrading configuration file from the initial differential tundish;
s3: extracting an upgrading file corresponding to a first version from the firmware of the flash machine;
s4: restoring a corresponding differential intermediate packet based on the upgrading file, the upgrading configuration file and the compiling environment file;
s5: and differentiating the restored differential intermediate packet with all the target version differential intermediate packets in sequence to generate OTA upgrade packets from the first version to a plurality of target versions.
In this embodiment, the first version is any system software version that the terminal manufacturer needs to upgrade and loses the middle package.
In this embodiment, the first version of the flash firmware is a factory flash package of the first software version issued by the terminal manufacturer.
In this embodiment, the initial differential intermediate packet is a differential intermediate packet obtained by compiling the system source code that generates the first software version, and may be a differential intermediate packet generated by recompiling the system source code that backs to the first software version, but since the compiling environment, timestamp, and the like at this time are different from those at this time, even if the version upgrade file included in the differential intermediate packet acquired by the rollback code is wrong, the acquired upgrade configuration file is correct.
In this embodiment, the compiling environment file is a compiling script and a dependent file required by compiling system source codes, and mainly includes an ota difference script, a built _ image.
In this embodiment, the target version differential intermediate packet is a differential intermediate packet generated by compiling a system source code of a software version after completion of upgrading, and may be one target version or a plurality of target versions.
In this embodiment, the upgrade configuration file is configuration information required to upgrade the first version upgrade file into the target version upgrade file and configure the target version upgrade file into the machine system, and is generally files such as an upgrade script, a signature, and a configuration table, for example, META, OTA, and the like.
In this embodiment, the upgrade file generally includes at least one partition file such as a system partition, a recovery partition, and a boot partition, and is mainly a mirror image file such as a system.
In this embodiment, the differential packets restored to the corresponding differential packets refer to the differential packets of the first software version.
In this embodiment, the OTA upgrade package is an incremental upgrade package corresponding to the first version to the target version.
In this embodiment, the incremental upgrade method is to upgrade the differential intermediate packet obtained by performing the difference by using the differential intermediate packet, for example: a differential intermediate packet (i.e., a differential intermediate packet restored in this embodiment) of a current software version (a first version, which may also be any system software version that a terminal manufacturer needs to upgrade and loses an intermediate packet) is a, and a differential intermediate packet that needs to be upgraded to a new software version (i.e., a target version) is B, so that the differential intermediate packet of B-a is used as the differential intermediate packet required for upgrading (i.e., the lost differential intermediate packet that needs to be generated in this embodiment).
The beneficial effect of above-mentioned scheme technique does: the method comprises the steps of extracting an upgrade configuration file from a differential intermediate package of any target version, restoring a publication upgrade file from a system img of a flashing package through the upgrade configuration file and a current system compiling environment file, restoring a missing first version differential intermediate package through the upgrade configuration file and the version upgrade file, and sequentially differentiating the restored first version differential intermediate package with a plurality of target version intermediate packages to manufacture a differential package from the first version to a plurality of target versions.
Example 2:
based on embodiment 1, in the method for generating a plurality of differential packets based on the Android flash firmware, S1: acquiring a first version of the firmware, an initial differential intermediate packet, a compilation environment file, and a plurality of target version differential intermediate packets, with reference to fig. 2, includes:
s101: acquiring a first compiling environment file corresponding to a current terminal to be upgraded and a second compiling environment file of an updating management system terminal;
s102: detecting a current software version corresponding to a terminal to be upgraded, and taking the current software version as a first version;
s103: calling the flashing firmware and the first system source code corresponding to the first version from the updating management system terminal, and generating a corresponding initial differential intermediate packet based on the first system source code, the first compiling environment file and the second compiling environment file;
s104: acquiring a second system source code corresponding to the target version from the update management system terminal, and compiling to generate a corresponding target version differential intermediate packet based on the second system source code, the first compiling environment file and the second compiling environment file;
wherein, the target version can be one or more.
In this embodiment, the terminal to be upgraded is a user terminal adapted to the first version, and examples of the terminal to be upgraded include a mobile phone terminal and a PC terminal.
In this embodiment, the first compiling environment file is a compiling script and a dependent file required for compiling at the terminal to be upgraded.
In this embodiment, the update management system terminal is a system for software update management, and is used to implement the whole upgrade process.
In this embodiment, the second compiling environment file is a compiling script and a dependent file required for compiling the upgrade file at the update management system terminal.
In this embodiment, the first system source code is a system source code corresponding to the first version.
In this embodiment, the second system source code does not generate system source code corresponding to the target version.
In this embodiment, the compiling method for compiling and generating the corresponding target version differential intermediate packet is consistent with the compiling method for compiling and generating the corresponding initial differential intermediate packet.
The beneficial effect of above-mentioned scheme technique does: the method comprises the steps of determining a first version by detecting and detecting a current software version corresponding to a terminal to be upgraded, obtaining a corresponding flashing firmware and a first system source code from an update management system terminal based on an obtained first compiling environment file corresponding to the terminal to be upgraded and a second compiling environment file of the update management system terminal, obtaining a second system source code corresponding to a target version from the update management system terminal, obtaining the flashing firmware, an initial differential intermediate packet, the compiling environment file and a plurality of target version differential intermediate packets of the first version, and providing data resources for subsequently generating the differential intermediate packets required by upgrading from the first version to the target version.
Example 3:
based on embodiment 1, in the method for generating a plurality of differential packets based on the Android flash firmware, S2: extracting a corresponding upgrade configuration file from the initial differential tundish, referring to fig. 3, includes:
s201: performing data identification on the initial differential tundish;
s202: determining the file size corresponding to the upgrade configuration file and the storage position of the upgrade configuration file in the initial differential intermediate packet based on the identification result;
s203: determining a corresponding first preset command based on the storage position, the file size and a preset reading command mapping table;
s204: and extracting a corresponding upgrading configuration file from the initial differential tundish based on the first preset command.
In this embodiment, the identification result includes file sizes and storage locations corresponding to the upgrade configuration file and the upgrade file in the initial differential tundish.
In this embodiment, the preset read command mapping table is a mapping table for determining a read command built in the system according to a storage location of a file and a file size or a partition file type.
In this embodiment, the first preset command is a python command for reading the copy upgrade configuration file from the initial differential tundish, and may also be a cp command.
The beneficial effect of above-mentioned scheme technique does: the method comprises the steps of obtaining an upgrade configuration file from an initial differential intermediate package obtained by backspacing and compiling a system source code of a first version, wherein the upgrade configuration file can be used for manufacturing the upgrade configuration file of the differential intermediate package from a current software version to any target version, determining a reading command according to the file size and the storage position of the upgrade configuration file obtained by carrying out data identification on the initial differential intermediate package, saving the time for generating the reading command under the condition of ensuring the accuracy of file reading, and improving the efficiency of generating the differential package.
Example 4:
based on embodiment 1, in the method for generating a plurality of differential packets based on the Android flash firmware, S3: extracting an upgrade file corresponding to the first version from the firmware, with reference to fig. 4, includes:
s301: carrying out file identification on the firmware to determine the partition file type contained in the firmware;
s302: determining a corresponding second preset command based on all partition file types and a preset reading command mapping table contained in the firmware;
s303: and extracting an upgrade file corresponding to the first version from the firmware of the flash machine based on the second preset command.
In this embodiment, the partition file types generally include partition files such as system partition, recovery partition, and boot partition.
In this embodiment, the preset read command mapping table is a mapping table for determining a read command built in the system according to a storage location of a file and a file size or a partition file type.
In this embodiment, the second preset command is a python command for reading the copy upgrade file from the flash firmware, and may also be a cp command.
The beneficial effect of above-mentioned scheme technique does: the upgrade file of the first version can be obtained based on the upgrade file of the first version extracted from the flashing firmware of the first version, the upgrade file can be used for manufacturing the upgrade file in the differential package of the current software version, data resources are provided for generating the differential package (including the upgrade configuration file and the upgrade file) of the current software version, and a reading command is determined according to the partition file type obtained by carrying out file identification on the flashing firmware.
Example 5:
based on embodiment 1, in the method for generating a plurality of differential packets based on the Android flash firmware, S4: restoring a corresponding differential intermediate package based on the upgrade file, the upgrade configuration file, and the compilation environment file, referring to fig. 5, including:
s401: determining a mirror image file corresponding to each partition file type in the upgrade files;
s402: generating a corresponding kernel symbol table file based on each mirror image file;
s403: and packaging the upgrade file, the upgrade configuration file and the kernel symbol table file to restore a differential intermediate packet corresponding to the first version.
In this embodiment, the image file is a file type of the partition file included in the upgrade file, because the version upgrade file generally includes at least one partition file such as a system partition, a recovery partition, and a boot partition, and is mainly an image file such as a system.
In this embodiment, the kernel symbol table file is a system.
The beneficial effect of above-mentioned scheme technique does: and restoring the upgrade configuration file acquired from the initial differential intermediate packet and the upgrade file corresponding to the flashing firmware of the current software version to acquire the differential intermediate packet corresponding to the current software version (namely the first version).
Example 6:
based on embodiment 1, in the method for generating a plurality of differential packets based on the Android flash firmware, S402: generating a corresponding kernel symbol table file based on each mirror image file, comprising:
carrying out format conversion on the mirror image file based on a preset file format template to obtain a corresponding first file;
and reading the current symbol attribute in each first file based on a third preset command, and determining a kernel symbol table file corresponding to each first file based on the current symbol attribute.
In this embodiment, the specific way of generating the corresponding kernel symbol table file based on each image file may be as follows: py file is modified first, then system in spark format is converted into ext4 format, system in ext4 format is obtained through simg2img command and then is obtained through mount-text4 system.raw./system, and system in file format is obtained through calling.
In this embodiment, the preset file format template is the ext4 format.
In this embodiment, the first file is an image file after format conversion based on a preset format template.
In this embodiment, the third preset command is a python command for reading the current symbolic attribute from the first file, and may also be a cp command.
The beneficial effect of above-mentioned scheme technique does: carrying out format conversion on the mirror image file based on a preset file format template to obtain a corresponding first file; reading the current symbol attribute in each first file based on a third preset command, and determining a kernel symbol table file corresponding to each first file based on the current symbol attribute; and an accurate data resource is provided for the restoration process of the differential tundish corresponding to the first version.
Example 7:
based on embodiment 1, in the method for generating a plurality of differential packets based on the Android flash firmware, S5: differentiating the restored differential intermediate packet with all the target version differential intermediate packets in sequence to generate an OTA upgrade packet from a first version to each target version, referring to fig. 6, including:
s501: judging whether all target version differential intermediate packets have differential intermediate packets corresponding to different versions of the same software, if so, sending an update version confirmation instruction to an update management system terminal, receiving a corresponding feedback instruction, and deleting the target version differential intermediate packets which do not need to be updated based on the feedback instruction;
s502: determining the software attribute and upgrading difficulty degree corresponding to the reserved target version differential intermediate packets, and determining a corresponding differential execution sequence table based on the software attribute and upgrading difficulty degree corresponding to each target version differential intermediate packet and a preset differential sequence mapping table;
s503: and differentiating the restored differential intermediate packet with all the reserved target version differential intermediate packets in sequence based on the differential execution sequence table to generate an OTA upgrade packet from the first version to each target version.
In this embodiment, the update version confirmation instruction is used to confirm the latest version of the corresponding software that needs to be updated.
In this embodiment, the feedback instruction is used to feed back the latest version of the corresponding software that needs to be updated.
In this embodiment, the software attribute is, for example, system software, general software, or the like.
In this embodiment, the difficulty level of upgrading is based on the time required for upgrading the corresponding software and the number of synchronously running software that needs to be stopped.
In this embodiment, the preset differential order mapping table is used to determine the corresponding differential execution order table based on the corresponding software attribute and the upgrade difficulty level.
In this embodiment, the difference execution sequence table indicates a sequence for checking the first version and each target version when there are a plurality of target versions to be differentiated.
The beneficial effect of above-mentioned scheme technique does: based on the fact that whether the differential intermediate packets corresponding to different versions of the same software exist in all the target version differential intermediate packets or not is confirmed, the unnecessary differential intermediate packets can be deleted, the generation process of the differential intermediate packets corresponding to the software versions which do not need to be updated is omitted, the efficiency of the total process of the differential intermediate packets is improved, and the system operation resources and the operation load are saved.
Example 8:
based on embodiment 2, the method for generating a plurality of differential packets based on the Android flush firmware, which generates corresponding initial differential intermediate packets based on the first system source code and all the compilation environment files, includes:
obtaining a corresponding compiling instruction based on the first system source code;
determining corresponding first compilation environment data and second compilation environment data based on the first compilation environment file and the second compilation environment file;
acquiring a corresponding compiling task and a corresponding file to be compiled based on the compiling instruction, determining a sub-compiling file root directory in the file to be compiled, dividing the file to be compiled into a plurality of task file packages based on the sub-compiling file root directory and the compiling task, and determining a compiling sequence of the task file packages based on a compiling sequence in the compiling task;
determining a first timestamp based on the compilation task and the compilation order;
acquiring a first compiling script corresponding to the first compiling environment data and a second compiling script corresponding to the second compiling environment data;
dividing the first compiling script and the second compiling script based on the first time stamp to obtain a plurality of first compiling sub scripts and a plurality of second compiling sub scripts;
meanwhile, each first compiling sub-script and the corresponding second compiling sub-script are subjected to difference comparison based on the first timestamp, the first compiling sub-script is modified based on a comparison result, and the first compiling environment data is updated based on the first timestamp and the modified first compiling sub-script to obtain third compiling environment data;
acquiring a first dependent file package corresponding to the third compiling environment data and a second dependent file package corresponding to the second compiling environment data;
adding a dependent file which is contained in the second dependent file package and is not contained in the first dependent file package into the first dependent file package to generate a third dependent file package, and updating the third compiling environment data based on the third dependent file package to generate corresponding fourth compiling environment data;
compiling and packaging all task file packages based on the fourth compiling environment data and the compiling tasks to generate corresponding initial differential intermediate packages.
In this embodiment, the compiling instruction is an instruction representing a compiling task and a file to be compiled in a compiling process for generating the first version.
In this embodiment, the first compilation environment data is data included in the first compilation environment file.
In this embodiment, the second compilation environment data is data included in the second compilation environment file.
In this embodiment, the compiling task is a task in the process of generating the first version by compiling.
In this embodiment, the file to be compiled is all files that need to be compiled in the process of generating the first version by compiling, and includes a part of the first system source code.
In this embodiment, the root directory of the sub-compiled file is a root directory of the sub-compiled file included in each file to be compiled, and provides a compiling path.
In this embodiment, the task file package is compiled to generate a file to be compiled in each compiling task process in the first version process, and the file to be compiled is divided into files including part of the first system source code.
In this embodiment, the compiling order is a compiling order in the process of generating the first version by compiling.
In this embodiment, the first timestamp is obtained by dividing the total time of the total compilation process into a plurality of time segments according to the time required by each compilation task, where the number of the divided time segments is consistent with the number of the compilation tasks.
In this embodiment, the first compiling script is a compiling script included in the first compiling environment data, and is mainly an ota difference script, a build _ image.
In this embodiment, the second compiling script is a compiling script included in the second compiling environment data, and is mainly an ota difference script, a build _ image.
In this embodiment, the first compiling sub-script is formed by dividing the first compiling script based on the first timestamp, and corresponds to the compiling tasks one to one.
In this embodiment, the second compiling sub-script is formed by dividing the second compiling script based on the first timestamp, and corresponds to the compiling tasks one to one.
In this embodiment, the third compilation environment data is the updated first compilation environment data.
In this embodiment, the first dependent file package is a dependent file included in the third compilation environment data.
In this embodiment, the second dependency file package is a dependency file included in the second compilation environment data.
In this embodiment, the third dependent file package is a dependent file package generated by adding the dependent files contained in the second dependent file package and not contained in the first dependent file package to the first dependent file package.
In this embodiment, the fourth compilation environment data is updated to obtain the third compilation environment data.
The beneficial effect of above-mentioned scheme technique does: by updating and modifying the first compiling environment file based on the second compiling environment file, the adaptability of the upgrading file and the upgrading configuration file with the terminal to be upgraded in the compiling and generating process of the first version is ensured, the accuracy of the compiling process is ensured, and the error of the restored differential tundish is reduced.
Example 9:
based on embodiment 1, the method for generating a plurality of differential packets based on the Android flash firmware includes, in S503: and differentiating the restored differential intermediate packet with all the reserved target version differential intermediate packets in sequence based on the differential execution sequence table to generate an OTA upgrade packet from a first version to each target version, wherein the differential execution sequence table comprises the following steps:
acquiring a first kernel symbol table file corresponding to each reserved target version differential intermediate packet, and determining a corresponding first symbol sequence and first symbol attributes and target data contained in a data space corresponding to each first kernel symbol based on the first kernel symbol table file;
determining corresponding current symbol attributes and current symbol sequences and current data contained in a data space corresponding to each second kernel symbol based on the kernel symbol table file in the restored differential intermediate packet;
taking a first kernel symbol and a second kernel symbol of which the current data and the target data are equal as a first group of symbols, and determining a first address corresponding to the first kernel symbol and a second address corresponding to the second kernel symbol in each first group of symbols based on the first symbol sequence and the current symbol sequence;
taking a first kernel symbol and a second kernel symbol which correspond to a first symbol attribute and correspond to a current symbol attribute and are consistent in the first kernel symbol and the second kernel symbol except the first group of symbols as a second group of symbols, and determining a third address corresponding to the first kernel symbol and a fourth address corresponding to the second kernel symbol in each second group of symbols based on the first symbol sequence and the current symbol sequence;
deleting the first kernel symbols except the first group of symbols and the second group of symbols, generating corresponding first differential data based on a corresponding deleting instruction and a deleting path, copying target data corresponding to the second kernel symbols except the first group of symbols and the second group of symbols to obtain copied data, and determining a corresponding fifth address before copying;
taking the restored kernel symbol table file in the differential intermediate packet as a second kernel symbol table file;
determining a difference arrangement space which is the same as a first kernel symbol table file to be differentiated, and dividing a subspace corresponding to the first symbol sequence based on the first kernel symbol table file;
transferring current data corresponding to a second address in the second kernel symbol table file to a subspace corresponding to the first address, and generating corresponding second differential data based on a corresponding transfer instruction and a transfer path;
storing the replication data to a subspace corresponding to the fifth address, and generating corresponding third differential data based on a corresponding replication instruction and a replication path;
dividing target data corresponding to a first kernel symbol and current data corresponding to a second kernel symbol contained in the second group of symbols according to a preset separator to obtain a corresponding target sub-character string and a current sub-character string;
comparing each target substring with the corresponding current substring, and obtaining fourth differential data corresponding to a second kernel symbol contained in each second group of symbols based on the comparison result;
updating the differential data on the fourth address to a subspace corresponding to the third address, and generating corresponding fifth differential data based on a corresponding update instruction and an update path;
and packaging the first differential data, the second differential data, the third differential data, the fourth differential data and the fifth differential data to obtain an OTA upgrade package for generating a first version to each target version.
In this embodiment, the first kernel symbol table file is a corresponding kernel symbol table file included in each reserved target version differential intermediate packet.
In this embodiment, the first symbol sequence is an arrangement sequence of symbols corresponding to each storage subspace storage data determined according to an arrangement manner of the storage subspace in each reserved target version differential intermediate packet.
In this embodiment, the first symbol attribute is an attribute (symbol name) of a symbol corresponding to the storage subspace storage data included in each target version differential intermediate packet, and includes: symbol name, data type, etc.
In this embodiment, the target data is data stored in the data space corresponding to each first kernel symbol.
In this embodiment, the current symbol sequence is an arrangement sequence of symbols corresponding to each storage subspace storage data determined according to an arrangement manner of the storage subspace in the restored differential tundish.
In this embodiment, the current symbol attribute is an attribute (symbol name) of a symbol corresponding to the storage data based on the storage subspace included in the restored differential intermediate packet, and includes: symbol name, data type, etc.
In this embodiment, the current data is the data stored in the data space corresponding to each second kernel symbol.
In this embodiment, the current data and the target data are equal, that is, represent unchanged data in the process of upgrading the initial differential intermediate packet to the target version differential intermediate packet.
In this embodiment, the first group of symbols is a symbol group consisting of corresponding first kernel symbols and second kernel symbols where the current data and the target data are equal, such as:
the target data in the first kernel symbol is: 1. #, 4, 3, 6, 7, the target data in the second kernel symbol are sequentially: 2. 7, 6, 1, @;
the first set of symbols has: a first kernel symbol and a fourth second kernel symbol, a fifth first kernel symbol and a third second kernel symbol, and a sixth first kernel symbol and a second kernel symbol (the data and symbol attributes corresponding to the same group of symbols are all consistent);
the second set of kernel symbols has: a second first kernel symbol and a fifth second kernel symbol (the symbol attributes are punctuation symbols but the data are not consistent);
then, deleting the third first kernel symbol and the fourth first kernel symbol, and copying the first second kernel symbol to obtain the copied data.
In this embodiment, the first address is the in-table location (corresponding to the data storage area) corresponding to each first kernel symbol included in the first set of symbols.
In this embodiment, the second address is the in-table location (corresponding to the data storage area) corresponding to each second kernel symbol included in the first set of symbols.
In this embodiment, the symbols of the first kernel symbol and the symbols of the second kernel symbol, which are the rest of the second group of symbols except the first group of symbols, have the same symbol property.
In this embodiment, the third address is the in-table location (corresponding to the data storage area) corresponding to each first kernel symbol included in the two sets of symbols.
In this embodiment, the fourth address corresponds to an in-table location (corresponding to a data storage area) for each second kernel symbol contained in the second set of symbols.
In this embodiment, the delete instruction includes a symbol to be deleted and corresponding data.
In this embodiment, the deletion path is an execution path of the deletion process.
In this embodiment, the first differential data is the differential data generated by the deleting process.
In this embodiment, the copy data copies the target data corresponding to the second core symbol remaining except for the first and second groups of symbols to obtain data.
In this embodiment, the fifth address is the location (corresponding to the data storage area) in the table corresponding to the second kernel symbol remaining in addition to the first and second sets of symbols.
In this embodiment, the difference arrangement space is a storage space that is consistent with a corresponding data storage space in the first kernel symbol table file to be differentiated.
In this embodiment, the subspace is obtained by dividing the difference sorting space based on the data storage space corresponding to each first internal symbol in the first kernel symbol table file.
In this embodiment, the move instruction includes a moved symbol and corresponding data.
In this embodiment, the transfer path executes an execution path in the transfer process.
In this embodiment, the second differential data is the differential data generated in the transfer process.
In this embodiment, the replication instructions include the replicated symbols and corresponding data.
In this embodiment, the copy path is an execution path in the copy process.
In this embodiment, the third differential data is the differential data generated by the above-mentioned copying process.
In this embodiment, the target substring is obtained by dividing the target data corresponding to the first kernel symbol included in the second group of symbols according to a preset delimiter.
In this embodiment, the current substring is obtained by dividing current data corresponding to the first kernel symbol included in the second group of symbols according to a preset delimiter.
In this embodiment, the fourth differential data is differential data obtained by comparing each target sub-string with the corresponding current sub-string, and based on the comparison result, comparing the fourth differential data with the corresponding current sub-string.
In this embodiment, the update instructions include updated symbols and corresponding data.
In this embodiment, the update path is an execution path in the update process.
In this embodiment, the fifth differential data is the differential data generated by the above-mentioned copying process.
The beneficial effect of above-mentioned scheme technique does: by simulating an execution instruction and an execution path in the process of upgrading the differential intermediate packet corresponding to the first version to the differential intermediate packet of the second version, the obtained OTA upgrade packet records the data change process in the upgrade process in detail, and the accuracy of the OTA upgrade packet is ensured.
The invention provides a device for generating a plurality of differential packets based on Android flash firmware, which comprises the following steps of:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a first version of flashing firmware, an initial differential tundish, a system compiling environment file and a plurality of target version differential tundishes;
the first extraction module is used for extracting a corresponding upgrading configuration file from the initial differential tundish;
the second extraction module is used for extracting the upgrade file corresponding to the first version from the firmware of the flash machine;
the restoring module is used for restoring a corresponding differential tundish based on the upgrading file, the upgrading configuration file and the system compiling environment file;
and the generation module is used for differentiating the restored differential intermediate packets with all the target version differential intermediate packets in sequence to generate OTA upgrade packets from the first version to a plurality of target versions.
The beneficial effect of above-mentioned scheme technique does: the method comprises the steps of extracting an upgrade configuration file from a differential intermediate packet of any target version by setting an acquisition module, a first extraction module, a second extraction module, a restoration module and a generation module, restoring a publication upgrade file from a system of a flash package by the upgrade configuration file and a current system compiling environment file, restoring a missing first version differential intermediate packet by the upgrade configuration file and the version upgrade file, and sequentially differentiating the restored first version differential intermediate packet with a plurality of target version intermediate packets to manufacture differential packets from a first version to a plurality of target versions.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. A method for generating a plurality of differential packets based on Android flash firmware is characterized by comprising the following steps:
s1: acquiring a first version of flashing firmware, an initial differential intermediate packet, a compiling environment file and a plurality of target version differential intermediate packets;
s2: extracting a corresponding upgrading configuration file from the initial differential tundish;
s3: extracting an upgrading file corresponding to a first version from the firmware of the flash machine;
s4: restoring a corresponding differential intermediate packet based on the upgrading file, the upgrading configuration file and the compiling environment file;
s5: differentiating the restored differential intermediate packet with all the target version differential intermediate packets in sequence to generate OTA upgrade packets from a first version to a plurality of target versions;
s1: the method for acquiring the flashing firmware of the first version, the initial differential intermediate packet, the compiling environment file and the plurality of target version differential intermediate packets comprises the following steps:
s101: acquiring a first compiling environment file corresponding to a current terminal to be upgraded and a second compiling environment file of an updating management system terminal;
s102: detecting a current software version corresponding to a terminal to be upgraded, and taking the current software version as a first version;
s103: calling the flashing firmware and the first system source code corresponding to the first version from the updating management system terminal, and generating a corresponding initial differential intermediate packet based on the first system source code, the first compiling environment file and the second compiling environment file;
s104: acquiring a second system source code corresponding to the target version from the update management system terminal, and compiling to generate a corresponding target version differential intermediate packet based on the second system source code, the first compiling environment file and the second compiling environment file;
wherein the target version is one or more.
2. The method for generating a plurality of differential packages based on the Android flash firmware of claim 1, wherein S2: extracting a corresponding upgrade configuration file from the initial differential tundish, including:
s201: performing data identification on the initial differential tundish;
s202: determining the file size corresponding to the upgrade configuration file and the storage position of the upgrade configuration file in the initial differential intermediate packet based on the identification result;
s203: determining a corresponding first preset command based on the storage position, the file size and a preset reading command mapping table;
s204: and extracting a corresponding upgrading configuration file from the initial differential tundish based on the first preset command.
3. The method for generating a plurality of differential packages based on the Android flash firmware of claim 1, wherein S3: extracting an upgrade file corresponding to a first version from the firmware of the flash device, including:
s301: carrying out file identification on the firmware to determine the partition file type contained in the firmware;
s302: determining a corresponding second preset command based on all partition file types and a preset read command mapping table contained in the firmware of the flash machine;
s303: and extracting an upgrade file corresponding to the first version from the firmware of the flash machine based on the second preset command.
4. The method for generating a plurality of differential packages based on the Android flash firmware of claim 1, wherein S4: restoring a corresponding differential intermediate packet based on the upgrade file, the upgrade configuration file and the compiling environment file, including:
s401: determining a mirror image file corresponding to each partition file type in the upgrade files;
s402: generating a corresponding kernel symbol table file based on each mirror image file;
s403: and packaging the upgrade file, the upgrade configuration file and the kernel symbol table file to restore a differential intermediate packet corresponding to the first version.
5. The method for generating a plurality of differential packets based on the Android flash firmware of claim 4, wherein S402: generating a corresponding kernel symbol table file based on each mirror image file, comprising:
carrying out format conversion on the mirror image file based on a preset file format template to obtain a corresponding first file;
and reading the current symbol attribute in each first file based on a third preset command, and determining a kernel symbol table file corresponding to each first file based on the current symbol attribute.
6. The method for generating a plurality of differential packages based on the Android flash firmware of claim 1, wherein S5: and differentiating the restored differential intermediate packet with all the target version differential intermediate packets in sequence to generate an OTA upgrade packet from a first version to each target version, wherein the differential intermediate packet comprises:
s501: judging whether all target version differential intermediate packets have differential intermediate packets corresponding to different versions of the same software, if so, sending an update version confirmation instruction to an update management system terminal, receiving a corresponding feedback instruction, and deleting the target version differential intermediate packets which do not need to be updated based on the feedback instruction;
s502: determining the software attribute and upgrading difficulty degree corresponding to the reserved target version differential intermediate packets, and determining a corresponding differential execution sequence table based on the software attribute and upgrading difficulty degree corresponding to each target version differential intermediate packet and a preset differential sequence mapping table;
s503: and differentiating the restored differential intermediate packet with all the reserved target version differential intermediate packets in sequence based on the differential execution sequence table to generate an OTA upgrade packet from the first version to each target version.
7. The method for generating a plurality of differential packets based on Android flash firmware of claim 1, wherein generating corresponding initial differential intermediate packets based on the first system source code and all compilation environment files comprises:
obtaining a corresponding compiling instruction based on the first system source code;
determining corresponding first compilation environment data and second compilation environment data based on the first compilation environment file and the second compilation environment file;
acquiring a corresponding compiling task and a corresponding file to be compiled based on the compiling instruction, determining a sub-compiling file root directory in the file to be compiled, dividing the file to be compiled into a plurality of task file packages based on the sub-compiling file root directory and the compiling task, and determining a compiling sequence of the task file packages based on a compiling sequence in the compiling task;
determining a first timestamp based on the compilation task and the compilation order;
acquiring a first compiling script corresponding to the first compiling environment data and a second compiling script corresponding to the second compiling environment data;
dividing the first compiling script and the second compiling script based on the first time stamp to obtain a plurality of first compiling sub scripts and a plurality of second compiling sub scripts;
meanwhile, each first compiling sub-script and the corresponding second compiling sub-script are subjected to difference comparison based on the first timestamp, the first compiling sub-script is modified based on a comparison result, and the first compiling environment data is updated based on the first timestamp and the modified first compiling sub-script to obtain third compiling environment data;
acquiring a first dependent file package corresponding to the third compiling environment data and a second dependent file package corresponding to the second compiling environment data;
adding a dependent file which is contained in the second dependent file package and is not contained in the first dependent file package into the first dependent file package to generate a third dependent file package, and updating the third compiling environment data based on the third dependent file package to generate corresponding fourth compiling environment data;
compiling and packaging all task file packages based on the fourth compiling environment data and the compiling tasks to generate corresponding initial differential intermediate packages.
8. The method according to claim 6, wherein S503: and differentiating the restored differential intermediate packet with all the reserved target version differential intermediate packets in sequence based on the differential execution sequence table to generate an OTA upgrade packet from a first version to each target version, wherein the differential execution sequence table comprises the following steps:
acquiring a first kernel symbol table file corresponding to each reserved target version differential intermediate packet, and determining a corresponding first symbol sequence and first symbol attributes and target data contained in a data space corresponding to each first kernel symbol based on the first kernel symbol table file;
determining corresponding current symbol attributes and current symbol sequences and current data contained in a data space corresponding to each second kernel symbol based on the kernel symbol table file in the restored differential intermediate packet;
taking a first kernel symbol and a second kernel symbol of which the current data and the target data are equal as a first group of symbols, and determining a first address corresponding to the first kernel symbol and a second address corresponding to the second kernel symbol in each first group of symbols based on the first symbol sequence and the current symbol sequence;
taking a first kernel symbol and a second kernel symbol which correspond to a first symbol attribute and correspond to a current symbol attribute and are consistent in the first kernel symbol and the second kernel symbol except the first group of symbols as a second group of symbols, and determining a third address corresponding to the first kernel symbol and a fourth address corresponding to the second kernel symbol in each second group of symbols based on the first symbol sequence and the current symbol sequence;
deleting the first kernel symbols except the first group of symbols and the second group of symbols, generating corresponding first differential data based on a corresponding deleting instruction and a deleting path, copying target data corresponding to the second kernel symbols except the first group of symbols and the second group of symbols to obtain copied data, and determining a corresponding fifth address before copying;
taking the restored kernel symbol table file in the differential intermediate packet as a second kernel symbol table file;
determining a difference arrangement space which is the same as a first kernel symbol table file to be differentiated, and dividing a subspace corresponding to the first symbol sequence based on the first kernel symbol table file;
transferring current data corresponding to a second address in the second kernel symbol table file to a subspace corresponding to the first address, and generating corresponding second differential data based on a corresponding transfer instruction and a transfer path;
storing the replication data to a subspace corresponding to the fifth address, and generating corresponding third differential data based on a corresponding replication instruction and a replication path;
dividing target data corresponding to a first kernel symbol and current data corresponding to a second kernel symbol contained in the second group of symbols according to a preset separator to obtain a corresponding target sub-character string and a current sub-character string;
comparing each target substring with the corresponding current substring, and obtaining fourth differential data corresponding to a second kernel symbol contained in each second group of symbols based on the comparison result;
updating the differential data on the fourth address to a subspace corresponding to the third address, and generating corresponding fifth differential data based on a corresponding update instruction and an update path;
and packaging the first differential data, the second differential data, the third differential data, the fourth differential data and the fifth differential data to obtain an OTA upgrade package for generating a first version to each target version.
9. An apparatus for generating a plurality of differential packets based on Android flash firmware, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a first version of flashing firmware, an initial differential tundish, a system compiling environment file and a plurality of target version differential tundishes;
the first extraction module is used for extracting a corresponding upgrading configuration file from the initial differential tundish;
the second extraction module is used for extracting the upgrade file corresponding to the first version from the firmware of the flash machine;
the restoring module is used for restoring a corresponding differential tundish based on the upgrading file, the upgrading configuration file and the system compiling environment file;
the generating module is used for sequentially differentiating the restored differential intermediate packets with all the target version differential intermediate packets to generate OTA upgrade packets from a first version to a plurality of target versions;
the acquisition module comprises:
s101: acquiring a first compiling environment file corresponding to a current terminal to be upgraded and a second compiling environment file of an updating management system terminal;
s102: detecting a current software version corresponding to a terminal to be upgraded, and taking the current software version as a first version;
s103: calling the flashing firmware and the first system source code corresponding to the first version from the updating management system terminal, and generating a corresponding initial differential intermediate packet based on the first system source code, the first compiling environment file and the second compiling environment file;
s104: acquiring a second system source code corresponding to the target version from the update management system terminal, and compiling to generate a corresponding target version differential intermediate packet based on the second system source code, the first compiling environment file and the second compiling environment file;
wherein the target version is one or more.
CN202111196256.0A 2021-10-14 2021-10-14 Method and device for generating multiple differential packets based on Android flash firmware Active CN114003266B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111196256.0A CN114003266B (en) 2021-10-14 2021-10-14 Method and device for generating multiple differential packets based on Android flash firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111196256.0A CN114003266B (en) 2021-10-14 2021-10-14 Method and device for generating multiple differential packets based on Android flash firmware

Publications (2)

Publication Number Publication Date
CN114003266A CN114003266A (en) 2022-02-01
CN114003266B true CN114003266B (en) 2022-05-27

Family

ID=79922836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111196256.0A Active CN114003266B (en) 2021-10-14 2021-10-14 Method and device for generating multiple differential packets based on Android flash firmware

Country Status (1)

Country Link
CN (1) CN114003266B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365702A (en) * 2013-07-11 2013-10-23 中国科学院合肥物质科学研究院 System and method for tracking process of lightweight virtual machine under IaaS cloud environment
CN109739999A (en) * 2019-01-16 2019-05-10 福建师范大学 A kind of efficient drosophila neural network Hash Search WMSN data method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569843A (en) * 2015-10-12 2017-04-19 青岛海信移动通信技术股份有限公司 Method and device for generating OTA central package
CN105511911B (en) * 2015-11-27 2019-02-12 青岛海信移动通信技术股份有限公司 The generation method and device of system firmware upgrade package
CN106406872B (en) * 2016-09-06 2019-07-23 Oppo广东移动通信有限公司 A kind of production method and device of the difference upgrade package based on specific file
CN110311801A (en) * 2019-05-10 2019-10-08 珠海格力电器股份有限公司 A kind of device firmware upgrade method and system
CN111857729A (en) * 2020-07-23 2020-10-30 深圳忆联信息系统有限公司 Network card drive compiling method and device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365702A (en) * 2013-07-11 2013-10-23 中国科学院合肥物质科学研究院 System and method for tracking process of lightweight virtual machine under IaaS cloud environment
CN109739999A (en) * 2019-01-16 2019-05-10 福建师范大学 A kind of efficient drosophila neural network Hash Search WMSN data method

Also Published As

Publication number Publication date
CN114003266A (en) 2022-02-01

Similar Documents

Publication Publication Date Title
CN107506219A (en) A kind of general version upgrade method based on android system
CN101436138A (en) Control device and control method for software upgrade and dynamic rolling back
CN103530150A (en) Remote updating method for Linux operating system
CN109376142B (en) Data migration method and terminal equipment
CN112100194A (en) Database version management method and system
CN102193841B (en) Backup method and device of Subversion configuration database
CN107003876A (en) Firmware updates
CN111104151A (en) Shell script-based Git code simplification management method
CN111400267A (en) Method and device for recording log
CN106603289B (en) LMT configuration file smooth upgrading method
CN112286543B (en) Application service deployment method and device
CN114003266B (en) Method and device for generating multiple differential packets based on Android flash firmware
CN101267645B (en) Automatic test method and system for service flow software development of W base station
CN115080076B (en) Cloud mobile phone software management method
CN112749147A (en) Method and device for merging and migrating data tables in database
CN116028084A (en) Cross-version hot upgrading method, system and terminal based on OpenStack cloud platform
CN115543429A (en) Project environment building method, electronic equipment and computer readable storage medium
CN111400243B (en) Development management system based on pipeline service and file storage method and device
CN113792026A (en) Deployment method and device of database script and computer readable storage medium
CN113568834A (en) SDK code compatibility detection method, device, computer equipment and medium
CN107820129B (en) Method for automatically maintaining application data packet of intelligent equipment
CN113468143A (en) Data migration method, system, computing device and storage medium
CN116149707B (en) Method and device for detecting and avoiding upgrading risk of distributed system
CN117492803B (en) Intelligent door lock PCBA software upgrading method and system
CN117407362B (en) Method and device for file migration among heterogeneous file systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant