An operating system update method and electronic device

By installing only pre-installed applications on electronic devices and adding new applications using a pre-installed extension list, the problem of diverse upgrade data packages caused by pre-installed applications in different batches of electronic devices is solved, thereby reducing maintenance difficulty and improving human-computer interaction efficiency.

CN120104151BActive Publication Date: 2026-05-26HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2023-11-29
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Different batches of electronic devices have different pre-installed applications, which means that different upgrade packages are needed for each operating system update, increasing the difficulty of maintenance and the complexity of testing.

Method used

By installing only pre-installed applications on electronic devices, updating the operating system using upgrade packages, and ensuring that pre-installed applications remain unchanged after the update, new applications are added using a pre-installed expansion list, and the installation and removal of applications are maintained in conjunction with a data list in the storage area.

Benefits of technology

This reduces the number of upgrade packages required for each operating system version, lowers maintenance difficulty, and improves human-computer interaction efficiency and the universality of upgrade packages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104151B_ABST
    Figure CN120104151B_ABST
Patent Text Reader

Abstract

This application provides an operating system update method and an electronic device, relating to the field of computer technology. It solves the problem of pre-installed applications and upgrade data packages not being decoupled, leading to high maintenance difficulty for upgrade data packages. The specific solution is as follows: A first data package is obtained, used to install a first version of the operating system. The first data package contains program files for N first applications. In response to the first data package, the first version of the operating system is installed. After installation and restart, the pre-installed applications in the electronic device include N first applications. A second data package is obtained, used to install a second version of the operating system. The second data package includes program files for second applications. In response to the second data package, the second version of the operating system is installed. After installation and restart, the pre-installed applications in the electronic device include N first applications but not the second applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an operating system update method and an electronic device. Background Technology

[0002] Electronic devices typically come pre-installed with some applications. The program files for these pre-installed applications are usually included in the operating system's update package. This allows the necessary pre-installed applications to be automatically installed when the operating system update package is installed, providing convenience for users.

[0003] However, different batches of electronic devices may have different pre-installed applications. To ensure that the pre-installed applications on electronic devices remain unchanged (neither added nor removed) after each operating system update, different batches of electronic devices require different upgrade packages, which undoubtedly increases the difficulty of maintaining upgrade packages. Summary of the Invention

[0004] In view of this, this application provides an operating system update method and an electronic device, which controls the electronic device to install only the applications that were previously pre-installed when updating the operating system, thereby reducing the amount of upgrade data packages released for each operating system version and reducing the maintenance difficulty of the upgrade data packages.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0006] In a first aspect, embodiments of this application provide an operating system update method, the method comprising: an electronic device acquiring a first data packet, the first data packet being used to install a first version of the operating system, the first data packet containing N program files of a first application, wherein N is a positive integer; the electronic device, in response to the first data packet, installing the first version of the operating system, wherein before installing the first version of the operating system, the electronic device does not contain any pre-installed applications, and after installing the first version of the operating system and restarting, the pre-installed applications in the electronic device include N of the first applications; the electronic device acquiring a second data packet, the second data packet being used to install a second version of the operating system, the second data packet including program files of a second application; the electronic device, in response to the second data packet, installing the second version of the operating system, and after installing the second version of the operating system and restarting, the pre-installed applications in the electronic device include N of the first applications, but do not include the second application.

[0007] In this context, the second application is a different application from the first application. In other examples, the second data packet may also contain the same application as the first application.

[0008] In other words, if the electronic device has not had any pre-installed applications installed, the applications can be pre-installed according to the upgrade package (e.g., the first package). If the electronic device already has applications installed, when updating the operating system using the upgrade package (e.g., the second package), the previously pre-installed applications will be installed, without adding any new pre-installed applications or reducing the number of pre-installed applications.

[0009] In the above embodiments, the actual pre-installed applications in the electronic device are related to the first pre-installed applications and are decoupled from the upgrade data package. This eliminates the need to configure upgrade data packages with different pre-installed applications for electronic devices with different applications, reduces the amount of upgrade data packages released for each operating system version, and lowers the maintenance difficulty of the upgrade data packages.

[0010] In some embodiments, the method further includes: an electronic device acquiring a third data packet for installing a third version of an operating system, the third data packet including the second application and program files of the third application, the third data packet including a pre-installed list and a pre-installed extension list, the pre-installed extension list including an application identifier of the third application, and the pre-installed list including an application identifier of the second application; the electronic device responding to the third data packet installing the third version of the operating system, and after installing the third version of the operating system and restarting, the pre-installed applications in the electronic device include N first applications and the third application in the pre-installed extension list, but do not include the second application.

[0011] The third application mentioned above is also a different application from the first application.

[0012] In the above embodiments, a pre-installed extension list can also be configured in the upgrade data package to add new applications to all electronic devices. This pre-installed extension list is different from the pre-installed list in the upgrade data package. Electronic devices do not need to pre-install applications from the pre-installed list in the upgrade data package. This maintains the decoupling between the upgrade data package and the actual pre-installed applications on the electronic device while meeting specific needs for adding pre-installed applications. In other words, it improves the human-computer interaction efficiency of electronic devices while satisfying specific requirements.

[0013] In some embodiments, after the electronic device pre-installs N of the first applications, the method further includes: the electronic device writing a first list to a first storage area, the first list including application identifiers of N of the first applications, wherein the data stored in the first storage area is not lost when the device loses power and is not modified when the operating system is updated; after installing the second version of the operating system and restarting, the method further includes: the electronic device reading the first list from the first storage area; and the electronic device installing N of the first applications in response to the first list.

[0014] In the above embodiments, each time the electronic device updates its operating system, applications are pre-installed according to the first list. Furthermore, the first list is stored in a storage area where data is not easily lost. Throughout the entire lifecycle of the electronic device, the actually pre-installed applications remain unchanged, without affecting the user's actual use, and also improve the efficiency of human-computer interaction during application installation.

[0015] In some embodiments, after the electronic device pre-installs N of the first applications, the method further includes: the electronic device writing a first list to a first storage area, the first list including application identifiers of N of the first applications, wherein the data stored in the first storage area is not lost when the device loses power and is not modified when the operating system is updated; after installing the third version of the operating system and restarting, the method further includes: reading the first list from the first storage area; installing N of the first applications in response to the first list; and installing the third application in response to the pre-installed extended list from the third data packet.

[0016] In the above embodiments, it can be ensured that the number of pre-installed applications does not decrease throughout the entire lifecycle of the electronic device, thus not affecting the user's actual use. Furthermore, additional pre-installed applications can be added according to business needs to meet specific requirements.

[0017] In some embodiments, after installing the third application from the pre-installed extended list, the method further includes: the electronic device updating the first list, wherein the updated first list includes an application identifier for the third application.

[0018] In the above embodiments, additional pre-installed applications can also be fixed to prevent the pre-installed applications in the electronic device from being changed arbitrarily.

[0019] In other embodiments, after the electronic device pre-installs a third application, if the user has used the third application (for example, by detecting an interaction between the user and the third application), the electronic device updates the first list, adding the application identifier of the third application to the updated first list. If the user has not used the third application, the electronic device does not update the first list. Thus, during the next operating system update, if the upgrade data package does not include the pre-installed extended list, the third application will not be pre-installed.

[0020] In other possible embodiments, the first list contains the application identifier of the fourth application. When the electronic device detects a user instruction to delete the fourth application, it can trigger an update of the first list, in which the updated first list does not contain the application identifier of the fourth application.

[0021] In some embodiments, the step of installing N first applications in response to the first list includes: traversing each first application in the first list, searching for the program file of each first application according to the access path of the first application; and installing the corresponding first application when a program file of a first application is found.

[0022] In some embodiments, the first data packet includes first pre-installed data, which includes N program files of the first application and a corresponding second list. The second list includes the application package name corresponding to each first application and the access path corresponding to the program file of the first application. The electronic device, in response to the first data packet, installs the first version of the operating system, including: the electronic device parsing the first data packet; the electronic device writing the first pre-installed data parsed from the first data packet into the pre-installation partition of the electronic device; after the first pre-installed data is written into the pre-installation partition, the program files of the first applications are stored under the corresponding access path; after installing the first version of the operating system and restarting, the method further includes: the electronic device scanning the pre-installation partition; when the electronic device scans the second list, it accesses the program files of each first application; when the electronic device accesses the program files of the first application, it installs the first application; after the first applications in the second list are installed, a first list is generated, which includes the application package name and the corresponding access path in the second list.

[0023] In some embodiments, the first storage area belongs to the basic partition of the electronic device.

[0024] In the above embodiments, it can be ensured that the first list is not affected by operating system updates, and that the number of pre-installed applications will not decrease after each operating system update.

[0025] In some embodiments, after the electronic device writes a first list to a first storage area, the first list is deleted under preset conditions, wherein the preset conditions include one or more of the following: detecting that the electronic device is in factory mode and restoring the device to factory settings; detecting that the electronic device responds to user operation, performs a flashing task, and the flashing is successful.

[0026] In some embodiments, after the electronic device writes the first list to the first storage area, the first list is retained under a first condition, wherein the first condition includes one or more of the following: the electronic device is detected to be operating normally; the electronic device is detected to have power-off and restart; the electronic device is detected to have responded to a user operation and deleted the installed first application; the electronic device is detected to have responded to a user operation and restored to factory settings; the electronic device is detected to have responded to a user operation and performed a flashing task, and the flashing failed; or, the electronic device is detected to have responded to a user operation and installed other applications.

[0027] In some embodiments, after the first version of the operating system is installed and restarted, and before the electronic device installs N of the first applications, the method further includes: determining that no list data is stored in the first storage area.

[0028] Secondly, an electronic device is provided in the embodiments of this application. The electronic device includes one or more processors and a memory. The memory is used to store computer instructions. When the one or more processors execute the computer instructions, the one or more processors are used to: acquire a first data packet, the first data packet being used to install a first version of an operating system, the first data packet containing N program files of a first application, where N is a positive integer; in response to the first data packet, install the first version of the operating system, where before installing the first version of the operating system, the electronic device does not contain any pre-installed applications, and after installing the first version of the operating system and restarting, the pre-installed applications in the electronic device include N of the first applications; acquire a second data packet, the second data packet being used to install a second version of the operating system, the second data packet including program files of a second application; in response to the second data packet, install the second version of the operating system, where after installing the second version of the operating system and restarting, the pre-installed applications in the electronic device include N of the first applications but do not include the second application.

[0029] In some embodiments, the one or more processors are configured to: acquire a third data packet for installing a third version of an operating system, the third data packet including the second application and program files of the third application, the third data packet including a pre-installed list and a pre-installed extension list, the pre-installed extension list including an application identifier of the third application, and the pre-installed list including an application identifier of the second application; in response to the third data packet, install the third version of the operating system, and after installing the third version of the operating system and restarting, the pre-installed applications in the electronic device include N first applications and the third application in the pre-installed extension list, but do not include the second application.

[0030] In some embodiments, after N of the first applications are pre-installed, the one or more processors are configured to: write a first list to a first storage area, the first list including application identifiers of the N first applications, wherein the data stored in the first storage area is not lost when the device loses power and is not modified when the operating system is updated.

[0031] After installing the second version of the operating system and restarting, the one or more processors are further configured to: read a first list from the first storage area; and, in response to the first list, install N copies of the first application.

[0032] In some embodiments, after N first applications are pre-installed, the one or more processors are further configured to: write a first list to a first storage area, the first list including application identifiers of N first applications, wherein the data stored in the first storage area is not lost when the device loses power and is not modified when the operating system is updated;

[0033] After installing the third version of the operating system and rebooting, the one or more processors are further configured to: read the first list from the first storage area; install N copies of the first application in response to the first list; and install the third application in response to the pre-installed extended list from the third data packet.

[0034] In some embodiments, after installing the third application from the pre-installed extended list, the one or more processors are configured to: update the first list, wherein the updated first list includes an application identifier for the third application.

[0035] In some embodiments, the one or more processors are configured to: traverse each of the first applications in the first list, and search for the program file of each of the first applications according to the access path of the first application; and install the corresponding first application when a program file of a first application is found.

[0036] In some embodiments, the first data packet includes first pre-installed data, which includes N program files of the first application and a corresponding second list, wherein the second list includes the application package name corresponding to each first application and the access path corresponding to the program file of the first application; the one or more processors are configured to: parse the first data packet; write the first pre-installed data parsed from the first data packet into a pre-installed partition; after the first pre-installed data is written into the pre-installed partition, the program file of the first application is stored under the corresponding access path.

[0037] After installing the first version of the operating system and restarting, the one or more processors are configured to: scan the pre-installed partition; when the second list is scanned, access the program file of each of the first applications; when the program file of the first application is accessed, install the first application; after the first application in the second list is installed, generate a first list, the first list including the application package name and corresponding access path in the second list.

[0038] In some embodiments, the first storage area is the oeminfo sub-partition within the base partition.

[0039] In some embodiments, after writing the first list to the first storage area, the first list is deleted under preset conditions, wherein the preset conditions include one or more of the following: detecting that the electronic device is in factory mode and restoring the device to factory settings; detecting that the electronic device responds to user operation, performs a flashing task, and the flashing is successful.

[0040] In some embodiments, after installing the first version of the operating system and restarting, and before installing N copies of the first application, the one or more processors are configured to: determine that list data is not stored in the first storage area.

[0041] Thirdly, embodiments of this application provide a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the methods described in the first aspect and its possible embodiments.

[0042] Fourthly, this application provides a computer program product that, when run on the aforementioned electronic device, causes the electronic device to perform the methods described in the first aspect and its possible embodiments.

[0043] Fifthly, this application provides a chip system applied to an electronic device, which stores a computer program that, when executed, causes the electronic device to perform the methods described in the first aspect and its possible embodiments.

[0044] Understandably, the electronic devices, computer storage media, and computer program products provided in the above aspects are all applied to the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description

[0045] Figure 1 This application provides an example diagram of the data storage structure of an operating system in an electronic device.

[0046] Figure 2 A flowchart illustrating the pre-installation of applications during operating system upgrades, as provided in this application embodiment;

[0047] Figure 3 Example diagrams of upgrade data packages for different devices provided in embodiments of this application;

[0048] Figure 4 This is one of the example diagrams for testing the upgrade path before the release of operating system version m provided in this application embodiment;

[0049] Figure 5 The second example diagram shows the test path for upgrading operating system versions prior to m provided in this application embodiment;

[0050] Figure 6 An example diagram illustrating the effect of an operating system update method provided in this application embodiment;

[0051] Figure 7 This is one of the flowcharts illustrating the steps of an operating system update method provided in an embodiment of this application;

[0052] Figure 8 This is a second flowchart illustrating the steps of an operating system update method provided in an embodiment of this application.

[0053] Figure 9 The third step of an operating system update method provided in this application embodiment;

[0054] Figure 10 The fourth step of the operating system update method provided in this application embodiment;

[0055] Figure 11 One of the example diagrams illustrating a scenario of clearing the APL list provided in an embodiment of this application;

[0056] Figure 12 One of the scenario example diagrams provided for the reserved APL list in the embodiments of this application;

[0057] Figure 13A second example diagram illustrating a scenario of clearing the APL list, provided for an embodiment of this application.

[0058] Figure 14 The second example diagram illustrates a scenario where a reserved APL list is provided for an embodiment of this application.

[0059] Figure 15 The third example diagram illustrating a scenario for reserving an APL list in an embodiment of this application;

[0060] Figure 16 This is a structural example diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0061] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0062] The implementation of this embodiment will now be described in detail with reference to the accompanying drawings.

[0063] This application provides an operating system update method, which can be applied to electronic devices. It is understood that electronic devices require an operating system to be installed before they can be used by users.

[0064] For example, the aforementioned electronic devices include, but are not limited to, smartphones, smart headphones, tablets, smart refrigerators, smart speakers, etc., which can install operating systems. Exemplary embodiments of the operating system include, but are not limited to, operating systems already published in related technologies.

[0065] The data storage structure of the operating system in electronic devices is as follows: Figure 1 As shown, the data storage structure of this operating system includes a Common partition, a system partition, and a User data partition.

[0066] The Common partition is the base partition, which stores system data that does not participate in operating system updates. In some embodiments, the Common partition may include at least one subpartition, such as an oeminfo subpartition. The data stored in the oeminfo subpartition is less likely to be lost.

[0067] The aforementioned Userdata partition is used to store users' personal data, such as apps installed by the user, photos, documents, and videos saved by the user.

[0068] The aforementioned system partition is used to store operating system data. For example, the system partition is further divided into static partitions and dynamic partitions (Super).

[0069] Figure 1 The system partition shown contains a static partition. After the electronic device boots up, it can load the basic partition (Common), the static partition, and the dynamic partition (Super) in sequence to run the operating system.

[0070] In other embodiments, the static partition may further include a static partition (A) and a static partition (B). Static partition (A) and static partition (B) are backups of each other; that is, the structures of static partition (A) and static partition (B) correspond to each other. With two static partitions, the electronic device can virtualize two operating systems, such as operating system A and operating system B. When the electronic device boots, it must run on either operating system. For example, if the electronic device needs to run on operating system A, the electronic device boots from static partition (A): loading the base partition (Common), static partition (A), and dynamic partition (Super) in sequence; and as another example, if the electronic device needs to run on operating system B, the electronic device boots from static partition (B): loading the base partition (Common), static partition (B), and dynamic partition (Super) in sequence.

[0071] Take Universal Flash Storage (UFS) using the Master Boot Record (MBR) format as an example. The UFS MBR (Master Boot Record, the first sector of the UFS, i.e., sector 1, head 0, cylinder 0 at C / H / S address) stores a description of the electronic device's boot order, such as booting from static partition (A) (boot order flag A) or booting from static partition (B) (boot order flag A). After booting, the electronic device first reads its boot order from the UFS MBR. Then, based on the read boot order, the electronic device can load data from the system partitions, such as loading the basic partition (Common), static partition (A), and dynamic partition (Super) sequentially, as described in the previous example, or loading the basic partition (Common), static partition (B), and dynamic partition (Super) sequentially.

[0072] Additionally, a dynamic partition (Super) can contain multiple subpartitions, such as a preload partition. The preload partition mentioned above is used to store program files for applications that need to be pre-installed.

[0073] Understandably, dynamic partitioning also includes... Figure 1Other partitions not shown include, for example, preas, preavs, System, system_ext, vendor, product, Cust, Odm, version, etc.

[0074] In some embodiments, upgrading the operating system is an example of updating the operating system. In subsequent embodiments, the method provided in this application will be mainly described using upgrading the operating system as an example. The process of upgrading the operating system of an electronic device is as follows:

[0075] First, electronic devices can obtain upgrade data packages via over-the-air (OTA) technology. These upgrade data packages can be used to upgrade the operating system to a target version. This target version can be the latest released version of the operating system or a user-specified version to be rolled back; this application does not impose specific limitations on this. Of course, different upgrade data packages are required for upgrading to different target versions.

[0076] In some embodiments, the upgrade data package includes data for updating multiple partitions in the operating system. For example... Figure 1 As shown, the upgrade data package includes pre-installed software used to update data in the preload partition. This pre-installed software may include program files for one or more applications that need to be pre-installed. Additionally, the upgrade data package also includes data for updating other sub-partitions in the base partition, static partition, and dynamic partition; this embodiment does not specifically limit this aspect.

[0077] Secondly, after obtaining the upgrade data package, the electronic device can parse the upgrade data package and write the data carried in the upgrade data package into the corresponding partition. For example, the pre-installed software in the upgrade data package can be written into the preload partition. Understandably, the above process can be found in relevant technologies, and will not be elaborated upon here.

[0078] Finally, the electronic device restarts, allowing the upgraded operating system to take effect. During the restart process, the electronic device can perform optimizations after the upgrade, such as installing pre-installed applications.

[0079] For example, such as Figure 2 As shown, the process of installing pre-installed applications during an electronic device's operating system upgrade includes the following steps:

[0080] S1 writes the upgrade data package to the electronic device and triggers a reboot.

[0081] In some embodiments, after verifying the upgrade data packet, the electronic device parses the upgrade data packet. Then, it writes the parsed data to the corresponding partitions in the operating system's data storage structure, and triggers a reboot. Specific implementation details can be found in relevant technologies and will not be elaborated here.

[0082] S2 scans the pre-installed partition to obtain a list of application installation packages (APKs) from the upgrade data package.

[0083] In some embodiments, the APK list above includes information about applications that need to be pre-installed (hereinafter referred to as pre-installed applications). This information includes the application package name and the access path of the application's program files in the preload partition.

[0084] As is understandable, both the APK list and the pre-installed application files mentioned above originate from the upgrade data package. There is a one-to-one correspondence between the application package names in the APK list and the pre-installed applications in the upgrade data package. For example, the upgrade data package contains 10 pre-installed applications, such as APK1 and APK2. Correspondingly, the APK list includes the application package names and corresponding access paths for these 10 pre-installed applications. The access path for each pre-installed application refers to the write path of the APK's program files in the preload partition, which can usually be pre-configured. Furthermore, APKs and applications can be used interchangeably.

[0085] In this way, after the electronic device parses the pre-installed software from the upgrade data package and writes it to the preload partition, during the scanning of the preload partition, a list of APKs from the upgrade data package can be found under a specified path (e.g., preload / xxx / all / cn / xml). Simultaneously, the program files of each APK can be found under the access paths corresponding to each APK recorded in the APK list.

[0086] For example, the pre-installed applications mentioned above can be divided into uninstallable pre-installed applications and non-uninstallable pre-installed applications. Among them, uninstallable pre-installed applications refer to applications that do not affect the normal operation of electronic devices after uninstallation, while non-uninstallable pre-installed applications refer to applications that will affect the normal operation of electronic devices after uninstallation.

[0087] Correspondingly, the above APK list includes an uninstallable APK list (del apk install list release.txt) and a non-uninstallable APK list (apk install list release.txt). The APKs in the uninstallable APK list are all uninstallable pre-installed applications. The APKs in the non-uninstallable APK list are all non-uninstallable pre-installed applications.

[0088] S3, install the APK from the APK list.

[0089] In some embodiments, after scanning the APK list, the program files of each pre-installed application are traversed according to the access paths in the APK list. Then, based on the traversed program files, the corresponding pre-installed application is installed.

[0090] In other words, the APK list contains information about the number of pre-installed applications, and the actual number of applications installed after the electronic device is upgraded and restarted. That is, when upgrading the operating system version, the actual number of pre-installed applications is only related to those included in the upgrade package.

[0091] However, due to product business considerations, electronic devices released at different times may require different pre-installed applications. Electronic devices with different pre-installed applications may also be considered different batches of devices. These electronic devices released at different times can refer to the same model or different models using the same operating system.

[0092] It's understandable that electronic devices released at different times may have different operating systems installed upon first power-on due to their different manufacturing dates. Furthermore, different operating system versions may have different pre-installed applications. Therefore, the operating system version installed upon first power-on can be called the initial version of the electronic device.

[0093] Once an electronic device has pre-installed applications, these applications cannot be arbitrarily changed during each operating system upgrade. That is, different devices correspond to different initial versions, and the pre-installed applications under those initial versions differ. Even when upgrading to the same operating system version, the pre-installed applications in the required upgrade data package will be different. This ensures that the pre-installed applications on any electronic device remain unchanged after each operating system upgrade.

[0094] Thus, each operating system version includes not only upgrade package a for the current version (containing all applications that need to be pre-installed under this operating system version), but also upgrade package b for devices with an initial version of another operating system (containing all applications that need to be pre-installed under that other operating system). The pre-installed applications in upgrade package a and upgrade package b can be different.

[0095] Clearly, with continuous operating system updates and frequent changes to pre-installed applications, operating system publishers face increasing demands and difficulties in maintaining upgrade packages. For example, before a new operating system version is released, numerous upgrade packages need to be tested, resulting in low efficiency in human-computer interaction during the testing process.

[0096] For example, the upgrade data package includes basic software, customized software, and pre-installed software. The basic software is data required for upgrading the operating system of all types of electronic devices. The customized software is specific data required for upgrading the operating system of a particular electronic device; this refers to devices with special functional requirements. The pre-installed software refers to data used to pre-install applications; for example, pre-installed software includes the program files and APK list corresponding to the pre-installed applications.

[0097] like Figure 3 As shown, the operating system installed on device 1 upon its first power-on after leaving the factory is operating system version 1, which is the initial version of device 1. In some examples, device 1 can upgrade its operating system to operating system version 1 using upgrade package 1.

[0098] like Figure 3 As shown, upgrade package 1 includes basic software 1, customized software 1, and pre-installed software 1.

[0099] The basic software 1 is the data required to upgrade the operating systems of all devices to operating system version 1. The customized software 1 is the data used to implement the special functional requirements of device 1. In some embodiments, if device 1 does not have special functional requirements, the upgrade data package 1 may not contain the customized software 1.

[0100] The pre-installed applications corresponding to the aforementioned operating system version 1 include APK 1, APK 2, ..., and APK N. Here, N is a positive integer. Correspondingly, pre-installed software 1 may include N applications such as APK 1, APK 2, ..., APK N.

[0101] In this way, after device 1 installs operating system version 1 according to upgrade data package 1, it can actually pre-install the above-mentioned APK 1, APK 2... and APK N.

[0102] like Figure 3 As shown, when device 2 is first powered on after leaving the factory, the installed operating system version is 2. Operating system version 2 is the initial version of device 2.

[0103] For example, device 2 can upgrade its operating system to operating system version 2 via upgrade data package 2. The pre-installed applications corresponding to the aforementioned operating system version 2 include APK 1, APK 2, ..., APK N and APK N+1.

[0104] Correspondingly, device 2 can upgrade its operating system to operating system version 2 via upgrade data package 2-2. For example... Figure 3 As shown, upgrade package 2-2 includes basic software 2, customized software 2, and pre-installed software 2. Pre-installed software 2 may include N+1 applications, such as APK1, APK2, ..., APKN+1.

[0105] Furthermore, after the release of operating system version 2, device 1 also needs to upgrade its operating system from version 1 to version 2. If device 1 uses upgrade package 2-2 to upgrade, the number of pre-installed applications on device 1 will increase from N to N+1 after the upgrade. Obviously, this does not meet the user's requirements for the upgrade result and affects the user's upgrade experience.

[0106] In some embodiments, device 1 needs to use upgrade package 2-1 to upgrade the operating system to operating system version 2. The differences between upgrade package 2-1 and upgrade package 2-2 include the different pre-installed software portions.

[0107] In the example above, the upgrade data package corresponding to operating system version 2 includes not only upgrade data package 2-2 for the current version, but also upgrade data package 2-1 for devices whose initial version is operating system version 1.

[0108] Subsequently, when upgrading the operating system to operating system version 3, device 1 needs to upgrade its operating system to operating system version 3 using upgrade data package 3-1. Device 2 needs to upgrade its operating system to operating system version 3 using upgrade data package 3-2.

[0109] Upgrade package 3-1 contains pre-installed software 1, and upgrade package 3-2 contains pre-installed software 2. After upgrading the operating system based on upgrade package 3-1, the pre-installed applications on device 1 include APK 1, APK 2, ..., APK N, etc., N applications. After upgrading the operating system based on upgrade package 3-2, the pre-installed applications on device 2 include APK 1, APK 2, ..., APK N+1, etc., N+1 applications.

[0110] Similarly, when upgrading the operating system to operating system version m, device 1 needs to upgrade its operating system to operating system version m using upgrade data package m-1. Device 2 needs to upgrade its operating system to operating system version m using upgrade data package m-2. Upgrade data package m-1 contains pre-installed software 1, and upgrade data package m-2 contains pre-installed software 2.

[0111] Figure 3 This example only shows the upgrade packages used by two devices with different pre-installed applications when upgrading their operating system. In real-world applications, there are many more devices with different pre-installed applications. Therefore, in practical applications, with a large number of devices requiring different pre-installed applications, each operating system version corresponds to a large number of upgrade packages. Furthermore, as pre-installed applications change, newly released operating system versions require even more upgrade packages.

[0112] To ensure the reliability of the upgrade data package, an upgrade test must be performed on the upgrade data package corresponding to each new version of the operating system before the new version is released to verify the reliability of using the upgrade data package to upgrade the operating system.

[0113] For example, before releasing operating system version m, it is necessary to test all upgrade paths that can be upgraded to operating system version m. Here, the upgrade path refers to the process of upgrading electronic devices with previously installed operating system versions to operating system version m.

[0114] For example, such as Figure 4 As shown, the historical operating systems include operating system version 1, operating system version 2, and operating system version 3, etc. The testing process for all upgrade paths is as follows: Based on the upgrade data package related to operating system version m, the test upgrades an electronic device with operating system version 1 installed to operating system version m. Based on the upgrade data package related to operating system version m, the test upgrades an electronic device with operating system version 2 installed to operating system version m. Based on the upgrade data package related to operating system version m, the test upgrades an electronic device with operating system version 3 installed to operating system version m.

[0115] Taking the test of upgrading an electronic device with operating system version 2 to operating system version m as an example, such as... Figure 5 As shown:

[0116] It is necessary to test the upgrade path of device 1 from operating system version 2 to operating system version m. For example, test the process of upgrading an electronic device that has already installed operating system version 2 based on upgrade package 2-1 to operating system version m using upgrade package m-1.

[0117] It is also necessary to test the upgrade path of device 2 from operating system version 2 to operating system version m. For example, test the process of an electronic device that has already installed operating system version 2 based on upgrade package 2-2, and then upgrade to operating system version m using upgrade package m-2.

[0118] In scenarios where there are many electronic devices with different pre-installed applications, there are more upgrade paths from operating system version 2 to operating system version m, which makes testing cumbersome and human-computer interaction inefficient for developers.

[0119] To address the aforementioned issues, this application provides an operating system update method applied to an electronic device. When updating the operating system based on an upgrade package, the electronic device only installs pre-installed applications adapted to its own machine. That is, by changing the update method of the electronic device, the universality of the upgrade package is improved, the number of upgrade packages used to configure the target version is reduced, thereby improving the human-computer interaction efficiency for testing the upgrade package of the target version.

[0120] For example, such as Figure 6 As shown, the target version is operating system version m, and operating system version m corresponds to a general upgrade package m, which includes basic software m, customized software m and pre-installed software m.

[0121] The basic software m and customized software m in the general upgrade data package m are the same as the basic software m and customized software m in the upgrade data package m-1 and upgrade data package m-2 mentioned in the previous embodiments, and will not be described again here.

[0122] In addition, the pre-installed software m in the general upgrade data package m includes all applications required to be pre-installed under operating system version m, such as APK 1, APK 2...APK N+i.

[0123] like Figure 6 As shown, device 1 and device 2 can be upgraded using the universal upgrade package m. Device 1 and device 2 are electronic devices with different initial versions and different pre-installed applications. Taking device 1 with operating system version 1 as an example, during the upgrade process using the universal upgrade package m, device 1 only installs the pre-installed applications corresponding to operating system version 1, such as APK1, APK2...APKN. The specific implementation process can be found in the description of subsequent embodiments and will not be repeated here. Taking device 2 with operating system version 2 as an example, during the upgrade process using the universal upgrade package m, device 2 only installs the pre-installed applications corresponding to operating system version 2, such as APK1, APK2...APKN+1. The specific implementation process can be found in the description of subsequent embodiments and will not be repeated here.

[0124] The implementation details of the upgrade method provided in the embodiments of this application are described below with reference to the accompanying drawings:

[0125] like Figure 7 As shown, in scenarios such as the first power-on after the electronic device leaves the factory, restoring factory settings in factory mode, or successfully flashing the electronic device, the above operating system update method may include the following steps:

[0126] S101, write the data of the first upgrade package to the electronic device and restart the electronic device.

[0127] The aforementioned first upgrade package is an upgrade data package used to configure the operating system, and can also be referred to as the first data package. This first upgrade package originates from a cloud server used to distribute the operating system. For example, an electronic device can download the upgrade data package corresponding to the latest operating system version (target version 1) from the cloud server via OTA technology, such as downloading the first upgrade package. Furthermore, the aforementioned target version 1 operating system can also be referred to as the first version of the operating system.

[0128] The aforementioned first upgrade package includes a first pre-installed software. This first pre-installed software includes a list of pre-installed applications and their corresponding APKs required for the latest operating system version (a second list).

[0129] In some embodiments, S101 may be that after the electronic device obtains the first upgrade package, it parses the first upgrade package and writes the data parsed from the first upgrade package into the corresponding partition.

[0130] Understandably, the first upgrade package includes data used to update various partitions in the operating system. For example, the first upgrade package may contain first pre-installed software (or first pre-installed data), which is used to update the preload partition. The preload partition is the corresponding partition for the first pre-installed software, and after resolving the first pre-installed software, it can be written to the preload partition.

[0131] After the data from the first upgrade package is written to the corresponding partitions in the electronic device, the electronic device can be restarted to make the new operating system effective.

[0132] In addition, before parsing the first upgrade package, preprocessing such as pre-upgrade verification can be performed on the first upgrade package. For details, please refer to relevant technologies, which will not be elaborated here.

[0133] S102, scan the pre-installed partition to obtain a list of APKs from the first upgrade package.

[0134] In some embodiments, the first upgrade includes not only the program files of the pre-installed application corresponding to target version 1, but also a list of APKs corresponding to target version 1. The APK list may include information about the applications that need to be pre-installed under target version 1. For example, this information may include the application's package name and the application's access path in the preload partition.

[0135] In some embodiments, after the electronic device parses the first pre-installed software from the first upgrade package and writes it to the preload partition, during the scanning process of the preload partition, the electronic device can find a list of APKs carried in the first pre-installed software under a specified path (e.g., preload / xxx / all / cn / xml). Simultaneously, the program files of each APK can be found in the preload partition according to the access paths corresponding to each APK recorded in the APK list. For example, the aforementioned APK list includes an uninstallable APK list (del apk install list release.txt) and a non-uninstallable APK list (apk install list release.txt).

[0136] S103, in the oeminfo subpartition of the base partition, find the actual preload list (APL) of the preconfigured system.

[0137] The aforementioned APL list (first list) includes applications pre-installed on the electronic device prior to this upgrade. If the electronic device is powered on for the first time after leaving the factory (or, after a successful flashing and factory reset in factory mode), and no pre-installed applications are present, the corresponding APL list will not be found in the oeminfo sub-partition.

[0138] In some embodiments, there is no necessary order between S102 and S103; they can be executed synchronously or asynchronously. In other embodiments, S102 may be executed after the electronic device determines, through S103, that the oeminfo sub-partition does not contain an APL list.

[0139] Furthermore, the above-mentioned S103 is only one way to determine whether an application has been pre-installed in an electronic device. In other possible embodiments, other methods can be used to determine whether an electronic device has been pre-installed with an application. This application embodiment does not specifically limit this method.

[0140] In any of the above embodiments, after the electronic device determines that the oeminfo sub-partition does not contain an APL list and obtains the APK list from the first upgrade package, the process can proceed to S104 and S105. There is no necessary order between S104 and S105.

[0141] S104, Install APKs from the APK list.

[0142] In some embodiments, if it is determined that no pre-installed applications have been installed on the electronic device—for example, if the oeminfo subpartition does not contain an APL list, or does not contain a valid APL list—the electronic device can traverse the program files of each pre-installed application according to the access paths in the APK list. Then, based on the traversed program files, the corresponding application is installed to implement the pre-installed application. Here, the APKs recorded in the APK list from the first upgrade package can be referred to as first applications, and the number of first applications is N, where N is a non-zero positive integer.

[0143] S105, Generate an APL list based on the APK list.

[0144] In some embodiments, the electronic device may generate an APL list based on the APK list from the first upgrade package.

[0145] For example, the APL list may include the number of applications to be pre-installed, the application package name, and the access path. The application package name and access path in the APL list are the same as those in the APK list.

[0146] Understandably, when an electronic device is powered on for the first time after leaving the factory, the pre-installed applications are all those included in the APK list of the upgrade package. In this scenario, the applications indicated by the generated APL list are also the same as those in the APK list of the upgrade package.

[0147] For example, the APK list from the first upgrade package includes APK1...APKN, and the generated APL list includes the application package name and access path of APK1...APKN. The APL list can also include the number of applications N.

[0148] S106, write the APL list to the oeminfo subpartition.

[0149] Understandably, the data stored in the oeminfo sub-partition is not easily lost. Once the APL list is written to the first storage area of ​​the oeminfo sub-partition, it will not be deleted or its contents changed, regardless of whether the electronic device loses power or updates its operating system. In this way, the applications in the APL list can always remain consistent with the pre-installed applications in the initial version of the electronic device.

[0150] In some embodiments, during the operating system upgrade process, electronic devices pre-install applications according to the APL list. This ensures that regardless of the pre-installed applications included in the upgrade package, upgrading according to that package will not result in any changes to the pre-installed applications on the electronic device.

[0151] In this embodiment, after the device is powered on for the first time after leaving the factory (or after the electronic device is successfully flashed and restored to factory settings in factory mode), an APL list is configured according to the pre-installed applications corresponding to the initial version of the operating system, and stored in the oeminfo sub-partition. The APL list remains unchanged after its generation. Thus, each time the operating system is upgraded, the pre-installed applications are installed according to the APL list, ensuring that the pre-installed applications remain unchanged after the upgrade.

[0152] In other words, during the operating system upgrade process, the actual pre-installed applications on electronic devices are not affected by the pre-installed applications in the upgrade package. There is no need to release upgrade packages containing different pre-installed applications for electronic devices, thus improving the universality of the upgrade packages.

[0153] In some embodiments, after an electronic device is first powered on after leaving the factory, it needs to undergo an operating system update along with the release of a new operating system version. This process is known as a regular OTA (Over-The-Air) operating system upgrade. During a regular OTA operating system upgrade, such as... Figure 8 As shown, the above method may include the following steps:

[0154] S201, write the data of the second upgrade package to the electronic device and restart.

[0155] The aforementioned second upgrade package is an upgrade data package used to upgrade the operating system, also referred to as the second data package. This second upgrade package originates from a cloud server used to release the operating system. For example, an electronic device can download the upgrade data package corresponding to the latest operating system version (target version 2) from the cloud server via OTA technology, such as downloading the second upgrade package. Target version 2 can be an operating system version released later than target version 1. Furthermore, target version 2 can also be referred to as the second version.

[0156] The second upgrade package includes a second pre-installed software. This second pre-installed software includes the applications and corresponding APK lists required for the latest operating system version (target version 2). For example, target version 2 requires the installation of APK1, APK2…APK N+1. The APK list from the second pre-installed software includes APK1, APK2…APK N+1. Applications in the second upgrade package that differ from those in the APK list of the first upgrade package can be referred to as second applications. For example, APK N+1 is a second application.

[0157] In addition, during the process of writing the second upgrade package into the electronic device and restarting, S101 of the aforementioned embodiment can be referred to, and will not be described in detail here.

[0158] S202, in the oeminfo sub-partition, look up the list of pre-configured APLs.

[0159] In some embodiments, the APL list mentioned above may be data pre-configured in the oeminfo sub-partition in S106. The electronic device can scan the oeminfo sub-partition, and after the APL list is found, the process proceeds to S203.

[0160] S203, Scan and install APKs from the APL list.

[0161] like Figure 8 As shown, the APL list scanned in the oeminfo sub-partition includes APK1…APKN. After S203, the actual pre-installed applications also include APK1…APKN. The actual pre-installed applications are only related to the APKs in the APL list, and are not related to the APK list from the second pre-installed software. Of course, if the operating system version first installed on the electronic device after leaving the factory is target version 2, then the pre-installed applications on the electronic device are related to the APK list from the second pre-installed software.

[0162] Additionally, after S201, the electronic device also scans the preload partition to obtain an APK list, as detailed in S102, which will not be elaborated here. This allows for application pre-installation even when an found APL list is marked as invalid, or when no APL list is found. Similarly, after pre-installing applications according to the APK list, a new APL list can be generated based on that APK list and written to the oeminfo sub-partition.

[0163] In other embodiments, during operating system upgrades, electronic devices can also add pre-installed applications, that is, add applications that were not pre-installed in the initial version. The added applications can be those specified by the user for pre-installation, or applications added according to business needs. In summary, in scenarios involving the addition of pre-installed applications, such as... Figure 9 As shown, the above method may further include the following steps:

[0164] S301 writes the data from the third upgrade package to the electronic device and then restarts.

[0165] The aforementioned third upgrade package is an upgrade data package used to upgrade the operating system, also referred to as the third data package. This third upgrade package originates from the cloud server used to release the operating system. For example, an electronic device can use OTA (Over-The-Air) technology to download the upgrade data package corresponding to the latest operating system version (target version 3) from the cloud server, such as downloading the third upgrade package. Target version 3 can be an operating system version released later than target version 1.

[0166] The aforementioned third upgrade package includes a third set of pre-installed software. This third set of pre-installed software includes the applications required for the latest operating system version (target version 3) and their corresponding APK lists (pre-installed list), as well as an extended APK list (or pre-installed extension list).

[0167] For example, under target version 3, APK1, APK2...APK N+1 and APK L need to be installed. APK1, APK2...APKN+1 are ordinary pre-installed applications, and these are not restricted to all electronic devices. APK L, however, is a special pre-installed application, which must be pre-installed on all electronic devices running this operating system.

[0168] In some examples, regular pre-installed applications (APK1, APK2...APK N+1) are recorded in the APK list, while special pre-installed applications (such as APK L, or third-party applications) are recorded in the extended APK list. The APK list includes the application package name and corresponding access path of regular pre-installed applications, while the extended APK list also includes the application package name and access path of special pre-installed applications (third-party applications). Both the application package name and access path can be referred to as the application identifier of that application.

[0169] In addition, during the process of writing the third upgrade package into the electronic device and restarting, S101 of the aforementioned embodiment can be referred to, and will not be described in detail here.

[0170] S302 scans the pre-installed partition to obtain a list of APKs and extended APKs from the third-party upgrade package.

[0171] In some embodiments, the aforementioned third upgrade includes not only the program files of the pre-installed application corresponding to target version 3 (third version), but also a list of APKs (pre-installed list) and a list of extended APKs (pre-installed extension list) corresponding to target version 3. For details, please refer to S102 in the foregoing embodiments.

[0172] S303, in the oeminfo sub-partition, look for the list of pre-configured APLs.

[0173] In some embodiments, the APL list mentioned above may be data pre-configured in the oeminfo sub-partition in S106. The electronic device can scan the oeminfo sub-partition, and after the APL list is found, the process proceeds to S304.

[0174] S304, scans for APKs in the list of installed extension APKs and APLs.

[0175] like Figure 9 As shown, the APL list scanned in the oeminfo subpartition includes APK1…APKN. After S304, the actual pre-installed applications, in addition to the applications in the APL list (e.g., APK1…APKN), also include applications in the extended APK list, such as APKL. The actual pre-installed applications are only related to the APKs in the APL list and the extended APK list, and are not related to the APK list from the second pre-installed software. Of course, if the operating system version first installed on the electronic device after leaving the factory is target version 3, then the pre-installed applications in the electronic device are related to the APK list and the extended APK list from the third pre-installed software.

[0176] In some embodiments, there is no necessary order between S302 and S303. In some embodiments, after scanning the extended APK list, the applications in the extended APK list can be installed one by one. After obtaining the APL list, the applications in the APL list can be installed one by one. In other embodiments, the applications in the extended APK list and APL list can be installed one by one after obtaining both. This application does not limit the specific implementation method.

[0177] In other embodiments, in scenarios with additional pre-installed applications, such as Figure 10 As shown, the above method may further include the following steps:

[0178] S401 writes the data from the third upgrade package to the electronic device and then restarts.

[0179] S402 scans the pre-installed partition to obtain a list of APKs and extended APKs from the third-party upgrade package.

[0180] S403, in the oeminfo sub-partition, look for the pre-configured APL list 1.

[0181] S404, Scan for APKs in the Install Extension APK List and APL List 1.

[0182] In some embodiments, the implementation details of S401 to S404 can be referred to S301 to S304 in the foregoing embodiments, and will not be repeated here.

[0183] S405, based on APL list 1 and extended APK list, obtain APL list 2.

[0184] In some embodiments, the electronic device can generate APL list 2 based on the applications and corresponding access paths in APL list 1 and the extended APK list. For example, APL list 1 includes APK1, APK2...APKN. The extended APK list includes APKL. Executing S405 generates APL list 2, which includes APK1, APK2...APKN and APKL.

[0185] S406, write APL list 2 to the oeminfo subpartition, overwriting APL list 1.

[0186] In some embodiments, the implementation process of S406 can refer to S106 above, and will not be repeated here.

[0187] Understandably, Figure 9 In the illustrated embodiment, by using a pre-configured APL list and an extended APK list from a third upgrade package, the APL list is not changed after the application is pre-installed. In this way, when the operating system version is upgraded, if the upgrade package no longer contains the extended APK list, the electronic device can also stop pre-installing the applications in the extended APK list and only pre-install the applications in the APL list.

[0188] and Figure 10 In the illustrated embodiment, utilizing a pre-configured APL list and an extended APK list from a third upgrade package, after pre-installing the application, the APL list is updated to include applications from the extended APK list. This ensures that after subsequent version upgrades, the pre-installed application can retain applications from the extended APK list. In practical applications, the appropriate method can be chosen based on actual needs. Figure 9 The proposed solution is still to be adopted. Figure 10 The scheme shown.

[0189] Furthermore, as mentioned in the preceding embodiments, the data in the oeminfo sub-partition is not easily lost; the APL list, once written to the oeminfo sub-partition, will not be deleted in most cases. However, in certain specific scenarios, the APL list in the oeminfo sub-partition can be cleared depending on the actual situation.

[0190] like Figure 11 As shown in the example scenario, when an electronic device is in factory mode and receives a command to restore factory mode, the APL list in the oeminfo subpartition can be cleared.

[0191] like Figure 12 As shown in the exemplary scenario, when an electronic device is in non-factory mode and receives a command to restore factory mode, it can retain the APL list in the oeminfo sub-partition.

[0192] like Figure 13 As shown in the example scenario, when an electronic device detects a successful device flashing command, it can clear the APL list in the oeminfo sub-partition.

[0193] like Figure 14 As shown in the example scenario, when an electronic device detects a failed flashing instruction, it can retain the APL list in the oeminfo sub-partition.

[0194] like Figure 15 As shown in the example scenario, even after an electronic device loses power and restarts, the APL list in the oeminfo sub-partition can still be retained.

[0195] In other exemplary scenarios, such as when the electronic device is detected to be operating normally, when the electronic device is detected to be responding to a user operation and deleting the pre-installed application, or when the electronic device is detected to be responding to a user operation and installing other applications, the above APL list is retained and not modified.

[0196] In summary, among the above scenario conditions, the scenario condition that allows the APL list in the oeminfo sub-partition to be retained can be called the first condition, and the scenario condition that allows the APL list in the oeminfo sub-partition to be deleted can be called the second condition or the preset condition.

[0197] In other possible embodiments, when an electronic device cleans up the storage space of the pre-installed partition, it may retain the data stored under the access path in the APL list and clear the data in other storage areas.

[0198] This application also provides an electronic device that may include a memory and one or more processors. The memory and processors are coupled. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, it causes the electronic device to perform the steps described in the above embodiments. Of course, the electronic device includes, but is not limited to, the memory and one or more processors described above.

[0199] Please refer to Figure 16 , Figure 16 A schematic diagram of a possible hardware structure for an electronic device is shown:

[0200] like Figure 16 As shown, the 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, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0201] The aforementioned sensor module 180 may include sensors such as pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and bone conduction sensors.

[0202] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0203] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0204] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0205] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0206] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include 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.

[0207] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0208] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0209] Display screen 194 is used to display images, videos, etc. 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 (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0210] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0211] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element (image sensor). The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0212] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include N cameras 193, where N is a positive integer greater than 1.

[0213] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0214] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0215] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0216] This application also provides a chip system that can be applied to the electronic devices described in the foregoing embodiments. The chip system includes at least one processor and at least one interface circuit. The processor may be the processor in the aforementioned electronic device. The processor and the interface circuit are interconnected via wiring. The processor can receive and execute computer instructions from the memory of the aforementioned electronic device through the interface circuit. When the computer instructions are executed by the processor, the electronic device can perform the various steps in the foregoing embodiments. Of course, the chip system may also include other discrete devices, and this application does not specifically limit this.

[0217] In some embodiments, as described above, those skilled in the art will clearly understand that, for the sake of convenience and brevity, the division of the functional modules described above is merely an example. In practical applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0218] In the embodiments of this application, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0219] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.

[0220] The above description is merely a specific implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.

Claims

1. An operating system update method, characterized in that, The method includes: The electronic device acquires a first data packet, which is used to install a first version of the operating system. The first data packet contains N program files for a first application, where N is a positive integer. In response to the first data packet, the electronic device installs the first version of the operating system. Before installing the first version of the operating system, the electronic device does not contain any pre-installed applications. After installing the first version of the operating system and restarting, the electronic device has N pre-installed applications, including the first application. The electronic device acquires a second data packet, which is used to install a second version of the operating system. The second data packet includes program files for a second application. In response to the second data packet, the electronic device installs the second version of the operating system. After installing the second version of the operating system and restarting, the pre-installed applications in the electronic device include N of the first applications but not the second application. An electronic device acquires a third data packet, which is used to install a third version of the operating system. The third data packet includes N program files for the first application, the second application, and the third application. The third data packet includes a pre-installed list and a pre-installed extended list. The pre-installed extended list includes the application identifier of the third application, and the pre-installed list includes the application identifier of the second application. In response to the third data packet, the electronic device installs the third version of the operating system. After installing the third version of the operating system and restarting, the pre-installed applications in the electronic device include N first applications and the third application in the pre-installed extended list, but do not include the second application. The electronic device acquires a fourth data packet, which is used to install a fourth version of the operating system. The fourth data packet includes N program files of the first application and the third application, and the application identifier of the third application does not belong to the pre-installed extension list. In response to the fourth data packet, the electronic device installs the fourth version of the operating system. After installing the fourth version of the operating system and restarting, the pre-installed applications in the electronic device include N of the first applications but do not include the third application.

2. The method according to claim 1, characterized in that, After the electronic device is pre-installed with N of the first applications, the method further includes: The electronic device writes a first list to a first storage area. The first list includes N application identifiers of the first application. The data stored in the first storage area is not lost when the device loses power and is not modified when the operating system is updated. After installing the second version of the operating system and restarting, the method further includes: The electronic device reads the first list from the first storage area; The electronic device responds to the first list and installs N copies of the first application.

3. The method according to claim 1, characterized in that, After the electronic device is pre-installed with N of the first applications, the method further includes: The electronic device writes a first list to a first storage area. The first list includes N application identifiers of the first application. The data stored in the first storage area is not lost when the device loses power and is not modified when the operating system is updated. After installing the third version of the operating system and rebooting, the method further includes: The electronic device reads the first list from the first storage area; The electronic device responds to the first list and installs N copies of the first application; The electronic device installs the third application in response to the pre-installed extension list from the third data packet.

4. The method according to claim 2 or 3, characterized in that, The response to the first list, installing N of the first applications, includes: The electronic device traverses each of the first applications in the first list and searches for the program files of each first application according to the access path of the first application. When a program file for the first application is found, the electronic device installs the corresponding first application.

5. The method according to any one of claims 1-3, characterized in that, The first data packet includes first pre-installed data, which includes N program files of the first application and a corresponding second list. The second list includes the application package name corresponding to each first application and the access path corresponding to the program file of the first application. The electronic device, in response to the first data packet, installs the first version of the operating system, including: The electronic device parses the first data packet; The electronic device writes the first pre-installed data parsed from the first data packet into the pre-installed partition of the electronic device; after the first pre-installed data is written into the pre-installed partition, the program file of the first application is stored under the corresponding access path; After installing the first version of the operating system and restarting, the method further includes: The electronic device scans the pre-installed partition; When the electronic device scans the second list, it accesses the program file of each of the first applications; When the electronic device accesses the program file of the first application, the first application is installed; After the first application in the second list is installed, the electronic device generates a first list, which includes the application package name and corresponding access path in the second list.

6. The method according to claim 2, characterized in that, The first storage area belongs to the basic partition of the electronic device.

7. The method according to claim 6, characterized in that, After the electronic device writes a first list to a first storage area, the first list is deleted under preset conditions, wherein the preset conditions include one or more of the following: If the electronic device is detected to be in factory mode, restore the device to factory settings. The electronic device was detected to have responded to the user's operation, executed a flashing task, and the flashing was successful.

8. The method according to claim 2, characterized in that, After installing the first version of the operating system and restarting, and before installing N of the first applications on the electronic device, the method further includes: The electronic device determines that no list data is stored in the first storage area.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program or instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-8.