Method and system for upgrading off-line resources based on double-partition mechanism

By adding ext4 formatted A/B partitions and update_engine extensions to the upgrade solution for the Android platform, the problem of read-only partitions during OTA upgrades is solved, enabling complete offline resource upgrades for in-vehicle infotainment devices. This solution is applicable to Android N and later platforms.

CN121125759APending Publication Date: 2025-12-12DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511188856.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

In existing technologies, the OTA upgrade partition of the Android platform is read-only and cannot upgrade the offline resources of third-party applications. This means that the need to additionally upgrade some third-party application resources during differential upgrades of Android P and later versions cannot be met.

Method used

The original upgrade solution is extended to include new ext4 formatted A/B partitions for storing offline resource data, and these partitions are included in the update_engine upgrade scope. The upgrade is carried out in two steps: first, the content of the A/B partitions is upgraded, and then the offline resources are upgraded.

Benefits of technology

It effectively solves the problem that some third-party application resources need to be upgraded when performing differential upgrades on Android P and later versions of the platform, ensuring that the vehicle's infotainment system can fully upgrade offline resources with minimal change in the size of the differential package.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121125759A_ABST
    Figure CN121125759A_ABST
Patent Text Reader

Abstract

The invention provides an off-line resource upgrading method and system based on a double-partition mechanism, and belongs to the technical field of vehicle equipment, the off-line resource upgrading method based on the double-partition mechanism comprises the following steps: carrying out expansion on the basis of a native upgrading scheme, and newly adding an A / B partition in an ext4 format for storing data of off-line resources; and the data of the off-line resources are included in an updataengine upgrading range, and the data of the off-line resources are upgraded. According to the off-line resource upgrading method and system based on the double-partition mechanism, firstly, expansion is carried out on the basis of a native upgrading scheme, and an A / B partition in an ext4 format is newly added and used for storing data of off-line resources; and then, the data of the offline resources are incorporated into an updataengine upgrading range, and the updataengine upgrading is carried out on the data of the offline resources. According to the method, the upgrading process is expanded, so that the requirement that part of three-party application resources need to be additionally upgraded during differential upgrading of platforms of Android P and later versions is effectively met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle infotainment technology, and in particular to a method and system for upgrading offline resources based on a dual-partition mechanism. Background Technology

[0002] The intelligentization of vehicles and traditional equipment is a future development trend. Many vehicles today have in-vehicle infotainment systems based on the Android platform, which require continuous upgrades. To eliminate the need for customers to visit dealerships for upgrades each time, Over-the-Air (OTA) technology has emerged. This technology has undergone several stages of development. With the evolution of wireless communication technology and device functionality, OTA has expanded from basic data transmission to a modern technology for remotely upgrading device firmware, operating systems, and applications. Summary of the Invention

[0003] This invention aims to solve at least one of the technical problems existing in the prior art, and proposes a method and system for upgrading offline resources based on a dual-partition mechanism.

[0004] In a first aspect, embodiments of the present invention provide a method for upgrading offline resources based on a dual-partition mechanism, comprising:

[0005] The original upgrade solution is extended by adding ext4 formatted A / B partitions to store offline resource data.

[0006] Include offline resource data in the update_engine upgrade scope and upgrade it.

[0007] The upgrade includes: first upgrading the content of partitions A and B, and then upgrading offline resources.

[0008] The upgrade of the A / B partition content includes calling the native Android update_engine.

[0009] After the A / B partition upgrade is completed, the slot flag is set to the backup partition, and then a reboot is performed.

[0010] After the system restarts, the A / B partitions will be switched to the target version.

[0011] Before the boot animation ends, ota_service detects the flag, sets system properties to start the upgrade process, triggers the execution of the script in init.rc, upgrades the third-party offline resources stored in the A / B partitions, and upgrades the resources to the specified location of the third-party application.

[0012] The upgrade of the third-party offline resources stored in the A / B partitions includes:

[0013] During the upgrade, the versions of third-party resources are checked. If the target version of the resource is found to be inconsistent with the resource version in the A / B partition, the subsequent upgrade process is initiated.

[0014] The upgrade of the third-party offline resources stored in the A / B partitions includes:

[0015] The upgrade package is parsed by ota_service, the upgrade status is obtained from update_engine and init and returned to ota.apk.

[0016] Secondly, embodiments of the present invention provide a system for upgrading offline resources based on a dual-partition mechanism, used to configure and implement the method described in any of the preceding claims, including:

[0017] The extension unit is used to expand upon the original upgrade scheme by adding ext4 formatted A / B partitions to store offline resource data.

[0018] The upgrade unit is used to include offline resource data within the scope of the update_engine upgrade and upgrade it.

[0019] Thirdly, embodiments of the present invention provide an electronic device, including:

[0020] One or more processors;

[0021] Memory, used to store one or more programs;

[0022] When one or more programs are executed by one or more processors, the one or more processors implement any of the methods described above.

[0023] Fourthly, embodiments of the present invention provide a computer-readable medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps of any of the methods described above.

[0024] The present invention provides a method and system for upgrading offline resources based on a dual-partition mechanism. First, it extends the original upgrade scheme by adding ext4 formatted A / B partitions to store offline resource data. Then, it incorporates the offline resource data into the update_engine upgrade scope for upgrading. By expanding the upgrade process, this invention effectively addresses the need to additionally upgrade some third-party application resources during differential upgrades on Android P and later versions. Attached Figure Description

[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0026] Figure 1 A flowchart illustrating a method for upgrading offline resources based on a dual-partition mechanism, provided in an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram illustrating an optional specific implementation process of a method for upgrading offline resources based on a dual-partition mechanism, provided in an embodiment of the present invention.

[0028] Figure 3 The following is a flowchart illustrating the specific upgrade process in an embodiment of the present invention for upgrading offline resources based on a dual-partition mechanism.

[0029] Figure 4 A structural block diagram of a system for upgrading offline resources based on a dual-partition mechanism, provided in an embodiment of the present invention;

[0030] Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0031] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0032] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.

[0033] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0034] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0035] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0036] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.

[0037] In related technologies, OTA (Over-the-Air) technology is a technology that remotely transmits data or updates software via a wireless network. Its most common applications are in smartphones, tablets, smart home devices, automobiles, and other IoT devices, used for system or firmware updates, application updates, configuration file and settings updates, bug fixes, and security patches.

[0038] Android OTA seamless updates work by dividing the device's storage into two system partitions, typically called partition A and partition B. Android's A / B partitions (Seamless Updates) are a partition structure used for seamless operating system updates, primarily designed to allow devices to update without interruption, reducing the risk of update failures. Each partition contains the operating system image file and other related data. When the device is running, the system boots from only one partition (e.g., partition A). During a system update, the update package is downloaded and applied to inactive partitions (e.g., partition B), without affecting the currently used partition (partition A). After the update is complete, the system marks the new partition as the active partition and boots from that partition on the next reboot.

[0039] Differential upgrades are a technique that reduces update package size and speeds up system updates. Compared to full upgrades, differential upgrades only include modifications relative to the current device version, rather than the entire system image. This technique is particularly suitable for large-scale OTA updates, significantly saving network bandwidth, reducing download time, and minimizing storage space usage during update installation. In addition to these features, differential upgrades generate a "DeltaPackage" based on two different versions of files. This package contains only the differences between the old and new versions. When an update is installed on the device, the system updates existing system files using the DeltaPackage, rather than replacing the entire file.

[0040] The technical problem solved by this application is: the new upgrade method proposed in this invention is applicable to Android N and later platforms. Because the partition of OTA upgrade is only read-only, but third-party applications need resources that can be read and written, the native upgrade process cannot upgrade such cases. This invention effectively solves the need to upgrade some third-party application resources when performing differential upgrades on Android P and later versions of the platform by expanding the upgrade process.

[0041] To address at least one of the technical problems existing in the aforementioned related technologies, this invention provides a method and system for upgrading offline resources based on a dual-partition mechanism. Wherein: Figure 1 A flowchart illustrating a method for upgrading offline resources based on a dual-partition mechanism, provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating an optional specific implementation process of a method for upgrading offline resources based on a dual-partition mechanism, provided in an embodiment of the present invention. Figure 3 The following is a flowchart illustrating the specific upgrade process in an embodiment of the present invention for upgrading offline resources based on a dual-partition mechanism. Figure 4 A structural block diagram of a system for upgrading offline resources based on a dual-partition mechanism, provided in an embodiment of the present invention; Figure 5This is a structural block diagram of an electronic device provided in an embodiment of the present invention.

[0042] As an embodiment of the present invention, see Figure 1 This invention provides a method for upgrading offline resources based on a dual-partition mechanism, comprising:

[0043] The original upgrade solution is extended by adding ext4 formatted A / B partitions to store offline resource data.

[0044] Include offline resource data in the update_engine upgrade scope and upgrade it.

[0045] The present invention provides a method for upgrading offline resources based on a dual-partition mechanism. First, it extends the native upgrade scheme by adding ext4 formatted A / B partitions to store offline resource data. Then, it incorporates the offline resource data into the update_engine upgrade scope and upgrades it. By expanding the upgrade process, this invention effectively solves the need to additionally upgrade some third-party application resources during differential upgrades on Android P and later versions.

[0046] Among them, see Figure 2 The upgrade includes: first upgrading the content of partitions A and B, and then upgrading offline resources.

[0047] Upgrading the A / B partitions includes calling the native Android update_engine.

[0048] After the A / B partitions are upgraded, the slot flag is set to the backup partition, and then a reboot is performed.

[0049] After the system restarts, the A / B partitions will be switched to the target version.

[0050] Before the boot animation ends, ota_service detects the flag, sets system properties to start the upgrade process, triggers the execution of the script in init.rc, upgrades the third-party offline resources stored in partitions A / B, and upgrades the resources to the specified location of the third-party application.

[0051] Upgrading the third-party offline resources stored within partitions A and B includes:

[0052] During the upgrade, the versions of third-party resources are checked. If the target version of the resource is found to be inconsistent with the version of the resource in partitions A / B, the subsequent upgrade process is initiated.

[0053] The specific upgrade process includes:

[0054] The upgrade package is parsed through ota_service, the upgrade status is obtained from update_engine and init, and the status is returned to ota.apk;

[0055] `update_engine` is the native A / B upgrade service used to upgrade payload.bin to the backup partition.

[0056] In the Android system, the init process is the first user-space process in the system. It is started by the kernel after the system boots up and is responsible for starting the ota_service.

[0057] Upgrading partitions A and B involves parsing the upgrade package via ota_service, obtaining the upgrade status from update_engine and init, and returning the status to ota.apk.

[0058] Specifically, the new upgrade method proposed in this invention is applicable to Android N and later platforms. This is because the partition for OTA upgrades is only read-only, but third-party applications require read-write resources. The native upgrade process cannot upgrade such cases. This invention effectively solves the need to upgrade some third-party application resources during differential upgrades on Android P and later platforms by expanding the upgrade process.

[0059] This technical solution is an extension of the original upgrade solution. It requires the addition of an ext4 formatted A / B partition to store offline resource data. For convenience, it is named the tmp partition and included in the update_engine upgrade scope.

[0060] The upgrade process is divided into two parts: first upgrade the content of partitions A and B, and then upgrade the offline resources.

[0061] 1. For upgrading partitions A and B, simply call the native Android update_engine. After the dual-partition upgrade is complete, set the slot flag to the backup partition and then reboot.

[0062] 2. After the system restarts, the system partition has been switched to the target version. Before the boot animation ends, ota_service detects the flag, sets system properties to start the upgrade process, triggers the execution of the script in init.rc, upgrades the third-party offline resources stored in the tmp partition, and upgrades the resources to the specified location of the third-party application, thereby realizing the upgrade of offline resources.

[0063] During the upgrade, the versions of third-party resources will be checked. When the target version of the resource is found to be inconsistent with the version of the resource in the tmp partition, the subsequent upgrade process will be started. It is not possible to start the upgrade simply by setting the version in the tmp partition to be newer, because when the SOC needs to be rolled back, there are compatibility issues with third-party applications, and the target version of the resource needs to be rolled back synchronously.

[0064] In the specific upgrade process, the role of each functional module is as follows: Figure 3 As shown.

[0065] The ota_service service is used to parse the upgrade package, obtain the upgrade status from update_engine and init, and return the status to ota.apk.

[0066] The `update_engine` is the native A / B upgrade service used to upgrade payload.bin to the backup partition.

[0067] In the Android system, the init process is the first user-space process in the system. It is started by the kernel after the system boots up and is responsible for starting the ota_service.

[0068] The beneficial effects of the technical solution of this invention are as follows:

[0069] This addresses the limitation of Android platforms not being able to upgrade read / write partitions, enabling in-vehicle infotainment systems to upgrade third-party offline resources, thus improving system functionality. Furthermore, because differential upgrades only compare the differences between two versions, the resulting differential package size does not change significantly, keeping it within an acceptable range.

[0070] As an embodiment of the present invention, see Figure 4 This invention provides a system for upgrading offline resources based on a dual-partition mechanism, used to implement the above method, comprising:

[0071] The extension unit is used to expand upon the original upgrade scheme by adding ext4 formatted A / B partitions to store offline resource data.

[0072] The upgrade unit is used to include offline resource data within the scope of the update_engine upgrade and upgrade it.

[0073] The system for upgrading offline resources based on a dual-partition mechanism provided by this invention first extends the original upgrade scheme by adding ext4 formatted A / B partitions to store offline resource data; then, the offline resource data is included in the update_engine upgrade scope and upgraded accordingly. This invention effectively solves the need to additionally upgrade some third-party application resources during differential upgrades on Android P and later versions of the platform by expanding the upgrade process.

[0074] Specifically, the new upgrade method proposed in this invention is applicable to Android N and later platforms. This is because the partition for OTA upgrades is only read-only, but third-party applications require read-write resources. The native upgrade process cannot upgrade such cases. This invention effectively solves the need to upgrade some third-party application resources during differential upgrades on Android P and later platforms by expanding the upgrade process.

[0075] This technical solution is an extension of the original upgrade solution. The extension unit adds an ext4 formatted A / B partition to store offline resource data. For convenience, it is named the tmp partition and included in the update_engine upgrade scope.

[0076] The upgrade process of the upgrade unit provided in this embodiment of the invention is divided into two parts: first, upgrade the content of partitions A / B, and then upgrade the offline resources.

[0077] 1. For upgrading partitions A and B, simply call the native Android update_engine. After the dual-partition upgrade is complete, set the slot flag to the backup partition and then reboot.

[0078] 2. After the system restarts, the system partition has been switched to the target version. Before the boot animation ends, ota_service detects the flag, sets system properties to start the upgrade process, triggers the execution of the script in init.rc, upgrades the third-party offline resources stored in the tmp partition, and upgrades the resources to the specified location of the third-party application, thereby realizing the upgrade of offline resources.

[0079] During the upgrade, the versions of third-party resources will be checked. When the target version of the resource is found to be inconsistent with the version of the resource in the tmp partition, the subsequent upgrade process will be started. It is not possible to start the upgrade simply by setting the version in the tmp partition to be newer, because when the SOC needs to be rolled back, there are compatibility issues with third-party applications, and the target version of the resource needs to be rolled back synchronously.

[0080] In the specific upgrade process, the upgrade unit has multiple functional modules, namely the ota_service service module, the update_engine service module, and the init process module. The functions of each module are as follows: Figure 3 As shown.

[0081] The ota_service module is used to parse the upgrade package, obtain the upgrade status from update_engine and init, and return the status to ota.apk;

[0082] The update_engine service module is a native A / B upgrade service used to upgrade payload.bin to the backup partition;

[0083] The init process module is the first user-space process in the system. It is started by the kernel after the system boots up and is responsible for starting the ota_service.

[0084] The beneficial effects of the technical solution of this invention are as follows:

[0085] This addresses the limitation of Android platforms not being able to upgrade read / write partitions, enabling in-vehicle infotainment systems to upgrade third-party offline resources, thus improving system functionality. Furthermore, because differential upgrades only compare the differences between two versions, the resulting differential package size does not change significantly, keeping it within an acceptable range.

[0086] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 5 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 5 As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement any of the methods for upgrading offline resources based on a dual-partition mechanism as described in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.

[0087] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).

[0088] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.

[0089] In some embodiments, the one or more processors 101 include a field-programmable gate array.

[0090] This invention also provides a computer-readable medium. The computer-readable medium stores a computer program, which, when executed by a processor, implements the steps of any of the methods for upgrading offline resources based on a dual-partition mechanism as described in the above embodiments. The computer-readable storage medium can be volatile or non-volatile.

[0091] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described method for upgrading offline resources based on a dual-partition mechanism.

[0092] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0093] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0094] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0095] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via 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., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0096] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0097] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0098] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0099] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0101] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.

Claims

1. A method for upgrading offline resources based on a dual-partition mechanism, characterized in that, include: The original upgrade solution is extended by adding ext4 formatted A / B partitions to store offline resource data. Include offline resource data in the update_engine upgrade scope and upgrade it.

2. The method according to claim 1, characterized in that, The upgrade includes: first upgrading the content of partitions A and B, and then upgrading offline resources.

3. The method according to claim 2, characterized in that, The upgrade of the A / B partitions includes calling the native Android update_engine.

4. The method according to claim 3, characterized in that, After the A / B partition upgrade is completed, the slot flag is set to the backup partition, and then a reboot is performed.

5. The method according to claim 4, characterized in that, After the system restarts, the A / B partitions will be switched to the target version; Before the boot animation ends, ota_service detects the flag, sets system properties to start the upgrade process, triggers the execution of the script in init.rc, upgrades the third-party offline resources stored in the A / B partitions, and upgrades the resources to the specified location of the third-party application.

6. The method according to claim 5, characterized in that, The upgrade of the third-party offline resources stored in the A / B partitions includes: During the upgrade, the versions of third-party resources are checked. If the target version of the resource is found to be inconsistent with the resource version in the A / B partition, the subsequent upgrade process is initiated.

7. The method according to claim 5, characterized in that, The upgrade of the third-party offline resources stored in the A / B partitions includes: The upgrade package is parsed by ota_service, the upgrade status is obtained from update_engine and init and returned to ota.apk.

8. A system for upgrading offline resources based on a dual-partition mechanism, characterized in that, For configuring the implementation of the method as described in any one of claims 1-7, comprising: The extension unit is used to expand upon the original upgrade scheme by adding ext4 formatted A / B partitions to store offline resource data. The upgrade unit is used to include offline resource data within the scope of the update_engine upgrade and upgrade it.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 7.

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