Operating system upgrade method, server and electronic equipment

By obtaining and adding the target extension VNDK library to the operating system version image of the electronic device, the problem of function loss after system upgrade is solved, and functional integrity and user experience are improved.

CN117971305BActive Publication Date: 2024-08-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410361816.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2024-08-27
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

In the existing technology, after the system upgrade, the electronic device loses the supplier's modifications to the original VNDK library, causing functional abnormalities and affecting the user experience.

Method used

By obtaining the latest version of the operating system version image of the electronic device, obtaining the target extension VNDK library from the archive server, adding it to the unpacked version image, and repackaging it into an upgrade package, retaining the supplier's modifications to the original VNDK library, Thus calling the extended VNDK library in the latest version of the operating system.

Benefits of technology

This ensures the functional integrity of the electronic device operating system after the upgrade and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117971305B
    Figure CN117971305B
Patent Text Reader

Abstract

The present application provides an operating system upgrade method, a server and an electronic device, and relates to the field of computer technology. Among them, the operating system upgrade method includes: the first server obtains the version image of the latest version of the operating system of the electronic device; the first server obtains the target extension VNDK library from the second server according to the version image; the first server adds the target extension VNDK library to the unpacked version image, and repackages the unpacked version image to obtain an upgrade package; the first server sends the upgrade package to the third server, so that the electronic device upgrades the current operating system based on the upgrade package obtained from the third server. The present application ensures that the functions of the electronic device operating system after the upgrade are complete, and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an operating system upgrade method, a server, and an electronic device. Background Art

[0002] In order to solve some system failures or vulnerabilities in the daily use of electronic devices, the system will be upgraded from time to time. The operating system framework and the vendor code are separated so that the vendor can develop the functions of the electronic device by adding private code.

[0003] Currently, there is a problem that the supplier's private code is lost, which causes some functional abnormalities of electronic devices, affecting the user experience. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides an operating system upgrade method, a server and an electronic device, in which a first server can obtain a target extension VNDK library that meets the version requirements from a second server according to the version image of the latest version operating system of the electronic device, and add the target extension VNDK library to the unpacked version image, and repack the unpacked version image to obtain an upgrade package. This ensures that the functions of the electronic device operating system after the upgrade are complete, and improves the user experience.

[0005] In the first aspect, the embodiment of the present application provides an operating system upgrade method. Applicable to a first server, the method includes: obtaining a version image of the latest version of the operating system of an electronic device; the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; according to the version image, obtaining a target extension VNDK (Vendor Native Development Kit) library from a second server; wherein the target extension VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; adding the target extension VNDK library to the unpacked version image, and repackaging the unpacked version image to obtain an upgrade package; sending the upgrade package to a third server; the electronic device is used to obtain the upgrade package from the third server, and upgrades the current operating system based on the upgrade package.

[0006] Among them, the version image is compiled by software code, which integrates various functional files and configurations related to the startup or operation process of the electronic device. The first server can be a package server, and the first server is used to make an upgrade package according to the version image. The second server can be an archive server, and the second server is used to store various versions of the extended VNDK library. The third server can be an OTA server, and the third server is used to store the upgrade package and send the upgrade package to the electronic device. The original VNDK library is a set of libraries used by vendors to develop HAL (Hardware Abstraction Layer). The original VNDK library is used to implement the basic functions or services provided by the system; the extended VNDK library is used to implement the basic functions or services provided by the system, as well as the functions or services extended by the vendor.

[0007] In this way, the first server obtains the target extended VNDK library of the adapted version from the second server according to the version image, adds the target extended VNDK library to the unpacked version image, and repacks the unpacked version image to obtain an upgrade package. This allows the supplier's modifications to the original VNDK library to be retained in the latest version of the upgrade package, and the extended VNDK library can be called during the operation of the electronic device, ensuring that the functions of the electronic device operating system after the upgrade are complete and improving the user experience.

[0008] According to the first aspect, the version image includes a first image and a second image; the first image is used to implement the core functions, user interface and application framework of the operating system; the second image is used to implement the executable program, library and system service extended by the vendor.

[0009] Among them, the first image is the system image, and the second image is the vendor image.

[0010] According to the first aspect, or any implementation method of the first aspect above, the target extended VNDK library is added to the unpacked version image, and the unpacked version image is repackaged to obtain an upgrade package, including: unpacking the first image to obtain a system file; the system file contains a target file, and the target file is used to store various libraries; the target extended VNDK library is added to the target file; the system file is repackaged into a first image, and the packaged first image and second image are packaged to obtain an upgrade package.

[0011] Among them, the system file is the system file, and the target file is the apex file.

[0012] In this way, by storing the target extension VNDK library in the specified file, the electronic device can directly install the target extension VNDK library from the specified file during the process of installing the upgrade package to upgrade the operating system, thereby improving the efficiency of installing and calling the target extension VNDK library.

[0013] According to the first aspect, or any implementation of the first aspect above, the target file includes multiple original VNDK libraries of different versions; adding the target extended VNDK library to the target file includes: according to the version number of the target extended VNDK library, replacing the original VNDK library with the same version number in the target file with the target extended VNDK library.

[0014] In this way, by replacing the original VNDK library with the target extended VNDK library of the same version number in the target file, the modification made by the supplier to the original VNDK library is retained, thereby ensuring the integrity of the functions after the electronic device system is updated.

[0015] According to the first aspect, or any implementation of the first aspect above, according to the system image file, obtaining the target extended VNDK library from the second server includes: determining the version number of the VNDK library associated with the second image; sending a first acquisition request to the second server; carrying the version number of the VNDK library associated with the second image in the first acquisition request; and receiving the target extended VNDK library sent by the second server in response to the first acquisition request.

[0016] The first acquisition request may be a library acquisition request.

[0017] In this way, by adding the version number of the VNDK library associated with the second image in the first acquisition request, the second server can determine the target extended VNDK library that meets the version requirement from multiple extended VNDK libraries stored locally.

[0018] In the second aspect, the embodiment of the present application provides another operating system upgrade method. It can be applied to a second server, the second server is used to store various versions of extended VNDK libraries, the extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library, and the original VNDK library is a set of libraries used by suppliers to develop HAL; the method includes: receiving a first acquisition request sent by a first server; the first acquisition request is generated by the first server according to the version image of the latest version of the operating system of the electronic device, and the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; according to the first acquisition request, determining a target extended VNDK library from multiple versions of the extended VNDK library; sending the target extended VNDK library to the first server; the first server is used to add the target extended VNDK library to the unpacked version image, and repack the unpacked version image to obtain an upgrade package; the first server is also used to send the upgrade package to a third server; the electronic device is used to obtain the upgrade package from the third server, and perform a version upgrade on the current operating system based on the upgrade package.

[0019] According to the second aspect, the version image includes a first image and a second image; the first image is used to implement the core functions, user interface and application framework of the operating system; the second image is used to implement the executable program, library and system service extended by the vendor.

[0020] According to the second aspect, or any implementation of the first aspect above, the first acquisition request carries the version number of the extended VNDK library associated with the second image; according to the first acquisition request, determining the target extended VNDK library from multiple versions of the extended VNDK library, including: determining the target extended VNDK library from multiple extended VNDK libraries according to the version number of the VNDK library associated with the second image.

[0021] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0022] In the third aspect, the embodiment of the present application provides another operating system upgrade method. It can be applied to electronic devices, and the method includes: when detecting that there is an upgrade package in the third server, sending a second acquisition request to the third server; the upgrade package is obtained by the first server adding the target extended VNDK library to the unpacked version image and repackaging the unpacked version image; the version image is the image of the latest operating system of the electronic device, and the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; the target extended VNDK library is obtained by the first server from the second server based on the version image; the target extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; the original VNDK library is a set of libraries for the supplier to develop HAL; receiving the upgrade package sent by the third server in response to the second acquisition request; based on the upgrade package, the current operating system is upgraded.

[0023] The second acquisition request may be a request for acquiring an upgrade package.

[0024] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0025] In a fourth aspect, an embodiment of the present application provides a server, which includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the server performs the following steps: obtaining a version image of the latest version of the operating system of the electronic device; the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; according to the version image, obtaining a target extended VNDK library from a second server; wherein the target extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; the original VNDK library is a set of libraries used by vendors to develop HAL; adding the target extended VNDK library to the unpacked version image, and repackaging the unpacked version image to obtain an upgrade package; sending the upgrade package to a third server; wherein the electronic device is used to obtain the upgrade package from the third server, and perform a version upgrade on the current operating system based on the upgrade package.

[0026] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0027] In a fifth aspect, an embodiment of the present application provides another server, which includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the server performs the following steps: receiving a first acquisition request sent by a first server; the first acquisition request is generated by the first server according to the version image of the latest version of the operating system of the electronic device; the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; according to the first acquisition request, determining a target extended VNDK library from multiple versions of extended VNDK libraries; multiple versions of extended VNDK libraries are stored in the memory; the extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library, and the original VNDK library is a set of libraries used by the supplier to develop HAL; sending the target extended VNDK library to the first server; the first server is used to add the target extended VNDK library to the unpacked version image, and repackage the unpacked version image to obtain an upgrade package; the first server is also used to send the upgrade package to a third server; the electronic device is used to obtain the upgrade package from the third server, and upgrade the current operating system based on the upgrade package.

[0028] The fifth aspect and any implementation of the fifth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fifth aspect and any implementation of the fifth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0029] In a sixth aspect, an embodiment of the present application provides an electronic device, which includes one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: when an upgrade package is detected in a third server, a second acquisition request is sent to the third server; the upgrade package is obtained by the first server adding the target extended VNDK library to the unpacked version image and repackaging the unpacked version image; the version image is an image of the latest operating system of the electronic device, and the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; the target extended VNDK library is obtained by the first server from the second server based on the version image; the target extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; the original VNDK library is a set of libraries used for vendors to develop HAL; receiving the upgrade package sent by the third server in response to the second acquisition request; and upgrading the current operating system based on the upgrade package.

[0030] The sixth aspect and any implementation of the sixth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the sixth aspect and any implementation of the sixth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0031] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium includes a computer program, and when the computer program is executed on an electronic device, the electronic device executes the operating system upgrade method of the first aspect and any one of the first aspects.

[0032] The seventh aspect and any implementation of the seventh aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the seventh aspect and any implementation of the seventh aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0033] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed, enables a computer to execute an operating system upgrade method as described in the first aspect or any one of the first aspects.

[0034] The eighth aspect and any implementation of the eighth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the eighth aspect and any implementation of the eighth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0035] In a ninth aspect, the present application provides a chip, the chip comprising a processing circuit and a transceiver pin, wherein the transceiver pin and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the operating system upgrade method of the first aspect or any one of the first aspects to control the receiving pin to receive a signal, and to control the sending pin to send a signal.

[0036] The ninth aspect and any implementation of the ninth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the ninth aspect and any implementation of the ninth aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 and Figure 2 is a schematic diagram of an application scenario shown as an example;

[0038] Figure 3 is a schematic diagram of the hardware structure of an electronic device shown as an example;

[0039] Figure 4 A schematic diagram of the software structure of an electronic device is shown as an example;

[0040] Figure 5 The figure is a schematic diagram showing the interaction between the packet capture server, the OTA server and the electronic device during the operating system upgrade process;

[0041] Figure 6 The following is a schematic diagram showing the changes before and after the current operating system is upgraded;

[0042] Figure 7 The figure is a schematic diagram of the interaction between the packet capture server, the archive server, the OTA server and the electronic device in the operating system upgrade process;

[0043] Figure 8 This is a schematic diagram showing the changes before and after the operating system upgrade of the present application;

[0044] Fig. 9 The timing diagram between the packet capture server, archive server, OTA server and electronic device of the present application is shown as an example. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0047] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0048] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0049] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0050] In order to make the following embodiments clear and concise, a brief introduction to related concepts or technologies is first given:

[0051] VNDK, or the Vendor Native Development Kit, also known as the VNDK library, is a set of libraries specifically designed for vendors to implement their HALs. VNDK is included in the system image system.img and is dynamically associated with the vendor code at runtime. Each version of the operating system provides a corresponding version of the original VNDK library, allowing vendors to modify the open source code of the original VNDK library according to their own needs and add some functions to electronic devices. The vendor modifies and compiles the open source code of the original VNDK library to obtain the extended VNDK library.

[0052] The VNDK library can include LL-NDK libraries, framework shared libraries, and vendor shared libraries, where the LL-NDK libraries include: libEGL.so, libGLESv1_CM.so, libGLESv2.so, libGLESv3.so, libandroid_net.so, libc.so, libdl.so, liblog.so, libm.so, libnativewindow.so, libneuralnetworks.so, libsync.so, libvndksupport.so, and libvulkan.so.

[0053] The version image is compiled through software code, which integrates various functional files and configurations related to the startup or operation process of the electronic device.

[0054] The system image, namely system.img, is also called the system image, system component or system component, which includes the core functions of the operating system, user interface, application framework, etc.

[0055] The vendor image, vendor.img, can also be called a chip component or a vendor component, which contains vendor-extended executable programs, libraries, system services, and apps.

[0056] In order to better illustrate the technical solution provided by the present application, the application scenario of the solution of the present application is first described.

[0057] When users use electronic devices, it is inevitable that some faults or problems will occur in the electronic devices. System maintenance personnel can update the operating system of the electronic devices from time to time to repair or solve the vulnerabilities or problems that occur in the daily use of the electronic devices by users. In the case of system updates for electronic devices, the following takes the electronic device as an example to introduce how to update the operating system of the mobile phone.

[0058] For example, Figure 1As shown in (1), the mobile phone displays interface 101, which includes various applications installed on the mobile phone, such as clock, calendar, gallery, memo, file management, email, music, settings 1011, sports health, weather, camera, etc. The user clicks on settings 1011, and the mobile phone responds to the user's click on settings 1011 by displaying interface 102, such as Figure 1 As shown in (2), the interface 102 includes multiple setting items, such as login account, WLAN, Bluetooth, application, screen off and unlock, system and update 1021, security, etc. The user clicks on the system and update 1021, and the mobile phone responds to the user's operation of clicking the system and update 1021 and displays the interface 103, such as Figure 1 As shown in (3), the interface 103 includes the current system version and the check update 1031. The user clicks the check update 1031, and the mobile phone responds to the user's click of the check update 1031 operation display interface 104, such as Figure 1 As shown in (4), the interface 104 includes a description of the latest version of the operating system, and download and install 1041. The user can click download and install 1041 to update the operating system of the mobile phone to the latest version. Figure 1 The latest version shown in (4) is 6.0.

[0059] For example, Figure 2 As shown in (1), the mobile phone responds to the user clicking the download and install operation 1041, downloading the latest version 6.0 of the operating system, and displays the download progress of the latest version during the download process. Figure 2 As shown in (2), after the download is complete, the phone installs the latest version 6.0 of the operating system, and the installation progress of the latest version is displayed during the installation process. Figure 2 As shown in (3), after the installation is complete, the phone will prompt that the new system has been installed and ask you to restart the device. The user clicks OK 1051, and the phone responds to the user's click of OK 1051 by restarting the phone. Figure 2 As shown in (4), after the phone restarts, follow the Figure 1 Medium (1) to Figure 1 As described in (3), re-enter the system and update interface. The phone displays the current version of the operating system as 6.0, indicating that the phone's operating system has been updated to the latest version.

[0060] Figure 3 1 shows a schematic diagram of the structure of the electronic device 100. It should be understood that Figure 3 The illustrated electronic device 100 is merely one example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have a different configuration of components. Figure 3The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0061] 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. The sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a depth sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0066] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.

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

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

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

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

[0071] The wireless communication module 160 can provide wireless communication solutions for application in the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0072] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0073] 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.

[0074] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0075] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0076] 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 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.

[0077] 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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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 1 or N cameras 193, where N is a positive integer greater than 1.

[0078] 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.

[0079] 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 the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

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

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

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

[0083] The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals.

[0084] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons.

[0085] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0086] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.

[0087] The SIM card interface 195 is used to connect a SIM card. The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0088] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0089] Figure 4 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0090] The layered architecture of the electronic device 100 divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the Android runtime (Android Runtime) and the system library, and the kernel layer.

[0091] The application layer can include a series of application packages. Figure 4 As shown in the figure, the application package can include system upgrade client (OTA Update Client, OUC), settings, camera, gallery, WLAN, Bluetooth and other applications. The application package can also include call, calendar, map, navigation, music, video, short message and other applications. OUC is used for system upgrade management. When these application packages are running, they can access the various service modules provided by the application framework layer through the application programming interface (API) and execute corresponding intelligent services.

[0092] Exemplarily, in order to upgrade the operating system, in some implementations, the electronic device can access the available WIFI network in the nearby area through the WIFI application, and then obtain the upgrade package from the upgrade package server that manages the upgrade package, such as the OTA (Over-the-Air Technology) server through the OUC, and then the upgrade engine writes the upgrade file in the upgrade package to the corresponding partition. After the installation is complete, in response to the user's operation on the restart option, the OUC triggers the mobile phone to restart.

[0093] In addition, in order to upgrade the operating system, in other implementations, the OUC and WIFI applications can be integrated into the setting application, that is, corresponding operation entrances are provided in the setting application to implement the above operations.

[0094] It should be understood that the above description is merely an example listed for a better understanding of the technical solution of this embodiment, and is not intended to be the sole limitation to this embodiment.

[0095] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 4 As shown, the application framework layer may include system services, window managers, content providers, view systems, phone managers, resource managers, notification managers, and the like.

[0096] The system service is used to instantiate services corresponding to applications, components, etc. Specifically in this embodiment, the system service may instantiate a property service for reading system restart properties.

[0097] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0098] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0099] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0100] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0101] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0102] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0103] Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.

[0104] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0105] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0106] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0107] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple commonly used audio and video formats, as well as static image files. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.

[0108] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, upgrade engine, Wi-Fi driver, sensor driver, etc. Among them, the hardware includes at least processor, display, Wi-Fi module, sensor, etc.

[0109] Understandably, Figure 4 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.

[0110] It should be noted that in actual application scenarios, with the development of Over-the-Air Technology (OTA), OTA upgrades for remote version upgrades of electronic devices through the wireless network interface of electronic devices are becoming more and more popular. In order to facilitate the explanation of the current operating system upgrade solution, the following is combined with actual business scenarios. Figure 5 Taking the OTA upgrade scenario as an example, the interaction between the packet capture server, OTA server and electronic device in the operating system upgrade solution is explained.

[0111] For example, see Figure 5 , used to upgrade electronic equipment (such as Figure 5 The upgrade package of the operating system of the PC device, tablet device, mobile phone, etc. is made by the Paibao server according to the version image, and the Paibao server uploads the made upgrade package to the OTA server, which is managed and actively pushed to the connected electronic devices by the OTA server, or sent to the corresponding electronic device according to the request of the connected electronic device.

[0112] Continue to see Figure 5After the electronic device obtains the upgrade package from the OTA server to upgrade the operating system, it will report the upgrade result to the OTA server so that the OTA server can know whether the operating system upgrade of the electronic device is successful.

[0113] In addition, in actual applications, in the event of an upgrade failure, the upgrade result reported by the electronic device to the OTA server may also include log information of the upgrade failure, so as to quickly locate the cause of the operating system upgrade failure.

[0114] System upgrades for electronic devices are an important way to resolve system failures and improve user experience. Taking the Android operating system as an example, Google will perform a major version upgrade of the Android system from time to time, and provide the original VNDK library of the corresponding version in each system version. For example, in the Q version (Android 10) operating system, the original VNDK library corresponding to version V29 is provided, namely com.android.vndk.v29.apex. In the R version (Android 11) operating system, the original VNDK library corresponding to version V30 is provided, namely com.android.vndk.v30.apex. In the S version (Android 12) operating system, the original VNDK library corresponding to version V31 is provided, namely com.android.vndk.v31.apex. In the T version (Android 13) operating system, the original VNDK library corresponding to version V33 is provided, namely com.android.vndk.v33.apex.

[0115] Since Google has made the source code of the original VNDK library open to suppliers, suppliers can develop some functionalities of electronic devices by adding private code to the source code of the original VNDK library. However, after Google makes a major version upgrade to the Android system, it does not retain the modifications made by suppliers to the previous version of the original VNDK library, but directly archives the previous version of the original VNDK library into the latest version of the Android system, causing electronic devices to lose some functionalities after upgrading the Android system to the latest version, thus affecting the user experience.

[0116] For example, Figure 6As shown, taking the current operating system as the S version operating system as an example, the S version operating system includes the vendor component and the S version system component. The vendor component is associated with the V31 version VNDK library. The S version system component contains the V31 version extended VNDK library. The V31 version extended VNDK library is obtained after the supplier modifies and compiles the source code of the original VNDK library of the V31 version. Modifying the source code includes deleting part of the code in the source code, adding part of the code to the corresponding position in the source code, and replacing part of the code in the source code. The VNDK library is a collection of a series of libraries, such as the LL-NDK library, the framework shared library, and the vendor shared library. The VNDK library is used by the vendor to develop its own services. At present, after upgrading the S version operating system to the T version operating system, the T version operating system includes the vendor component and the T version system component. The T version system component contains the V33 version original VNDK library and the V31 version original VNDK library. After upgrading the S version operating system to the T version operating system, the V31 version extended VNDK library is not used anymore, but the V31 version original VNDK library is used, which results in the loss of the supplier's modification to the V31 version original VNDK library. As a result, when the V31 version original VNDK library is called to provide services during the use of the electronic device, some functional abnormalities will occur.

[0117] Based on this, the present application proposes a method for upgrading an operating system, where a package server can obtain a version image of the latest version of the operating system of an electronic device, and obtain a target extended VNDK library from an archive server based on the version image. The package server adds the target extended VNDK library to the unpacked version image, and repackages the unpacked version image to obtain an upgrade package, so as to retain the supplier's modified parts of the VNDK in the upgrade package of the latest version of the operating system. The package server sends the upgrade package to the OTA server, so that the electronic device upgrades the current operating system based on the upgrade package obtained from the OTA server. In this way, during the operation of the electronic device, the supplier's extended VNDK library can be called to ensure the integrity of the electronic device's functions, thereby improving the user experience.

[0118] For example, Figure 7As shown, in addition to obtaining the version image file, the package server will also obtain the extended VNDK library from the archive server, such as the extended VNDK library of the V31 version. The version image is compiled by software code, and various functional files and configurations related to the startup or operation process of the electronic device are integrated in it. A complete system version includes many images, partition table image gpt.img, boot-related images (xloader.img, boot.img), chip image vendor.img (including all binary files that cannot be distributed to the Android Open Source Project (AOSP)), system image system.img, super image super.img (integrated with the Android system core) and user data image userdata.img (used to store user data). The package server can unpack the system image super.img in the version image to obtain system.img; then unpack system.img to obtain the apex file. The path of the apex file is system / apex / . The apex file is used to store various libraries, such as the original VNDK library of the V33 version and the original VNDK library of the V31 version. The package server can replace the original VNDK library of the corresponding version in the apex file according to the version of the extended VNDK library. For example, the original VNDK library of version V31 in the apex file is replaced with the extended VNDK library of version V31. At this time, the apex file contains the extended VNDK library. After replacing the VNDK library in the system image, the package server repackages the multiple images to obtain an upgrade package for the operating system of the electronic device.

[0119] For example, Figure 8 As shown, the Paibao server can obtain the version image of the T version operating system and the V31 version of the extended VNDK library. The Paibao server can isolate the original VNDK library in the T version system component. As shown in the figure, the T version operating system includes the vendor component, the T version system component, the V33 version of the original VNDK library, and the V31 version of the original VNDK library. The Paibao server replaces the V31 version of the original VNDK library in the T version operating system with the V31 version of the extended VNDK library, and generates a system upgrade package, which includes: vendor components, T version system components, V33 version of the original VNDK library, and V31 version of the extended VNDK library. In this way, the vendor's modifications to the VNDK library can be retained in the new version of the operating system, so that all functions of the electronic device system can still be used normally after the upgrade, thereby improving the user experience.

[0120] like Fig. 9 The following is a schematic diagram of the interaction between the modules. Fig. 9The process of the operating system upgrade method provided in the embodiment of the present application specifically includes:

[0121] S901, the archive server obtains multiple versions of extended VNDK files.

[0122] Exemplarily, the extended VNDK library is obtained by the supplier modifying and compiling the source code of the original VNDK library. For example, in order to improve the performance of electronic devices, add new APIs or new functions, the supplier modifies and compiles the source code of the original VNDK library to obtain the extended VNDK library. The supplier can upload multiple versions of the extended VNDK library to the archive server, multiple versions of the extended VNDK files, for example, the extended VNDK library of version V30, the extended VNDK library of version V31, and the extended VNDK library of version V33, and each version of the extended VNDK library can realize a different number of functions.

[0123] S902, the packet capture server obtains the version image of the latest version of the operating system of the electronic device.

[0124] Exemplarily, the package server can obtain the version image of the latest version of the operating system of the electronic device from the official website of the system developer. The version image includes multiple images, for example, partition table image gpt.img, boot-related images (xloader.img, boot.img), chip image vendor.img, system image system.img, super image super.img and user data image userdata.img, etc. In the version images of some high-version operating systems, the chip image and the system image are packaged in the super image. After unpacking the super image, the chip image and the system image can be obtained. The latest version of the operating system is such as the T version (Android 13) operating system.

[0125] S903, the package server determines the target version number of the VNDK library associated with the vendor image in the version image.

[0126] Exemplarily, the system image can be unpacked to obtain the system file, which contains a property file. The storage path of the property file is such as / system / build.prop or / system / default.prop. The version attribute ro.vndk.version is found in the property file. The version attribute ro.vndk.version is used to identify the version number of VNDK. The target version number of the VNDK library associated with the vendor image in the version image can be determined based on the value of the attribute ro.vndk.version. For example, if ro.vndk.version=31, then the target version number of the VNDK library associated with the vendor image in the version image is 31.

[0127] S904, the packet server generates a request to obtain a library according to the target version number.

[0128] Exemplarily, the package server generates a library acquisition request carrying a target version number, and the library acquisition request is used to instruct the archive server to return the extended VNDK library of the target version number to the package server.

[0129] S905, the packet capture server sends a request to obtain the library to the archive server.

[0130] S906: The archive server determines a target extended VNDK library from multiple versions of extended VNDK libraries according to the target version number.

[0131] Exemplarily, after obtaining the version image, the package server may send a library acquisition request to the archive server, and the library acquisition request is used to instruct the archive server to send the extended VNDK library to the package server; the archive server receives the library acquisition request and sends the target extended VNDK library to the package server in response to the library acquisition request. Here, since the archive server may contain multiple versions of the extended VNDK library, in order to obtain the required version of the extended VNDK library, the library acquisition request carries the target version number. In this way, after receiving the library acquisition request, the archive server can determine the target extended VNDK library of the target version number from the multiple versions of the extended VNDK library stored locally according to the target version number. Furthermore, the archive server sends the target extended VNDK library to the package server in response to the library acquisition request.

[0132] For example, the target version number of the VNDK library associated with the vendor image in the version image is ro.vndk.version=31, and the library acquisition request carries the information of ro.vndk.version=31. The package server sends the library acquisition request to the archive server. Based on the information ro.vndk.version=31 in the acquisition request, the archive server determines the locally stored target extension VNDK library with version number v31, and sends the target extension VNDK library with version number v31 to the package server. The target extension VNDK library with version number v31 is provided by the vendor for the S version (Android 12) operating system, and is obtained after source code modification and compilation of the original VNDK library.

[0133] S907, the archive server sends the target extended VNDK library to the package server.

[0134] S908, the package server unpacks the system image in the version image to obtain the system file.

[0135] Exemplarily, the package server unpacks the system image in the version image to obtain a system file; the system file includes an apex file, and the apex file is used to store various libraries.

[0136] S909, the packet capture server adds the target extended VNDK library to the apex file in the system file.

[0137] Exemplarily, the apex file may include multiple versions of the original VNDK library, such as the original VNDK library of version V33, the original VNDK library of version V31, the original VNDK library of version V30, and so on. Since the original VNDK library and the extended VNDK library of the same version cannot coexist, in this case, the package server will trigger the replacement of the VNDK library when adding the target extended VNDK library to the apex file. For example, if the target version number of the target extended VNDK library is 31, then when the target extended VNDK library is added to apex, the target extended VNDK library will replace the original VNDK library of version V31. Simply put, the package server can replace the original VNDK library of the same version number in the apex file with the target extended VNDK library according to the version number of the target extended VNDK library, so as to add the target extended VNDK library to the apex file in the system file.

[0138] S910, the package server repackages the system file into a system image, and packages the system image and the vendor image to obtain an upgrade package.

[0139] Exemplarily, the package server packages the system files to generate a system image, namely, system.img; and then fully packages the system image and the vendor image to obtain an upgrade package.

[0140] S911, the packet capture server sends the upgrade package to the OTA server.

[0141] Exemplarily, in some implementations, the upgrade package can be actively uploaded to the OTA server by the packet server when a new version of the upgrade package is detected, or the newly released upgrade package can be actively uploaded to the OTA server at a preset period.

[0142] Exemplarily, in some other implementations, the condition for the package server to upload the upgrade package may be that the newly released upgrade package is uploaded to the OTA server after receiving a request from the OTA server.

[0143] Exemplarily, in some implementations, in order to prevent redundant versions from occupying space on the OTA server, the OTA server may periodically traverse the stored upgrade packages and thereby clear the redundant versions.

[0144] Exemplarily, in other implementations, in order to further reduce the space occupied by the OTA server, the OTA server may periodically clean up the upgraded versions of the old versions.

[0145] S912, the electronic device searches the OTA server for an upgrade package. If so, execute S913; otherwise, continue to execute S912.

[0146] S913, the electronic device sends a request to the OTA server for obtaining an upgrade package.

[0147] S914, the OTA server sends the upgrade package to the electronic device in response to the request for obtaining the upgrade package.

[0148] Understandably, in general, facing a large number of user groups, the upgrade package for upgrading the operating system installed in the electronic device is prepared by the package server and uploaded to the OTA server for management. The OTA server will interact with the connected electronic device for data, that is, establish a communication link with the electronic device. Therefore, in some implementations, the electronic device can actively initiate a search request to the OTA server to determine whether there is an upgrade package corresponding to the new version of the operating system in the OTA server.

[0149] Exemplarily, in other implementations, the OTA server may also proactively push notification information when detecting an upgrade package corresponding to a new version of the operating system, so as to inform the electronic device that an upgrade package for a new version of the operating system is currently available.

[0150] For ease of explanation, this embodiment takes the example of an electronic device actively initiating a search request to an OTA server to search whether there is an upgrade package corresponding to a new version of an operating system in the OTA server.

[0151] Accordingly, if an upgrade package corresponding to a new version of the operating system is found on the OTA server, the electronic device sends a request to the OTA server to obtain the upgrade package. Otherwise, it initiates a search request to the OTA server according to the set search period, or initiates a search request to the OTA server when triggered by the user.

[0152] For example, Figure 1 In (3), in response to the user clicking the check update 1031 operation, the electronic device searches the OTA server for an upgrade package. If it exists, Figure 1In (4), the electronic device displays an interface 104, which includes a description of the latest version of the operating system, and download and install 1041. In response to the user clicking the download and install 1041 operation, the electronic device sends an upgrade package acquisition request to the OTA server, and the upgrade package acquisition request is used to instruct the OTA server to send the upgrade package to the electronic device. In response to the upgrade package acquisition request, the OTA server sends the upgrade package to the electronic device.

[0153] S915, the electronic device upgrades the current operating system based on the upgrade package.

[0154] For example, the electronic device may Figure 2 Description, upgrade the current operating system to the latest version by installing the upgrade package.

[0155] This embodiment also provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the operating system upgrade method in the above-mentioned embodiment.

[0156] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the operating system upgrade method in the above-mentioned embodiment.

[0157] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor can execute the computer execution instructions stored in the memory so that the chip executes the operating system upgrade method in the above-mentioned method embodiments.

[0158] Among them, the electronic device (such as a mobile phone, etc.), computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.

[0159] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0160] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0161] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for upgrading an operating system, characterized in that: Applied to a first server, the method comprises: Obtaining a version image of the latest version of the operating system of the electronic device from the system developer; the version image integrates various functional files and configurations related to the startup or operation process of the electronic device, and the version image of the latest version of the operating system includes the latest version of the original VNDK library provided by the system developer and the original VNDK library of the previous version of the latest version; According to the version image, a target extended supplier native development kit VNDK library is obtained from the second server; wherein the target extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; the original VNDK library is a group of libraries used by suppliers to develop a hardware abstraction layer HAL, and the second server stores multiple versions of extended VNDK libraries uploaded by suppliers, and each version of the extended VNDK library implements a different number of functions; Adding the target extended VNDK library to the unpacked version image, and repackaging the unpacked version image to obtain an upgrade package, wherein the unpacked version image also includes the latest version of the original VNDK library, and the version of the target extended VNDK library is the previous version of the latest version; The upgrade package is sent to a third server; wherein the electronic device is used to obtain the upgrade package from the third server, and upgrade the current operating system based on the upgrade package to upgrade the current operating system to the latest version, The step of adding the target extended VNDK library to the unpacked version image includes: In the unpacked version image, the original VNDK library of the previous version is replaced with the target extended VNDK library, so that the modifications made by the vendor to the original VNDK library of the previous version are retained after the current operating system of the electronic device is updated from the previous version to the latest version.

2. The method according to claim 1, characterized in that The version image includes a first image and a second image; the first image is used to implement the core functions, user interface and application framework of the operating system; the second image is used to implement the executable program, library and system service extended by the vendor.

3. The method according to claim 2, characterized in that The step of adding the target extended VNDK library to the unpacked version image, and repackaging the unpacked version image to obtain an upgrade package includes: Unpacking the first image to obtain a system file; the system file includes a target file, and the target file is used to store various libraries; Add the target extended VNDK library to the target file; The system files are repackaged into a first image, and the packaged first image and the second image are packaged to obtain the upgrade package.

4. The method according to claim 3, characterized in that The target file includes multiple different versions of the original VNDK library; Adding the target extended VNDK library to the target file includes: According to the version number of the target extended VNDK library, the original VNDK library with the same version number in the target file is replaced with the target extended VNDK library.

5. The method according to claim 2, characterized in that: According to the system image file, obtain the target extension VNDK library from the second server, including: Determine the version number of the VNDK library associated with the second image; Sending a first acquisition request to the second server; the first acquisition request carries a version number of the VNDK library associated with the second image; Receive a target extended VNDK library sent by the second server in response to the first acquisition request.

6. A method for upgrading an operating system, characterized in that: The method is applied to a second server, the second server is used to store various versions of extended VNDK libraries, the extended VNDK libraries are obtained by modifying and compiling source code of original VNDK libraries, and the original VNDK libraries are a group of libraries used by vendors to develop HALs; the method comprises: Receiving a first acquisition request sent by a first server; the first acquisition request is generated by the first server according to a version image of the latest version of the operating system of the electronic device; the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; Determine, according to the first acquisition request, a target extended VNDK library from multiple versions of extended VNDK libraries; Sending the target extended VNDK library to the first server; wherein the first server is used to add the target extended VNDK library to the unpacked version image, and repack the unpacked version image to obtain an upgrade package; the first server is also used to send the upgrade package to a third server; the electronic device is used to obtain the upgrade package from the third server, and upgrade the current operating system based on the upgrade package to upgrade the current operating system to the latest version, wherein the unpacked version image also includes the latest version of the original VNDK library, and the version of the target extended VNDK library is the previous version of the latest version, The version image of the latest version of the operating system is obtained from the system developer, and the version image of the latest version of the operating system includes the latest version of the original VNDK library provided by the system developer and the original VNDK library of the previous version of the latest version; The second server stores multiple versions of extended VNDK libraries uploaded by the supplier, and each version of the extended VNDK library implements a different number of functions; The first server is used to replace the original VNDK library of the previous version with the target extended VNDK library in the unpacked version image, so that the current operating system of the electronic device retains the modifications made by the vendor to the original VNDK library of the previous version after being updated from the previous version to the latest version.

7. The method according to claim 6, characterized in that The version image includes a first image and a second image; the first image is used to implement the core functions, user interface and application framework of the operating system; the second image is used to implement the executable program, library and system service extended by the vendor.

8. The method according to claim 7, characterized in that The first acquisition request carries a version number of an extended VNDK library associated with the second image; The step of determining a target extended VNDK library from multiple versions of extended VNDK libraries according to the first acquisition request includes: According to the version number of the VNDK library associated with the second image, a target extended VNDK library is determined from multiple extended VNDK libraries.

9. A method for upgrading an operating system, characterized in that: Applied to electronic equipment, the method comprises: In the case where an upgrade package is detected in the third server, a second acquisition request is sent to the third server; the upgrade package is obtained by the first server adding the target extended VNDK library to the unpacked version image and repackaging the unpacked version image; the version image is an image of the latest operating system of the electronic device, and the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; the target extended VNDK library is obtained by the first server from the second server based on the version image; the target extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; the original VNDK library is a group of libraries used for supplier development services; receiving an upgrade package sent by the third server in response to the second acquisition request; Based on the upgrade package, the current operating system is upgraded to the latest version, wherein the unpacked version image also includes the latest version of the original VNDK library, and the version of the target extended VNDK library is the previous version of the latest version. The latest operating system version image is obtained from a system developer, and the latest operating system version image includes the latest version of the original VNDK library provided by the system developer and the original VNDK library of the previous version of the latest version; The second server stores multiple versions of extended VNDK libraries uploaded by the supplier, and each version of the extended VNDK library implements a different number of functions; The first server is used to replace the original VNDK library of the previous version with the target extended VNDK library in the unpacked version image, so that the current operating system of the electronic device retains the modifications made by the vendor to the original VNDK library of the previous version after being updated from the previous version to the latest version.

10. A server, characterized in that: include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored on the memory and when the computer programs are executed by the one or more processors, cause the server to perform the following steps: Obtaining a version image of the latest version of the operating system of the electronic device from the system developer; the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; According to the version image, a target extended VNDK library is obtained from the second server; wherein the target extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; and the original VNDK library is a set of libraries used for supplier development services; Add the target extended VNDK library to the unpacked version image, and repack the unpacked version image to obtain an upgrade package; The upgrade package is sent to a third server; wherein the electronic device is used to obtain the upgrade package from the third server, and upgrade the current operating system based on the upgrade package to upgrade the current operating system to the latest version, wherein the unpacked version image also includes the latest version of the original VNDK library, and the version of the target extended VNDK library is the previous version of the latest version, The version image of the latest version of the operating system includes the latest version of the original VNDK library provided by the system developer and the original VNDK library of the previous version of the latest version; The second server stores multiple versions of extended VNDK libraries uploaded by the supplier, and each version of the extended VNDK library implements a different number of functions; The step of adding the target extended VNDK library to the unpacked version image includes: In the unpacked version image, the original VNDK library of the previous version is replaced with the target extended VNDK library, so that the vendor's modifications to the original VNDK library of the previous version are retained after the current operating system of the electronic device is updated from the previous version to the latest version.

11. A server, characterized in that: include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored on the memory and when the computer programs are executed by the one or more processors, cause the server to perform the following steps: Receiving a first acquisition request sent by a first server; the first acquisition request is generated by the first server according to a version image of the latest version of the operating system of the electronic device; the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; According to the first acquisition request, determining a target extended VNDK library from multiple versions of extended VNDK libraries; the multiple versions of extended VNDK libraries are stored in the memory; the extended VNDK library is obtained by modifying and compiling source code of an original VNDK library, and the original VNDK library is a set of libraries used by vendors to develop HAL; Sending a target extended VNDK library to the first server; wherein the first server is used to add the target extended VNDK library to the unpacked version image, and repack the unpacked version image to obtain an upgrade package; the first server is also used to send the upgrade package to a third server; the electronic device is used to obtain the upgrade package from the third server, and upgrade the current operating system based on the upgrade package to upgrade the current operating system to the latest version, wherein the unpacked version image also includes the latest version of the original VNDK library, and the version of the target extended VNDK library is the previous version of the latest version, The version image of the latest version of the operating system is obtained from the system developer, and the version image of the latest version of the operating system includes the latest version of the original VNDK library provided by the system developer and the original VNDK library of the previous version of the latest version; The second server stores multiple versions of the extended VNDK library uploaded by the supplier, and each version of the extended VNDK library implements a different number of functions; The first server is used to replace the original VNDK library of the previous version with the target extended VNDK library in the unpacked version image, so that the current operating system of the electronic device retains the modifications made by the vendor to the original VNDK library of the previous version after being updated from the previous version to the latest version.

12. An electronic device, characterized in that: include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: In the case where an upgrade package is detected in the third server, a second acquisition request is sent to the third server; the upgrade package is obtained by the first server adding the target extended VNDK library to the unpacked version image and repackaging the unpacked version image; the version image is an image of the latest operating system of the electronic device, and the version image integrates various functional files and configurations related to the startup or operation process of the electronic device; the target extended VNDK library is obtained by the first server from the second server based on the version image; the target extended VNDK library is obtained by modifying and compiling the source code of the original VNDK library of the same version; The original VNDK library is a set of libraries used by vendors to develop HALs; receiving an upgrade package sent by the third server in response to the second acquisition request; Based on the upgrade package, the current operating system is upgraded to the latest version, wherein the unpacked version image also includes the latest version of the original VNDK library, and the version of the target extended VNDK library is the previous version of the latest version. The latest operating system version image is obtained from a system developer, and the latest operating system version image includes the latest version of the original VNDK library provided by the system developer and the original VNDK library of the previous version of the latest version; The second server stores multiple versions of extended VNDK libraries uploaded by the supplier, and each version of the extended VNDK library implements a different number of functions; The first server is used to replace the original VNDK library of the previous version with the target extended VNDK library in the unpacked version image, so that the current operating system of the electronic device retains the modifications made by the vendor to the original VNDK library of the previous version after being updated from the previous version to the latest version.