Application startup method, electronic device, and storage medium

By using the collaborative working mechanism of the first service and the second service in the electronic device, it is ensured that the updated application can receive the boot broadcast and start automatically, solving the problem of being unable to start automatically after the update, and realizing the normal update of the application and the system timely synchronization.

CN117311840BActive Publication Date: 2024-09-24HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311148781.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2024-09-24
Estimated Expiration
2043-05-10

Smart Images

  • Figure CN117311840B
    Figure CN117311840B
Patent Text Reader

Abstract

The present application provides an application startup method, an electronic device, and a computer-readable storage medium, and relates to the technical field of electronic devices. The electronic device includes a first application, a first service, and a second service; the application startup method includes: the electronic device shuts down and restarts in response to receiving an update package of the first application; during the startup process, the first service updates the first application based on the update package; the second service sends a startup broadcast based on the completion of the startup process; the first service receives the startup broadcast, determines that the update of the first application is complete, and sends a first broadcast to the updated first application, and the first broadcast is used to indicate the startup of the updated first application. The present application can avoid the situation where the updated application cannot start automatically.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and in particular to an application startup method, an electronic device, and a computer-readable storage medium. Background Art

[0002] Nowadays, electronic devices such as mobile phones and tablet computers have been widely used. In order to meet the increasing user needs, some applications in electronic devices need to be updated.

[0003] After updating certain applications (e.g., software update applications) in an electronic device, the updated application is usually required to start automatically to perform subsequent tasks after starting, such as displaying application update completion information, etc. However, in some scenarios, the updated application may not start automatically. Summary of the invention

[0004] Some embodiments of the present application provide an application startup method, an electronic device, and a computer-readable storage medium. The present application is introduced from multiple aspects below, and the implementation methods and beneficial effects of the following aspects can be referenced to each other.

[0005] In a first aspect, the present application provides an application startup method, where an electronic device includes a first application, a first service, and a second service; the method includes: the electronic device shuts down and restarts in response to receiving an update package for the first application; the electronic device is turned on, and during the startup process, the first service updates the first application based on the update package; the second service sends a startup broadcast based on the completion of the startup process; the first service receives the startup broadcast and determines that the update of the first application is complete, and sends a first broadcast to the updated first application, the first broadcast being used to indicate the startup of the updated first application.

[0006] According to the implementation mode of the present application, the first application is started based on receiving the first broadcast sent by the first service. Among them, the first service receives the power-on broadcast sent by the second service and determines that the first application is updated before sending the first broadcast to the first application. It can be understood that the first broadcast is sent after the electronic device is powered on and the first application is updated. Therefore, the updated first application can definitely receive the first broadcast, thereby avoiding the situation where it cannot be automatically updated after the update.

[0007] In some embodiments, the first application is a system application; the method also includes: the first application is started in response to receiving the first broadcast; based on the completion of the startup, the first application performs at least one of the following actions: partition synchronization of the update package data of the first application; refreshing the system version number of the electronic device; setting a keep-alive clock for the first application; sending dot data to the server; and displaying notification information of successful update of the first application.

[0008] In some embodiments, the first application performs partition synchronization on the update package data of the first application, including: the first application performs partition synchronization on the update package data of the first application based on determining that the operating system of the electronic device supports virtual AB partitions, and determining that after the first application is updated, the electronic device is not restarted.

[0009] In some embodiments, the power-on process includes at least: displaying a lock screen interface; receiving an unlock operation for the lock screen interface; and a second service determining that the power-on process is complete, including: the second service determining that the power-on process is complete based on the electronic device receiving the unlock operation.

[0010] In some implementations, the unlocking operation includes entering an unlocking password.

[0011] In some embodiments, the electronic device also includes a third service; the first service updates the first application based on the update package, including: the first service sends a first request to the third service to synthesize a new version installation package of the first application; the third service synthesizes the new version installation package of the first application based on the update package in response to receiving the first request; the first service updates the first application based on the new version installation package.

[0012] In some embodiments, the electronic device also includes a fourth service; the first service updates the first application based on the new version installation package, including: the first service sends a second request for installing the first application to the fourth service; the third service installs the first application based on the new version installation package in response to receiving the second request; the third service sends a notification of completion of the first application update to the first service based on the completion of the first application installation; the first service determines that the first application update is completed, including: the first service determines that the first application has been updated based on the receipt of the notification of completion of the first application update.

[0013] In some implementations, the first application is a software update application.

[0014] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; a processor, when the processor executes the instructions in the memory, the electronic device can execute the method described in any embodiment of the first aspect of the present application. The beneficial effects that can be achieved in the second aspect can refer to the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here.

[0015] In a third aspect, the present application provides a computer-readable storage medium on which instructions are stored, and when the instructions are executed on a computer, the computer can execute the method described in any embodiment of the first aspect. The beneficial effects that can be achieved in the third aspect can refer to the beneficial effects of the method provided in any embodiment of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1A-1B An exemplary method 1 for a user to update an application provided by an embodiment of the present application is shown;

[0017] Figure 1C The second exemplary method for a user to update an application provided by an embodiment of the present application is shown;

[0018] Figure 2 FIG1 is an example of an application update principle provided in an embodiment of the present application;

[0019] Figure 3 FIG1 is an example of a process of sending a power-on broadcast provided in some embodiments;

[0020] Figure 4 Example of a process for sending a power-on broadcast provided in some embodiments Figure 2 ;

[0021] Figure 5 Schematic diagram 1 of the process of starting an application provided in an embodiment of the present application;

[0022] Figure 6 Figure 1 is an example of an application update interface provided in an embodiment of the present application;

[0023] Figure 7 Schematic diagram of the process of starting an application provided in the embodiment of the present application Figure 2 ;

[0024] Figure 8 Example of application update principle provided for the embodiment of the present application Figure 2 ;

[0025] Fig. 9 Example of a process for sending a power-on broadcast provided in some embodiments Figure 3 ;

[0026] Fig. 10A and Fig. 10B An example diagram of a virtual VAB partition architecture provided in an embodiment of the present application;

[0027] Fig.11 Figure 1 is an example of refreshing the system version number provided in an embodiment of the present application (before refreshing);

[0028] Fig.12 Example of refreshing the system version number provided in the embodiment of the present application Figure 2 (after refresh);

[0029] Fig.13 An example diagram of a notification of application update completion provided in an embodiment of the present application;

[0030] Fig.14A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown;

[0031] Fig.15 A software architecture diagram of an electronic device provided in an embodiment of the present application is shown;

[0032] Fig.16 A block diagram of an electronic device provided by an embodiment of the present application is shown;

[0033] Fig.17 A schematic diagram of the structure of a system on chip (SoC) provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0034] The implementation mode of the present application is used to provide an application startup method. Through the method provided by the present application, the application can be automatically started smoothly during the update.

[0035] Figure 1A and Figure 1B An exemplary application scenario of the embodiment of the present application is shown. Figure 1A , the electronic device 100 includes a software update application (or "OUC", as an example of a first application). The OUC includes a software update interface 10. When a user clicks a check update button 11 on the software update interface 10, the electronic device 100 can check whether there is a new version of the system software.

[0036] When a new version of the system software exists, the electronic device 100 can jump to Figure 1B The new version interface 15 shown in the figure includes update log, new version number of system software and other information. Figure 1B , this update incorporates the patch of the software update application. When the user clicks the download and install button 16, the electronic device 100 can update the OUC.

[0037] It is understood that in other embodiments, the electronic device 100 may also start updating the application in other ways. For example, when a new version of an application is detected, the electronic device 100 may automatically start updating the application in the background. For another example, when a new version of an application is detected, the electronic device 100 pops up an application update notification, and the user may start updating the application based on the application update notification.

[0038] Specifically, if Figure 1C As shown, when a new version of OUC is detected, the electronic device 100 can display a notification bar 20 on the desktop to notify the user to update the OUC. The notification bar 20 includes an update button for the OUC, namely an OK button 21. In some cases, when the user clicks the OK button 21 in the notification bar 20, the electronic device 100 updates the OUC.

[0039] The present application does not limit the specific form of the electronic device 100, and the electronic device 100 may be a mobile phone, a laptop computer, a tablet, a large-screen device, a wearable device (e.g., a watch, smart glasses, a helmet), a desktop computer, an augmented reality (AR) / virtual reality (VR) device, a personal digital assistant (PDA), etc. A mobile phone is used as an example of the electronic device 100 below.

[0040] refer to Figure 2 When updating OUC, the electronic device 100 can download the cold patch package of OUC (as an example of an update package) from the server 200, and authenticate and decompress the cold patch package. Among them, the cold patch package is a patch package that can only take effect after the electronic device 100 is restarted. After the cold patch package is authenticated and decompressed, the electronic device 100 needs to be restarted.

[0041] When the electronic device 100 is restarted, the patch service (PatchService) (as the first service) is pulled up during the boot phase and the PatchService is initialized. After the PatchService is initialized, the update driver (UpdateEngine) (as the third service) is called to combine the cold patch package with the current version of the Android application package (Android Application Package, APK) of the OUC into a new version of APK. Subsequently, the PatchService calls the Package Manager Service (PMS) (as the fourth service) to install the new version of APK to update the OUC.

[0042] After the OUC update is completed, it needs to be self-started to perform subsequent tasks. For example, calling UpdateEngine to perform partition synchronization (merge) operations, issuing patch upgrade success notifications, etc. For the sake of narrative coherence, the tasks performed by OUC after self-start will be described later.

[0043] In some cases, after the OUC update is completed, it will not start automatically.

[0044] The following describes the situation where OUC cannot start automatically after updating.

[0045] (1) Case 1: The user sets a lock screen password for the electronic device 100, and the electronic device 100 is unlocked before the OUC update is completed.

[0046] Exemplarily, the lock screen password may encrypt a credential encrypted (CE) storage space of the electronic device 100. The credential encrypted storage space is used to store encryption-level files of the electronic device 100.

[0047] To ensure user data security, the activity manager service (AMS) of the electronic device 100 (as the second service) will send a boot broadcast (BOOT_COMPLETED) only after the credential encrypted storage space is decrypted to prevent applications in the electronic device 100 from being started before unlocking.

[0048] It can be understood that certain applications in the electronic device 100 (for example, software update applications, voice assistant applications and other system applications) can start automatically after receiving the power-on broadcast.

[0049] refer to Figure 3 , the update process of OUC includes the following two stages:

[0050] Phase 1: PatchService calls UpdateEngine to synthesize a new version of the APK (for example, the duration of Phase 1 is about 15 seconds).

[0051] Phase 2: PatchService calls PMS to install the new version of APK (for example, the duration of Phase 2 is about 3 seconds).

[0052] When the user unlocks the electronic device 100 before the OUC update is completed (eg, during phase 1), the electronic device 100 calls the sendBroadcast method to request the Activity Manager Service (AMS) to send a power-on broadcast.

[0053] After receiving the request, the AMS queries the broadcast receiver (BroadcastReceiver) in the system and creates a broadcast record (BroadcastRecord) according to the query result. It can be understood that the OUC has set the broadcast receiver before the update, so the broadcast record includes the broadcast receiver of the OUC.

[0054] After the broadcast record is established, AMS will establish a broadcast queue, then add the broadcast receivers in the broadcast record to the broadcast queue, and send (distribute) the boot broadcast according to the broadcast queue. Usually, there is a certain time from the completion of the broadcast record establishment to the AMS starting to send the boot broadcast, for example, about 17 seconds.

[0055] In some cases, such as Figure 3As shown in the figure, before AMS sends the power-on broadcast, PMS will install the new version of APK. During the installation of the new version of APK, PMS will remove the broadcast receiver of OUC. When the OUC is updated, the broadcast receiver of the updated OUC (hereinafter referred to as "updated OUC" as "HnOUC") is not in the broadcast queue established by AMS, so HnOUC cannot receive the power-on broadcast.

[0056] (2) Case 2: The user has not set a lock screen password for the electronic device 100, and the electronic device 100 is powered on before the OUC update is completed.

[0057] Since the electronic device 100 is not locked by the user, the credential encryption storage space of the electronic device 100 is not encrypted. In this case, when the electronic device 100 is powered on, the sendBroadcast method can be called to request the AMS to send a power-on broadcast.

[0058] refer to Figure 4 When the electronic device 100 is powered on before the OUC update is completed (for example, during phase 1), the electronic device 100 calls the sendBroadcast method to request the AMS to send a power-on broadcast. After receiving the request, the AMS creates a broadcast record.

[0059] Similar to situation 1, in some cases, before AMS sends the power-on broadcast, PMS will install a new version of APK and remove OUC's broadcast receiver in the process, causing HnOUC's broadcast receiver to be out of the broadcast queue established by AMS, resulting in HnOUC not receiving the power-on broadcast.

[0060] In the above-mentioned situations 1 and 2, OUC cannot start automatically after being updated. In order to solve the above-mentioned technical problems, the present application provides an application startup method. In the method provided in this embodiment, the updated OUC (as an example of a first application) is started based on receiving a custom broadcast (or referred to as a "first broadcast") sent by PatchService (as a first service). Among them, PatchService receives the power-on broadcast sent by AMS (as a second service), and after determining that the OUC update is completed, it sends a custom broadcast to OUC. It can be understood that the custom broadcast is sent after the electronic device 100 is powered on and the OUC update is completed. Therefore, the updated OUC can definitely receive the custom broadcast, thereby avoiding the situation where it cannot start automatically after the update.

[0061] The following describes the specific steps of the application startup method provided in the embodiment of the present application.

[0062] refer to Figure 5The application startup method provided in this application includes the following steps:

[0063] S101: PatchService calls UpdateEngine (as a third service) to synthesize a new version of APK.

[0064] In this embodiment, OUC is used as an example of the first application. In other embodiments, the first application may be a system application such as a camera application, a setting application, a clock application, a screen recording application, a smart assistant application, or other third-party applications.

[0065] When updating the OUC, the electronic device 100 can receive the cold patch package (as an example of an update package) sent by the server, and authenticate and decompress the cold patch package. After the cold patch package is authenticated and decompressed, the electronic device 100 enters the restart state, and the user can restart the electronic device 100 by performing a restart operation.

[0066] For example, refer to Figure 6 , when the electronic device 100 enters the restart state, a window 40 may pop up. When the user clicks the install now button 41 in the pop-up window 40, the electronic device 100 restarts. Alternatively, the user may also restart the electronic device 100 by long pressing the power button 42. For example, when the user long presses the power button 42 for more than 3 seconds, the electronic device 100 restarts. In other embodiments, the electronic device may also automatically restart after the cold patch package is authenticated and decompressed.

[0067] It can be understood that the restart phase of the electronic device 100 includes a shutdown process and a restart process. During the startup process of the restart phase of the electronic device 100, PatchService can send a request (as a first request) to synthesize the new version APK of the OUC application to UpdateEngine, so as to call UpdateEngine to synthesize the cold patch package with the current version APK of the OUC into a new version APK of the OUC.

[0068] S102: UpdateEngine sends a synthesis completion notification of the new version APK to PatchService.

[0069] In some embodiments, when the synthesis of the new version of APK is completed, UpdateEngine can send a notification of the completion of the synthesis of the new version of APK to PatchService through broadcast, Bundle, etc. Among them, Bundle is a communication method between components provided by the Android system.

[0070] S103: PatchService calls PMS (as the fourth service) to install the new version of APK to update OUC.

[0071] After receiving the synthesis completion notification of the new version of APK, PatchService sends a request to install OUC to PMS (as a second request) to call PMS to install the new version of APK to update OUC.

[0072] S104: AMS sends a startup broadcast to PatchService.

[0073] When the power-on process of the electronic device 100 is completed, the AMS sends a power-on broadcast to the PatchService.

[0074] In some embodiments, if a lock screen password is not set for the electronic device 100, when the desktop (Launch) application of the electronic device 100 is started, the boot process of the electronic device 100 is completed.

[0075] In other embodiments, if a lock screen password is set for the electronic device 100, the lock screen interface will be displayed during the boot process of the electronic device 100. When the electronic device 100 receives an unlock operation from the user on the lock screen interface, the electronic device 100 is unlocked and the boot process is completed.

[0076] Specifically, when the electronic device 100 displays the lock screen interface, the user can unlock the electronic device 100 by entering a lock screen password (or "unlock password") on the lock screen interface. The lock screen password can be in the form of a fingerprint password, a numeric password, a gesture password, a face password, etc., which is not limited in this application.

[0077] S105: PatchService receives the startup broadcast and determines whether it has received the notification of OUC update completion. If so, S108 is executed, and if not, the custom broadcast is not sent.

[0078] In some embodiments, the electronic device 100 stores a parameter BOOT_COMPLETED for marking whether the boot broadcast is received. After each boot of the electronic device 100, the value of the parameter BOOT_COMPLETED can be set to false. When the PatchService receives the boot broadcast, the value of the parameter BOOT_COMPLETED is modified to true.

[0079] In addition, the electronic device 100 also stores a parameter OUC_INSTALL_COMPLETED for marking the OUC update status. Each time the electronic device 100 is turned on, the value of the parameter OUC_INSTALL_COMPLETED can be set to false. When PatchService receives a notification that the OUC update is complete, the value of the parameter OUC_INSTALL_COMPLETED can be changed to true.

[0080] exist Figure 5 In the example shown, when PatchService receives the boot broadcast, it indicates that the boot process of the electronic device 100 has been completed. At this time, PatchService modifies the value of the parameter BOOT_COMPLETED to true, and continues to determine whether the notification of the completion of the OUC update has been received. In addition, PatchService determines whether the notification of the completion of the OUC update has been received based on the value of the parameter OUC_INSTALL_COMPLETED. It can be understood that in step S105, the value of the parameter OUC_INSTALL_COMPLETED is false, so PatchService determines that it has not received the notification of the completion of the OUC update. Therefore, PatchService does not send a custom broadcast.

[0081] S106, PMS sends a notification of OUC update completion to PatchService.

[0082] In some embodiments, after the PMS completes the installation of the new version APK of the OUC, the PMS can send a notification of the completion of the OUC update to the PatchService through broadcast, Bundle, etc.

[0083] S107: PatchService receives the notification of OUC update completion and determines whether the boot broadcast has been received. If yes, S108 is executed; if no, the custom broadcast is not sent.

[0084] When PatchService receives the notification that the OUC update is complete, it means that the OUC has been updated. At this time, PatchService modifies the value of the parameter OUC_INSTALL_COMPLETED to true. In addition, PatchService determines whether the boot broadcast has been received based on the value of the parameter BOOT_COMPLETED. It can be understood that in step S105, the value of the parameter BOOT_COMPLETED is modified to true, so PatchService determines that it has received the boot broadcast and executes S108.

[0085] S108: PatchService sends a custom broadcast (or "first broadcast") to HnOUC.

[0086] This embodiment does not limit the content of the custom broadcast. For example, the content of the custom broadcast can be "launchapplication". In addition, PatchService can specify the package name of the receiver of the custom broadcast as the package name of the OUC, or as the component name of the broadcast receiver of the HnOUC (the HnOUC can define the component name of its broadcast receiver in its Manifest file). Therefore, when PatchService sends the custom broadcast, the HnOUC can receive the custom broadcast.

[0087] When PatchService determines that the power-on broadcast has been received and that the OUC has been updated, it can call the sendBroadcast method to send a custom broadcast to HnOUC.

[0088] S109: In response to receiving the custom broadcast, the HnOUC starts itself.

[0089] After PatchService sends a custom broadcast, HnOUC can receive the custom broadcast.

[0090] S110: HnOUC executes subsequent actions after the update.

[0091] After HnOUC is started, subsequent actions after the update can be performed, such as partition synchronization of the update package data of HnOUC; refreshing the system version number of the electronic device 100; setting the keep-alive clock of HnOUC; sending dot data to the server, and / or displaying notification information of successful HnOUC update. For the sake of narrative coherence, the specific details of the above actions are described in detail below.

[0092] In the method provided in this embodiment, HnOUC starts after receiving the custom broadcast sent by PatchService. The custom broadcast is sent after the electronic device 100 is turned on and the OUC is updated. Therefore, HnOUC can definitely receive the custom broadcast, thereby avoiding the situation where it cannot be automatically updated after the update.

[0093] exist Figure 5 In the example shown, PatchService first receives the power-on broadcast, and then receives the notification of the completion of the OUC update. Therefore, in another embodiment, the notification of the completion of the OUC update may be received first, and then the power-on broadcast may be received.

[0094] refer to Figure 7 The application startup method provided in this embodiment includes the following steps:

[0095] S201, PatchService calls UpdateEngine to synthesize a new version of APK.

[0096] S202: UpdateEngine sends a synthesis completion notification of the new version APK to PatchService.

[0097] S203: PatchService calls PMS to install a new version of APK to update OUC.

[0098] Steps S201 to S203 are substantially the same as the above-mentioned steps S101 to S103 and will not be described in detail here.

[0099] S204: PMS sends a notification of OUC update completion to PatchService.

[0100] Step S204 is substantially the same as the above-mentioned step S106 and will not be described again here.

[0101] S205: PatchService receives the startup broadcast and determines whether it has received the notification of OUC update completion. If so, S208 is executed, and if not, the custom broadcast is not sent.

[0102] exist Figure 7 In the example shown, when PatchService receives the notification that the OUC update is complete, it means that the OUC has been updated. At this time, PatchService modifies the value of the parameter OUC_INSTALL_COMPLETED to true, and continues to determine whether the boot broadcast has been received. In addition, PatchService determines whether the boot broadcast has been received based on the value of the parameter BOOT_COMPLETED. It can be understood that in step S205, the value of the parameter BOOT_COMPLETED is false. Therefore, PatchService determines that it has not received the boot broadcast. Therefore, PatchService does not send a custom broadcast.

[0103] S206, AMS sends a startup broadcast to PatchService.

[0104] Step S206 is substantially the same as the above-mentioned step S104 and will not be described again here.

[0105] S207: PatchService receives the startup broadcast and determines whether it has received the notification of OUC update completion. If yes, S208 is executed, if no, the custom broadcast is not sent.

[0106] When PatchService receives the boot broadcast, it means that the electronic device 100 has completed booting. At this time, PatchService modifies the value of the parameter BOOT_COMPLETED to true. In addition, PatchService determines whether it has received the notification of OUC update completion based on the value of the parameter OUC_INSTALL_COMPLETED. It can be understood that in step S205, the value of the parameter OUC_INSTALL_COMPLETED is modified to true, so PatchService determines that it has received the notification of OUC update completion and executes S208.

[0107] S208: PatchService sends a custom broadcast to HnOUC.

[0108] S209: In response to receiving the custom broadcast, the HnOUC starts itself.

[0109] S210: HnOUC executes subsequent actions after the update.

[0110] Steps S208 to S210 are substantially the same as the above-mentioned steps S108 to S110 and will not be described in detail here.

[0111] That is to say, reference Figure 8 In the method of the above embodiment, the timing of sending a custom broadcast by PatchService is determined in the following two situations:

[0112] (1) Case A: When PatchService receives the OUC update completion notification, it determines whether the startup process of the electronic device 100 is completed.

[0113] (2) Case B: When PatchService receives the startup broadcast, it determines whether the OUC update is complete.

[0114] From the above situation, it can be seen that PatchService will send a custom broadcast to HnOUC only when PatchService receives a boot broadcast (recorded as "condition one") and receives a notification that the OUC update is complete (recorded as "condition two"). When any of condition one and condition two is not met, PatchService will not send a custom broadcast to HnOUC. Therefore, the embodiment of the present application can ensure that HnOUC receives a custom broadcast and starts itself smoothly.

[0115] In some cases, the control module (e.g., Iaware module) of the electronic device 100 may control the startup behavior of the application and restrict the custom broadcast from launching the application. In order to enable HnOUC to start automatically to perform subsequent tasks, in this embodiment, the control module may be pre-set to allow custom broadcast to launch HnOUC, for example, by adding the OUC application to the whitelist of the control module.

[0116] In some embodiments, the cold patch package mentioned above is a differential update package, which is a differential package between the installation package of the new version and the installation package of the old version.

[0117] The following introduces another situation that may occur during the restarting and booting phase of the electronic device 100 (another situation different from the above situation one and situation two, recorded as "situation three").

[0118] Case 3: Reference Fig. 9 When a lock screen password is set for the electronic device 100 and the user unlocks the electronic device 100 after the OUC update is completed, the updated OUC can receive the power-on broadcast.

[0119] Specifically, Fig. 9 As shown, the user unlocks the electronic device 100 after stage 2 (PatchService calls PMS to install the new version of APK), for example, unlocking the electronic device 100 20 seconds after PatchService calls UpdateEngine. At this time, the electronic device 100 calls the sendBroadcast method to request AMS to send a power-on broadcast. After receiving the request, AMS queries the broadcast receivers in the system and creates a broadcast record based on the query results.

[0120] It can be understood that before the AMS establishes the broadcast record, the OUC has been updated, so the broadcast record includes the broadcast receiver of the OUC. In addition, after the broadcast record is established, the OUC broadcast recorder will no longer be removed due to reinstalling the OUC. Therefore, in this case, when the AMS sends a power-on broadcast to the HnOUC, the HnOUC can receive the power-on broadcast normally. After receiving the power-on broadcast, the HnOUC can start automatically.

[0121] In some embodiments, HnOUC may receive two broadcasts. For example, after HnOUC receives the power-on broadcast (first broadcast) and starts up, if PatchService determines that the OUC update is complete and the power-on broadcast is received, it will still send a custom broadcast to HnOUC. At this time, HnOUC receives the custom broadcast (second broadcast). In other words, HnOUC will receive two broadcasts. It is understandable that in other embodiments, HnOUC may also receive the custom broadcast first and then the power-on broadcast.

[0122] When HnOUC receives the first broadcast, it can start automatically and perform the updated related operations (for example, the partition synchronization operation described in step S110, the system version number refresh operation, etc.) after starting. When HnOUC receives the broadcast (custom broadcast) for the second time, it may start automatically again and perform the updated related operations again.

[0123] In some other embodiments, a flag may be added in the electronic device 100. The HnOUC determines whether to execute the updated related operation based on the value of the Flag.

[0124] Exemplarily, each time the electronic device 100 downloads the cold patch package of the OUC and completes the decompression and authentication of the cold patch package, the value of Flag is set to 0. After that, the electronic device 100 restarts and updates the OUC based on the cold patch package. When the updated OUC (i.e., HnOUC) receives the broadcast, it queries the value of Flag. If the value of Flag is 0, the relevant actions after the update are executed and the value of Flag is set to 1; otherwise, HnOUC does not execute the relevant actions after the update.

[0125] It can be understood that when the OUC is updated and receives the first broadcast (e.g., power-on broadcast), the Flag value is 0. At this time, HnOUC performs the relevant actions after the update and changes the Flag value to 1. Afterwards, when HnOUC receives the second broadcast (e.g., custom broadcast), the Flag value has been changed to 1. At this time, HnOUC will not perform the relevant actions after the update. Through this setting, HnOUC can be prevented from repeatedly performing the actions after the update (e.g., partition synchronization operation).

[0126] The following describes the related actions performed after the OUC update is completed (ie, the actions involved in step S110 ).

[0127] 1. Perform partition synchronization on a cold patch package (as an example of an update package).

[0128] In this embodiment, the system partition of the electronic device 100 can adopt a virtual AB (or "VAB") dynamic partition architecture (that is, the operating system of the electronic device 100 supports virtual AB partitions). In other embodiments, the system partition of the electronic device 100 can also adopt other partition architectures, for example, a virtual A partition architecture, an AB partition architecture, an AB dynamic partition architecture, a VAB partition architecture, etc.

[0129] refer to Fig. 10A and Fig. 10B The electronic device 100 includes two static partitions (static partition A and static partition B), a dynamic partition and a user data partition, wherein the static partition A and the static partition B are independent physical storage spaces, and the dynamic partition is a shared space.

[0130] refer to Fig. 10A When the electronic device 100 is working, the system is mounted on one of the static partitions, for example, static partition A. When the software (for example, OUC) in the electronic device 100 needs to be upgraded, the upgrade data may not be written into the static partition A, but into the static partition B. Therefore, during the software upgrade process, the normal operation of the system may not be affected. In addition, a part of the upgrade data (the part of the upgrade data corresponding to the dynamic partition, recorded as "upgrade data R") can be written into the user data partition.

[0131] After the upgrade data is written to the static partition B, the electronic device 100 is restarted. After the electronic device 100 is restarted, the system switches to the static partition B for operation. Fig. 10B , the system is mounted on the static partition B and the dynamic partition. At this time, data R can be written to the dynamic partition.

[0132] In addition, after the OUC update is completed, since the data of the OUC in the static partition B is the data after the OUC update, and the data of the OUC in the static partition A is the data before the OUC update. After the OUC update is completed, HnOUC can also synchronize the update package data of the OUC in the static partition B to the static partition A, so that the update package data of the OUC in the static partition A and the static partition B are consistent. The next time the OUC is updated, whether it is updated in the static partition A or in the static partition B, it can be updated based on the latest OUC version instead of based on the earlier OUC version.

[0133] In some embodiments, after HnOUC receives a broadcast (custom broadcast or boot broadcast), it can determine whether the current system partition supports partition synchronization operations, and determine whether HnOUC has been started after installation.

[0134] If the current system partition supports partition synchronization operation, and HnOUC has not been started since installation (for example, ifHnOucUtility.isSupportVAB()&&!OucUtility.isNeedReboot()), HnOUC performs partition synchronization operation after startup. Otherwise, HnOUC does not perform partition synchronization operation after startup. Through this setting, it can be avoided that HnOUC performs partition synchronization operation every time the electronic device 100 is restarted.

[0135] (2) Refresh the system version number of the electronic device 100.

[0136] HnOUC can refresh the current version number (the version number before the update) of the electronic device 100 system to the version number after the update.

[0137] For example, refer to Fig.11 and Fig.12 , the electronic device 100 can display the system version number of the electronic device 100 in the About Phone interface of the Settings application. Fig.11 , the current version number of the electronic device 100 is "7.0.0.123 (C00E190R6P2)". After this update, refer to Fig.12 , HnOUC can refresh the version number to "7.0.0.123 (C00E190R6P2Patch01)".

[0138] By refreshing the system version number of the electronic device 100, it is convenient for the user to observe that the system version of the electronic device 100 has been updated, thereby improving the user perception.

[0139] (3) Set the OUC keep-alive clock (Alarm).

[0140] The keep-alive clock is used to trigger the automatic start of the application. By setting the keep-alive clock, HnOUC can be automatically started regularly to perform the check and update task regularly. For example, HnOUC can set the clock period of the keep-alive clock to 4 hours, so that HnOUC can automatically start once every 4 hours to perform the check and update task (search for packages) every 4 hours. After each search is completed, OUC can be automatically closed.

[0141] When the OUC performs the check update task, it can check whether there is a new version of system software in the electronic device 100. When it is detected that there is a new version of system software in the electronic device 100, the user is reminded to update the system software, or the system software is automatically updated.

[0142] After HnOUC is started, it can activate the task of checking updates regularly by setting its own keep-alive clock, so that it can be updated to the latest version in time when the manufacturer releases a new version of the system software.

[0143] (4) Send the dot data to the server.

[0144] After HnOUC is started, it sends the dot data to the server to notify the server that OUC has been successfully updated on the electronic device 100 (i.e., the electronic device 100 has successfully completed the installation of the cold patch package). The server can obtain the number of cold patch packages installed by collecting the dot data of each electronic device. Exemplarily, the dot data may include the version number of the cold patch package, the device identification of the electronic device 100, etc.

[0145] (5) Display the notification information of successful OUC update.

[0146] After HnOUC is started, it can execute the task of issuing software update application upgrade notification. For example, refer to Fig.13 , a notification bar 50 is displayed in the display area of ​​the electronic device 100. The notification bar 50 includes notification information of successful OUC update, such as "the software update application has been updated and is currently the latest version".

[0147] Specifically, the HnOUC may call the system service (SystemService) to create a notification object for the notification bar 30 , so as to display the notification bar 50 through the notification object.

[0148] After HnOUC is started, a notification message indicating successful update is displayed to enhance user perception.

[0149] Fig.141 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 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. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0150] It is to be understood that the structure illustrated in the embodiment of the present invention does 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 components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

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

[0152] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.

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

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

[0155] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0156] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple groups of I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 to the wireless communication module 160. For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to achieve Bluetooth function. The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via a DSI interface to implement the display function of the electronic device 100.

[0157] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

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

[0159] The USB connector 130 is a connector that complies with USB standard specifications and can be used to connect the electronic device 100 and peripheral devices. Specifically, it can be a standard USB connector (such as a Type C connector), a Mini USB connector, a Micro USB connector, etc.

[0160] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB connector 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0161] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

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

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

[0165] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

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

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

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

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

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

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

[0172] 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 converts the optical signal into an electrical signal, which is then transmitted to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0173] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0174] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record videos in multiple coding formats.

[0175] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

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

[0177] The internal memory 121 can be used to store computer executable program codes, which include instructions. 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 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, etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

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

[0179] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0180] The speaker 170A, also called a "speaker", is used to convert an audio signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A. The receiver 170B, also called a "earpiece", is used to convert an audio signal into a sound signal. When the electronic device 100 receives a call or a voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0181] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting his mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. The headphone jack 170D is used to connect wired headphones.

[0182] 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. TMTaking the system as an example, the software structure of the electronic device 100 is exemplified.

[0183] Fig.15 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0184] The layered architecture 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: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0185] The application layer can include a series of application packages.

[0186] like Fig.15 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, software update, etc.

[0187] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0188] like Fig.15 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

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

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

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

[0192] 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.).

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

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

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

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

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

[0198] The system library may 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.

[0199] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0200] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0201] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0202] A 2D graphics engine is a drawing engine for 2D drawings.

[0203] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0204] Reference now Fig.16 , shown is a block diagram of an electronic device 400 according to one embodiment of the present application. The electronic device 400 may include one or more processors 401 coupled to a controller hub 403. For at least one embodiment, the controller hub 403 communicates with the processor 401 via a multi-drop bus such as a front side bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or a similar connection 406. The processor 401 executes instructions that control general types of data processing operations. In one embodiment, the controller hub 403 includes, but is not limited to, a graphics & memory controller hub (GMCH) (not shown) and an input / output hub (IOH) (which can be on a separate chip) (not shown), wherein the GMCH includes a memory and a graphics controller and is coupled to the IOH.

[0205] The electronic device 400 may also include a coprocessor 402 and a memory 404 coupled to a controller hub 403. Alternatively, one or both of the memory and the GMCH may be integrated within the processor (as described in this application), with the memory 404 and the coprocessor 402 being directly coupled to the processor 401 and the controller hub 403, with the controller hub 403 being in a single chip with the IOH.

[0206] The memory 404 may be, for example, a dynamic random access memory (DRAM), a phase change memory (PCM), or a combination of the two. The memory 404 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, specifically, temporary and permanent copies of the instructions. The instructions may include: when executed by at least one of the processors, causing the electronic device 400 to implement the following: Figure 5 , Figure 7 , Figure 8 When the instructions are executed on a computer, the computer executes the application startup method disclosed in the embodiment of the present application.

[0207] In one embodiment, the coprocessor 402 is a special-purpose processor, such as, for example, a high-throughput Many Integrated Core (MIC) processor, a network or communication processor, a compression engine, a graphics processor, a general-purpose computing on graphics processing units (GPGPU), or an embedded processor. The optional nature of the coprocessor 402 is indicated by a dashed line in FIG. Fig.16 middle.

[0208] In one embodiment, the electronic device 400 may further include a network interface (Network Interface Controller, NIC) 406. The network interface 406 may include a transceiver for providing a radio interface for the electronic device 400, and then communicating with any other suitable device (such as a front-end module, an antenna, etc.). In various embodiments, the network interface 406 may be integrated with other components of the electronic device 400. The network interface 406 may implement the functions of the communication unit in the above-mentioned embodiments.

[0209] The electronic device 400 may further include an input / output (I / O) device 405. The I / O 405 may include: a user interface designed to enable a user to interact with the electronic device 400; a peripheral component interface designed to enable peripheral components to interact with the electronic device 400; and / or a sensor designed to determine environmental conditions and / or location information related to the electronic device 400.

[0210] It is worth noting that Fig.16 This is for illustrative purposes only. Fig.16 It is shown that the electronic device 400 includes multiple devices such as a processor 401, a controller hub 403, a memory 404, etc.; however, in actual applications, the device using the methods of the present application may include only a portion of the devices in the electronic device 400, for example, it may include only the processor 401 and the network interface 406. Fig.16 The properties of optional devices are shown with dotted lines.

[0211] Reference now Fig.17 , which is a block diagram of a system on chip (SoC) 500 according to an embodiment of the present application. Fig.17 In the FIG, similar components have the same reference numerals. In addition, the dashed boxes are optional features of more advanced SoCs. Fig.17In the embodiment, SoC 500 includes: an interconnect unit 550 coupled to a processor 510; a system agent unit 580; a bus controller unit 590; an integrated memory controller unit 540; a group or one or more coprocessors 520, which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random access memory (SRAM) unit 530; and a direct memory access (DMA) unit 560. In one embodiment, the coprocessor 520 includes a special-purpose processor, such as, for example, a network or communication processor, a compression engine, a general-purpose computing on graphics processing units (GPGPU), a high-throughput MIC processor, or an embedded processor.

[0212] Static random access memory (SRAM) unit 530 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, and more specifically, stores temporary and permanent copies of the instructions. The instructions may include: when executed by at least one of the processors, causing the SoC to implement the following: Figure 5 , Figure 7 , Figure 8 When the instructions are executed on a computer, the computer executes the application startup method disclosed in the embodiment of the present application.

[0213] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in this embodiment, the value of each data range includes the end value. For example, A=10-50 means that A can be 10 or 50.

[0214] Each method implementation mode of the present application can be implemented in the form of software, magnetic components, firmware, etc.

[0215] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0216] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described herein is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0217] One or more aspects of at least one embodiment may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logics in a processor, and when the instructions are read by a machine, the machine makes logic for performing the techniques described herein. These representations, known as "Intellectual Property (IP) cores," may be stored on tangible computer-readable storage media and provided to multiple customers or production facilities to be loaded into a manufacturing machine that actually manufactures the logic or processor.

[0218] In some cases, the instruction converter can be used to convert instructions from a source instruction set to a target instruction set. For example, the instruction converter can transform (e.g., using static binary transformation, dynamic binary transformation including dynamic compilation), deform, simulate, or otherwise convert instructions into one or more other instructions to be processed by the core. The instruction converter can be implemented in software, hardware, firmware, or a combination thereof. The instruction converter can be on the processor, outside the processor, or partially on the processor and partially outside the processor.

Claims

1. An application startup method, applied to an electronic device, characterized in that: The electronic device includes a first application; the method includes: In response to receiving an update package for the first application, shutting down and restarting the computer, the first application being a system application; Updating the first application based on the update package; When the power-on process of the electronic device is completed and the first application is updated, sending a first broadcast to the first application, where the first broadcast is different from the power-on broadcast; The first application is started in response to receiving the first broadcast.

2. The method according to claim 1, characterized in that The electronic device includes a first service and a second service; The updating of the first application based on the update package includes: the first service updating the first application based on the update package; When the power-on process of the electronic device is completed and the update of the first application is completed, sending a first broadcast to the first application includes: When the power-on process of the electronic device is completed, the second service sends a power-on broadcast; The first service sends the first broadcast to the first application based on receiving the startup broadcast and determining that the first application is updated.

3. The method according to claim 1, characterized in that: The method further comprises: Based on the completion of startup, the first application performs at least one of the following actions: partition synchronization of the update package data of the first application; refresh the system version number of the electronic device; set the keep-alive clock of the first application; send dot data to the server; and display notification information of successful update of the first application.

4. The method according to claim 3, characterized in that The first application performs partition synchronization on update package data of the first application, including: The first application performs partition synchronization on update package data of the first application based on determining that the operating system of the electronic device supports virtual AB partitions and determining that after the first application is updated, the electronic device is not restarted.

5. The method according to claim 2, characterized in that: The startup process at least includes: Display the lock screen interface; Receiving an unlock operation for the lock screen interface; The electronic device startup process is completed, including: The electronic device receives the unlocking operation and determines that the power-on process is completed.

6. The method according to claim 5, characterized in that The unlocking operation includes inputting an unlocking password.

7. The method according to claim 2, characterized in that The electronic device further includes a third service; the first service updates the first application based on the update package, including: The first service sends a first request to the third service to synthesize a new version installation package of the first application; In response to receiving the first request, the third service synthesizes a new version installation package of the first application based on the update package; The first service updates the first application based on the new version installation package.

8. The method according to claim 7, characterized in that The electronic device further includes a fourth service; the first service updates the first application based on the new version installation package, including: The first service sends a second request to the fourth service to install the first application; In response to receiving the second request, the fourth service installs the first application based on the new version installation package; The fourth service sends a notification of completion of updating the first application to the first service based on completion of installation of the first application; The first service determines that the first application update is complete, including: The first service determines that the first application has completed updating based on receiving a notification that the first application has completed updating.

9. The method according to claim 1, characterized in that: The first application is a software update application.

10. The method according to claim 1, characterized in that The boot broadcast includes BOOT_COMPLETED.

11. The method according to claim 2, characterized in that The first service is PatchService, and the second service is ActivityManagerService.

12. An electronic device comprising: a memory for storing instructions executed by one or more processors of the electronic device; A processor, when the processor executes the instructions in the memory, can enable the electronic device to execute the application startup method according to any one of claims 1 to 11.

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