CN116244008B - Application starting method, electronic device and storage medium - Google Patents

Application starting method, electronic device and storage medium Download PDF

Info

Publication number
CN116244008B
CN116244008B CN202310520805.8A CN202310520805A CN116244008B CN 116244008 B CN116244008 B CN 116244008B CN 202310520805 A CN202310520805 A CN 202310520805A CN 116244008 B CN116244008 B CN 116244008B
Authority
CN
China
Prior art keywords
application
service
electronic device
update
broadcast
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310520805.8A
Other languages
Chinese (zh)
Other versions
CN116244008A (en
Inventor
朱立国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310520805.8A priority Critical patent/CN116244008B/en
Priority to CN202311148781.4A priority patent/CN117311840A/en
Publication of CN116244008A publication Critical patent/CN116244008A/en
Application granted granted Critical
Publication of CN116244008B publication Critical patent/CN116244008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an application starting method, electronic equipment and a computer readable storage medium, and relates to the technical field of electronic equipment. The electronic device includes a first application, a first service, and a second service; the application starting method comprises the following steps: the electronic equipment responds to receiving an update package of the first application, and is powered off and restarted; in the starting-up process, the first service updates the first application based on the update package; the second service is completed based on the starting-up process, and starting-up broadcasting is sent; the first service receives the startup broadcast, determines that the first application is updated, and sends a first broadcast to the updated first application, wherein the first broadcast is used for indicating the updated first application to start. The application can avoid the situation that the updated application cannot be started automatically.

Description

Application starting method, electronic device and storage medium
Technical Field
The present application relates to the field of electronic devices, and in particular, to an application starting method, an electronic device, and a computer readable storage medium.
Background
Electronic devices such as mobile phones and tablet computers are widely used today. To meet increasing user demands, some applications in electronic devices need to be updated.
After updating some applications (e.g., software update applications) in an electronic device, the updated applications are typically required to self-launch to perform subsequent tasks after launch. For example, application update completion information and the like are displayed. However, in some scenarios, the updated application may not be self-bootable.
Disclosure of Invention
Some embodiments of the present application provide an application starting method, an electronic device, and a computer-readable storage medium, and the present application is described in the following aspects, which may be referred to with reference to the following embodiments and advantageous effects.
In a first aspect, the present application provides an application starting method, where an electronic device includes a first application, a first service and a second service; the method comprises the following steps: the electronic equipment responds to receiving an update package of the first application, and is powered off and restarted; the electronic equipment is started, and in the starting process, a first service updates a first application based on an update package; the second service is completed based on the starting-up process, and starting-up broadcasting is sent; the first service receives the startup broadcast, determines that the first application is updated, and sends a first broadcast to the updated first application, wherein the first broadcast is used for indicating the updated first application to start.
According to an embodiment of the present application, the first application is started as the first application based on receiving a first broadcast transmitted by the first service. The first service receives a start-up broadcast sent by the second service, and sends the first broadcast to the first application after determining that the update of the first application is completed. It will be appreciated that the first broadcast is sent after the electronic device has been powered on and the first application update has been completed. Therefore, the updated first application can necessarily receive the first broadcast, so that the situation that the updated first application cannot be automatically updated can be avoided.
In some implementations, the first application is a system application; the method further comprises the steps of: the first application is started in response to receiving the first broadcast; the first application performs at least one of the following actions based on the completion of the launch: carrying out partition synchronization on update package data of a first application; refreshing a system version number of the electronic device; setting a keep-alive clock of a first application; transmitting dotting data to a server; and displaying the notification information of successful update of the first application.
In some embodiments, 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 an operating system of the electronic device supports virtual AB partition and that the electronic device is not restarted after the first application is updated.
In some embodiments, the power-on process includes at least: displaying a lock screen interface; receiving unlocking operation aiming at a screen locking interface; the second service determines that the boot process is complete, including: the second service determines that the boot process is complete based on the electronic device receiving the unlocking operation.
In some embodiments, the unlocking operation includes entering an unlock code.
In some implementations, 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 for synthesizing a new version installation package of the first application to a third service; the third service is used for responding to the received first request and synthesizing 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.
In some implementations, 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 for installing the first application to the fourth service; the third service responds to the second request and installs the first application based on the new version installation package; the third service sends a notification of completion of the update of the first application to the first service based on completion of the installation of the first application; the first service determining that the first application update is complete, comprising: the first service determines that the first application is finished with the update based on receiving the notification of the completion of the update of the first application.
In some implementations, the first application is a software update application.
In a second aspect, an embodiment of the present application provides an electronic device, including: a memory for storing instructions for execution by one or more processors of the electronic device; the processor, when executing the instructions in the memory, may cause the electronic device to perform the method according to any of the embodiments of the first aspect of the present application. The advantages achieved by the second aspect may be referred to the advantages of the method provided by any embodiment of the first aspect, and will not be described here in detail.
In a third aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon instructions that, when executed on a computer, cause the computer to perform the method according to any of the embodiments of the first aspect. The advantages achieved by the third aspect may refer to the advantages provided by any embodiment of the first aspect, and are not described here again.
Drawings
FIGS. 1A-1B illustrate an exemplary method one of user-to-application updating provided by embodiments of the present application;
FIG. 1C illustrates an exemplary second method for user-to-application updating provided by an embodiment of the present application;
FIG. 2 is a diagram illustrating an example of an application update principle according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a power-on broadcast transmission according to some embodiments;
FIG. 4 is a flowchart illustrating a power-on broadcast transmission according to some embodiments;
fig. 5 is a flowchart of an application starting method according to an embodiment of the present application;
FIG. 6 is a diagram illustrating an example of an application update interface according to an embodiment of the present application;
fig. 7 is a second flowchart of an application starting method according to an embodiment of the present application;
FIG. 8 is a diagram illustrating an example of an application update principle according to an embodiment of the present application;
FIG. 9 is a flowchart illustrating a third example of a power-on broadcast transmission provided in some embodiments;
FIGS. 10A and 10B are diagrams illustrating virtual VAB partition frameworks according to embodiments of the present application;
FIG. 11 is a diagram illustrating an exemplary system version number refresh (before refresh) provided by an embodiment of the present application;
FIG. 12 is a diagram of a second embodiment of a system version number refresh (after refresh) according to an embodiment of the present application;
FIG. 13 is a diagram illustrating a notification of completion of an update of an application provided by an embodiment of the present application;
fig. 14 is a schematic view showing the construction of an electronic device according to an embodiment of the present application;
fig. 15 shows a software architecture diagram of an electronic device according to an embodiment of the present application;
FIG. 16 shows a block diagram of an electronic device provided by an embodiment of the application;
fig. 17 is a schematic structural diagram of a System on Chip (SoC) according to an embodiment of the present application.
Detailed Description
The embodiment of the application is used for providing an application starting method. The method provided by the application can be applied to update and can be smoothly and automatically started.
Fig. 1A and 1B illustrate exemplary application scenarios of embodiments of the present application. Referring to fig. 1A, an 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 the user clicks the check update button 11 on the software update interface 10, the electronic device 100 can check whether a new version of the system software exists.
When a new version of the system software exists, the electronic device 100 may jump to the new version interface 15 shown in FIG. 1B. The new version interface 15 includes information such as update logs, new version numbers of system software, and the like. Referring to FIG. 1B, the present update incorporates a patch for a software update application. When the user points to download and install the button 16, the electronic device 100 may update the OUC.
It will be appreciated that in other embodiments, the electronic device 100 may initiate an update to an application in other ways as well. For example, when a new version of an application is detected, the electronic device 100 may automatically initiate an update to 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, based on which a user may initiate an update to the application.
Specifically, as shown in FIG. 1C, 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 of ouc—a ok button 21. In some cases, the electronic device 100 updates the OUC when the user clicks the ok button 21 in the notification bar 20.
The application is not limited to a specific form of electronic device 100, and electronic device 100 may be a cell phone, a notebook computer, a tablet, a large screen device, a wearable device (e.g., a wristwatch, a smart glasses, a helmet), a desktop computer, an augmented Reality (Augmented Reality, AR)/Virtual Reality (VR) device, a personal digital assistant (Personal Digital Assistant, PDA), etc. A cellular phone is hereinafter taken as an example of the electronic device 100.
Referring to fig. 2, when updating OUC, the electronic device 100 may download a cold patch Ding Bao of the OUC (as an example of an update package) from the server 200 and authenticate, decompress the cold patch Ding Bao. Cold patch Ding Bao is a patch package that is not validated until electronic device 100 is restarted. After the cold patch Ding Bao is authenticated and decompressed, the electronic device 100 needs to be restarted.
When the electronic device 100 is restarted, a patch service (patch service) is pulled up (as a first service) at the boot stage, and the patch service is initialized. After the patch service is initialized, an update driver (UpdateEngine) is called (as a third service) to synthesize the cold patch Ding Bao and the android application package (Android Application Package, APK) of the current version of OUC into a new version of APK. Subsequently, patchService invokes the package administration service (Package Manager Service, PMS) (as a fourth service) to install the new version of APK to update OUC.
After the OUC update is completed, a self-start is required to perform the subsequent tasks. For example, the UpdateEngine is invoked to perform tasks such as partition synchronization (merge) operations, issuing notification of patch upgrade success, and the like. For consistency of description, tasks performed after OUC self-start will be described later.
In some cases, the OUC update cannot be self-initiated after it is completed.
The following describes the case where OUC cannot be self-initiated after update.
(1) Case one: the electronic device 100 is set with a lock screen password by the user, and the electronic device 100 is unlocked before the OUC update is completed.
Illustratively, the lock screen password may encrypt the credential encryption (Credential Encrypted, CE) storage space of the electronic device 100. The credential encryption storage is used to store encryption level files of the electronic device 100.
To ensure user data security, the activity management service (ActivityManagerService, AMS) of the electronic device 100 (as a second service) will send a BOOT-up broadcast (boot_complete) only after the credential encrypted storage is decrypted, to avoid that applications in the electronic device 100 are started before unlocking.
It will be appreciated that certain applications (e.g., software update applications, system applications such as voice assistant applications) in the electronic device 100 may be self-initiated upon receipt of a power-on broadcast.
Referring to fig. 3, the update procedure of ouc includes the following two phases:
stage one: patchService calls UpdateEngine to synthesize a new version of APK (e.g., phase one is 15 seconds or so).
Stage two: patchService invokes the PMS to install a new version of APK (e.g., phase two is about 3 seconds long).
When the user unlocks the electronic device 100 before the OUC update is complete (e.g., during phase one), the electronic device 100 invokes the sendroadcast method to request the campaign management service (ActivityManagerService, AMS) to send a power-on broadcast.
After receiving the request, the AMS queries a broadcast receiver (BroadcastReceiver) in the system and creates a broadcast record (BroadcastRecord) according to the query result. It will be appreciated that the OUC has set the broadcast receiver before the update, and thus the broadcast receiver of the OUC is included in the broadcast record.
After the establishment of the broadcast record is completed, the AMS establishes a broadcast queue, and then adds broadcast receivers in the broadcast record to the broadcast queue, and transmits (distributes) the start-up broadcast according to the broadcast queue. Typically, there is a certain period of time, for example, about 17 seconds, from the completion of the broadcast record establishment to the start of the AMS transmission of the power-on broadcast.
In some cases, as shown in fig. 3, the PMS may install a new version of APK before the AMS transmits the power-on broadcast. The PMS removes the broadcast receiver of the OUC during installation of the new version APK. When the OUC update is completed, a broadcast receiver that causes the updated OUC (hereinafter, "updated OUC" will be referred to as "HnOUC") is not in the broadcast queue established by the AMS, and thus, the HnOUC does not receive the on-air broadcast.
(2) And a second case: the electronic device 100 is not set with the lock screen password by the user and the electronic device 100 is powered on before the OUC update is completed.
Since the electronic device 100 is not set with the lock screen password by the user, the credential encryption storage of the electronic device 100 is not encrypted. In this case, when the electronic device 100 is powered on, the sendroadcast method may be called to request the AMS to send the power-on broadcast.
Referring to fig. 4, when the electronic device 100 is powered on before the OUC update is completed (e.g., during phase one), the electronic device 100 invokes the sendcast method to request the AMS to send a power-on broadcast. After the AMS receives the request, it establishes a broadcast record.
In some cases, as in the first case, before the AMS transmits the power-on broadcast, the PMS installs a new version of APK, and removes the broadcast receiver of the OUC in the process, so that the broadcast receiver of the HnOUC is not in the broadcast queue established by the AMS, and thus the HnOUC cannot receive the power-on broadcast.
In both the first and second cases, the OUC cannot be self-initiated after updating. In order to solve the technical problems, the application provides an application starting method. In the method provided in this embodiment, the updated OUC (as an example of the first application) is started based on receiving a custom broadcast (or "first broadcast") sent by the PatchService (as the first service). The PatchService is a method for receiving a startup broadcast sent by the AMS (serving as a second service), and sending a custom broadcast to the OUC after determining that the OUC update is completed. It will be appreciated 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 necessarily receive the custom broadcast, so that the situation that the updated OUC cannot be started automatically can be avoided.
The following describes specific steps of the application starting method provided by the embodiment of the present application.
Referring to fig. 5, the application starting method provided by the present application includes the following steps:
s101: patchService invokes UpdateEngine (as a third service) to synthesize a new version of APK.
In the present embodiment, OUC is taken as an example of the first application. In other embodiments, the first application may be a system application such as a camera application, a setup application, a clock application, a screen recording application, a smart assistant application, or other third party application.
When updating OUC, the electronic device 100 may receive the cold patch Ding Bao (as an example of an update package) sent by the server and authenticate and decompress the cold patch Ding Bao. After the cold patch Ding Baojian is completed and decompressed, the electronic device 100 enters a restart state, at which time the user can restart the electronic device 100 by performing a restart operation.
For example, referring to fig. 6, when the electronic device 100 enters a reboot state, the window 40 may be pop-up. When the user clicks the immediate install button 41 in the pop-up window 40, the electronic device 100 is restarted. Alternatively, the user may restart the electronic device 100 by pressing the power key 42 for a long time. For example, when the user presses the power key 42 for more than 3 seconds, the electronic device 100 is restarted. In other embodiments, the electronic device may also automatically restart after the completion of the decompression and the weighting of the cold patch Ding Baojian.
It is understood that the reboot phase of the electronic device 100 includes a shutdown process and a reboot process. During a boot up process of the electronic device 100 during a restart phase, the PatchService may send a request (as a first request) to the UpdateEngine to synthesize a new version of the OUC APK for the OUC application to invoke the UpdateEngine to synthesize the cold patch Ding Bao with the current version of the OUC APK.
S102: the UpdateEngine sends a synthesis completion notification of the new version APK to the patch service.
In some embodiments, after the new version of APK synthesis is completed, the UpdateEngine may send a notification of the completion of the new version of APK synthesis to the patch service by broadcasting, bundle, or the like. The Bundle is an inter-component communication mode provided by the Android system.
S103: patchService invokes the PMS (as a fourth service) to install the new version of APK to update OUC.
After receiving the notification of completion of the synthesis of the new version APK, the patch service sends a request (as a second request) to the PMS to install the OUC to invoke the PMS to install the new version APK to update the OUC.
S104: the AMS sends a power-on broadcast to the patch service.
When the power-on process of the electronic device 100 is completed, the AMS transmits a power-on broadcast to the patch service.
In some embodiments, if the electronic device 100 is not set with the screen locking password, the power-on process of the electronic device 100 is completed when a desktop (Launch) application of the electronic device 100 is started.
In other embodiments, if the electronic device 100 is set with a lock screen password, the electronic device 100 displays a lock screen interface during the power-on process. When the electronic device 100 receives the unlocking operation of the user on the lock screen interface, the electronic device 100 unlocks and completes the startup process.
Specifically, when the electronic device 100 displays the lock screen interface, the user may unlock the electronic device 100 by entering a lock screen code (or "unlock code") on the lock screen interface. The screen locking password can be in the form of fingerprint password, digital password, gesture password, face password and the like, and the application is not limited.
S105: patchService receives the start-up broadcast and determines whether a notification of OUC update completion has been received. If yes, S108 is executed, and if no, no custom broadcast is transmitted.
In some embodiments, the electronic device 100 has stored therein a parameter boot_complete for marking whether a power-on broadcast is received. After each power-up of the electronic device 100, the value of the parameter boot_complete may be set to false. When the PatchService receives the BOOT broadcast, the value of the parameter BOOT_complete is modified to true.
In addition, the electronic device 100 also stores a parameter ouc_INSTALL_complete for marking the update status of OUC. After each power-up of the electronic device 100, the value of the parameter ouc_INSTALL_complete may be set to false. When PatchService receives notification of the completion of the OUC update, the value of parameter OUC_INSTALL_complete may be modified to wire.
In the example shown in fig. 5, when the PatchService receives a power-on broadcast, it is illustrated that the power-on process of the electronic device 100 has been completed. At this time, the PatchService modifies the value of the parameter BOOT_complete to true, and continues to determine whether a notification of OUC update completion has been received. And, patchService judges whether a notification of completion of OUC update has been received according to the value of parameter OUC_INSTALL_COMPLETED. It will be appreciated that in step S105, the value of the parameter ouc_INSTALL_completed is false, and thus, patchService determines that it has not received notification of completion of the OUC update. Thus, patchService does not send custom broadcasts.
S106, the PMS sends notification of OUC update completion to the PatchService.
In some embodiments, after the PMS completes the installation of the APK for the new version of OUC, the PMS may send a notification of the completion of the update of OUC to the patch service by broadcasting, bundle, or the like.
S107: patchService receives notification of OUC update completion and determines whether a start-up broadcast has been received. If yes, S108 is executed, and if no, no custom broadcast is transmitted.
When PatchService receives notification of OUC update completion, it indicates that OUC has been updated. At this point PatchService modifies the value of parameter OUC_INSTALL_complete to wire. And, patchService judges whether the start-up broadcast has been received according to the value of the parameter BOOT_complete. It will be understood that in step S105, the value of the parameter boot_complete is modified to be wire, and thus, the patch service determines that it has received the power-on broadcast, and performs S108.
S108: patchService sends a custom broadcast (or "first broadcast") to HnOUC.
The content of the custom broadcast is not limited in this embodiment, for example, the content of the custom broadcast may be "launchapplication". In addition, the PatchService may designate the packet name of the receiver of the custom broadcast as the packet name of the OUC, or as the component name of the broadcast receiver of the HnOUC (HnOUC may define the component name of its broadcast receiver in its Manifest file). Thus, after PatchService sends a custom broadcast, hnOUC can receive the custom broadcast.
When PatchService determines that a turn-on broadcast has been received and that OUC has been updated, the sendcast method may be invoked to send a custom broadcast to HnOUC.
S109: hnOUC is self-initiated in response to receiving the custom broadcast.
After PatchService sends a custom broadcast, hnOUC may receive the custom broadcast.
S110: the HnOUC performs the updated follow-up actions.
After the HnOUC is started, updated subsequent actions, such as partition synchronization, can be performed on the update package data of the HnOUC; refreshing a system version number of the electronic device 100; setting a keep-alive clock of HnOUC; and sending dotting data to the server and/or displaying notification information of successful updating of the HnOUC. For consistency of description, specific details of the above actions are described in detail below.
In the method provided in this embodiment, hnOUC starts after receiving a custom broadcast sent by patch service. The custom broadcast is sent after the electronic device 100 is powered on and the OUC update is completed. Therefore, hnOUC can receive the custom broadcast inevitably, so that the situation that update cannot be automatic can be avoided.
In the example shown in fig. 5, the patch service first receives a power-on broadcast, and then receives a notification of completion of the OUC update. Thus, the method is applicable to a variety of applications. 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.
Referring to fig. 7, the application starting method provided in this embodiment includes the following steps:
s201, patchService calls UpdateEngine to synthesize new version of APK.
S202: the UpdateEngine sends a synthesis completion notification of the new version APK to the patch service.
S203: patchService invokes the PMS to install the new version of APK to update OUC.
Steps S201 to S203 are substantially the same as steps S101 to S103, and will not be described here.
S204: the PMS sends a notification of completion of the OUC update to the patch service.
Step S204 is substantially the same as step S106, and will not be described here.
S205: patchService receives the start-up broadcast and determines whether a notification of OUC update completion has been received. If yes, S208 is executed, and if not, the custom broadcast is not transmitted.
In the example shown in fig. 7, when the PatchService receives a notification of completion of the OUC update, it is indicated that the OUC has been updated. At this time, the PatchService modifies the value of the parameter OUC_INSTALL_COMPLETED to true, and continues to determine whether a power-on broadcast has been received. And, patchService judges whether the start-up broadcast has been received according to the value of the parameter BOOT_complete. It is understood that in step S205, the value of the parameter boot_complete is false. Thus, patchService determines that it has not received a power-on broadcast. Thus, patchService does not send custom broadcasts.
S206, the AMS sends a startup broadcast to the PatchService.
Step S206 is substantially the same as step S104 described above, and will not be described again here.
S207: patchService receives the start-up broadcast and determines whether a notification of OUC update completion has been received. If yes, S208 is executed, and if not, the custom broadcast is not transmitted.
When the PatchService receives the power-on broadcast, it indicates that the electronic device 100 has been powered on. At this point PatchService modifies the value of the parameter BOOT_complete to be wire. And, patchService judges whether a notification of completion of OUC update has been received according to the value of parameter OUC_INSTALL_COMPLETED. It will be appreciated that in step S205, the value of the parameter ouc_INSTALL_completed is modified to wire, and therefore, patchService determines that it has received notification of completion of the OUC update, and execution proceeds to S208.
S208: patchService sends a custom broadcast to HnOUC.
S209: hnOUC is self-initiated in response to receiving the custom broadcast.
S210: the HnOUC performs the updated follow-up actions.
Steps S208 to S210 are substantially the same as steps S108 to S110 described above, and will not be described here again.
That is, referring to fig. 8, in the method of the above embodiment, the following two cases exist for determining the timing of the patch service sending the custom broadcast:
(1) Case a: when the PatchService receives the OUC update completion notification, it is determined whether the power-on process of the electronic device 100 is completed.
(2) Case B: when the PatchService receives the start-up broadcast, it is determined whether the OUC has been updated.
From the above, it can be seen that the PatchService will send a custom broadcast to HnOUC only when it receives a power-on broadcast (denoted as "condition one") and receives notification of the completion of the OUC update (denoted as "condition two"). When either of the first and second conditions is not satisfied, patchService will not send a custom broadcast to HnOUC. Therefore, the embodiment of the application can ensure that HnOUC receives the custom broadcast and is smoothly self-started.
In some cases, a management module (e.g., iaware module) of the electronic device 100 may manage the launch behavior of the application, limiting the custom broadcast pull-up application. In order to enable the HnOUC to be self-started to perform a subsequent task, in this embodiment, the management and control module may be preset to allow the custom broadcast to pull the HnOUC, for example, add the OUC application to a whitelist of the management and control module.
In some embodiments, cold patch Ding Bao above is a differential update package. The differential update package is a differential package between the new version of the installation package and the old version of the installation package.
Another situation that may occur in the electronic device 100 during the reboot phase (another situation different from the first and second cases described above, denoted as "case three") is described below.
And a third case: referring to fig. 9, when the electronic device 100 is set with a screen locking password and the user unlocks the electronic device 100 after the update of the OUC is completed, the updated OUC may receive a power-on broadcast.
Specifically, as shown in fig. 9, the user unlocks the electronic device 100 after stage two (patch service calls PMS to install a new version of APK), e.g., unlocks the electronic device 100 at 20 seconds after patch service calls UpdateEngine. At this time, the electronic device 100 may call the sendroadcast method to request the AMS to transmit the power-on broadcast. After receiving the request, the AMS queries a broadcast receiver in the system and establishes a broadcast record according to the query result.
It will be appreciated that the OUC has been updated before the AMS establishes the broadcast record, and thus the broadcast receiver of the OUC is included in the broadcast record. And, after the establishment of the broadcast record is completed, the situation that the broadcast recorder of the OUC is removed due to reinstallation of the OUC does not occur any more. Therefore, in this case, after the AMS transmits the power-on broadcast to the HnOUC, the HnOUC may normally receive the power-on broadcast. After the HnOUC receives the start-up broadcast, the HnOUC can be started automatically.
In some embodiments, hnOUC may receive two broadcasts. For example, when HnOUC is self-started after receiving the on-air broadcast (first broadcast), if the patch service determines that the OUC update is completed and the on-air broadcast is received, it will still transmit a custom broadcast to HnOUC, at which point HnOUC receives the custom broadcast (second broadcast). That is, hnOUC receives two broadcasts. It will be appreciated that in other embodiments, hnOUC may receive the custom broadcast first and then the power-on broadcast.
When the HnOUC receives the first broadcast, it may be self-started and perform updated related operations (e.g., partition synchronization operations described in step S110, refresh system version number operations, etc.) after start-up. When the HnOUC receives the broadcast (custom broadcast) for the second time, it may still be self-started again and perform the updated related operation again.
In other embodiments, a Flag bit (Flag) may be added to the electronic device 100. The HnOUC determines whether to perform the updated correlation operation based on the value of Flag.
Illustratively, the value of Flag is set to 0 after the electronic device 100 downloads the cold patch Ding Bao to the OUC each time and completes decompressing and authenticating the cold pack. Thereafter, the electronic device 100 is restarted and the OUC is updated based on the cold patch Ding Bao. When the updated OUC (i.e., hnOUC) receives the broadcast, the value of Flag is queried, if the value of Flag is 0, the updated related action is performed, and the value of Flag is set to 1; otherwise, hnOUC does not perform the updated relevant actions.
It will be appreciated that when the Flag value is 0 after the OUC update is completed and the first broadcast (e.g., a power-on broadcast) is received, the HnOUC performs the updated related action and modifies the Flag value to 1. Thereafter, when the HnOUC receives the second broadcast (e.g., custom broadcast), the value of Flag has been modified to 1. At this time, hnOUC does not perform the updated related actions. With this setting, the HnOUC can be prevented from repeatedly performing an updated action (e.g., partition synchronization operation).
The relevant actions performed after the OUC update is completed (i.e., the actions involved in step S110) are described below.
1. The cold patch Ding Bao (as an example of an update package) is partition synchronized.
In this embodiment, the system partition of the electronic device 100 may employ a virtual AB (or "VAB") dynamic partition architecture (i.e., the operating system of the electronic device 100 supports virtual AB partitioning). In other embodiments, other partition architectures may also be employed for system partitioning of electronic device 100, such as, for example, an ounly a partition architecture, an AB dynamic partition architecture, a VAB partition architecture, and the like.
Referring to fig. 10A and 10B, the electronic device 100 includes two static partitions (static partition a and static partition B, respectively), 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.
Referring to fig. 10A, while the electronic device 100 is in operation, the system is mounted on one of the static partitions, e.g., static partition a. When software (e.g., OUC) in electronic device 100 needs to be upgraded, the upgrade data may not be written to static partition a, but to static partition B. Therefore, in the process of upgrading the software, the normal operation of the system can not be influenced. In addition, a part of the upgrade data (a part of the upgrade data corresponding to the dynamic partition, referred to as "upgrade data R") may be written to the user data partition.
After the writing of the upgrade data in the static partition B is completed, the electronic device 100 is restarted. After the electronic device 100 is restarted, the system switches to the static partition B operation. That is, referring to FIG. 10B, the system is mounted on both static partition B and dynamic partition. At this time, the data R may be written in the dynamic partition.
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 static partition B into static partition A so that the update package data of the OUC in static partition A and static partition B are consistent. The next time an OUC is updated, either in static partition a or static partition B, the update may be based on the most recent version of the OUC, rather than the earlier version of the OUC.
In some embodiments, after the HnOUC receives the broadcast (custom broadcast or power-on broadcast), it may be determined whether the current system partition supports partition synchronization operations, and whether it is started after the HnOUC is installed.
If the current system partition supports partition synchronization operations and has not been started after HnOUC is installed (e.g., if HnOuc UcUtility. IsSupport VAB () & ≡OucUtility isneedledReboot ()), then HnOUC performs partition synchronization operations after it has been started. Otherwise, the partition synchronization operation is not executed after the HnOUC is started. With this arrangement, it is possible to avoid the HnOUC from performing the partition synchronization operation after each restart of the electronic apparatus 100.
(2) The system version number of the electronic device 100 is refreshed.
The HnOUC may refresh the current version number of the system of the electronic device 100 (the version number before the update) to the version number after the current update.
For example, referring to fig. 11 and 12, the electronic device 100 may display a system version number of the electronic device 100 on a cell phone interface of a setup application. Referring to fig. 11, the current version number of the electronic device 100 is "7.0.0.123 (C00E 190R6P 2)". After this update, referring to fig. 12, hnouc may refresh the version number to "7.0.0.123 (C00E 190R6P2Patch 01)".
By refreshing the system version number of the electronic device 100, it is convenient for a user to observe that the system version of the electronic device 100 has been updated, and user perception is improved.
(3) Keep-alive clocks (Alarm) for OUC are set.
The keep-alive clock is used to trigger the automatic start of the application. The HnOUC may be automatically started periodically by setting a keep-alive clock to periodically perform a check update task. For example, hnOUC may set the clock period of the keep-alive clock to 4 hours, so that HnOUC may automatically start once every 4 hours to perform a check update task (search for packets) every 4 hours. The OUC may be automatically turned off after each search is completed.
When the OUC performs a check update task, it may check whether there is a new version of system software for the electronic device 100. When it is checked that the electronic device 100 has new version of system software, the user is reminded to update the system software, or the system software is automatically updated.
After the HnOUC starts, the task of timing the check update can be activated by setting its own keep-alive clock. Therefore, when a manufacturer pushes out new version of system software, the system software can be updated to the latest version in time.
(4) And sending dotting data to the server.
After the HnOUC starts up, dotting data is sent to the server to inform the server OUC that the update was successful on the electronic device 100 (i.e., the electronic device 100 has successfully completed the installation of the cold patch package). The server can acquire the number of installed cold patch Ding Bao by collecting dotting data of each electronic device. Illustratively, the dotting data may include a version number of the cold patch package, a device identification of the electronic device 100, and so forth.
(5) And displaying the notification information of successful OUC update.
After the HnOUC is started, a task may be performed that issues a notification of the update of the software update application. For example, referring to fig. 13, a notification bar 50 is displayed within the display area of the electronic device 100. The notification bar 50 includes notification information that the OUC update was successful, such as "the software update application has been updated and is currently the latest version".
Specifically, hnOUC may invoke a System service (SystemService) to create a notification object for notification bar 30 to display notification bar 50 with the notification object.
After HnOUC is started, notification information of successful update is displayed, so that user perception can be improved.
Fig. 14 shows a schematic structural diagram 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 (universal serial bus, USB) connector 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-networkprocessing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The processor can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integratedcircuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industryprocessor interface, MIPI), a general-purpose input/output (GPIO) interface, and a subscriber identity module (subscriber identity module, SIM) interface.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. PCM interfaces may 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 may be coupled through a PCM bus interface. The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serialinterface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may 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, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
USB connector 130 is a connector that meets USB standard specifications, and may be used to connect electronic device 100 to a peripheral device, specifically, a standard USB connector (e.g., type C connector), a Mini USB connector, a Micro USB connector, etc.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB connector 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating 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. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency Modulation (FM), near field communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, which is then transferred 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 the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are 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 video in a variety of encoding formats.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as an image playing function) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, and the like. The processor 110 performs various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A. A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. The earphone interface 170D is used to connect a wired earphone.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. Android with layered architecture in the embodiment of the invention TM The system is an example illustrating the software architecture of the electronic device 100.
Fig. 15 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages.
As shown in fig. 15, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, software updates, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in fig. 15, 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.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
Android run time includes a core library and virtual machines. Android run is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
Referring now to fig. 16, shown is a block diagram of an electronic device 400 in accordance with 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 fast channel link (QuickPath Interconnect, QPI), or similar connection 406. The processor 401 executes instructions that control the general type of data processing operations. In one embodiment, controller Hub 403 includes, but is not limited to, a Graphics & Memory Controller Hub (GMCH) (not shown) and an Input Output Hub (IOH) (which may be on separate chips) (not shown), where the GMCH includes memory and Graphics controllers and is coupled to the IOH.
The electronic device 400 may also include a coprocessor 402 and memory 404 coupled to a controller hub 403. Alternatively, one or both of the memory and GMCH may be integrated within the processor (as described in the present application), with the memory 404 and co-processor 402 coupled directly to the processor 401 and to the controller hub 403, the controller hub 403 being in a single chip with the IOH.
Memory 404 may be, for example, dynamic random access memory (Dynamic Random Access Memory, DRAM), phase change memory (PhaseChange Memory, PCM), or a combination of both. One or more tangible, non-transitory computer-readable media for storing data and/or instructions may be included in memory 404. The computer-readable storage medium has stored therein instructions, and in particular, temporary and permanent copies of the instructions. The instructions may include: instructions that, when executed by at least one of the processors, cause the electronic device 400 to implement the methods shown in fig. 5, 7, 8. When the instructions run on the computer, the instructions cause the computer to execute the application starting method disclosed by the embodiment of the application.
In one embodiment, coprocessor 402 is a special-purpose processor, such as, for example, a high-throughput integrated many-core (Many Integrated Core, MIC) processor, network or communication processor, compression engine, graphics processor, general-purpose computing (GPGPU) on a graphics processing unit, embedded processor, or the like. Optional properties of coprocessor 402 are shown in dashed lines in fig. 16.
In one embodiment, electronic device 400 may further include a network interface (Network Interface Controller, NIC) 406. The network interface 406 may include a transceiver to provide a radio interface for the electronic device 400 to communicate with any other suitable device (e.g., front end module, 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 units in the above-described embodiments.
Electronic device 400 may further include an Input/Output (I/O) device 405.I/O405 may include: a user interface, the design enabling a user to interact with the electronic device 400; the design of the peripheral component interface enables the peripheral component to also interact with the electronic device 400; and/or sensors designed to determine environmental conditions and/or location information associated with the electronic device 400.
It is noted that fig. 16 is merely exemplary. That is, although fig. 16 shows that the electronic apparatus 400 includes a plurality of devices such as the processor 401, the controller hub 403, and the memory 404, in practical applications, the apparatus using the methods of the present application may include only a part of the devices of the electronic apparatus 400, for example, may include only the processor 401 and the network interface 406. The nature of the alternative device is shown in dashed lines in fig. 16.
Referring now to fig. 17, shown is a block diagram of a System on Chip (SoC) 500 in accordance with an embodiment of the present application. In fig. 17, similar parts have the same reference numerals. In addition, the dashed box is an optional feature of a more advanced SoC. In fig. 17, the SoC500 includes: an interconnect unit 550 coupled to the processor 510; a system agent unit 580; a bus controller unit 590; an integrated memory controller unit 540; a set 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; a direct memory access (Direct Memory Access, DMA) unit 560. In one embodiment, coprocessor 520 includes a special-purpose processor, such as, for example, a network or communication processor, compression engine, general-purpose computing (GPGPU) on a graphics processing unit, high-throughput MIC processor, embedded processor, or the like.
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 has stored therein instructions, and in particular, temporary and permanent copies of the instructions. The instructions may include: instructions that when executed by at least one of the processors cause the SoC to implement the methods shown in fig. 5, 7, 8. When the instructions run on the computer, the instructions cause the computer to execute the application starting method disclosed by the embodiment of the application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, in the present embodiment, the value of each data range includes an end value. For example, a=10 to 50, meaning that a may be 10 or 50.
The method embodiments of the application can be realized in the modes of software, magnetic elements, firmware and the like.
Program code may be applied to input instructions to perform the functions described herein and generate output information. The output information may be applied to one or more output devices in a known manner. For the purposes of the present application, a processing system includes any system having a processor such as, for example, a digital signal processor (Digital Signal Processor, DSP), microcontroller, application Specific Integrated Circuit (ASIC), or microprocessor.
The program code may be implemented in a high level procedural or object oriented programming language to communicate with a processing system. Program code may also be implemented in assembly or machine language, if desired. Indeed, the mechanisms described herein are not limited in scope to any particular programming language. In either case, the language may be a compiled or interpreted language.
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 logic in a processor, which when read by a machine, cause the machine to fabricate logic to perform the techniques described herein. These representations, referred to as "intellectual property (Intellectual Property, IP) cores," may be stored on a tangible computer-readable storage medium and provided to a plurality of customers or production facilities for loading into the manufacturing machines that actually manufacture the logic or processor.
In some cases, an instruction converter may be used to convert instructions from a source instruction set to a target instruction set. For example, the instruction converter may transform (e.g., using a static binary transform, a dynamic binary transform including dynamic compilation), morph, emulate, or otherwise convert an instruction into one or more other instructions to be processed by the core. The instruction converter may be implemented in software, hardware, firmware, or a combination thereof. The instruction converter may be on-processor, off-processor, or partially on-processor and partially off-processor.

Claims (10)

1. An application starting method is used for electronic equipment and is characterized in that the electronic equipment comprises a first application, a first service and a second service; the method comprises the following steps:
The electronic equipment is powered off and restarted in response to receiving the update package of the first application;
in the starting-up process, the first service updates the first application based on the update package;
the second service is completed based on the starting-up process, and a starting-up broadcast is sent;
the first service receives the starting broadcast, determines that the first application is updated, and sends a first broadcast to the updated first application, wherein the first broadcast is used for indicating the updated first application to start.
2. The method of claim 1, wherein the first application is a system application; the method further comprises the steps of:
the first application is started in response to receiving the first broadcast;
the first application performs at least one of the following actions based on the completion of the launch: carrying out partition synchronization on the update package data of the first application; refreshing a system version number of the electronic device; setting a keep-alive clock of the first application; transmitting dotting data to a server; and displaying the notification information of successful updating of the first application.
3. The method of claim 2, wherein the first application partition synchronizing update package data of the first application, comprising:
The first application performs partition synchronization on update package data of the first application based on determining that an operating system of the electronic device supports virtual AB partition and that the electronic device is not restarted after the first application is updated.
4. The method of claim 1, wherein the power-on process comprises at least:
displaying a lock screen interface;
receiving unlocking operation aiming at the screen locking interface;
the second service determining that the boot process is complete includes:
and the second service determines that the starting-up process is completed based on the electronic equipment receiving the unlocking operation.
5. The method of claim 4, wherein the unlocking operation comprises entering an unlock code.
6. The method of claim 1, wherein the electronic device further comprises a third service; the first service updating the first application based on the update package, including:
the first service sends a first request for synthesizing a new version installation package of the first application to the third service;
the third service synthesizes a 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.
7. The method of claim 6, wherein the electronic device further comprises 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 responds to the second request and installs the first application based on the new version installation package;
the third service sends a notification of completion of the update of the first application to the first service based on completion of the installation of the first application;
the first service determining that the first application update is complete includes:
the first service determines that the first application is finished with the update based on receiving a notification that the first application is finished with the update.
8. The method of claim 1, wherein the first application is a software update application.
9. An electronic device, comprising:
a memory for storing instructions for execution by one or more processors of the electronic device;
A processor, which when executing the instructions in the memory, causes the electronic device to perform the application launch method of any one of claims 1 to 8.
10. A computer readable storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the application launch method of any one of claims 1 to 8.
CN202310520805.8A 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium Active CN116244008B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202310520805.8A CN116244008B (en) 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium
CN202311148781.4A CN117311840A (en) 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310520805.8A CN116244008B (en) 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311148781.4A Division CN117311840A (en) 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN116244008A CN116244008A (en) 2023-06-09
CN116244008B true CN116244008B (en) 2023-09-15

Family

ID=86635994

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311148781.4A Pending CN117311840A (en) 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium
CN202310520805.8A Active CN116244008B (en) 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311148781.4A Pending CN117311840A (en) 2023-05-10 2023-05-10 Application starting method, electronic device and storage medium

Country Status (1)

Country Link
CN (2) CN117311840A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116701318B (en) * 2023-08-09 2023-12-15 荣耀终端有限公司 System upgrade information acquisition method, electronic equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345408A (en) * 2013-06-26 2013-10-09 深圳市金立通信设备有限公司 Terminal starting-up accelerating method and terminal
CN104346187A (en) * 2013-08-07 2015-02-11 西安诺瓦电子科技有限公司 Software upgrading method for video control card for display screen
CN106484473A (en) * 2016-09-29 2017-03-08 Tcl集团股份有限公司 A kind of application starts method and apparatus
CN107423064A (en) * 2017-07-26 2017-12-01 广东欧珀移动通信有限公司 Message treatment method, device, terminal device and storage medium
CN108038010A (en) * 2017-12-25 2018-05-15 青岛海信电器股份有限公司 Android system startup stage broadcast transmission method, apparatus and terminal
CN112135180A (en) * 2020-09-18 2020-12-25 青岛海信传媒网络技术有限公司 Content display method and display equipment
CN112445530A (en) * 2019-08-29 2021-03-05 成都鼎桥通信技术有限公司 Method and device for keeping third-party application program alive
CN112988213A (en) * 2021-04-13 2021-06-18 荣耀终端有限公司 Program data updating method, electronic equipment and computer storage medium
CN113127084A (en) * 2021-04-28 2021-07-16 雄狮汽车科技(南京)有限公司 Application service self-starting method, electronic equipment and automobile
US11115269B1 (en) * 2020-10-20 2021-09-07 Metactix Llc System and method for updating an application for a population of computers
CN113934519A (en) * 2021-08-10 2022-01-14 荣耀终端有限公司 Application scheduling method and electronic equipment
CN113973044A (en) * 2020-07-10 2022-01-25 深圳Tcl数字技术有限公司 Upgrading method, upgrading system and computer equipment
CN114398048A (en) * 2022-03-25 2022-04-26 深圳市星卡科技有限公司 Method and device for automatically upgrading APP and computer equipment
CN115643338A (en) * 2022-12-01 2023-01-24 荣耀终端有限公司 Parameter updating method and equipment
CN116048628A (en) * 2022-07-21 2023-05-02 荣耀终端有限公司 Equipment starting method and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6535924B1 (en) * 2001-09-05 2003-03-18 Pluris, Inc. Method and apparatus for performing a software upgrade of a router while the router is online
CN101853173A (en) * 2010-05-27 2010-10-06 杭州华三通信技术有限公司 Software upgrading method and device of programmable logic device of distributed system
EP2660998A3 (en) * 2012-05-04 2014-10-15 Samsung Electronics Co., Ltd. Broadcast receiving apparatus and method for controlling application, and device
US9210211B2 (en) * 2012-05-10 2015-12-08 Hulu, LLC Remote automated updates for an application
CN106874048B (en) * 2017-01-25 2019-11-05 北京安云世纪科技有限公司 A kind of processing method, device and the mobile terminal of application program self-starting
CN115686679A (en) * 2022-11-14 2023-02-03 桂林海威科技股份有限公司 Application self-starting method based on android device

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345408A (en) * 2013-06-26 2013-10-09 深圳市金立通信设备有限公司 Terminal starting-up accelerating method and terminal
CN104346187A (en) * 2013-08-07 2015-02-11 西安诺瓦电子科技有限公司 Software upgrading method for video control card for display screen
CN106484473A (en) * 2016-09-29 2017-03-08 Tcl集团股份有限公司 A kind of application starts method and apparatus
CN107423064A (en) * 2017-07-26 2017-12-01 广东欧珀移动通信有限公司 Message treatment method, device, terminal device and storage medium
CN108038010A (en) * 2017-12-25 2018-05-15 青岛海信电器股份有限公司 Android system startup stage broadcast transmission method, apparatus and terminal
CN112445530A (en) * 2019-08-29 2021-03-05 成都鼎桥通信技术有限公司 Method and device for keeping third-party application program alive
CN113973044A (en) * 2020-07-10 2022-01-25 深圳Tcl数字技术有限公司 Upgrading method, upgrading system and computer equipment
CN112135180A (en) * 2020-09-18 2020-12-25 青岛海信传媒网络技术有限公司 Content display method and display equipment
US11115269B1 (en) * 2020-10-20 2021-09-07 Metactix Llc System and method for updating an application for a population of computers
CN112988213A (en) * 2021-04-13 2021-06-18 荣耀终端有限公司 Program data updating method, electronic equipment and computer storage medium
CN113127084A (en) * 2021-04-28 2021-07-16 雄狮汽车科技(南京)有限公司 Application service self-starting method, electronic equipment and automobile
CN113934519A (en) * 2021-08-10 2022-01-14 荣耀终端有限公司 Application scheduling method and electronic equipment
CN114398048A (en) * 2022-03-25 2022-04-26 深圳市星卡科技有限公司 Method and device for automatically upgrading APP and computer equipment
CN116048628A (en) * 2022-07-21 2023-05-02 荣耀终端有限公司 Equipment starting method and electronic equipment
CN115643338A (en) * 2022-12-01 2023-01-24 荣耀终端有限公司 Parameter updating method and equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"Android App功能插件化机制的研究与实现";熊建芬;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;第I138-570页 *
"Reproducible Performance Optimization of Complex Applications on the Edge-to-Cloud Continuum";Daniel Rosendo 等;《 2021 IEEE International Conference on Cluster Computing (CLUSTER)》;第23-33页 *
"基于Android快速启动技术的系统一致性的研究与实现";郑文选;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;第I138-5247页 *
一种易部署的Android应用程序动态监测方案;苏祥;胡建伟;崔艳鹏;;计算机科学(第02期);第268-274页 *

Also Published As

Publication number Publication date
CN116244008A (en) 2023-06-09
CN117311840A (en) 2023-12-29

Similar Documents

Publication Publication Date Title
EP3822835B1 (en) Method for deleting secure service, and electronic apparatus
CN111405681B (en) Wi-Fi Aware link establishment method, wi-Fi Aware link establishment system, electronic equipment and storage medium
CN114553814B (en) Method and device for processing push message
CN113408016B (en) Method and device for storing ciphertext
CN116244008B (en) Application starting method, electronic device and storage medium
CN112860445B (en) Method and terminal for sharing data between fast application and native application
CN113608753A (en) Application uninstalling method, application recovery method, electronic device and storage medium
CN116302291B (en) Application display method, electronic device and storage medium
CN116795435A (en) Compatibility management and control method and related equipment
CN114579181A (en) Patching method, related equipment and system
CN117009023B (en) Method for displaying notification information and related device
CN116048594B (en) Software upgrading method and related device
CN116048544B (en) Processing method of popup advertisement, electronic equipment and readable storage medium
CN116048685B (en) Display method of magazine lock screen, graphical interface and electronic equipment
CN115495716B (en) Local authentication method and electronic equipment
CN116048545B (en) Processing method of popup advertisement, electronic equipment and readable storage medium
WO2023051036A1 (en) Method and apparatus for loading shader
CN116795476B (en) Wallpaper deleting method and electronic equipment
CN117786260A (en) Card updating method and related device
CN116560535A (en) Application component management method and related equipment
CN117687708A (en) Starting-up method and electronic equipment
CN117729561A (en) System upgrading method, terminal and storage medium
CN114860293A (en) Electronic device, system upgrade method and medium thereof
CN116541188A (en) Notification display method, terminal device and storage medium
CN118033541A (en) Spatial position determining method, system and equipment thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant