US 12,367,027 B2
Operating system upgrade method, device, storage medium, and computer program product
Yanzhao Wang, Shenzhen (CN); Zenghui Zhang, Shenzhen (CN); Chao Chen, Shenzhen (CN); and Jiulin Huang, Shenzhen (CN)
Assigned to Honor Device Co., Ltd., Shenzhen (CN)
Appl. No. 17/922,087
Filed by Honor Device Co., Ltd., Shenzhen (CN)
PCT Filed Jun. 15, 2022, PCT No. PCT/CN2022/098818
§ 371(c)(1), (2) Date Oct. 28, 2022,
PCT Pub. No. WO2022/262744, PCT Pub. Date Dec. 22, 2022.
Claims priority of application No. 202110661780.4 (CN), filed on Jun. 15, 2021.
Prior Publication US 2024/0220225 A1, Jul. 4, 2024
Int. Cl. G06F 8/65 (2018.01); G06F 8/61 (2018.01); G06F 9/4401 (2018.01)
CPC G06F 8/65 (2013.01) [G06F 8/61 (2013.01); G06F 9/4401 (2013.01)] 19 Claims
OG exemplary drawing
 
1. An operating system upgrade method, applied to an electronic device comprising a processor and a memory comprising a basic partition, a first static partition, a second static partition, a dynamic partition, and a user data partition, wherein the dynamic partition comprises a plurality of sub-partitions, the method comprises:
running a first operating system by loading data in the basic partition, loading data in the first static partition, and loading data in the dynamic partition;
obtaining a first upgrade installation package comprising a first upgrade file for a first sub-partition of the dynamic partition;
creating a virtual dynamic partition in the user data partition, and storing the first upgrade file in the virtual dynamic partition wherein the basic partition includes metadata showing a merging status for the first upgrade file;
modifying a startup sequence of the electronic device from starting from the first static partition to starting from the second static partition;
restarting the electronic device, and running the startup sequence by starting from the second static partition; and
loading data in the basic partition;
loading data in the second static partition;
loading data in another sub-partition other than the first sub-partition in the dynamic partition, and loading the first upgrade file in the user data partition;
starting up the electronic device;
reading the merging status in the metadata in the basic partition;
determining based on the merging status, a merge to be performed for the first upgrade file; and
merging the first upgrade file in the user data partition in the virtual dynamic partition into the first sub-partition of the dynamic partition by writing the first upgrade file to the first sub-partition of the dynamic partition, and deleting the first upgrade file in the virtual dynamic partition in the user data partition and returning storage space used by the virtual dynamic partition to the user data partition.