Operation system updating method and electronic equipment
By installing only pre-installed applications during the operating system update of electronic devices, the maintenance difficulty problem caused by different pre-installed applications on different batches of devices is solved, and the stability and maintenance difficulty of pre-installed applications during operating system updates are achieved.
Patent Information
- Application Number
- CN202311628492.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2043-11-29
AI Technical Summary
Different batches of electronic devices pre-installed applications may be different, resulting in different upgrade packets required when operating system updates, increasing maintenance difficulty.
By controlling electronic devices to install only pre-installed applications when updating the operating system, reducing the amount of upgraded data packets released for each operating system version and reducing maintenance difficulty.
It realizes that pre-installed applications remain unchanged when the operating system is updated, without increasing or decreasing, reducing the difficulty of maintaining upgraded data packets and improving the efficiency of operating system updates.
Smart Images

Figure CN120104151A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an operating system updating method and electronic device. Background Art
[0002] Electronic devices usually pre-install some applications. The program files of the pre-installed applications are usually included in the upgrade data package of the operating system, so that when the upgrade data package of the operating system is installed, the applications that need to be pre-installed can be automatically installed, which is convenient for users.
[0003] However, different batches of electronic devices may have different pre-installed applications. In order to ensure that the pre-installed applications in the electronic devices remain unchanged (neither increase nor decrease) after each operating system update, different batches of electronic devices require different upgrade data packages, which undoubtedly increases the difficulty of maintaining the upgrade data packages. Summary of the invention
[0004] In view of this, the present application provides an operating system update method and an electronic device, which controls the electronic device to only install pre-installed applications when updating the operating system, thereby reducing the amount of upgrade data packages released for each operating system version and reducing the difficulty of maintaining the upgrade data packages.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides an operating system updating method, the method comprising: an electronic device obtains a first data packet, the first data packet is used to install a first version of an operating system, the first data packet includes N program files of a first application, wherein N is a positive integer; the electronic device installs the first version of the operating system in response to the first data packet, before installing the first version of the operating system, the electronic device does not contain any preinstalled applications, and after installing the first version of the operating system and restarting, the preinstalled applications in the electronic device include N first applications; the electronic device obtains a second data packet, the second data packet is used to install a second version of the operating system, the second data packet includes program files of a second application; the electronic device installs the second version of the operating system in response to the second data packet, and after installing the second version of the operating system and restarting, the preinstalled applications in the electronic device include N first applications and do not include the second application.
[0007] The second application is an application different from the first application. In other examples, the second data packet may also include the same application as the first application.
[0008] In other words, if the electronic device has not installed pre-installed applications, the application program can be pre-installed according to the application program carried in the upgrade data package (e.g., the first data package). If the electronic device has already installed the application program, when the operating system is updated using the upgrade data package (e.g., the second data package), the previously pre-installed application program is installed, and no additional pre-installed application program is added, nor is the number of pre-installed applications reduced.
[0009] In the above embodiment, the application programs actually preinstalled in the electronic device are related to the applications preinstalled for the first time and are decoupled from the upgrade data packages. There is no need to configure upgrade data packages with different preinstalled applications for electronic devices with different preinstalled applications, thereby reducing the amount of upgrade data packages released for each operating system version and reducing the difficulty of maintaining the upgrade data packages.
[0010] In some embodiments, the method also includes: the electronic device obtains a third data packet, the third data packet is used to install a third version of the operating system, the third data packet includes program files of the second application and the third application, the third data packet includes a preinstalled list and a preinstalled extension list, the preinstalled extension list includes the application identifier of the third application, and the preinstalled list includes the application identifier of the second application; the electronic device installs the third version of the operating system in response to the third data packet, and after installing the third version of the operating system and restarting, the preinstalled applications in the electronic device include N first applications and the third application in the preinstalled extension list, but do not include the second application.
[0011] Among them, the above-mentioned third application is also an application program different from the first application.
[0012] In the above embodiment, it is also possible to configure a preinstalled extension list in the upgrade data package to implement the use of the upgrade data package to preinstall new applications on all electronic devices. The above preinstalled extension list is a different list from the preinstalled list in the upgrade data package, and the electronic device does not need to preinstall the application programs in the preinstalled list in the upgrade data package. While maintaining the degree of decoupling between the upgrade data package and the actual preinstalled applications of the electronic device, the specific needs of adding preinstalled applications are met. That is, on the premise of meeting specific needs, the human-computer interaction efficiency of electronic devices is improved.
[0013] In some embodiments, after the electronic device pre-installs N of the first applications, the method further includes: the electronic device writes a first list to a first storage area, the first list including application identifiers of the N first applications, and 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 installs the N first applications in response to the first list.
[0014] In the above embodiment, each time the electronic device updates the operating system, the application is pre-installed according to the first list, and the first list is stored in a storage area where data is not easily lost. During the entire use cycle of the electronic device, the actual pre-installed application can be guaranteed to remain unchanged, without affecting the actual use of the user, and also improving the human-computer interaction efficiency of the user installing the application.
[0015] In some embodiments, after the electronic device pre-installs N of the first applications, the method further includes: the electronic device writes a first list to a first storage area, the first list including application identifiers of the N first applications, and 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 the N first applications in response to the first list; and installing the third application in response to the pre-installed extension list from the third data packet.
[0016] In the above embodiment, during the entire use cycle of the electronic device, it can be ensured that the actual pre-installed applications are not reduced and the actual use of the user is not affected. In addition, some pre-installed applications can be added according to business needs to meet actual business needs.
[0017] In some embodiments, after installing the third application in the pre-installed extension list, the method further includes: the electronic device updating the first list, wherein an application identifier of the third application is newly added to the updated first list.
[0018] In the above embodiment, the additional pre-installed application program may also be solidified to prevent the pre-installed application program in the electronic device from being changed at will.
[0019] In other embodiments, after the electronic device has pre-installed a third application, if the user has used the third application, for example, if an interactive operation between the user and the third application is detected, the electronic device updates the first list, wherein the application identifier of the third application is added to the updated first list. If the user has not used the third application, the electronic device does not update the first list. In this way, when the operating system is updated next time, if the upgrade data package used does not contain the pre-installed extension list, the third application will no longer be pre-installed.
[0020] In other possible embodiments, the first list includes the application identifier of the fourth application. When the electronic device detects that the user instructs to delete the fourth application, it can trigger an update of the first list, and the updated first list does not contain the application identifier of the fourth application.
[0021] In some embodiments, in response to the first list, installing N first applications 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 first application accordingly each time a program file of the first application is found.
[0022] In some embodiments, the first data packet includes first preinstalled data, the first preinstalled data includes N program files of the first applications and a corresponding second list, the second list includes an application package name corresponding to each of the first applications and an access path corresponding to the program file of the first application; the electronic device installs the first version of the operating system in response to the first data packet, including: the electronic device parses the first data packet; the electronic device writes the first preinstalled data parsed from the first data packet into a preinstalled partition of the electronic device; after the first preinstalled data is written into the preinstalled 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 also includes: the electronic device scans the preinstalled partition; when the electronic device scans the second list, the electronic device 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 applications in the second list are installed, a first list is generated, the first list includes the application package name and the corresponding access path in the second list.
[0023] In some embodiments, the first storage area belongs to a base partition of the electronic device.
[0024] In the above embodiment, it is ensured that the first list is not affected by the update of the operating system, and it is ensured that the pre-installed application programs will not be reduced after each operating system update.
[0025] In some embodiments, after the electronic device writes 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 factory device; detecting that the electronic device responds to user operations, executes 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: detecting that the electronic device is operating normally; detecting that the electronic device is powered off and restarted; detecting that the electronic device responds to user operation and deletes the installed first application; detecting that the electronic device responds to user operation and restores factory settings; detecting that the electronic device responds to user operation and performs a flashing task, and the flashing fails; or detecting that the electronic device responds to user operation and installs other applications.
[0027] In some embodiments, after installing the first version of the operating system and restarting, and before the electronic device installs N first applications, the method further includes: determining that no list data is stored in the first storage area.
[0028] In a second aspect, an electronic device provided by an embodiment of the present application includes one or more processors and a memory, wherein the memory is used to store computer instructions, and when the one or more processors execute the computer instructions, the one or more processors are used to: obtain a first data packet, wherein the first data packet is used to install a first version of an operating system, wherein the first data packet includes N program files of a first application, wherein N is a positive integer; in response to the first data packet, install the first version of the operating system, before installing the first version of the operating system, the electronic device does not contain any preinstalled applications, and after installing the first version of the operating system and restarting, the preinstalled applications in the electronic device include N of the first applications; obtain a second data packet, wherein the second data packet is used to install a second version of the operating system, wherein the second data packet includes program files of a second application; in response to the second data packet, install the second version of the operating system, and after installing the second version of the operating system and restarting, the preinstalled 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 used to: obtain a third data packet, the third data packet is used to install a third version of an operating system, the third data packet includes program files of the second application and the third application, the third data packet includes a preinstalled list and a preinstalled extension list, the preinstalled extension list includes an application identifier of the third application, and the preinstalled list includes an application identifier of the second application; in response to the third data packet, install the third version of the operating system, after installing the third version of the operating system and restarting, the preinstalled applications in the electronic device include N first applications and the third application in the preinstalled extension list, but do not include the second application.
[0030] In some embodiments, after pre-installing N of the first applications, the one or more processors are used to: write a first list into a first storage area, wherein the first list includes application identifiers of the N first applications, and 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 install N first applications in response to the first list.
[0032] In some embodiments, after preinstalling N of the first applications, the one or more processors are further configured to: write a first list into a first storage area, wherein the first list includes application identifiers of the N first applications, and 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 restarting, the one or more processors are further used to: read the first list from the first storage area; install N first applications in response to the first list; and install the third application in response to the pre-installed extension list from the third data packet.
[0034] In some embodiments, after installing the third application in the pre-installed extension list, the one or more processors are used to: update the first list, wherein the application identifier of the third application is newly added to the updated first list.
[0035] In some embodiments, the one or more processors are used 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 applications; and install the first application accordingly each time a program file of the first application is found.
[0036] In some embodiments, the first data packet includes first preinstalled data, the first preinstalled data includes N program files of the first applications and a corresponding second list, the second list includes an application package name corresponding to each of the first applications and an access path corresponding to the program file of the first application; the one or more processors are used to: parse the first data packet; write the first preinstalled data parsed from the first data packet into a preinstalled partition; after the first preinstalled data is written into the preinstalled 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 used to: scan the pre-installed partition; when scanning the second list, access the program file of each of the first applications; when accessing the program file of the first application, 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 the corresponding access path in the second list.
[0038] In some embodiments, the first storage area is an oeminfo subpartition in 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 factory device; detecting that the electronic device responds to user operations, executes 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 of the first applications, the one or more processors are used to: determine that no list data is stored in the first storage area.
[0041] In a third aspect, an embodiment of the present application provides a computer storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method in the above-mentioned first aspect and possible embodiments thereof.
[0042] In a fourth aspect, the present application provides a computer program product. When the computer program product is run on the above-mentioned electronic device, the electronic device executes the method in the above-mentioned first aspect and possible embodiments thereof.
[0043] In a fifth aspect, the present application provides a chip system, which is applied to an electronic device and stores a computer program. When the computer program is executed, the electronic device executes the method in the above-mentioned first aspect and its possible embodiments.
[0044] It can be understood that the electronic devices, computer storage media and computer program products provided in the above-mentioned aspects are all applied to the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 An example diagram of a data storage structure of an operating system in an electronic device provided in an embodiment of the present application;
[0046] Figure 2 An example diagram of a process for preinstalling an application when upgrading an operating system provided in an embodiment of the present application;
[0047] Figure 3 An example diagram of an upgrade data package for different devices provided in an embodiment of the present application;
[0048] Figure 4 One of the example diagrams of the upgrade path test before the release of operating system version m provided in the embodiment of the present application;
[0049] Figure 5 The second example diagram of the upgrade path test before the release of operating system version m provided in the embodiment of the present application;
[0050] Figure 6 An example diagram of the effect of an operating system update method provided in an embodiment of the present application;
[0051] Figure 7 One of the step flow charts of an operating system update method provided in an embodiment of the present application;
[0052] Figure 8 A second flowchart of a method for updating an operating system provided in an embodiment of the present application;
[0053] Fig. 9 A flowchart of a method for updating an operating system provided in an embodiment of the present application;
[0054] Fig.10 A fourth step flow chart of a method for updating an operating system provided in an embodiment of the present application;
[0055] Fig.11 One of the example diagrams of the scenario of clearing the APL list provided in the embodiment of the present application;
[0056] Fig.12 One of the example diagrams of the scenario of retaining the APL list provided in the embodiment of the present application;
[0057] Fig.13The second example diagram of a scenario of clearing the APL list provided in an embodiment of the present application;
[0058] Fig.14 The second example diagram of the scenario of retaining the APL list provided in the embodiment of the present application;
[0059] Fig.15 Figure 3 of the scenario example of retaining the APL list provided in the embodiment of the present application;
[0060] Fig.16 This is a diagram showing an example structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0061] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0062] The implementation of this embodiment will be described in detail below with reference to the accompanying drawings.
[0063] The embodiment of the present application provides an operating system update method, which can be applied to electronic devices. It can be understood that electronic devices need to be installed with an operating system before they can be used by users.
[0064] Exemplarily, the electronic devices include but are not limited to smartphones, smart headphones, tablet computers, smart refrigerators, smart speakers, etc., which can be installed with operating systems. Exemplary embodiments of operating systems include but are not limited to operating systems that have been published in related technologies.
[0065] The data storage structure of the operating system in an electronic device is as follows Figure 1 As shown, the data storage structure of the operating system includes a Common partition, a system partition and a user data partition (Userdata).
[0066] The Common partition is a basic partition that stores system data that is not involved in operating system updates. In some embodiments, the Common partition may include at least one sub-partition, such as an oeminfo sub-partition. The data stored in the oeminfo sub-partition is not easily lost.
[0067] The user data partition (Userdata) is used to store the user's personal data, such as APPs installed by the user, pictures, documents, videos and other personal data saved by the user.
[0068] The system partition is used to store operating system data. Exemplarily, the system partition is further divided into a static partition and a dynamic partition (Super).
[0069] Figure 1 The system partition shown in includes a static partition. After the electronic device is started, the basic partition (Common), the static partition and the dynamic partition (Super) can be loaded in sequence to realize operation based on the operating system.
[0070] In other embodiments, the static partition may also include a static partition (A) and a static partition (B). The static partition (A) and the static partition (B) back up each other, that is, the structures of the static partition (A) and the static partition (B) correspond to each other. In the case of two static partitions, two operating systems can be virtualized in the electronic device, such as operating system A and operating system B. When the electronic device is started, it needs to run based on any one of the operating systems. Exemplarily, when the electronic device needs to run based on operating system A, the electronic device starts from static partition (A): loads the basic partition (Common), static partition (A) and dynamic partition (Super) in sequence; and exemplarily, when the electronic device needs to run based on operating system B, the electronic device starts from static partition (B): loads the basic partition (Common), static partition (B) and dynamic partition (Super) in sequence.
[0071] Take the Universal Flash Storage (UFS) in the Master Boot Record (MBR) format as an example. In the MBR (Master Boot Sector, the first sector of UFS, i.e., the 0th cylinder 0th head 1st sector of the C / H / S address) of UFS, the description of the startup sequence of the electronic device is saved, for example, starting from the static partition (A) (the startup sequence mark is A) or starting from the static partition (B) (the startup sequence mark is A). After the electronic device is started, the startup sequence of the electronic device is first read from the MBR of UFS. Then, according to the boot sequence read, the electronic device can load the data in the system partition, such as the loading of the basic partition (Common), static partition (A) and dynamic partition (Super) in sequence as described in the above example, or the loading of the basic partition (Common), static partition (B) and dynamic partition (Super) in sequence.
[0072] In addition, the dynamic partition (Super) may also include multiple sub-partitions, such as a pre-installed partition (preload). The pre-load partition is used to store program files of application programs that need to be pre-installed.
[0073] Understandably, dynamic partitioning also includes Figure 1Other partitions not shown in the figure, 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 the subsequent embodiments, the method provided by the embodiment of the present application is mainly introduced by taking upgrading the operating system as an example. The process of upgrading the operating system of the electronic device is as follows:
[0075] First, the electronic device can obtain an upgrade data packet through over-the-air technology (OTA). The upgrade data packet can be used to upgrade the operating system to a target version, which can be the latest released version of the operating system or a user-specified version of the operating system to be backtracked. This application does not specifically limit this. Of course, upgrading to different target versions requires different upgrade data packets.
[0076] In some embodiments, the upgrade data package includes data for updating multiple partitions in the operating system. Figure 1 As shown, the upgrade data package includes preinstalled software, which is used to update the data in the preload partition. The preinstalled software may include program files of one or more application programs that need to be preinstalled. In addition, the upgrade data package also includes data for updating the basic partition, static partition, and other sub-partitions in the dynamic partition, which is not specifically limited in the embodiments of the present application.
[0077] Secondly, after obtaining the upgrade data packet, the electronic device can parse the upgrade data packet and write the data carried in the upgrade data packet into the corresponding partition. For example, the pre-installed software in the upgrade data packet is written into the preload partition. It can be understood that the above process can refer to the relevant technology and will not be repeated here.
[0078] Finally, the electronic device is restarted to make the upgraded operating system effective. During the restart process, the electronic device can perform the upgraded optimization, for example, installing the application programs that need to be pre-installed.
[0079] For example, Figure 2 As shown, the process of installing the pre-installed application program during the process of upgrading the operating system of the electronic device includes the following steps:
[0080] S1, write the upgrade data package to the electronic device and trigger a restart.
[0081] In some embodiments, after verifying the upgrade data packet, the electronic device parses the upgrade data packet. Then, the parsed data is written into the corresponding partitions in the data storage structure of the operating system, and then a restart is triggered. The specific implementation process can be referred to the relevant technology, which will not be described here.
[0082] S2, scanning the pre-installed partition, and obtaining an application installation package (Android application package, APK) list from the upgrade data package.
[0083] In some embodiments, the APK list includes relevant information of the application programs to be preinstalled (hereinafter referred to as preinstalled applications). The relevant information includes the application package name and the access path of the program file of the application program in the preload partition.
[0084] It can be understood that the above APK list and the program files of the pre-installed applications are all 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 of the above 10 pre-installed applications. The access path corresponding to the above pre-installed applications refers to the write path of the APK program files in the preload partition, which can usually be pre-configured. In addition, APK and application can be used interchangeably.
[0085] In this way, after the electronic device parses the preinstalled software from the upgrade data package and writes the preinstalled software into the preload partition, it can find the APK list from the upgrade data package under the specified path (e.g., preload / xxx / all / cn / xml) during the scanning of the preload partition. At the same time, it can also find the program files of each APK under the access path corresponding to each APK recorded in the APK list.
[0086] Exemplarily, the preinstalled applications can be divided into uninstallable preinstalled applications and non-uninstallable preinstalled applications. The uninstallable preinstalled applications refer to applications that do not affect the normal operation of the electronic device after uninstallation, and the non-uninstallable preinstalled applications refer to applications that affect the normal operation of the electronic device 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 corresponding to the above uninstallable APK list are all pre-installed applications that can be uninstalled. The APKs corresponding to the above non-uninstallable APK list are all pre-installed applications that cannot be uninstalled.
[0088] S3, install the APK in the APK list.
[0089] In some embodiments, after the APK list is scanned, the program files of each pre-installed application are traversed according to the access path in the APK list, and then the corresponding pre-installed application is installed based on the traversed program files.
[0090] In other words, the APK list contains information about how many pre-installed applications are actually installed after the electronic device is upgraded and restarted. That is, when upgrading the operating system version, the actual pre-installed applications are only related to the pre-installed applications carried by the upgrade data packet.
[0091] However, due to product business reasons, electronic devices released at different times may require different pre-installed applications. Electronic devices pre-installed with different applications may also be called devices from different batches. The electronic devices released at different times may refer to the same model of devices or different models of devices with the same operating system.
[0092] It is understandable that electronic devices released at different time points may have different operating systems installed when they are turned on for the first time after leaving the factory due to different factory production times. In addition, the pre-installed applications corresponding to different operating system versions may also be different. In this way, electronic devices released at different time points may have different pre-installed applications after they are turned on for the first time. The operating system version installed when the device is turned on for the first time can be called the initial version of the electronic device.
[0093] After an electronic device has pre-installed applications, the pre-installed applications cannot be changed at will each time the operating system is upgraded. That is, different devices correspond to different initial versions, and if the pre-installed applications under the corresponding initial versions are different, even if they are upgraded to the same operating system version, the pre-installed applications in the upgrade data package required to be used are different, so as to ensure that the pre-installed applications in any electronic device remain unchanged after each operating system upgrade.
[0094] In this way, each operating system version includes not only the upgrade data package a for the current version (including all applications that need to be pre-installed under this operating system version), but also the upgrade data package b for devices whose initial version is another operating system version (including all applications that need to be pre-installed under another operating system version). The pre-installed applications in the upgrade data package a and the upgrade data package b may be different.
[0095] Obviously, with the continuous updates of the operating system and the multiple changes of the applications that need to be pre-installed, the publisher of the operating system needs to maintain more and more upgrade data packages, and the maintenance difficulty is getting higher and higher. For example, before the release of a new operating system version, there are many upgrade data packages that need to be tested, and the human-computer interaction efficiency during the test is low.
[0096] Exemplarily, the upgrade data package includes basic software, customized software and pre-installed software. The above-mentioned basic software is the data required to be used when all types of electronic devices upgrade their operating systems. The above-mentioned customized software is the exclusive data required to be used when a specific electronic device upgrades its operating system. The above-mentioned specific electronic device refers to a device with special functional requirements. The above-mentioned pre-installed software refers to data for pre-installing applications. For example, the pre-installed software includes program files and APK lists corresponding to the pre-installed applications.
[0097] like Figure 3 As shown, after device 1 leaves the factory, the version of the operating system installed when it is turned on for the first time is operating system version 1, which is the initial version of device 1. In some examples, device 1 can upgrade the operating system of device 1 to operating system version 1 through upgrade data package 1.
[0098] like Figure 3 As shown, the upgrade data package 1 includes basic software 1 , customized software 1 and pre-installed software 1 .
[0099] The basic software 1 is data required to upgrade the operating systems of all devices to the operating system version 1. The customized software 1 is data used to implement special functional requirements of the device 1. In some embodiments, if the 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 operating system version 1 include APK 1, APK 2, ..., and APK N. Where N is a positive integer. Correspondingly, the pre-installed software 1 may include N applications such as APK 1, APK 2, ..., APK N.
[0101] In this way, after the device 1 installs the operating system version 1 according to the upgrade data package 1, the above-mentioned APK 1, APK 2... and APK N can be actually pre-installed.
[0102] like Figure 3 As shown, after the device 2 leaves the factory, when it is turned on for the first time, the version of the operating system installed is operating system version 2. Operating system version 2 is the initial version of the device 2.
[0103] Exemplarily, device 2 can upgrade the operating system to operating system version 2 through upgrade data package 2. The pre-installed application programs corresponding to the operating system version 2 include APK 1, APK 2, . . . , APK N, and APK N+1.
[0104] Correspondingly, device 2 can upgrade the operating system to operating system version 2 by upgrading data package 2-2. Figure 3 As shown, the upgrade data package 2-2 includes basic software 2, customized software 2 and pre-installed software 2. The pre-installed software 2 may include N+1 application programs such as APK1, APK 2, ..., APK N+1.
[0105] In addition, after the release of operating system version 2, device 1 also needs to upgrade the operating system from operating system version 1 to operating system version 2. If device 1 is upgraded using upgrade data package 2-2, after the upgrade, the number of pre-installed applications in device 1 changes from N to N+1, which obviously does not meet the user's requirements for the upgrade result and affects the user's upgrade experience.
[0106] In some embodiments, the device 1 needs to use the upgrade data package 2-1 to upgrade the version of the operating system to the operating system version 2. The difference between the upgrade data package 2-1 and the upgrade data package 2-2 includes the difference in the pre-installed software part.
[0107] In the above example, the upgrade data package corresponding to the operating system version 2 includes not only the upgrade data package 2-2 for the current version, but also the upgrade data package 2-1 for the device whose initial version is the operating system version 1.
[0108] Afterwards, when upgrading the operating system to operating system version 3, device 1 needs to upgrade the operating system to operating system version 3 using upgrade data package 3-1. Device 2 needs to upgrade the operating system to operating system version 3 using upgrade data package 3-2.
[0109] Among them, the upgrade data package 3-1 includes pre-installed software 1, and the upgrade data package 3-2 includes pre-installed software 2. After the operating system is upgraded based on the upgrade data package 3-1, the pre-installed applications in the device 1 include N applications such as APK 1, APK 2, ..., APK N. After the operating system is upgraded based on the upgrade data package 3-2, the pre-installed applications in the device 2 include N+1 applications such as APK 1, APK2, ..., APK N+1.
[0110] Similarly, when upgrading the operating system to operating system version m, device 1 needs to upgrade the operating system to operating system version m through upgrade data package m-1. Device 2 needs to upgrade the operating system to operating system version m through upgrade data package m-2. Upgrade data package m-1 includes pre-installed software 1, and upgrade data package m-2 includes pre-installed software 2.
[0111] Figure 3 Only two devices with different pre-installed applications are shown, and the upgrade data packets used when the operating system version is upgraded. In actual applications, there are more devices with different pre-installed applications. It can be seen that in actual applications, facing a large number of devices that need to be pre-installed with different applications, each operating system version corresponds to a large number of upgrade data packets. In addition, as the pre-installed applications continue to change, the newly released operating system version corresponds to more upgrade data packets.
[0112] In order to ensure the reliability of the upgrade data package, before each new version of the operating system is released, it is necessary to perform an upgrade test on the upgrade data package corresponding to the operating system version 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. The upgrade path refers to the process of upgrading an electronic device with an installed historical operating system version to operating system version m.
[0114] For example, Figure 4 As shown, the historical operating system includes operating system version 1, operating system version 2, and operating system version 3, etc. The process of testing all upgrade paths is as follows: Based on the upgrade data packet related to operating system version m, the test is to upgrade the electronic device with operating system version 1 installed to operating system version m. Based on the upgrade data packet related to operating system version m, the test is to upgrade the electronic device with operating system version 2 installed to operating system version m. Based on the upgrade data packet related to operating system version m, the test is to upgrade the electronic device with operating system version 3 installed to operating system version m.
[0115] Take the test of upgrading an electronic device with operating system version 2 installed to operating system version m as an example. 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, to test the process of upgrading an electronic device that has installed operating system version 2 based on upgrade data package 2-1 to operating system version m using upgrade data 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, to test the process of upgrading an electronic device that has installed operating system version 2 based on upgrade data package 2-2 to operating system version m using upgrade data package m-2.
[0118] In a scenario 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. For developers, testing is cumbersome and human-computer interaction efficiency is low.
[0119] In order to improve the above problems, an embodiment of the present application provides an operating system update method, which is applied to an electronic device. When the electronic device updates the operating system based on the upgrade data package, only pre-installed applications adapted to the local device are installed. That is, by changing the update method of the electronic device, the versatility of the upgrade data package is improved, the number of upgrade data packages used to configure the target version is reduced, and the human-computer interaction efficiency of the upgrade data package for testing the target version is improved.
[0120] For example, Figure 6 As shown, the target version is the operating system version m, and the operating system version m corresponds to a general upgrade data package m, which includes basic software m, customized software m and pre-installed software m.
[0121] Among them, 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 the upgrade data package m-2 mentioned in the above embodiment, and will not be repeated here.
[0122] In addition, the pre-installed software m of the general upgrade data package m includes all application programs that need to be pre-installed under the operating system version m, such as APK 1, APK 2...APK N+i.
[0123] like Figure 6 As shown, the general upgrade data packet m can be used to upgrade device 1, and the general upgrade data packet m can also be used to upgrade device 2. Device 1 and device 2 are electronic devices with different initial versions and different pre-installed applications. Taking the initial version of device 1 as operating system version 1 as an example, in the process of upgrading device 1 using the general upgrade data packet m, device 1 only installs the pre-installed applications corresponding to operating system version 1, such as APK1, APK2...APKN. For the specific implementation process, please refer to the description in the subsequent embodiments, which will not be repeated here. Taking the initial version of device 2 as operating system version 2 as an example, in the process of upgrading batch 2 electronic devices using the general upgrade data packet m, device 2 only installs the pre-installed applications corresponding to operating system version 2, such as APK1, APK2...APKN+1. For the specific implementation process, please refer to the description in the subsequent embodiments, which will not be repeated here.
[0124] The following describes the implementation details of the upgrade method provided in the embodiment of the present application in conjunction with the accompanying drawings:
[0125] like Figure 7 As shown, in the scenario where the electronic device is turned on for the first time after leaving the factory, the factory settings are restored in the factory mode, or the electronic device is successfully flashed, the above operating system update method may include the following steps:
[0126] S101, writing data of a first upgrade package into an electronic device, and restarting the electronic device.
[0127] Among them, the above-mentioned first upgrade package is an upgrade data package for configuring the operating system, which can also be referred to as the first data package. The above-mentioned first upgrade package comes from a cloud server for publishing the operating system. Exemplarily, the electronic device can download the upgrade data package corresponding to the latest operating system version (target version 1) from the cloud server through OTA technology, for example, downloading the first upgrade package. In addition, the operating system of the above-mentioned target version 1 can also be referred to as the first version of the operating system.
[0128] The first upgrade package includes the first pre-installed software. The first pre-installed software includes the pre-installed application programs required to be installed for the latest operating system version and the corresponding APK list (second list).
[0129] In some embodiments, the above 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] It can be understood that the first upgrade package includes data for updating each partition in the operating system. For example, the first upgrade package may include first preinstalled software (or first preinstalled data), and the first preinstalled software is used to update the preload partition. The preload partition is the corresponding partition of the first preinstalled software. After parsing the first preinstalled software, the first preinstalled software can be written into the preload partition.
[0131] After the data in the first upgrade package is written into 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, pre-upgrade verification and other pre-processing may be performed on the first upgrade package. For the specific process, reference may be made to related technologies and will not be described in detail here.
[0133] S102, scan the pre-installed partition to obtain an APK list 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 the target version 1, but also the APK list corresponding to the target version 1. The APK list may include relevant information of the application that needs to be pre-installed under the target version 1. For example, the relevant information may include the application package name of the application and the access path of the application in the preload partition.
[0135] In some embodiments, after the electronic device parses the first preinstalled software from the first upgrade package and writes it into the preload partition, the electronic device can find the APK list carried in the first preinstalled software under the specified path (such as preload / xxx / all / cn / xml) during the process of scanning the preload partition. At the same time, the program files of each APK can also be found in the preload partition according to the access path corresponding to each APK recorded in the APK list. Exemplarily, 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).
[0136] S103, searching for a preconfigured actual preload list (APL) in the oeminfo sub-partition of the basic partition.
[0137] The APL list (first list) includes the applications pre-installed on the electronic device before the upgrade. When the electronic device is turned on for the first time after leaving the factory (or the electronic device is successfully flashed and restored to factory settings in factory mode), there are no pre-installed applications on the electronic device. In this scenario, the corresponding APL list cannot be found in the oeminfo sub-partition.
[0138] In some embodiments, there is no necessary order between S102 and S103, and the two can be executed synchronously or asynchronously. In other embodiments, S102 can be executed when the electronic device determines through S103 that the oeminfo sub-partition does not contain an APL list.
[0139] In addition, the above S103 is only one way to determine whether the electronic device has been pre-installed with an application. In other possible embodiments, other methods can also be used to determine whether the electronic device has been pre-installed with an application. The embodiments of the present application do not specifically limit this.
[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 also enter S104 and S105. There is no necessary order between the above S104 and S105.
[0141] S104, installing the APK in the APK list.
[0142] In some embodiments, when it is determined that the electronic device has not installed a pre-installed application, for example, when it is determined that the oeminfo sub-partition 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 path in the APK list. Then, based on the traversed program files, the corresponding application is installed to implement the pre-installed application. Among them, the APK recorded in the APK list from the first upgrade package can be called the first application, and the number of the first application is N, where N is a non-zero positive integer.
[0143] S105, generate an APL list according to the APK list.
[0144] In some embodiments, the electronic device may generate an APL list according to the APK list from the first upgrade package.
[0145] Exemplarily, the APL list may include the number of applications to be preinstalled, application package names, and access paths. The application package names and access paths in the APL list are the same as those in the APK list.
[0146] It is understandable that when the electronic device is turned on for the first time after leaving the factory, the pre-installed applications installed are all applications included in the APK list in the upgrade data package. In this scenario, the applications indicated by the generated APL list are also the same as the APK list in the upgrade data package.
[0147] For example, the APK list from the first upgrade package includes APK1...APK N, and the generated APL list includes the application package names and access paths of APK1...APK N. The APL list may also include the number N of applications.
[0148] S106, writing the APL list into the oeminfo sub-partition.
[0149] It can be understood that the data stored in the above-mentioned oeminfo sub-partition is not easy to be lost. After the APL list is written into the first storage area of the oeminfo sub-partition, whether the electronic device is powered off or the electronic device updates the operating system, the APL list will not be deleted, nor will the content of the APL list be changed. In this way, the applications in the APL list can always be consistent with the pre-installed applications of the initial version of the electronic device.
[0150] In some embodiments, during the upgrade process of the operating system, the electronic device pre-installs applications according to the APL list. In this way, no matter what pre-installed applications are carried in the upgrade data packet, after the upgrade is performed according to the upgrade data packet, the pre-installed applications in the electronic device will not change.
[0151] In the embodiment of the present application, after the device is turned on for the first time after leaving the factory (or the electronic device is successfully flashed and the factory settings are restored in factory mode), the 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 can remain unchanged after it is generated. In this way, each time the operating system is upgraded, the pre-installed applications are installed according to the APL list to ensure that the pre-installed applications remain unchanged after the upgrade.
[0152] That is, during the operating system upgrade process of the electronic device, the actual pre-installed application is not affected by the pre-installed application in the upgrade data package. It is not necessary to release upgrade data packages containing different pre-installed application for electronic devices pre-installed with different application, thereby improving the versatility of the upgrade data package.
[0153] In some embodiments, after the electronic device is turned on for the first time after leaving the factory, as a new operating system version is released, the electronic device also needs to update the operating system accordingly. The above process can be called a conventional OTA operating system upgrade. In the conventional OTA operating system process, Figure 8 As shown, the above method may include the following steps:
[0154] S201, write the data of the second upgrade package into the electronic device, and restart.
[0155] Among them, the above-mentioned second upgrade package is an upgrade data package for upgrading the operating system, which can also be called a second data package. The above-mentioned second upgrade package comes from a cloud server for publishing the operating system. Exemplarily, the electronic device can download the upgrade data package corresponding to the latest operating system version (target version 2) from the cloud server through OTA technology, for example, downloading the second upgrade package. Among them, the target version 2 can be an operating system version that is released later than the target version 1. In addition, the target version 2 can also be called the second version.
[0156] The second upgrade package includes the second pre-installed software. The second pre-installed software includes the applications required to be pre-installed for the latest operating system version (target version 2) and the corresponding APK list. For example, APK1, APK2...APK N+1 need to be installed under target version 2. The APK list from the second pre-installed software includes APK1, APK2...APK N+1. Among them, in the second upgrade package, the application that is different from the application in the APK list of the first upgrade package can be called the second application. For example, APK N+1 is the second application.
[0157] In addition, during the process of writing the second upgrade package into the electronic device and restarting it, reference may be made to S101 of the aforementioned embodiment, which will not be described in detail here.
[0158] S202, searching for a pre-configured APL list in the oeminfo sub-partition.
[0159] In some embodiments, the APL list may be data pre-configured in the oeminfo sub-partition in S106. The electronic device may scan the oeminfo sub-partition, and after scanning the APL list, the process proceeds to S203.
[0160] S203, scan and install the APK in 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 APK in the APL list and have nothing to do with 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 in the electronic device are related to the APK list from the second pre-installed software.
[0162] In addition, after S201, the electronic device will also scan the preload partition to obtain the APK list, refer to S102 for details, which will not be described here. In this way, when the found APL list is marked as invalid, or when the APL list is not found, the APK list can still be used to preinstall the application. Similarly, after preinstalling the application according to the APK list, a new APL list can also be generated based on the APK list and written into the oeminfo sub-partition.
[0163] In other embodiments, the electronic device can also add applications that need to be pre-installed during the operating system upgrade, that is, add applications that do not need to be pre-installed in the initial version. The added applications can be applications that the user indicates need to be pre-installed, or the added applications can be applications that need to be pre-installed according to business needs. In short, in the scenario of adding pre-installed applications, such as Fig. 9 As shown, the above method may further include the following steps:
[0164] S301, write the data of the third upgrade package into the electronic device, and restart.
[0165] Among them, the above-mentioned third upgrade package is an upgrade data package for upgrading the operating system, which may also be referred to as a third data package. The above-mentioned third upgrade package comes from a cloud server for publishing the operating system. Exemplarily, the electronic device can download the upgrade data package corresponding to the latest operating system version (target version 3) from the cloud server through OTA technology, for example, download the third upgrade package. Among them, target version 3 can be an operating system version that is released later than target version 1.
[0166] The third upgrade package includes the third pre-installed software. The third pre-installed software includes the application programs required to be pre-installed for the latest operating system version (target version 3) and the corresponding APK list (pre-installed list) and extended APK list (or called pre-installed extended list).
[0167] For example, under target version 3, APK1, APK2...APK N+1 and APK L need to be installed. Among them, APK1, APK2...APKN+1 are ordinary pre-installed applications, and ordinary pre-installed applications are not restricted to be pre-installed on all electronic devices. The above APK L is a special pre-installed application, and the above special pre-installed application needs to be pre-installed on all electronic devices that install the operating system.
[0168] In some examples, common pre-installed applications (APK1, APK2...APK N+1) are recorded in the APK list, and special pre-installed applications (such as APK L, or the third application) are recorded in the extended APK list. The APK list includes the application package name and the corresponding access path of the common pre-installed application, and the extended APK list also includes the application package name and access path of the special pre-installed application (the third application), wherein the application package name and access path of the application can both be referred to as the application identifier of the application.
[0169] In addition, during the process of writing the third upgrade package into the electronic device and restarting it, reference may be made to S101 of the aforementioned embodiment, which will not be described in detail here.
[0170] S302, scan the pre-installed partition to obtain the APK list and extended APK list from the third upgrade package.
[0171] In some embodiments, the third upgrade includes not only the program files of the pre-installed application corresponding to the target version 3 (third version), but also the APK list (pre-installed list) and the extended APK list (pre-installed extended list) corresponding to the target version 3. For details, please refer to S102 in the above embodiment.
[0172] S303, searching for a pre-configured APL list in the oeminfo sub-partition.
[0173] In some embodiments, the APL list may be data pre-configured in the oeminfo sub-partition in S106. The electronic device may scan the oeminfo sub-partition, and after scanning the APL list, the process proceeds to S304.
[0174] S304, scan and install the APK in the extended APK list and the APL list.
[0175] like Fig. 9 As shown, the APL list scanned in the oeminfo sub-partition includes APK1...APKN. After S304, the actually pre-installed applications include applications in the extended APK list, such as APK L, in addition to the applications in the APL list (such as APK1...APKN). The actually pre-installed applications are only related to the APKs in the APL list and the extended APK list, and have nothing to do with the APK list from the second pre-installed software. Of course, if the operating system version installed for the first time after the electronic device leaves 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 the extended APK list is scanned, the applications in the extended APK list can be installed one by one. After the APL list is obtained, the applications in the APL list are installed one by one. In other embodiments, after the extended APK list and the APL list are obtained, the applications in the extended APK list and the APL list can be installed one by one. The embodiments of the present application do not limit the specific implementation method.
[0177] In other embodiments, in a scenario with additional pre-installed applications, such as Fig.10 As shown, the above method may further include the following steps:
[0178] S401, write the data of the third upgrade package into the electronic device, and restart.
[0179] S402, scan the pre-installed partition to obtain the APK list and extended APK list from the third upgrade package.
[0180] S403, searching for the pre-configured APL list 1 in the oeminfo sub-partition.
[0181] S404, scan and install the APK in the extended APK list and APL list 1.
[0182] In some embodiments, the implementation details of the above S401 to S404 may refer to S301 to S304 in the aforementioned embodiments, which will not be described in detail here.
[0183] S405, obtain APL list 2 according to APL list 1 and extended APK list.
[0184] In some embodiments, the electronic device may generate APL list 2 according to the applications and corresponding access paths in APL list 1 and the extended APK list. For example, APL list 1 includes APK1, APK2 ... APK N. The extended APK list includes APK L, and S405 is executed to generate APL list 2 including APK1, APK2 ... APK N and APK L.
[0185] S406, write APL list 2 into the oeminfo sub-partition, overwriting APL list 1.
[0186] In some embodiments, the implementation process of the above S406 may refer to the above S106 and will not be described in detail here.
[0187] Understandably, Fig. 9 In the illustrated embodiment, the APL list is not changed after the application is preinstalled using a preconfigured APL list and an extended APK list from a third upgrade package. Thus, when the subsequent operating system version is upgraded, if the upgrade data packet no longer contains the extended APK list, the electronic device may no longer preinstall the application in the extended APK list, and only preinstall the application in the APL list.
[0188] and Fig.10 In the embodiment shown, the pre-configured APL list and the extended APK list from the third upgrade package are used. After the application is pre-installed, the APL list will be updated, and the application in the extended APK list will also be written into the APL list. In this way, after the subsequent operating version of the electronic device is upgraded, the pre-installed application can retain the application in the extended APK list. In the actual application process, you can choose to adopt according to actual needs. Fig. 9 The solution shown is still to choose Fig.10 The scheme shown.
[0189] In addition, as mentioned in the above embodiment, the data in the oeminfo sub-partition is not easy to be lost, and after the APL list is written into the oeminfo sub-partition, it will not be deleted in most cases. However, in some specific scenarios, the APL list in the oeminfo sub-partition can also be cleared according to the actual situation.
[0190] like Fig.11 As shown, in an exemplary scenario, the electronic device is in factory mode and receives an instruction to restore the factory mode, and the APL list in the oeminfo subpartition can be cleared.
[0191] like Fig.12 As shown, in an exemplary scenario, the electronic device is in a non-factory mode and receives an instruction to restore to the factory mode, and the APL list in the oeminfo sub-partition can be retained.
[0192] like Fig.13 As shown, in an exemplary scenario, when the electronic device detects an instruction that the device has been successfully flashed, the APL list in the oeminfo subpartition can be cleared.
[0193] like Fig.14 As shown, in an exemplary scenario, the electronic device detects an instruction that the device flashing has failed and can retain the APL list in the oeminfo subpartition.
[0194] like Fig.15 As shown, in an exemplary scenario, after the electronic device is powered off and restarted, the APL list in the oeminfo sub-partition can also be retained.
[0195] In other exemplary scenarios, for example, when it is detected that the electronic device is operating normally, when it is detected that the electronic device responds to a user operation and deletes an installed pre-installed application, or when it is detected that the electronic device responds to a user operation and installs other applications, the above APL list is retained and not modified.
[0196] In summary, among the above scenario conditions, the scenario condition that can retain the APL list in the oeminfo sub-partition can be called the first condition, and the scenario condition that can delete the APL list in the oeminfo sub-partition can be called the second condition or the preset condition.
[0197] In other possible embodiments, when the electronic device cleans up the storage space of the preinstalled partition, the data stored under the access path in the APL list may be retained, and the data in other storage areas may be cleared.
[0198] The embodiment of the present application also provides an electronic device, which may include: a memory and one or more processors. The memory and the processor are coupled. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can perform each step in the above embodiment. Of course, the electronic device includes but is not limited to the above memory and one or more processors.
[0199] Please refer to Fig.16 , Fig.16 A possible hardware structure diagram of an electronic device is shown:
[0200] like Fig.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, 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.
[0201] Among them, the above-mentioned sensor module 180 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.
[0202] It is to be 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 shown in the figure, or combine some components, or separate 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.
[0203] 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.
[0204] The controller may be the nerve center and command center of the 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.
[0205] 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.
[0206] In some embodiments, the processor 110 may include one or more interfaces. The interface 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 understandable that the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0208] The electronic device 100 implements the 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.
[0209] 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.
[0210] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0211] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element (image sensor) through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0212] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. 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, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include N cameras 193, where N is a positive integer greater than 1.
[0213] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0214] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0215] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0216] The embodiment of the present application also provides a chip system, which can be applied to the electronic device in the aforementioned embodiment. The chip system includes at least one processor and at least one interface circuit. The processor can be the processor in the above-mentioned electronic device. The processor and the interface circuit can be interconnected through a line. The processor can receive and execute computer instructions from the memory of the above-mentioned electronic device through the interface circuit. When the computer instructions are executed by the processor, the electronic device can execute the various steps in the above-mentioned embodiment. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.
[0217] In some embodiments, through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above 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. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0218] Each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0219] If the integrated unit is implemented in the form of 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 solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, disk or optical disk.
[0220] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the present application should be included in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiment of the present application should be based on the protection scope of the claims.
Claims
1. A method for updating an operating system, It is characterized in that The method comprises: The electronic device obtains a first data packet, where the first data packet is used to install a first version of an operating system, and the first data packet includes N program files of a first application, where N is a positive integer; The electronic device installs the first version of the operating system in response to the first data packet, and before the first version of the operating system is installed, the electronic device does not contain any pre-installed application program, and after the first version of the operating system is installed and restarted, the pre-installed application program in the electronic device includes N first applications; The electronic device obtains a second data packet, where the second data packet is used to install a second version of the operating system, and the second data packet includes a program file of a second application; The electronic device installs the second version of the operating system in response to the second data packet. 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.
2. The method according to claim 1, It is characterized in that The method further comprises: The electronic device obtains a third data packet, the third data packet is used to install a third version of the operating system, the third data packet includes program files of the second application and the third application, the third data packet includes a preinstalled list and a preinstalled extension list, the preinstalled extension list includes an application identifier of the third application, and the preinstalled list includes an application identifier of the second application; The electronic device installs the third version of the operating system in response to the third data packet. After installing the third version of the operating system and restarting, the preinstalled applications in the electronic device include N first applications and the third application in the preinstalled extension list, but do not include the second application.
3. The method according to claim 1 or 2, It is characterized in that After the electronic device pre-installs N of the first applications, the method further includes: The electronic device writes a first list into a first storage area, wherein the first list includes application identifiers of N first applications, and the data stored in the first storage area is not lost when the device is powered off 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 installs N of the first applications in response to the first list.
4. The method according to claim 2, It is characterized in that After the electronic device pre-installs N of the first applications, the method further includes: The electronic device writes a first list into a first storage area, wherein the first list includes application identifiers of N first applications, and the data stored in the first storage area is not lost when the device is powered off 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: The electronic device reads the first list from the first storage area; The electronic device installs N of the first applications in response to the first list; The electronic device installs the third application in response to the pre-installed extension list from the third data packet.
5. The method according to claim 4, It is characterized in that After installing the third application in the pre-installed extension list, the method further includes: The electronic device updates the first list, wherein the application identifier of the third application is newly added to the updated first list.
6. The method according to any one of claims 3 to 5, It is characterized in that The step of installing N first applications in response to the first list includes: The electronic device traverses each of the first applications in the first list, and searches for a program file of each of the first applications according to an access path of the first application; Each time a program file of the first application is found, the electronic device correspondingly installs the first application.
7. The method according to any one of claims 1 to 6, It is characterized in that The first data packet includes first preinstalled data, the first preinstalled data includes N program files of the first applications and a corresponding second list, the second list includes an application package name corresponding to each of the first applications and an access path corresponding to the program file of the first application; The electronic device installs the first version of the operating system in response to the first data packet, including: The electronic device parses the first data packet; The electronic device writes the first preinstalled data parsed from the first data packet into the preinstalled partition of the electronic device; after the first preinstalled data is written into the preinstalled 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 preinstalled partition; When the electronic device scans the second list, accessing the program file of each of the first applications; When the electronic device accesses the program file of the first application, installing the first application; After the first application in the second list is installed, the electronic device generates a first list, where the first list includes the application package names and corresponding access paths in the second list.
8. The method according to claim 3, It is characterized in that The first storage area belongs to a basic partition of the electronic device.
9. The method according to claim 8, It is characterized in that After the electronic device writes the first list into the first storage area, the first list is deleted under a preset condition, wherein the preset condition includes one or more of the following: Detecting that the electronic device is in factory mode, restoring the device to factory settings; It is detected that the electronic device responds to the user operation, executes the flashing task, and the flashing is successful.
10. The method according to claim 3, It is characterized in that After installing the first version of the operating system and restarting, and before installing the N 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.
11. An electronic device, It is characterized in that The electronic device comprises: a processor and a memory, wherein the memory is used to store computer instructions. When the processor executes the computer instructions, the electronic device executes the method as claimed in any one of claims 1 to 10.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a computer program or instructions. When the computer program or instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
System updating control method and apparatus
CN107168731A
Pre-installed application protection method and apparatus
CN107506636A
Operation system upgrading method and electronic equipment
CN115543368A
Preinstalled application updating method and device
CN115794147A