Data updating method, installation method, device and storage medium

By identifying the identifier in the first electronic device, starting the search repair installation package and installing the adaptive version of the repair installation package on the cloud OTA server, the first application is moved from the system partition to the user data partition, solving the problem of the loss of the first application after the user is restored to the factory settings, and improving the application continuity and user experience are achieved.

CN118502775BActive Publication Date: 2025-03-14HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311692062.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-08
Publication Date
2025-03-14
Estimated Expiration
2043-12-08

AI Technical Summary

Technical Problem

In the first electronic device, after the user restores the factory settings, the system partition falls back to the version of the second version of the system installation package, resulting in the preset first application being reset and deleted, affecting the user's usage continuity.

Method used

By identifying the identifier, start the search repair installation package, obtain and install the adapted version of the repair installation package on the cloud OTA server, and relocate the first application from the system partition to the user data partition to ensure the continuity of the application.

Benefits of technology

After the first electronic device is restored to factory settings, the first application does not lose the system partition preset, ensuring that the user can continue to use the first application and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118502775B_ABST
    Figure CN118502775B_ABST
Patent Text Reader

Abstract

The present application discloses a data update method, an installation method, a device and a storage medium, and the method is applied to electronic devices and belongs to the field of communication technology. The method includes: the system partition of the first electronic device of the second version system does not include the first application, and the user data partition includes the first application, and the first application is pre-set in the system partition of the first electronic device of the first version system. The user operates the first electronic device of the second version system to restore the factory settings, restarts the first electronic device, starts the package search process to the cloud OTA server, obtains and installs the adapted version of the repair installation package from the cloud OTA server, and installs the system partition of the image file of the repair installation package. The system partition does not include the first application, and the user data partition includes the first application. In this way, it can be ensured that after the first electronic device is restored to the factory settings, the first application of the first electronic device is not lost, and the continuity of the user's use of the first application is not affected, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data updating method, an installation method, a device and a storage medium. Background Art

[0002] The system or software of the first electronic device such as a mobile phone, tablet computer, wearable device, etc. can be updated with data after the supplier releases a new version, and the user terminal needs to install the operating system for the user to use. The operating system of the first electronic device is provided by the operating system supplier. Under normal circumstances, the supplier will adjust the customized content based on the first version of the system, build a customized operating system, and adjust the system preset applications. After the first electronic device installs the customized operating system, the data is updated. The preset applications of the new and old versions of the system are different. If the user restores the factory settings, the applications cut out by the new version of the system will be reset and deleted. Therefore, a data update method for the system is required. Summary of the invention

[0003] The present application provides a data updating method, an installation method, a device and a storage medium.

[0004] Generally speaking, the first version system of the first electronic device 100 pre-installs the first application, but due to business adjustments, the first application cannot be pre-installed in the subsequent version system. The first application originally pre-installed in the system partition will be moved to the user data partition by downloading and installing the transit installation package and the second version system installation package in sequence, so that the business needs can be met, the first application is not pre-installed in the system partition, and the user's use of the first application is not affected. However, since the first application is installed in the user data partition, if the user operates the first electronic device 100 to restore the factory settings at this time, the first application in the user data partition will be reset and deleted, and the system partition will fall back to the version of the second version system installation package, which will eventually cause the first electronic device 100 to lose the first application after restoring the factory settings, reducing the continuity of the user's use of the first application. It can be understood that the first application does not exist after the first electronic device 100 is restored to factory settings, and the repair installation package is obtained and downloaded from the cloud OTA server, and the repair installation package is installed so that the user can continue to use the first application on the first electronic device 100.

[0005] Therefore, after the first electronic device 100 is restored to factory settings and restarted, the identification mark starts searching for the repair installation package, obtains and installs the repair installation package of the adapted version on the cloud OTA server, and the system partition of the second version system of the first electronic device 100 does not include the pre-installed first application, and the first application is installed in the user data partition. In this way, it can be ensured that after the first electronic device 100 operated by the user with the second version system is restored to factory settings, the pre-installed first application in the system partition of the first electronic device 100 when it was in the first version system is not lost, and the user's smooth use of the first application is not affected, thereby improving the user experience.

[0006] In a first aspect, the method is applied to a first electronic device 100, which is a second version system. The user data partition of the first electronic device 100 includes a first application. The method includes: receiving a first operation of a user, and restoring factory settings in response to the first operation of the user; the user data partition of the first electronic device does not include the first application.

[0007] Specifically, the user data partition of the first electronic device 100 of the second version system does not include the first application after restoring the factory settings, and the first electronic device 100 is restarted after installing the repair installation package. By identifying the first identifier as 1, a package search request is sent to the cloud OTA server, the repair installation package matching the first electronic device 100 is downloaded, and the repair installation package is installed, and the user data partition of the first electronic device 100 includes the first application. Record the first identifier, and before the electronic device is restarted, record whether the user data partition of the first electronic device 100 includes the preset first application; after the first electronic device 100 is restarted, start searching for packages to the cloud OTA server through the first identifier as 1. It can be understood that the mirror file of the repair installation package includes multiple data partitions, including a system partition and a user data partition, and the user data partition includes the installation file of the first application. After the first electronic device 100 successfully installs the repair installation package, the user data partition of the first electronic device 100 includes the first application, and the user can operate and use the first application on the first electronic device.

[0008] In a possible implementation, the initialization module of the first electronic device identifies the first identifier and the second identifier. It can be understood that the initialization module is an init module. If the first identifier meets the preset value, it is necessary to send a repair installation package search request to the cloud OTA server. If the first identifier does not meet the preset value, it is not necessary to send a repair installation package search request to the cloud OTA server; if the second identifier meets the preset value, the user data partition of the first electronic device before restoring the factory settings includes the first application. If the second identifier does not meet the preset value, the user data partition of the first electronic device before restoring the factory settings does not include the first application. It can be understood that the first identifier and the second identifier can be used to determine whether to download and install the repair installation package from the cloud OTA server, so that the repair of the first application is more targeted.

[0009] In a possible implementation, the first electronic device is initially preset to a first version system, and the first electronic device is upgraded or data is updated to a second version system by downloading and installing a second version system installation package from an OTA server.

[0010] In a possible implementation, the installation package includes an image file, which includes a single application or multiple applications. The image file includes a first application, which is pre-installed in a system partition of a first version system and is deleted in a system partition of a second version system due to business adjustments.

[0011] In a possible implementation, the system partition is used to store and run pre-installed system applications, the system partition of the first version system is pre-installed with the first application, and the system partition of the second version system is not pre-installed with the first application. System applications are generally system pre-installed applications, and exemplary system applications include system settings, system themes, etc.

[0012] In one possible implementation, the user data partition is used to store and run pre-installed non-system applications, the user data partition of the first version system does not pre-install the first application, and the user data partition of the second version system installs the first application. Non-system applications are usually third-party applications, and exemplary non-system applications include wallet applications, sports and health applications, or application markets.

[0013] In a possible implementation, a user operates the first electronic device to restore factory settings, and the user data partition of the first electronic device after the factory settings are restored does not include the first application.

[0014] In a possible implementation, the system version number is identified to be greater than or equal to a first version number threshold, the first application is relocated to the user data partition, and the first application is mounted and becomes effective. The first version number threshold is used to update the version control installation package, and whether to update the data is determined by the increase or decrease of the version number.

[0015] In a possible implementation, the first electronic device downloads the second version system installation package from the cloud OTA server, and the system partition of the image file of the second version system installation package does not include the first application.

[0016] In a possible implementation, the first electronic device downloads a repair installation package from a cloud OTA server, and a user data partition of an image file of the repair installation package includes the first application.

[0017] In one possible implementation, restoring factory settings means that the first electronic device 100 is reset to the first version system or the second version system, the system partition is reset to the system of the first version system installation package or the second version system installation package, and the user data partition is reset and deleted, that is, the programs, data, settings, etc. downloaded, installed and used by the user during use are deleted.

[0018] The installation package includes a transit installation package, a second version system installation package, and a repair installation package, wherein the system partition and the user partition of the transit installation package both include the first application, the user data partition of the repair installation package includes the first application, and the system partition of the second version system installation package does not include the first application.

[0019] In a possible implementation, the system partition and the user data partition of the first electronic device 100 of the first version system both include the first application, the first application of the system partition is in an effective state, and the first application of the user data partition is in an invalid state; the first electronic device 100 obtains the second version system installation package from the cloud OTA server, the system partition of the second version system installation package is the second version system, and the second version system installation package does not include the first application; the second version system installation package is installed, the system version of the first electronic device 100 is updated to the second version system, and the first application of the user data partition becomes effective.

[0020] In one possible implementation, the system partition of the first electronic device 100 of the second version system includes a first application, the first application is in an effective state, and the user data partition does not include the first application; the first electronic device 100 obtains the transit installation package from the cloud OTA server, the system partition of the transit installation package is the first version system, and the system partition and the user data partition of the transit installation package both include the first application; the transit installation package is installed, the system version of the first electronic device 100 is the first version system, the system partition and the user data partition both include the first application, and the first application of the system partition is in an effective state.

[0021] In a possible implementation, the transit installation package, or the second version system installation package, or the repair installation package is decompressed and installed to generate an installation completion file, where the installation completion file is used to indicate that the installation of the first application or system is complete.

[0022] In a possible implementation, exemplarily, the first identifier OEMINFO_DG_IMG_RESUME is set to a first value to indicate that the first application needs to be installed in the user data partition, and the first identifier OEMINFO_DG_IMG_RESUME is set to a second value to indicate that the first application does not need to be installed in the user data partition. The second identifier OEMINFO_DG_IMG is set to a third value to indicate that the user data partition of the first electronic device 100 before restoring factory settings includes the first application, and the second identifier OEMINFO_DG_IMG is set to a fourth value to indicate that the user data partition of the first electronic device 100 before restoring factory settings does not include the first application.

[0023] In a possible implementation, illustratively, the first value may be set to 1, and the second value may be set to 0, or other values, which are merely illustrative here.

[0024] In a possible implementation, the installation package downloaded from the cloud OTA server includes a transit installation package, or a second version system installation package, or a repair installation package, and the installation package includes an image file.

[0025] In a second aspect, a data update system is applied to a first electronic device 100 and a cloud OTA server, the method comprising: the cloud OTA server receives and stores the installation package, receives a package search request from the first electronic device 100, matches the installation package with a version adapted to the first electronic device 100, and the cloud OTA server transmits the installation package to the first electronic device 100;

[0026] The first electronic device 100 receives the installation package adapted to the first electronic device 100 and sent by the cloud OTA server, the system partition of the first version system of the first electronic device 100 is pre-set to include the first application, the system partition of the second version system of the first electronic device 100 is pre-set to not include the first application, and the user data partition of the second version system of the first electronic device 100 controls the first application; the installation package includes a transit installation package, or a second version system installation package, or a repair installation package.

[0027] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements any of the above methods when executed by the processor.

[0028] In a fourth aspect, a chip is provided, comprising a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit them to the processing circuit, and the processing circuit is used to run the code instructions so that the chip system executes any of the methods described above.

[0029] In a fifth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the data updating method of any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a schematic diagram showing an exemplary interaction between a terminal side and a server side for data update;

[0031] Figure 2 is a schematic diagram of another process of updating data on the terminal side and the server side;

[0032] Figure 3 It is a flowchart of a method for updating data of an electronic device provided in an embodiment of the present application;

[0033] Figure 4 It is a flowchart of another electronic device data updating method provided in an embodiment of the present application;

[0034] Figure 5 It is a flowchart of another electronic device data updating method provided in an embodiment of the present application;

[0035] Figure 6 It is a flowchart of another electronic device data updating method provided in an embodiment of the present application;

[0036] Figure 7 is a schematic diagram of a software framework of an electronic device provided in an embodiment of the present application;

[0037] Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0039] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.

[0040] Before describing in detail the data updating method provided in the embodiment of the present application, the application scenario and implementation environment involved in the embodiment of the present application are described first.

[0041] The first electronic device 100 such as a mobile phone, a tablet computer, a wearable device, etc. needs to update the system or software of the first electronic device 100 according to the installation package released by the supplier. For example, the first electronic device 100 can use OTA (over the air, air download) technology to achieve data update. OTA technology is a technology for downloading and updating data through a wireless network. OTA technology is a technology for remotely updating the object to be updated of the first electronic device 100 through the wireless network interface of the first electronic device 100, so as to achieve remote data update of the system or software of the first electronic device 100. The installation package involved in the OTA air download upgrade technology process includes: a transfer installation package, or a second version system installation package, or a repair installation package, or a rollback installation package, etc. The installation package is a data update installation package required for the data update of the first electronic device 100. By downloading and installing it from the cloud OTA server to the first electronic device 100, the functional defect repair, function optimization, system upgrade and data update of the application, operating system and system parameters are completed, which belongs to a convenient and fast upgrade and repair data update method. It should be understood that the first electronic device 100 may also use other technologies to implement data update, such as SD, OTG, USB, flashing software, etc. to update data.

[0042] Please refer to Figure 1 , Figure 1 FIG. 1 is a schematic diagram showing an exemplary interaction between a terminal side and a server side for updating data. Figure 1As shown, the first electronic device 100, the cloud OTA server 200 and the packet-snapping server 300 are included. The first electronic device 100, the cloud OTA server 200 and the packet-snapping server 300 can communicate with each other through a wired network or a wireless network.

[0043] Among them, the package server 300 is a device for making and uploading installation packages, such as an electronic device or a server. The cloud OTA server 200 is a device for receiving, storing and publishing installation packages, such as an electronic device or a server. The first electronic device 100 is a device for downloading and installing installation packages, such as an electronic device or a server. In addition, the first electronic device 100 matches the installation package of the adapted version on the cloud OTA server 200, downloads it to the local of the first electronic device 100 and installs it, and the first electronic device 100 can update data according to the installation package.

[0044] The first electronic device 100 can download the installation package by actively sending a request to the cloud OTA server 200, matching the installation package of the adapted version, and downloading and installing it, such as: application software update, etc.; or receiving the installation package download instruction sent by the cloud OTA server 200, the user operates the first electronic device 100 to choose whether to download the installation package, such as: system patch update, etc.; or the cloud OTA server 200 forcibly releases the installation package to the first electronic device 100, such as: security vulnerability patch, etc.; the first electronic device 100 is a device for downloading and installing the installation package, which can be the first electronic device 100 or a server, etc. Among them, the first electronic device 100 can be a mobile phone, a tablet computer, a computer, a wearable electronic device, or a single server, or a cluster composed of multiple servers, which is not limited in this application. Exemplarily, the package server 300 makes an installation package for the object to be updated, uploads the installation package to the cloud OTA server 200, and is stored by the cloud OTA server 200. The first electronic device 100 matches the installation package of the adapted version from the cloud OTA server 200, downloads the installation package to the local, and the first electronic device 100 updates the version of the object to be updated according to the installation package. It can be understood that the object to be updated is the system, or the application software, or the data and system configuration, etc. The package server 300 provides the installation package to the cloud OTA server 200, and the installation package is used for the first electronic device 100 to update the data. The cloud OTA server 200 is a single server, or a cluster composed of multiple servers. The package server 300 is a single server, or a cluster composed of multiple servers. Exemplarily, the installation package published by the first electronic device 100 to the cloud OTA server 200 is that the first electronic device 100 actively uploads it to the cloud OTA server 200 after making the installation package, or after the first electronic device 100 initiates a request to obtain the installation package to the cloud OTA server 200, the cloud OTA server 200 publishes the installation package to the first electronic device 100.

[0045] The first application described in this article refers to the first application.img, that is, the first application image file, as shown in the attached Figures 2 to 5The first application is .img. The img format is a file compression format (archive format), which is mainly used to create a disk image file (disk image). It can be used to compress the contents of an entire floppy disk (usually a floppy disk, Floppy Disk or Diskette) or an entire CD. Files with the ".img" extension are created in this file format. The .img file format can be considered a superset of the .iso format. File type: img is the Android system image file format, that is, the file format used to install, update or backup the system; Application scenarios: files in img format are usually used in scenarios such as electronic device system updates or customized ROMs that require operations on electronic device systems; File structure: files in img format usually contain a complete image of the system; For example, the system image system.img is the most commonly used image for address ROM, which is used to store the core files of the system, and system.img is the image of the system directory of the electronic device. The image contains the main directories and files of the system, and these files are usually not allowed to be modified; the user data image userdata.img will be mounted to the user data partition directory, which contains all application-related applications, data or configuration files, as well as user-related data; the first application.img is the first application image, which is set in the system partition or user data partition of the installation package. After the first electronic device 100 completes the installation of the installation package, the first application image is mounted to the system partition or user data partition directory of the first electronic device 100.

[0046] It can be seen from the above description that the installation package includes data update files, such as patch files, image files, authentication identifiers, installation files, etc. Specifically, the installation package usually sets a system partition and a user data partition, wherein the system partition is used to deploy preset system-related programs, settings, and data, etc., and the user data partition is used to deploy preset non-system-related programs, settings, and data, etc. After the installation package is installed on the first electronic device 100, the programs, settings, and data preset in the system partition of the installation package update the programs, settings, and data of the system partition of the first electronic device 100, and the programs, settings, and data preset in the user data partition of the installation package update the programs, settings, and data of the user data partition of the first electronic device 100.

[0047] It can be understood that the first electronic device 100 is set with a system partition and a user data partition. The system partition can store and run preset system-related applications. When the user restores the factory settings, the system partition and the user data partition will be reset. Usually, the system partition stores the latest downloaded installation package from the cloud server, and the system partition is reset to the system version of the latest downloaded installation package. The user data partition stores and runs non-system-related applications. The applications downloaded and installed by the user during use are installed and saved in the user data partition. When the user restores the factory settings, the user data partition is reset.

[0048] In addition, it should be noted that in actual applications, if the user data partition of the operating system needs to be updated, the installation package downloaded from the cloud OTA server through the OUC application includes not only the data update files corresponding to the system partition to be updated, but also the data update files corresponding to the user data partition to be updated.

[0049] Taking the update of the operating system as an example, if both the system partition and the user data partition of the operating system of the first electronic device 100 need data updates, the OUC application downloads the installation package from the cloud OTA server, and the installation package obtained needs to include update files for the user data partition and update files for the system partition.

[0050] Accordingly, when the user data partition needs to be updated and the system partition does not need to be updated, the obtained installation package includes the installation file of the user data partition but does not include the installation file for updating the system partition.

[0051] See also Figure 2 , Figure 2 1 is another schematic diagram of a process of updating data on a terminal side and a server side, showing a process of updating data interactively between an electronic device 100 and a cloud OTA server 200.

[0052] S203 . The system partition of the first electronic device 100 installs the first version system, preinstalls the first application in the system partition, and initiates an installation package data update request to the cloud OTA server 200 .

[0053] S204: The cloud OTA server 200 has stored the second version system installation package, and searches the cloud OTA server for an installation package of a version compatible with the first electronic device 100. The system partition of the second version system installation package does not include the first application.

[0054] S205: The first electronic device 100 downloads the second version system installation package from the cloud OTA server 200, and the system partition of the first electronic device 100 that installs the second version system installation package is updated to not include the first application.

[0055] See also Figure 3 , Figure 3 1 is a flow chart of a method for updating data of an electronic device provided in an embodiment of the present application, showing a process of updating a data installation package between a first electronic device 100 and a cloud OTA server 200.

[0056] Exemplarily, the version number of the first version system is 1.0.0, and the first version system is a system in which the first application is pre-installed in the system partition. Due to business needs, the version number of the second version system is 2.0.0, and the second version system is a system in which the first application is no longer pre-installed in the system partition.

[0057] First, refer to Figure 3 In steps S201 to S205, the first application pre-installed in the system partition of the first electronic device 100 is moved to the user data partition, thereby cutting the pre-installed first application in the system partition of the first electronic device 100. Exemplarily, a first application is pre-installed in the system partition of a first version system 1.0.0 of a first electronic device 100, and the first electronic device 100 initiates an installation package search and download request to a cloud OTA server 200, and the cloud OTA server 200 matches an adapted version for the first electronic device 100, and both the system partition and the user data partition of the transit installation package adapted to the system version of the first electronic device 100 include the first application, and the first electronic device 100 obtains and installs the transit installation package of the adapted version, at which point both the system partition and the user data partition of the first electronic device 100 include the first application, the first application in the system partition is in an effective state, and the first application in the user data partition is in an ineffective state; the first electronic device 100 obtains a second version system 2.0.0 installation package from the cloud OTA server 200, and the system partition of the second version system 2.0.0 installation package does not include the first application; the first electronic device 100 obtains and installs the second version system 2.0.0 installation package, and the system partition does not include the first application, and the user data partition includes the first application. In this way, the first application pre-installed in the system partition of the first electronic device 100 of the first version system 1.0.0 is moved to the user data partition of the first electronic device 100 of the second version system 2.0.0, and the pre-installed first application in the system partition of the first electronic device 100 is trimmed and deleted, which can cancel the pre-installed first application in the system partition of the first electronic device 100 of the second version system 2.0.0, thereby meeting business needs, and allow users to continue to use the first application, thereby maintaining the continuity of the user experience.

[0058] Then, refer to Figure 3In steps S205 to S206, when the user operates the first electronic device 100 to restore the factory settings, the first electronic device 100 is reset to the second version system 2.0.0, but the system partition of the second version system 2.0.0 does not include the first application, and the first application of the user data partition before restoring the factory settings is reset and deleted in the user partition after restoring the factory settings, which will cause the first application of the first electronic device 100 to be lost and the user cannot use the first application. It can be understood that the first application is a wallet application, or a sports health application, or a video application, etc. The first application includes the user's personal information, or an account balance, or a transaction bill, or sports information, etc. The loss of the first application in the first electronic device 100 of the second version system restored to factory settings will affect the user's experience of using the first application.

[0059] Finally, refer to Figure 3 In steps S207 to S208, in order to solve the problem of the first application being lost after restoring the factory settings, the first electronic device 100 restores the factory settings, updates the system identification status, restarts the first electronic device 100, triggers the sending of a package search and download request to the cloud OTA server according to the system identification status, and the first electronic device 100 searches the cloud OTA server 200 for a repair installation package of a version compatible with the first electronic device 100, downloads and installs the repair installation package, and the user data partition of the first electronic device 100 after installation includes the first application, and the system identification status is updated. In this way, the system partition of the first electronic device 100 of the second version system does not include the first application, and the user data partition includes the first application, which meets the business requirements, cancels the preset first application in the system partition of the first electronic device 100 of the second version system 2.0.0, and satisfies the continuity of the user's use of the first application.

[0060] Generally speaking, considering the user journey of the first electronic device 100, the pre-installed applications in the system partition of the first version system and the second version system of the first electronic device 100 are different, and the first electronic device 100 is updated from the first version system 1.0.0 to the second version system 2.0.0, and the scenario in which the user restores the factory settings is indispensable in the product life cycle. The embodiment of the present application proposes a method for updating data of an electronic device, for which the first application has been moved from the system partition to the user data partition, and the first application is the first application stored in the system partition of the first version system 1.0.0, after the first version system 1.0.0 is restored to the factory settings, the first electronic device 100 is triggered to search and download packages from the cloud OTA server 200, the first electronic device 100 obtains the repair installation package of the adapted version from the cloud OTA server 200, and installs the repair installation package on the first electronic device 100, and the user data partition of the first electronic device 100 of the second version system 2.0.0 includes the first application.

[0061] It can be understood that the first electronic device 100 is updated from the first version system 1.0.0 to the second version system 2.0.0. If the user data partition of the first electronic device 100 updated to the second version system 2.0.0 includes the first application, the user operates the first electronic device 100 to perform factory reset, and after the first electronic device 100 completes the restart, it obtains the adapted version of the repair installation package from the cloud OTA server 200, the user data partition of the repair installation package includes the first application, which is downloaded and installed in the user data partition of the first electronic device 100, and the user data partition of the first electronic device 100 includes the first application, thereby ensuring the continuity of the user's use of the first application of the first electronic device 100.

[0062] It is understandable that the operating system of the first electronic device 100 is the Android OS operating system, or the Apple iPhone OS operating system, or the Microsoft Windows operating system, or the Hongmeng Harmony OS operating system, which is not limited in this application.

[0063] The first application in this article represents the first application .img, which represents a single application, or an image file of a collection of multiple applications, or represents application data, system configuration, etc.; it can be understood that the first application is successfully installed after the user data partition of the first electronic device 100 is decompressed, and the first application installed by the user and personal daily usage data of the user who deleted the user data partition are also reset and deleted.

[0064] Next, refer to Figure 3 The data update process is introduced in detail.

[0065] S201. The first electronic device 100 is a first version system 1.0.0.

[0066] The first electronic device 100 is a first version system 1.0.0, a first application is preinstalled in the system partition, the first application is in a valid state, and a user can operate and use the first application on the first electronic device 100.

[0067] S202 . The cloud OTA server 200 has uploaded and stored a transfer installation package of a version compatible with the first electronic device 100 .

[0068] The system partition and the user data partition of the transit installation package of the version adapted to the first electronic device 100 are both pre-installed with the first application. After the transit installation package is installed, the user data partition of the first electronic device 100 is updated with the newly added first application.

[0069] S203: The first electronic device 100 obtains and installs a transit installation package of an adapted version, and adds a first application to the user data partition, but the first application does not take effect.

[0070] The first electronic device 100 downloads the adapted version of the transit installation package through the cloud OTA server 200, and the system partition and the user data partition pre-set in the transit installation package both include the first application. The first electronic device 100 completes the installation of the transit installation package, at which time the system partition and the user data partition of the first electronic device 100 both include the first application, the first application of the system partition is in effect, and the first application of the user data partition is in an ineffective state.

[0071] S204: The cloud OTA server 200 has uploaded and stored a second version system installation package adapted for the first electronic device 100, and the system partition of the second version system installation package does not include the first application.

[0072] The first application pre-installed in the system partition of the first electronic device 100 of the first version system 1.0.0 is no longer a pre-installed application in the system partition of the second version system 2.0.0 due to business adjustments, that is, the first application originally pre-installed in the system is cut out of the pre-installed first application in the subsequent update version system. It can be understood that the main difference between the first version system 1.0.0 and the second version system 2.0.0 of the first electronic device 100 in this solution is: the system partition of the first version system 1.0.0 is pre-installed with the first application, and the system partition of the second version system 2.0.0 is not pre-installed with the first application. The version system numbers 1.0.0 and 2.0.0 in this solution only represent the difference in the version system, and do not represent specific version upgrade restrictions. The above-mentioned version systems 1.0.0 and 2.0.0 do not represent specific version system numbers, but are only used as a method of indicating system versions, which can represent different system partition installation contents or the same system partition installation contents.

[0073] The first electronic device 100 obtains and downloads the second version system installation package that is compatible with the first electronic device 100 from the cloud OTA server 200, and the system partition of the second version system installation package does not include the first application. The second version system installation package is used to update the system partition of the first electronic device 100, and the system version of the first electronic device 100 is updated to 2.0.0; if the first electronic device 100 starts to restore the factory settings, since the first electronic device 100 has downloaded and stored the second version system installation package, the first electronic device 100 restores the factory settings to reset and update to the second version system 2.0.0, and the factory settings will not be reset and updated to the first version system 1.0.0.

[0074] S205. The first electronic device 100 downloads and installs the second version system installation package. The system partition of the first electronic device 100 is updated to the second version system 2.0.0. The first application of the system partition is reset and deleted. The first application of the user data partition is retained and updated to an effective state. The user can use the first application of the first electronic device 100.

[0075] It can be understood that the above steps S201 to S205 complete the migration of the first application of the first electronic device 100 from the system partition to the user data partition. After the first application is migrated, it does not affect the user's use of the first application, and also meets the business adjustment requirements. The system partition of the first electronic device 100 in the second version system 2.0.0 cuts out the first application preset in the system partition of the first version system 1.0.0. However, during the user's journey, the first electronic device 100 after the migration may be triggered by the user's operation to restore the factory settings. When the user restores the factory settings, the first application saved in the user data partition will be reset and deleted, which will cause the first application to be lost.

[0076] After step S204, the second version system installation package is downloaded and installed, and the system version of the first electronic device is updated from the first version system 1.0.0 system version in S203 to the second version system 2.0.0 in S205.

[0077] S206: The user operates the first electronic device 100 on which the first application has been installed in the user data partition to restore factory settings.

[0078] The user restores the factory settings of the first electronic device 100 on which the first application has been installed in the user data partition. The first application in the user data partition of the first electronic device 100 is reset and deleted, and the system partition is reset to the most recently downloaded second version system installation package 2.0.0. At this time, the second identifier OEMINFO_DG_IMG=0 is written, and the first identifier OEMINFO_DG_IMG_RESUME=1 is written. Neither the system partition nor the user data partition of the first electronic device 100 includes the first application, that is, the first electronic device 100 does not include the first application, and the user cannot use the first application.

[0079] It can be understood that the first application pre-installed in the system partition of the first version system 1.0.0 of the first electronic device 100 can be bound to the user's account information, wallet assets, personal sports records, etc. The user may have formed a habit of using the first application, but due to the user's operation to restore the factory settings, the first electronic device 100 loses the first application, which will reduce the user experience. At this time, a data update method is needed to download and install the first application for the first electronic device 100 to maintain the user's continuity of use.

[0080] After the reset, the first electronic device 100 identifies the first identifier. If the first identifier OEMINFO_DG_IMG_RESUME=1, the first electronic device 100 starts searching for packages in the cloud OTA server 200, matches the repair installation package of the adapted version of the first electronic device 100, and executes step S207; if the first identifier OEMINFO_DG_IMG_RESUME=0, the cloud OTA server 200 is not started to search for packages, and the process ends;

[0081] S207 . The cloud OTA server 200 has uploaded and stored a repair installation package that is compatible with the version of the first electronic device 100 .

[0082] The first electronic device 100 matches a repair installation package of an adapted version in the cloud OTA server 200 . The repair installation package includes the first application only in the user data partition. The repair installation package is used to install the first application in the user data partition of the first electronic device 100 .

[0083] S208. The first electronic device 100 obtains a repair installation package of an adapted version from the cloud OTA server 200. After installing the repair installation package, the user data partition of the first electronic device 100 is updated to add a new first application, and the first application is in effect.

[0084] The first electronic device 100 obtains a repair installation package of an adapted version from the cloud OTA server 200, and the repair installation package includes a first application in the user data partition. The first electronic device 100 installs the repair installation package and installs the first application in the user data partition. The first application is in an effective state, and the user can access and operate the first application in the first electronic device 100.

[0085] It can be understood that the first electronic device 100 is the second version system 2.0.0, the user operates the first electronic device 100 to perform the factory reset operation, obtains the repair installation package of the adapted version from the cloud OTA server 200, and installs it in the user data partition of the first electronic device 100, and the first electronic device 100 is reset to the second version system 2.0.0, the system partition does not include the first application, and the user data partition includes the first application. It is ensured that the user can continue to use the first application preset in the system partition of the first version system 1.0.0 on the first electronic device 100, without affecting the continuity of the user's use of the first application.

[0086] It can be understood that each of the above steps can be reasonably combined and adjusted in execution order according to actual conditions, or several steps can be combined and executed. Exemplarily, the first electronic device 100 is the second version system 2.0.0, the user data partition includes the first application, and after the factory settings are restored successfully, the first identifier OEMINFO_DG_IMG_RESUME=1 is written, the first electronic device 100 restarts, and the first identifier OEMINFO_DG_IMG_RESUME=1 is identified, then the repair installation package of the adapted version is obtained from the cloud OTA server 200, the first electronic device 100 downloads and installs the repair installation package, and the first application of the data user data partition of the repair installation package is installed in the user data partition of the first electronic device 100, and the first application is in an effective state, that is, after the first electronic device 100 is restored to factory settings, the user can still operate the first electronic device 100 to use the first application.

[0087] It can be understood that in another embodiment, if the first electronic device 100 has never installed the first version system, that is, the first electronic device 100 has never installed the first version system 1.0.0, and the originally installed version is the second version system 2.0.0, that is, the system partition of the first electronic device 100 has never been pre-installed with the first application. The first identifier OEMINFO_DG_IMG_RESUME=0, without the processing step of being written to 1, indicates that after the first electronic device 100 is restored to factory settings, the first electronic device 100 recognizes the first identifier OEMINFO_DG_IMG_RESUME=0, does not start searching for packages to the cloud OTA server, does not install the repair installation package, that is, the first application is not installed in the user data partition, that is, the system partition of the first electronic device 100 of the second version system is not pre-installed with the first application, and there is no need to install the repair installation package to install the first application in the user data partition of the first electronic device 100 of the second version system.

[0088] Please refer to Figure 4 , Figure 4 It is a flowchart of another electronic device data updating method provided in an embodiment of the present application.

[0089] Starting from the user journey, the specific plan is divided into 3 steps.

[0090] S301: The first electronic device 100 is the second version system 2.0.0, and the user operates the electronic device 100 to restore the factory settings.

[0091] Before the user performs a factory reset, when the user data partition of the first version system includes the first application, the second identifier OEMINFO_DG_IMG=1 is written, indicating that the user data partition of the first electronic device 100 before the factory reset includes the first application; when the user data partition of the first electronic device 100 of the first version system does not include the first application, OEMINFO_DG_IMG=0 is written, indicating that the user data partition of the first electronic device 100 before the factory reset does not include the first application;

[0092] Ways to restore to factory settings include, but are not limited to, restoring to factory settings through an SD card (Secure Digital Memory Card), OTG (On The Go), USB (Universal Serial Bus), etc.

[0093] Restoring the factory settings is to reset the first electronic device 100 to the first version system 1.0.0 or the second version system 2.0.0. For example, the first version system 1.0.0 represents the preset system version state when the device is first purchased and powered on, and the second version system 2.0.0 represents the system version state when the second version system installation package is downloaded and installed from the cloud OTA server. All data, settings and applications will be reset and deleted.

[0094] The system partition is used to store basic applications, settings and data required for the operation of the electronic device system, such as operating systems, drivers, configuration files, interface UI, etc. It also stores the first version system installation package or the second version system installation package. When the user restores the factory settings, the first version system installation package or the second version system installation package is rolled back and installed, and the first electronic device rolls back to the first version system or the second version system. The installation package is usually provided by the electronic device supplier. The user data partition (Userdata) is used to store the user's personal data, such as applications installed by the user, pictures, documents, videos and other personal data saved by the user. The saved personal data does not participate in the system data updated by the system and will be reset and deleted during the factory settings restoration process.

[0095] If the first electronic device 100 is successfully restored to factory settings, that is, all applications, data and settings are successfully installed, and an "Installation Completed" file is generated so that the subsequent data update steps can be continued. If the first electronic device 100 is not successfully restored to factory settings, that is, all applications, data and settings are not installed, for example, 10 application images are compressed in the installation package, 4 of which are decompressed and installed, and the remaining 6 applications are not decompressed and installed, and the first electronic device 100 is low on power and shuts down, the "Installation Successful" file is not generated, and the subsequent data update steps are terminated. In the case where the "Installation Successful" file is not generated, the user operates the first electronic device 100 to restore the factory settings. During the process, power outages or other states may occur, and some applications may be successfully restored, while others may fail to be restored. Or it is not fully restored. In this case, the node with the first identifier OEMINFO_DG_IMG_RESUME=0 is written, indicating that no repair is required. The user can continue to perform the factory reset steps to complete the factory reset operation, that is, all the compressed image files in the installation package are decompressed and installed, and a "successful installation" file is generated. At this time, the first identifier OEMINFO_DG_IMG_RESUME=1 is written.

[0096] S302: After the first electronic device 100 is restored to factory settings successfully, it identifies a second identifier OEMINFO_DG_IMG=1.

[0097] After the first electronic device 100 is successfully restored to factory settings, the "Installation Completed" file is identified. If the second identifier OEMINFO_DG_IMG=1 is identified, step S303 is executed; if the second identifier OEMINFO_DG_IMG=0 is identified, step S308 is executed and the process ends. The second identifier OEMINFO_DG_IMG=1 indicates that the user data partition of the first electronic device before restoring the factory settings includes the first application, so it is necessary to perform the subsequent search and download repair installation package steps, and the first application needs to be installed; the second identifier OEMINFO_DG_IMG=0 indicates that the user data partition of the first electronic device before restoring the factory settings does not include the first application, so it is not necessary to perform the subsequent search and download repair installation package steps, and the first application does not need to be installed.

[0098] S303 , if the second flag OEMINFO_DG_IMG=1, write the second flag OEMINFO_DG_IMG=0, and write the first flag OEMINFO_DG_IMG_RESUME=1.

[0099] At this time, the second identifier OEMINFO_DG_IMG=0 indicates that the subsequent update step has been determined by the second identifier OEMINFO_DG_IMG=1, and OEMINFO_DG_IMG has been updated from 1 to 0. When the second identifier OEMINFO_DG_IMG=0 of the first electronic device 100 and the first identifier OEMINFO_DG_IMG_RESUME=1, step S304 is continued. The first identifier OEMINFO_DG_IMG_RESUME=1 is used to start the execution step of searching for the repair installation package from the cloud OTA server after the first electronic device 100 is restarted.

[0100] S304: Restart the first electronic device 100.

[0101] S305 , identifying the first flag OEMINFO_DG_IMG_RESUME=1 or OEMINFO_DG_IMG_RESUME=0.

[0102] When the first identifier OEMINFO_DG_IMG_RESUME=1 is identified, step S306 is executed, and the first electronic device 100 starts searching the cloud OTA server for a repair installation package process instruction.

[0103] Identify the first identifier OEMINFO_DG_IMG_RESUME=0, execute step S308, and the process ends. Initialize the loading of the init module at the system library layer, the init module includes the first identifier OEMINFO_DG_IMG_RESUME and the second identifier OEMINFO_DG_IMG, identify the second identifier OEMINFO_DG_IMG=1 and the first identifier OEMINFO_DG_IMG_RESUME=0, the second identifier OEMINFO_DG_IMG sets the second identifier attribute msc.dg.img, the first identifier OEMINFO_DG_IMG_RESUME sets the first identifier attribute msc.dg.img.resume, the second identifier attribute and the first identifier attribute are used by OUC applications or other applications above the framework layer Framework.

[0104] S306: The first electronic device 100 starts a package search program and matches a repair installation package of a version adapted for the first electronic device 100 on the cloud OTA server.

[0105] The installation package supplier produces an installation package based on the package shooting server 300, produces an installation package that is compatible with the system version of the first electronic device 100, and uploads and publishes it to the cloud OTA server 200 through the package shooting server 300. The first electronic device 100 can initiate a package search request to the cloud OTA server 200, match the installation package of the version compatible with the first electronic device 100, and download it to the first electronic device, install the installation package to update the first electronic device 100, and execute step 307.

[0106] S307, the first electronic device 100, the first electronic device 100 of different system versions can download the repair installation package from the cloud OTA server 200 through the OUC, and the first electronic device 100 completes the installation of the repair installation package, indicating that the first application exists in the user data partition of the first electronic device 100, and the user operates the first electronic device 100 to use the first application, and the first application is not lost due to the factory reset operation. Exemplarily, the version system 1.0.0, 2.0.0 represents the system version number, 1.0.0, 2.0.0, 2.3.5 or 3.0.11 refers to any system version number, and the first version system is upgraded to the second version system, which can represent the upgrade relationship of the version system, application, data or settings. There is a difference between the first version system and the second version system: the system partition of the first version system includes the first application, and the system partition of the second version system does not include the first application, and step S308 is executed.

[0107] S308: The process ends.

[0108] Please refer to Figure 5 , Figure 5 It is a flowchart of another electronic device data updating method provided in an embodiment of the present application.

[0109] S401, the first electronic device 100 obtains a repair installation package from the cloud OTA server 200 through OTA technology. Figure 3 Step S207.

[0110] The second version system installation package obtained by the first electronic device 100 has a version number of 2.0.0. The process of making the second version system installation package is to package the data packets from the bottom layer to the top layer in sequence, first package the bottom layer package and then package the upper layer layer by layer, and finally package the whole package. Exemplarily, the third layer is packaged first, then the second layer is packaged in sequence, and finally the first layer is packaged. Exemplarily, the third layer update_cota_normal.zip needs to be packaged first, and then the second layer update_base.zip needs to be packaged, the system version configuration is modified to adapt, and finally the first layer UpdateBasePackage.zip is packaged as a whole.

[0111] The installation package structure schematically includes S40101 to S40111, which are shown as follows:

[0112] S40101: UpdateBasePackage.zip, indicating the complete package of the installation package, including the following S40102 to S40111.

[0113] S40102: --filelist.xml, refresh the installation space size size, change packageSolution to dcota.

[0114] S40103: --changelog.xml, records the installation package update log.

[0115] S40104: --update_base.zip, indicates the update base package in the installation package, including the following S40105 to S40111.

[0116] S40105: ------payload.bin, system-related content, such as system files and applications, occupies a large amount of storage space.

[0117] S40106: ------payload_properties.txt, system related content.

[0118] S40107:------META-INF.

[0119] S40108: ------SOFTWARE_VER.mbn, software version information, SD card downgrade.

[0120] S40109: ------VERSION.mbn, authentication information.

[0121] S40110: ------only_cota_version.tag, installation package identifier.

[0122] S40111: ------update_cota_normal.zip, a compressed package for updating data, does not configure the display version number & msc.cota.config = false.

[0123] It can be understood that the structure of the above installation package is only for illustrative purposes and does not constitute a specific limitation on the installation package.

[0124] S402, Update_engine update.

[0125] The first electronic device 100 starts the update_engine module of the system library to perform data update, including but not limited to update installation, signature correction, authentication verification, upgrade failure enrichment, upgrade failure recovery, version management, upgrade management and other modules.

[0126] S403, identify the noly_cota_version.tag tag of the repair installation package, and the installation process is as follows S4031 to S4035:

[0127] S4031. Complete the authentication of the update_base.zip package through the noly_cota_version.tag signature verification and VERSION.mbn authentication.

[0128] S4032. After decompressing update_cota_normal.zip, store it in the directory / data / update / ATL / 5678.

[0129] S4033. Install the installation package in the directory / data / cota / cota_normal / reboot_update.

[0130] S4034, skipping the authentication of the update_cota_normal.zip package through the magic word "5678", that is, recognizing that there is a subdirectory named "5678" in the directory / data / update / ATL / 5678, there is no need to authenticate the update_cota_normal.zip package, and the update_base.zip package in the upper layer has passed the authentication process, which can ensure the security and legality of the installation package, so the sub-compressed package update_cota_normal.zip of update_base.zip does not need to be authenticated.

[0131] S4035. Completely decompress the first application in the update_cota_normal.zip compressed package. The first application is successfully installed, and an "installation completed" file is generated to implement power-off protection.

[0132] Unzip the first application from the update_cota_normal.zip package. The first application is one application or a collection of multiple applications. Generally speaking, the update_cota_normal.zip package occupies a large amount of memory space in the electronic device, exceeding hundreds of megabytes (Mebibyte, 1MB=1024KB). The process of decompressing the update_cota_normal.zip compressed package takes a long time. The specific size of the memory space occupied is related to the actual size of the first application.

[0133] For example, since it takes a long time to decompress update_cota_normal.zip, the first electronic device 100 may shut down due to insufficient power during the decompression process. If it is shut down without decompression and installation, the decompression and installation process is terminated. If the first application is not decompressed or partially decompressed, the "installation completed" file will not be generated. After the first electronic device 100 installs the installation package, it restarts to execute step S403, starts to detect the "installation completed" file, and if the "installation completed" file exists, it continues to execute step S406. If the "installation completed" file does not exist, the process ends; read and decompress the first application until all the first applications are installed and the "installation completed" file is successfully generated, and then continue to execute step S404. In this way, the power-off protection of the first electronic device 100 is realized, and the problem of incomplete installation of the first application caused by power failure during the installation process of the installation package is avoided.

[0134] S404, update the user data partition through the OTA installation package to add a new first application. Figure 3 Step 208.

[0135] At this time, the system partition of the first electronic device 100 of the second version system does not include the first application, and the first application is added to the user data partition and is in an effective state.

[0136] S405, write the second identifier OEMINFO_DG_IMG=1, write the first identifier

[0137] OEMINFO_DG_IMG_RESUME=0.

[0138] During the installation of the repair installation package, the second identifier and the first identifier are processed, wherein the second identifier OEMINFO_DG_IMG = 1, indicating that the user data partition of the first electronic device before restoring the factory settings includes the first application. The first identifier OEMINFO_DG_IMG_RESUME = 0, indicating that the user data partition of the first electronic device of the second version system has installed the first application, and the first application does not need to be repaired after restarting the first electronic device.

[0139] Write the second identifier OEMINFO_DG_IMG=1, the first identifier OEMINFO_DG_IMG_RESUME=0, set the second identifier attribute msc.dg.img according to the second identifier OEMINFO_DG_IMG=0 and set the first identifier attribute msc.dg.img.resume according to the first identifier OEMINFO_DG_IMG_RESUME=1, the second identifier attribute and the first identifier attribute are used for OUC applications and applications above the framework application layer to read and use. This means that the user data partition of the electronic device of the second version system has installed the first application, and the user data partition of the electronic device of the second version system after the data is updated has not installed the first application, and the first electronic device 100 needs to repair the first application.

[0140] S406: Restart the first electronic device 100.

[0141] The first electronic device 100 completes the installation of the repair installation package, writes the second identification and the first identification status, and restarts the first electronic device 100.

[0142] S407: Whether the system version number of the restarted first electronic device 100 is greater than or equal to the first version threshold, refer to Figure 3 Step S204.

[0143] The cloud OTA server 200 has uploaded and stored the second version system installation package, and the system version number of the second version system installation package is 2.0.0. After the first electronic device 200 installs the second version system installation package, the version system number of the first electronic device 200 is 2.0.0. The first version threshold is the set version number. The first version threshold is exemplarily set to 1.0.1. It can be understood that if the version number 2.0.0 of the first electronic device is greater than 1.0.1, it means that step S408 continues to be executed. If the first version threshold is 2.0.1, it means that the version number 2.0.0 of the first electronic device is less than 2.0.1, then step S408 is not executed, and step S410 is continued. There is no need to install the first application, and the electronic device data update process ends. Exemplarily, the first version number threshold is 2.0.0, or other version numbers, such as 3.0.0, 2.1.2, etc., which is only used as a judgment condition here.

[0144] S408. Move the first application image file to the user data partition directory / data / cust / mount.

[0145] If the "Installation Completed" file is recognized, the first application image file is moved to the user data partition directory / data / cust / mount and mounted to the directory / cust / cota / special_cust, and step S409 is continued; if the "Installation Completed" file is not recognized, the first application image file is not moved to the directory / data / cust / mount to ensure the integrity of the first application image file installed in the user data partition of the first electronic device 100.

[0146] It can be understood that when the existence of the "Installation Completed" file is identified, when it is identified that the system version number 2.0.0 of the first electronic device 100 is greater than or equal to the preset first version number threshold, the first application image file is moved to the user data partition directory / data / cust / mount, and step S409 is executed; when it is identified that the system version number 2.0.0 of the first electronic device 100 is less than the preset first version number threshold, there is no need to move the first application image file to the user data partition directory / data / cust / mount, and step S410 is executed, and the data update process ends; if the "Installation Completed" file is not identified, it means that the first application is not installed completely, which may be due to a power outage during the installation process. The "Installation Completed" file is used to ensure the integrity of the installation package and the application installation of the first application.

[0147] S409: Mount the first application image file to the directory / cust / mount.

[0148] The PMS application (PackageManagerService) is used to scan the first application image file and mount the first application image file to the directory / cust / mount.

[0149] If the PMS application scans the first application image file in the directory / data / cust / mount, the first application image file is installed and mounted to the directory / cust / mount. After the first application is installed, the first electronic device is restarted and the first identifier OEMINFO_DG_IMG_RESUME=0 is identified, and the package search process is no longer entered, and the process ends.

[0150] If the PMS application does not scan the first application image file in the directory / data / cust / mount, the first application will not be installed.

[0151] S410: The first application has been installed in the user data partition of the first electronic device 100 of the second version system, and the process ends.

[0152] The first application is installed and is in a valid state. The first identifier OEMINFO_DG_IMG_RESUME=0 is obtained, the package search step is not started, and the data update process ends.

[0153] It is understandable that the user triggers the factory reset operation again and identifies the second identifier OEMINFO_DG_IMG=1, indicating that the user data partition of the first electronic device 100 before the factory reset includes the first application, and the first identifier OEMINFO_DG_IMG_RESUME=1, indicating that the first application is not installed in the user data partition, and the first application needs to be repaired and installed in the user data partition. The first electronic device 100 obtains and downloads the installation and repair installation package from the cloud OTA server 200 to ensure that the user operates the first electronic device 100 to restore the factory settings and avoid the problem of losing the first application.

[0154] In addition, the directories / cust / mount, / data / cust / mount, / cust / cota / special_cust, etc. in this solution description are set according to requirements, and the directory addresses can be adjusted according to actual conditions. The first application refers to the first application image file.

[0155] See also Figure 6 , Figure 6 It is a flowchart of another electronic device data updating method provided in an embodiment of the present application.

[0156] The data updating method of this embodiment is a maintenance data updating method, which is different from the above-mentioned embodiments in that it is a case where the first electronic device 100 refreshes data and updates it.

[0157] S601, fastboot flash.

[0158] Flashing the first electronic device 100 to update the system, program or data configuration by flashing software is an unconventional system data updating method in the related art.

[0159] S602: Determine whether the flashing is successful.

[0160] If the flashing fails, step S604 is executed and the data updating process ends.

[0161] If the flashing is successful, step S603 is executed to write the values ​​of the second identifier and the first identifier.

[0162] S603 , write the second flag OEMINFO_DG_IMG=0 and the first flag OEMINFO_DG_IMG_RESUME=0.

[0163] Usually, this type of flashing process is a way to update data. If the flashing is successful, the second identifier OEMINFO_DG_IMG=0 and the first identifier OEMINFO_DG_IMG_RESUME=0 are written, which means that the user data partition of the first version system 1.0.0 does not include the first application, and there is no need to search for packages to download the repair installation package to repair and install the first application on the user data partition. After the flashing is completed, the process ends and there is no need to download the repair installation package to repair and install the first application.

[0164] S604: The maintenance and measurement data update process ends.

[0165] Please refer to Figure 7 , Figure 7 is a schematic diagram of a software framework of an electronic device provided in an embodiment of the present application;

[0166] In order to enable the electronic device to follow the data update technical solution provided in the embodiment of the present application, the software framework structure of the electronic device is adjusted.

[0167] The external electronic devices and modules include: a first electronic device 100 , a packet-snapping server, a cloud OTA server 200 , and a packet-snapping server 300 .

[0168] The package making server 300 is used to make installation packages, and can use personal computers, servers, etc., including an upgrade management module, a signature center module, and a package making capability set;

[0169] The cloud-side OTA server 200 is used to store installation packages for terminal access and download, including TRC tools and HOTA publishing modules. The TRC tools include installation package uploading and installation package publishing, and the HOTA cloud-side publishing module includes installation package storage and terminal-cloud interaction modules.

[0170] Please continue to see Figure 7 The application layer (Application) includes the system upgrade client (OTAUpdate Client), OUC application, setting application, etc. for system upgrade management.

[0171] S701, the OUC application is used to search for packages from the cloud OTA server 200, match the installation package of the version adapted to the first electronic device 100, and download and store the installation package. It can be understood that the OUC application is an application dedicated to supervising operating system upgrades.

[0172] In addition, in a specific implementation, the data update of the operating system can also be completed by setting the application.

[0173] For example, see Figure 7The application framework layer (Framework) includes the patch engine, notification manager, etc. The System Server module includes the PMS (Plant Management System) application, which is used to scan and install image files or application installation packages.

[0174] It is understandable that, specifically in actual applications, the patch engine can repair problems existing in the current version of the operating system based on the downloaded patch package, and the notification manager can notify whether there are new patch packages, second version system installation packages, repair installation packages, transit installation packages, etc.

[0175] S702, exemplary, continue to see Figure 7 , the system library layer includes the upgrade engine update_engine module.

[0176] It can be understood that, specifically in the technical solution provided in the embodiment of the present application, the implementation process of the system data update and power-off protection solution is completed by the update_engine module, which is responsible for data update installation.

[0177] S703, the system library includes an Init module to initialize the boot loading module, which is responsible for the boot loading function of the application.

[0178] This solution starts the application by using the init module to load and install the image file.

[0179] The Init module can also be understood as an initialization module. This module is the first process started when the system starts. It is responsible for initializing system resources, loading the operating system core module, and starting system services and user processes. The Init module is an important part of system startup and provides a basic environment for subsequent system operations. The Init module is usually started by the operating system kernel and is a user-mode process. All processes are created and run directly or indirectly by the Init module. The Init module exists as a daemon process and is responsible for organizing and running the system-related initialization work to allow the system to enter a defined operating mode.

[0180] S704, an independent small system plug-in of the system library, the small system includes Native module, Native module includes Recovery, update_binary, factory_reset and recovery_oemserver modules, etc. Among them, the Recovery module includes command parsing, factory reset protection, security verification, partition migration, power-off protection, ui and other modules; the update_binary module includes parsing command scripts and updating ROM data; the factory_reset includes modules such as formatting / data; the recovery_oemserver includes accessing oeminfa modules, etc.; it can be understood that the formatting / data module of factory_reset is used for the first electronic device 100 to restore factory settings, format and reset the user data partition, and format and reset the programs, data and settings of the user data partition.

[0181] For example, see Figure 7 The kernel layer includes a cold patch engine, that is, an engine for repairing problems existing in the operating system of the first version system in the form of cold patches. The modules of the kernel layer involve read and write operations.

[0182] The Hardware layer is the HAL layer, which includes Powercontrol, bootcontrol and keymint modules. Powercontrol includes sleep lock management, bootcontrol includes boot status module and slot management, and keymint includes key module, etc.

[0183] The Linux kernel layer includes VFS write / read modules, dm modules and snapshot modules, wherein the dm module includes a dm device management module, and the snapshot module includes a snapshot device management module and a merge management module.

[0184] This is the end of the introduction to the software structure of electronic devices. It is understandable that Figure 7 The layers in the software structure shown and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.

[0185] To facilitate the description of the technical solution provided by the embodiment of the present application, based on the above-mentioned software structure, taking the scenario in which the user data partition is loaded when the electronic device is first started and the installation package after startup is the system partition and the user data partition as an example, the technical solution provided by the embodiment of the present application is described in detail.

[0186] Please refer to Figure 8 , Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0187] It should be understood that Figure 8 The first electronic device 100 shown is only an example. In a specific implementation, the electronic device 100 may have more Figure 8 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 1 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0188] The first electronic device 100 may be Figure 1 See Figure 8 The first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0189] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0190] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0191] The controller may be the nerve center and command center of the first electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0192] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0193] In some embodiments, the processor 110 may include one or more interfaces, such as an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0194] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0195] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193 and the wireless communication module 160.

[0196] The wireless communication function of the first electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0197] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0198] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the first electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0199] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.

[0200] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the first electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0201] The first electronic device 100 is connected to the cloud OTA server 200 through the wireless communication module 160, and sends request instructions to the cloud OTA server 200 through the OUC application, including package search requests, download requests, etc., downloads the installation package of the adapted version to the first electronic device 100, and installs it.

[0202] In some embodiments, the antenna 1 of the first electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the first electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0203] The first electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0204] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the first electronic device 100 may include 1 or N display screens 194, where N is an integer greater than 1.

[0205] The user operates the first electronic device 100 , and the first electronic device 100 displays data update information to the user through the display screen 194 . The user operates the touch sensor 180K through the display screen 194 to operate the first electronic device 100 to interact with the cloud OTA server 200 for data update.

[0206] The first electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0207] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the first electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0208] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the first electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data (such as audio data, a phone book, etc.) created by the first electronic device 100 during use, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0209] The first electronic device 100 can implement audio functions, such as music playing and recording, through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D and the application processor.

[0210] In the embodiment of the present application, when installing the installation package, a new version of the installation package can be restored based on the installation package, and then the new version of the installation package can be installed.

[0211] It should be noted that: when the installation package generation device provided in the above embodiment generates an installation package, and when the installation device of the installation package provided in the above embodiment installs the installation package, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0212] The functional units and modules in the above embodiments may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above integrated units may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present application.

[0213] The data update method embodiments of the installation package provided in the above embodiments belong to the same concept. The data update method embodiments of the installation package provided in the above embodiments belong to the same concept. The specific working process of the units and modules in the above embodiments and the technical effects brought about can be found in the method embodiment part and will not be repeated here.

[0214] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (such as: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (such as: infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a digital versatile disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)).

[0215] The above are optional embodiments provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the technical scope disclosed in the present application shall be included in the protection scope of the present application.

Claims

1. A data updating method, characterized in that: Applied to a first electronic device, the first electronic device is a second version system, the second version system is a system updated based on the first version system, the user data partition of the first electronic device includes a first application, the system partition of the second version system does not include the first application, and the system partition of the first version system is pre-installed with the first application, the method comprising: Receiving a first operation from a user; In response to the first operation, the first electronic device performs factory reset, wherein the user data partition of the first electronic device after the factory reset does not include the first application; Before the first electronic device is restored to factory settings, determining that an initialization module of the first electronic device includes a first identifier and a second identifier, the first identifier being used to identify that a repair installation package search request needs to be sent to a cloud OTA server, and the second identifier being used to identify that a user data partition before the first electronic device is restored to factory settings includes the first application; After restoring the factory settings, sending a packet search request to the cloud OTA server; Acquire a repair installation package matching the first electronic device from the cloud OTA server, wherein the user data partition of the image file of the repair installation package includes the installation file of the first application; The repair installation package is installed, and the user data partition of the first electronic device includes the first application.

2. The method according to claim 1, characterized in that The repair installation package includes an image file, and the image file includes a single application or multiple applications.

3. The method according to any one of claims 1 to 2, characterized in that: The system partition is used to store and run pre-installed system applications. The first application is pre-installed in the system partition of the first version system of the first electronic device, and the first application is not pre-installed in the system partition of the second version system.

4. The method according to any one of claims 1 to 3, characterized in that: The user data partition is used to store and run pre-installed non-system applications. The first application is not pre-installed in the user data partition of the first version system of the first electronic device, and the first application is installed in the user data partition of the second version system.

5. The method according to any one of claims 1 to 4, characterized in that: Restoring the first electronic device to factory settings, the method further comprising: receiving a second operation from the user; In response to the second operation, the first electronic device is restored to factory settings, wherein the first electronic device after the factory settings are restored is a second version system, and the user data partition of the first electronic device does not include the installation file of the first application.

6. The method according to any one of claims 1 to 5, characterized in that: After restoring the factory settings, the method further includes: Restarting the first electronic device; After restarting the first electronic device, determining that the system version number of the first electronic device is greater than or equal to a first version threshold; The image file of the first application is moved to the user data partition to make the first application effective.

7. The method according to any one of claims 1 to 6, characterized in that: The system partition of the image file of the second version system installation package does not include the installation file of the first application.

8. The method according to any one of claims 1 to 7, characterized in that: The user data partition of the image file of the repair installation package includes the installation file of the first application.

9. The method according to any one of claims 1 to 8, characterized in that The system partition and the user data partition of the first electronic device of the first version system both include the first application, the first application of the system partition is in a valid state, and the first application of the user data partition is in an invalid state; The first electronic device obtains the second version system installation package from the cloud OTA server, the system partition of the image file of the second version system installation package is the second version system, and the system partition of the image file of the second version system installation package does not include the first application; The second version system installation package is installed to update the system version of the first electronic device to the second version system, and the first application of the user data partition takes effect.

10. The method according to any one of claims 1 to 9, characterized in that: The system partition of the first electronic device of the first version system includes a first application, the first application is in effect, and the user data partition does not include the first application; The first electronic device obtains a transit installation package from the cloud OTA server, the system partition of the image file of the transit installation package is the first version system, and the system partition and the user data partition of the image file of the transit installation package both include the first application; The transfer installation package is installed so that the system version of the first electronic device is the first version system, the system partition and the user data partition both include the first application, and the first application of the system partition is in a valid state.

11. The method according to any one of claims 1 to 10, characterized in that: Decompress and install the transit installation package, or the second version system installation package, or the repair installation package to generate an installation completion file, where the installation completion file is used to indicate that the installation of the first application is complete.

12. The method according to any one of claims 1 to 11, characterized in that: If the first identifier is a first value, it indicates that the first electronic device needs to install the first application in the user data partition; if the first identifier is a second value, it indicates that the first electronic device does not need to install the first application in the user data partition.

13. The method according to any one of claims 1 to 12, characterized in that: If the second identifier is the third value, it indicates that the user data partition of the first electronic device before restoring the factory settings includes the first application; if the second identifier is the fourth value, it indicates that the user data partition of the first electronic device before restoring the factory settings does not include the first application.

14. A data updating system, characterized in that: Applied to a first electronic device and a cloud-based over-the-air download OTA server, the first electronic device is a second version system, the second version system is a system updated based on the first version system, the user data partition of the first electronic device includes a first application, the system partition does not include the first application, the system partition of the first version system is pre-installed with the first application, and the system includes: The first electronic device performs a factory reset in response to a first operation of the user, wherein the user data partition of the first electronic device after the factory reset does not include the first application; Before the first electronic device is restored to factory settings, the first electronic device determines that an initialization module of the first electronic device includes a first identifier and a second identifier, the first identifier is used to identify that a repair installation package search request needs to be sent to a cloud OTA server, and the second identifier is used to identify that a user data partition before the first electronic device is restored to factory settings includes the first application; After the first electronic device is restored to factory settings, the first electronic device sends a packet search request to the cloud OTA server; The cloud OTA server receives the package search request of the first electronic device, obtains the repair installation package matching the first electronic device, and transmits the repair installation package to the first electronic device; the user data partition of the image file of the repair installation package includes the installation file of the first application; The first electronic device receives the repair installation package sent by the cloud OTA server, and after installing the repair installation package, the user data partition of the first electronic device includes the first application.

15. An electronic device, characterized in that: The electronic device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 13 when executed by the processor.

16. A chip, characterized in that: The chip comprises a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit is used to run the code instructions so that the chip executes the method according to any one of claims 1 to 13.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Management method of preset third-party application, intelligent terminal and storage medium

    CN116483387A

  • Operation system upgrading method and electronic equipment

    CN118484211A