Application installation method, electronic device, storage medium and program product
By adding the application identifier of the target card-mounted application to the preloaded application collection, the problem of the user identification card cannot be installed after inserting the card, and the successful installation in the preloaded partition is achieved, reducing the risk of installation failure.
Patent Information
- Application Number
- CN202410882656.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-07-02
AI Technical Summary
In the preloaded partition of the electronic device, the user identification card cannot successfully install the application with the card after inserting it, resulting in the installation failure.
By adding the application identifier of the target card-mounted application to the preloaded application collection, the electronic device can successfully install the card-mounted application corresponding to the user identification card in the preloaded partition after the user identification card is inserted.
After the user identification card is inserted into the electronic device, the application can be successfully installed on the preloaded partition, avoiding the probability of installation failure.
Smart Images

Figure CN118963780B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to an application installation method, an electronic device, a storage medium, and a program product. Background Art
[0002] In order to enable the electronic device to quickly load some applications after the first boot, these applications can be installed on the preload partition during the electronic device startup process. Usually, an actual preload list (APL) can be set in the electronic device to manage and control the applications installed in the preload partition.
[0003] In the card-based installation scenario, after the user identification card is inserted into the electronic device, since the applications in the preloaded partition are controlled by APL, if the card-based installation application corresponding to the user identification card needs to be installed in the preloaded partition, it cannot be installed, resulting in the failure of the installation of the application that needs to be installed with the card. Summary of the invention
[0004] The embodiments of the present application provide an application installation method, an electronic device, a storage medium, and a program product, which can successfully install the card-installed application corresponding to the user identification card in a preloaded partition after the user identification card is inserted into the electronic device, thereby avoiding card-installed installation failure or reducing the probability of card-installed installation failure.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a method for installing an application is provided, and the method is applied to an electronic device. After a user identification card is inserted into the electronic device, an application identifier of a target application installed with the card is added to a preloaded application set. The electronic device can install an application corresponding to the application identifier included in the preloaded application set in a preloaded partition, wherein the preloaded application set includes the application identifier of the target application installed with the card, that is, the target application installed with the card is installed to the preloaded partition based on the preloaded application set. The target application installed with the card refers to an application corresponding to the user identification card and specified to be installed in the preloaded partition. The preloaded application set includes applications that are allowed to be installed to the preloaded partition.
[0007] In the above scheme, by adding the application identifier of the target card-installed application to the preloaded application set, the electronic device can install the target card-installed application in the preloaded partition, and after the user identification card is inserted into the electronic device, the card-installed application corresponding to the user identification card can be successfully installed in the preloaded partition.
[0008] In a possible implementation of the first aspect, the electronic device compares the application identifier of the scanned application to be installed with the application identifier in the preloaded application set during the application scanning and installation phase. The application to be installed represented by the application identifier in the preloaded application set is installed to the preload partition, that is, if the application identifier of the application to be installed belongs to the preloaded application set, the application is installed. The application identifier in the preloaded application set includes the application identifier of the added target card-installed application.
[0009] In the above scheme, the present application adds the application identifier of the application corresponding to the user identification card to be installed in the preloaded partition to the preloaded application collection, so that the electronic device can install the application corresponding to the user identification card into the preloaded partition, thereby realizing that the application corresponding to the user identification card can be successfully installed into the preloaded partition after the card is inserted.
[0010] In a possible implementation of the first aspect, the preloaded application set includes a first application list and a second application list. The application identifiers in the first application list are application identifiers corresponding to the application programs installed in the preload partition when the electronic device is turned on for the first time, and the first application list cannot be changed after being generated. The application identifiers in the second application list are application identifiers of application programs that need to be installed in the preload partition in addition to the first application list, and the application identifiers of the target card-installed application can be added to the second application list.
[0011] In the above scheme, due to the immutability of the first application list, after the user identification card is inserted into the electronic device, by adding the application identifier of the target card-installed application to the second application list, the electronic device can successfully install the target card-installed application corresponding to the user identification card in the preloaded partition after the user identification card is inserted into the electronic device.
[0012] In a possible implementation of the first aspect, after the user identification card is inserted into the electronic device, the application identifier of the target application installed with the card is added to the preloaded application set, including: after the user identification card is inserted into the electronic device and the electronic device is not restarted, CotaService adds the application identifier of the target application installed with the card to the preloaded application set. After CotaService adds the application identifier of the target application installed with the card to the preloaded application set, PMS is triggered, so that PMS installs the target application installed with the card into the preloaded partition by scanning the application identifier of the target application installed with the card in the preloaded application set.
[0013] In the above scheme, since the PMS has installed the application corresponding to the application identifier in the preloaded application set after the electronic device is restarted, the PMS will not re-scan the preloaded application set after the user identification card is inserted into the electronic device and the electronic device is not restarted. Therefore, CotaService can add the application identifier of the target card-installed application to the preloaded application set, and then PMS can install the application corresponding to the application identifier in the preloaded application set to achieve the installation of the card-installed application into the preloaded partition.
[0014] In a possible implementation of the first aspect, after the user identification card is inserted into the electronic device, the application identifier of the target application installed with the card is added to the preloaded application set, including: after the user identification card is inserted into the electronic device and the electronic device is restarted, when the PMS scans the application to be installed, the PMS adds the application identifier of the target application installed with the card to the second application list.
[0015] In the above scheme, since the PMS will install the application corresponding to the application identifier in the preloaded application set during the restart process of the electronic device, the application identifier of the target application to be installed with the card can be added to the second application list during the installation phase of the PMS, so that the application to be installed with the card can be directly installed during the PMS installation process, reducing the waste of computing power.
[0016] In a possible implementation of the first aspect, before the PMS adds the application identifier of the target application installed with the card to the second application list, the following steps are performed: when the electronic device is powered on for the first time, when the PMS scans the application to be installed, the application identifier of the scanned application to be installed is compared with the cancel preload list, and then the application corresponding to the application identifier of the application to be installed that does not belong to the cancel preload list is installed to the preload partition, wherein the cancel preload list includes the application identifier of the application that is not allowed to be installed to the preload partition. Based on the application identifier corresponding to the application successfully installed in the preload partition, the first application list is generated.
[0017] In the above scheme, by comparing the application identifier of the scanned application to be installed with the cancel preloading list, other applications that are not allowed to be installed in the preloading partition can be successfully installed in the preloading partition, and the first application list can be generated subsequently through the application identifier corresponding to the successfully installed application in the preloading partition.
[0018] In a possible implementation of the first aspect, during the stage when the PMS scans for applications to be installed, the PMS adds the application identifier of the target application to be installed with the card to the second application list, including: after the user identification card is inserted into the electronic device, the electronic device is restarted, and the application identifier of the target application to be installed with the card is not included in the first application list, during the stage when the PMS scans for applications to be installed, the PMS adds the application identifier of the target application to be installed with the card to the second application list.
[0019] In the above solution, during the PMS installation process, PMS directly adds the application identifier of the target application to be installed with the card to the second application list, so that the application to be installed with the card can be directly installed during the PMS installation process, avoiding the subsequent process of CotaService adding the application identifier of the target application to be installed with the card to the preloaded application collection, thereby reducing the waste of computing power.
[0020] In a possible implementation of the first aspect, before adding the identifier of the target card-installed application corresponding to the user identification card to the preloaded application set, the method also includes: identifying, from at least one card-installed application corresponding to the user identification card, a target card-installed application whose installation path indicates a preloaded partition, that is, the electronic device identifies the target card-installed application that needs to be installed in the preloaded partition in each card-installed application corresponding to the user identification card by determining the installation path of each card-installed application corresponding to the user identification card.
[0021] In the above scheme, by determining whether the installation path of each card-installed application corresponding to the user identification card is a preloaded path, the target card-installed application is identified, so that the application identifier of the target card-installed application can be added to the preloaded application set later.
[0022] In a possible implementation of the first aspect, identifying, from at least one installed-with-card application corresponding to a user identification card, a target installed-with-card application of a preloaded partition indicated by an installation path, includes: after the user identification card is inserted into an electronic device, parsing an installed-with-card configuration file, and determining an application identifier of each installed-with-card application corresponding to the user identification card from the installed-with-card configuration file. Determining the installation path corresponding to the application identifier of each installed-with-card application through the installed-with-card configuration file, and identifying the target installed-with-card application of a preloaded partition as the installation path.
[0023] In the above solution, the target accompanying card installation application to be installed in the preload partition can be determined through the accompanying card installation configuration file, so that the application identifier of the target accompanying card application can be added to the preload application set later.
[0024] In a possible implementation of the first aspect, the card installation configuration file records an application identifier of an installed-with-card application corresponding to at least one operator identifier. The electronic device can determine the target operator corresponding to the user identification card through the card installation configuration file, and determine the application identifier of the installed-with-card application of the target operator through the card installation configuration file.
[0025] In the above solution, the application identifier of the target operator's accompanying card installation application is determined through the accompanying card installation configuration file, which can facilitate the subsequent determination of the target accompanying card application to be installed in the preload partition.
[0026] In a second aspect, the present application provides an electronic device, the electronic device comprising a memory and a processor; the memory and the processor are coupled. The memory stores a computer program code, the computer program code comprises a computer instruction, and when the computer instruction is executed by the processor, the electronic device executes the method in the first aspect and any possible implementation thereof.
[0027] In a third aspect, an embodiment of the present application provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method of the first aspect and any possible implementation thereof.
[0028] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method of the first aspect and any possible implementation thereof. The computer may be an electronic device in the second aspect and any possible implementation thereof.
[0029] It can be understood that the beneficial effects that can be achieved by the electronic device of the second aspect, the computer storage medium of the third aspect, and the computer program product of the fourth aspect provided above can be referred to as the beneficial effects in the first aspect and any possible implementation method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flowchart of a PMS installation application provided by a related technical embodiment;
[0031] Figure 2 is a schematic diagram of different versions of an electronic device provided in an embodiment of the present application;
[0032] Figure 3 It is a schematic diagram of a version upgrade of an electronic device provided in an embodiment of the present application;
[0033] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0034] Figure 5 It is a schematic diagram of the software system architecture structure of an electronic device provided in an embodiment of the present application;
[0035] Figure 6 It is a schematic diagram of the principle of an application installation method provided in an embodiment of the present application;
[0036] Figure 7 This is a flowchart of a card application installation process provided by an embodiment of the present application;
[0037] Figure 8 This is another flowchart of card application installation processing provided by an embodiment of the present application;
[0038] Fig. 9 This is another flowchart of card application installation processing provided by an embodiment of the present application;
[0039] Fig.10 It is a flowchart of a PMS installation application provided by an embodiment of the present application;
[0040] Fig.11 It is a schematic diagram of another electronic device version upgrade provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0042] Before introducing specific embodiments, in order to facilitate understanding, some descriptions of concepts related to the embodiments of the present application are given by way of example for reference.
[0043] A Subscriber Identity Module (SIM) card is an Integrated Circuit Card (IC card) held by mobile users of the Global System for Mobile Communications (GSM) system, and may also be referred to as a User Identification Card.
[0044] A preload partition is a system partition preset by an electronic device. The electronic device can install an application in the preload partition, for example, install the application in the / preload path.
[0045] The preloaded application set is used to indicate the applications that are allowed to be installed in the preload partition.
[0046] The actual preload list (APL) refers to a list of applications actually preloaded in the preload partition, that is, the first application list in the embodiment of the present application.
[0047] The Cancel Preload List (CPL) is a list of applications that are not loaded in the preload partition.
[0048] The application package management service (PackageManagerService, PMS) manages the applications on the electronic device, such as installing applications, uninstalling applications, etc.
[0049] Original equipment manufacturer information (OEMInfo) refers to information stored on an electronic device, and OEM Info will not be deleted when the electronic device is restored to factory settings.
[0050] Over The Air (OTA) is a technology for wireless remote management through mobile communication networks. That is, it is a technology for remote management of mobile terminal devices and SIM card data through the air interface of mobile communication. Among them, OTA specifically includes HTOA.
[0051] Customized OTA services (CotaService): that is, customized OTA services, which are used to enable users to obtain data value-added services of personalized information services. In the embodiment of the present application, CotaService can be called to add the application identifier of the application corresponding to the card installation to the preloaded application set, so that the application corresponding to the user identification card can be installed in the preloaded partition, and the PMS is triggered to install the application according to the added preloaded application set.
[0052] In order to quickly load some application programs (eg, some commonly used software or library files) after the electronic device is powered on, these application programs may be installed on a preload partition (ie, a preload partition, a system partition) of the electronic device.
[0053] In some cases, the applications installed in the preload partition will change. For example, the third-party contract to which a certain application belongs is terminated, so that the application does not need to be installed in the preload partition of the electronic device produced subsequently. Generally, the applications installed in the preload partition are updated by adding a new batch. This is specifically illustrated with examples 1 and 2 below.
[0054] Example 1, for a certain system version (such as version 101), there may be multiple batches under the system version. Specifically, in the electronic device version 101, assuming that application 1 and application 2 need to be installed in the preload partition in January, in this case, the R1 batch can be set, that is, the preload partition of the electronic device produced in the R1 batch will have application 1 and application 2 installed. In April, due to the termination of the third-party contract corresponding to application 2, only application 1 needs to be installed in the preload partition, and application 2 is no longer installed. In this case, the R2 batch can be set, that is, the preload partition of the electronic device produced in the R2 batch will have application 1 installed. Therefore, in version 101, there are two batches R1 and R2.
[0055] Example 2: When the system version is upgraded, if there are too many batches of the previous system version before the upgrade, the upgraded system version will also have the problem of too many batches. Specifically, when an electronic device performs a system upgrade, the new system version may indicate the addition / deletion of applications in the preloaded partition. But usually, it is necessary to upgrade the system version of an electronic device without changing the types of applications installed in the preloaded partition of the electronic device. Suppose the electronic device is upgraded from version 101 to version 104, version 104 will indicate the addition of application 3 and application 4 to the preloaded partition. The version upgrade goal of the electronic device is to upgrade the system version of the electronic device from version 101 to version 104, but the newly added applications 3 and 4 indicated by version 104 are not added to the preloaded partition of the electronic device. Since there are two batches, R1 and R2, under version 101, in order not to change the applications installed in the loading partition of electronic devices produced in batches R1 and R2 in version 101, two batches must also be set in version 104, and the applications installed in the pre-loading partition in the two batches in version 104 correspond to the two batches in version 101, resulting in multiple batches under version 104.
[0056] In summary, updating the preloaded partition by adding new batches will cause multiple batches to exist under one version, which will cause the overall version of the system to be split, resulting in too many system versions being released during the next upgrade, which will increase the workload of version building and testing exponentially.
[0057] In the related art, in order to solve the above problem, an actual preload list APL can be set and an actual preload list CPL can be canceled in the electronic device, so that the application package management service PMS can install applications in the preload partition according to the CPL and APL.
[0058] Continuing to illustrate with the above example 1, in the electronic device version 101, the application identifiers of application 1 and application 2 may not be written into the CPL in January, so that after the electronic device in January is turned on, the generated APL includes the application identifiers of application 1 and application 2, and the electronic device in January can install application 1 and application 2 in the preload partition. In April, due to the termination of the third-party contract corresponding to application 2, the application identifier of application 2 may be written into the CPL in the electronic device in April, so that after the electronic device in April is turned on, the generated APL does not include the application identifier of application 2, but includes the application identifier of application 1, and the electronic device in April can install application 1 in the preload partition. There is no need to implement updates in the preload partition by adding new batches in version 101.
[0059] Since the OEM info is written into the APL after it is generated, and the OEM info cannot be modified at the user level, even if the electronic device is subsequently restarted, HOTA upgraded, or the electronic device is restored to factory settings, the OEM info of the APL will not be deleted, and the application list in the APL can continue to be read and used as the preload partition application installation list. Therefore, the APL is unchangeable after it is generated. Since the preload partition will be managed and controlled after the APL is generated, and the APL of the electronic device will not change after the version is upgraded, even if the electronic device is upgraded, the applications installed in the preload partition will not change, that is, there is no need to set multiple batches in the new version to prevent the applications installed in the loading partition of the electronic device in the old version from being changed during the upgrade process.
[0060] Therefore, in the above implementation process, by changing the CPL and APL of the electronic device, the application installed in the preload partition can be updated without increasing the batch of the electronic device. The new batch incorporates the old batch and reduces the number of multiple batches in one version.
[0061] In the related art, the method of installing an application in a preload partition through APL is as follows:
[0062] During the startup of the operating system of the electronic device, the PMS will scan the applications to be installed in the electronic device. If the application to be installed currently scanned needs to be installed in the preload partition, it is determined whether the application identifier of the application to be installed is included in the APL. If it is included in the APL, the PMS installs the application. If it is not included in the APL, the PMS does not install the application. If the current application to be installed is installed in a partition other than the preload partition, the PMS directly installs the application. That is, the APL mainly controls the applications that need to be installed in the preload partition, and does not impose installation restrictions on applications that do not need to be installed in the preload partition.
[0063] In some embodiments, the APL is generated during the first startup of the electronic device after the electronic device leaves the factory. Specifically, the PMS scans the application to be installed, but since the APL is not configured when the electronic device is first started, in this case, it will determine whether there is a CPL in the electronic device. If there is a CPL, the PMS does not install the application in the CPL when installing the application, and then writes the application identifier of the application successfully installed in the preload partition into the APL, and then writes the APL into the OEM info. If there is no CPL, after the PMS completes the installation of the application to be installed, it writes the application identifier of the application successfully installed in the preload partition into the APL, and then writes the APL into the OEM info.
[0064] Specifically, Figure 1 This is a flowchart of a PMS installation application provided by the related technology. Figure 1 As shown, the way in which PMS installs the application in the preload partition according to APL can be:
[0065] S101: Scan the pre-installed partition to generate a list of applications to be installed.
[0066] In some embodiments, the preinstalled partition is used to store application identifiers of applications to be installed. Before installing an application, the PMS first scans the application identifiers of all applications to be installed in the preinstalled partition and generates a list of applications to be installed.
[0067] The list of applications to be installed includes applications that can be uninstalled by the user and applications that cannot be uninstalled by the user. For example, setting applications, camera applications, etc. cannot be uninstalled by the user, while applications provided by third parties can be uninstalled by the user.
[0068] Specifically, in some embodiments, applications that can be uninstalled by the user can be stored in the DelAPKInstallListRelease.txt file, and applications that cannot be uninstalled by the user can be stored in the APKInstallListRelease.txt file, wherein the DelAPKInstallListRelease.txt and APKInstallListRelease.txt can be stored in the / preload / (product) / slice / xml / path.
[0069] S102: Read the APL configuration file from the OEM info.
[0070] S103: Determine whether there is a valid APL.
[0071] The valid APL means that the APL configuration file in the OEM info is not empty.
[0072] In some embodiments, if the operating system of the electronic device is started for the first time, there is no valid APL in the OEM info, and S104 is executed; if the electronic device is not started for the first time, there is a valid APL in the OEM info, and S109 is executed.
[0073] S104: Read CPL from OEM info.
[0074] S105: Determine whether CPL exists.
[0075] In some embodiments, if the CPL exists, S106 is executed, and if the CPL does not exist, S107 is executed.
[0076] S106: Install an application that is not in the CPL.
[0077] In some embodiments, the electronic device installs the application corresponding to the application identifier in the list of applications to be installed that is not in the CPL into the preload partition.
[0078] S107: Install all applications.
[0079] In some embodiments, since there is no CPL, the electronic device can install all application programs in the list of applications to be installed that need to be installed in the preload partition.
[0080] S108: Generate APL according to the installed application and package name, and write it into OEM info.
[0081] In some embodiments, the application successfully installed in the preload partition and the package name corresponding to the application are obtained, an APL is generated, and the APL is written into OEM info.
[0082] S109: Applications installed in APL.
[0083] In some embodiments of the present application, when the electronic device is not started for the first time, for example, when the electronic device is started for the first time, restarted, upgraded via HOTA, or restored to factory settings, the APL can be read from the OEM info.
[0084] S110: Scan and install all applications in the extended application list.
[0085] In some embodiments of the present application, the extended application list is not controlled by APL, that is, it is an additional installation channel reserved for the electronic device. In addition to installing applications in APL, the electronic device can also install applications in the extended application list installed in the preloaded partition.
[0086] In some examples, it is assumed that the APL includes: application 1, application 2, and application 3. In this case, application 1, application 2, and application 3 can be installed in the preload partition. If application 4 needs to be installed in the preload partition, since the APL has been written into the OEM info and the APL cannot be changed, application 4 cannot be added to the APL, and therefore application 4 cannot be installed in the preload partition through the APL. In this case, application 4 can be added to the extended application list so that application 4 can be installed in the preload partition.
[0087] The extended application list may include applications that can be uninstalled by the user and applications that cannot be uninstalled by the user. Specifically, applications that can be uninstalled by the user may be stored in the ExtDelAPKInstallListRelease.txt file, and applications that cannot be uninstalled by the user may be stored in the ExtAPKInstallListRelease.txt file, wherein ExtDelAPKInstallListRelease.txt and ExtAPKInstallListRelease.txt may be stored in the / preload / (product) / slice / xml / path.
[0088] Combine the following Figure 2 and Figure 3 Describe a specific example to show the usage scenario of APL.
[0089] Figure 2This is a schematic diagram of installing applications in different versions of an electronic device provided by an embodiment of the present application. Taking the electronic device as a mobile phone as an example, taking version 101 and version 104 as examples, the installation of applications in the preloaded partition of electronic devices using different system versions is illustrated.
[0090] For example, the version of January 2024 (version 101) needs to install application A, application B, application C, application D, application E, and application F in the preload partition. Since the CPL list is empty, when the mobile phone equipped with the 101 version is turned on for the first time, the PMS can directly install application A, application B, application C, application D, application E, and application F in the preload partition and write these applications into the APL. In this case, the APL includes the application identifiers corresponding to application A, application B, application C, application D, application E, and application F.
[0091] For another example, in the April 2024 version (version 104), in addition to installing application A, application B, application C, application D, application E, and application F in the preload partition, application G and application H must also be installed. Since the CPL list is empty, when the mobile phone equipped with the 104 version is turned on for the first time, the PMS can directly install application A to application H and write these applications into the APL. In this case, the APL includes the application identifiers corresponding to application A, application B, application C, application D, application E, application F, application G, and application H.
[0092] Figure 3 Schematic diagram of an electronic device version upgrade provided by an embodiment of the present application. Figure 3 As shown in the figure, when the mobile phone equipped with version 101 in January 2024 is upgraded to version 104 through OTA, applications G and H may be added to the preload partition with the OTA update. However, the mobile phones produced in January 2024 do not need to install application G and application H in the preload partition. In this case, since the APL has been written on the version 101 of the mobile phones produced in January 2024, and the APL will not change with the OTA upgrade, after the mobile phone is upgraded from version 101 to version 104, even if the OTA is upgraded, the applications in the APL are still application A, application B, application C, application D, application E, and application F, and do not include application G and application H. In this way, application G and application H are not installed in the preload partition.
[0093] But in the specific implementation process, the inventor of the present application finds that there are some problems in controlling the application program installed in the preload partition by APL. Specifically, after the SIM card (also known as the Subscriber Identity Module) is inserted by the electronic device, it is necessary to install the application program corresponding to the Subscriber Identity Module in the preload partition, and the application program corresponding to the Subscriber Identity Module needs to be installed in the preload partition. But because the preload partition is controlled by APL, the application program corresponding to the Subscriber Identity Module cannot be installed in the preload partition. Therefore, this will cause the installation failure of the application program installed with the card after the Subscriber Identity Module is inserted into the electronic device.
[0094] For example, when a user identification card is inserted into an electronic device, the application corresponding to the user identification card needs to be installed in the preload partition. For example, after user identification card 1 is inserted into the electronic device, application 1 needs to be installed, and after user identification card 1 is inserted into the electronic device, application 2 needs to be installed. However, since application 1 and application 2 are not included in the APL, in this case, after user identification card 1 is inserted into the electronic device, application 1 cannot be installed. Similarly, after user identification card 2 is inserted into the electronic device, application 2 cannot be installed.
[0095] In order to solve this technical problem, the present application provides an application installation method, which is applied to the card installation scenario, and the method includes: after the user identification card is inserted into the electronic device, the application identifier of the target card installation application is added to the preloaded application set. Based on the preloaded application set, the target card installation application is installed to the preload partition.
[0096] The target application to be installed with the card refers to the application corresponding to the user identification card and specified to be installed in the preload partition. For example, the applications corresponding to the user identification card that need to be installed with the card include: application 1, application 2, and application 3. Among them, application 1 needs to be installed in the preload partition (installed in the / preload path), and neither application 2 nor application 3 needs to be installed in the preload partition (both can be installed in the / product path). Then application 1 is the target application to be installed with the card. The preload application set is used to indicate the applications that are allowed to be installed in the preload partition.
[0097] Among them, the application identifier is used to uniquely characterize the application, for example, a string or label that identifies or represents a certain application. Specifically, the application identifier can be generated based on the package name of the application installation package, or can be generated based on the name of the application, etc., which is not limited here.
[0098] It can be understood that in an embodiment of the present application, by adding the application identifier of the target card-installed application to the preloaded application collection, the application corresponding to the user identification card can be installed in the preloaded partition, thereby avoiding the failure of installation of the application installed with the card after the user identification card is inserted into the electronic device, and reducing the probability of failure of installation with the card.
[0099] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0100] Please refer to Figure 4 In this application, the electronic device 400 is taken as an example of a mobile phone to introduce the electronic device 400 provided by this application. Figure 4 As shown, the electronic device 400 may include: a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, an earphone interface 470D, a sensor module 480, a button 490, an indicator 492, a camera 493, and a display screen 494. Among them, the sensor module 480 may include a pressure sensor 480A, a magnetic sensor 480B, a proximity light sensor 480C, a fingerprint sensor 480D, a touch sensor 480E, an ambient light sensor 480F, and the like.
[0101] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 400. In other embodiments of the present application, the electronic device 400 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware. For ease of understanding, the above components will be briefly introduced below.
[0102] The processor 410 may include one or more processing units, for example, the processor 410 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0103] The controller may be the nerve center and command center of the electronic device 400. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0104] The processor 410 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may store instructions or data that the processor 410 has just used or cyclically used. If the processor 410 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.
[0105] In some embodiments, the processor 410 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0106] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 400. In other embodiments of the present application, the electronic device 400 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0107] The charging management module 440 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 440 may receive charging input from a wired charger through the USB interface 430. In some wireless charging embodiments, the charging management module 440 may receive wireless charging input through a wireless charging coil of the electronic device 400. While the charging management module 440 is charging the battery 442, it may also power the electronic device through the power management module 441.
[0108] The wireless communication function of the electronic device 400 can be implemented through the antenna 1, the antenna 2, the mobile communication module 450, the wireless communication module 460, the modem processor and the baseband processor.
[0109] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 400 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0110] The mobile communication module 450 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 400. The mobile communication module 450 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 450 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 450 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 450 can be set in the processor 410. In some embodiments, at least some of the functional modules of the mobile communication module 450 can be set in the same device as at least some of the modules of the processor 410.
[0111] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 470A, a receiver 470B, etc.), or displays an image or video through a display screen 494. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 410 and be set in the same device as the mobile communication module 450 or other functional modules.
[0112] The wireless communication module 460 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 400. The wireless communication module 460 can be one or more devices integrating at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 410. The wireless communication module 460 can also receive the signal to be sent from the processor 410, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0113] In some embodiments, the antenna 1 of the electronic device 400 is coupled to the mobile communication module 450, and the antenna 2 is coupled to the wireless communication module 460, so that the electronic device 400 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).
[0114] The display screen 494 is used to display images, videos, etc. The display screen 494 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 400 may include 1 or N display screens 494, where N is a positive integer greater than 1.
[0115] The camera 493 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 400 may include 1 or N cameras 493, where N is a positive integer greater than 1.
[0116] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 400 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0117] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 400. The external memory card communicates with the processor 410 through the external memory interface 420 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0118] The internal memory 421 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the instructions stored in the internal memory 421. The internal memory 421 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 400 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 421 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0119] In an embodiment of the present application, the preloaded application set may be stored in the internal memory 421 .
[0120] The electronic device 400 can implement audio functions such as music playing and recording through the audio module 470, the speaker 470A, the receiver 470B, the microphone 470C, the headphone jack 470D, and the application processor.
[0121] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0122] Figure 5 It is a schematic diagram of the software system architecture structure of an electronic device provided in an embodiment of the present application.
[0123] The software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.
[0124] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer, framework service layer and driver layer.
[0125] The application layer may include a series of application packages.
[0126] like Figure 5As shown, the application package may include setting the application to be installed with the card, Android Interface Definition Language (aidl), etc., and may also include: camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0127] The application installed with the card is used to determine whether the user identification card is inserted into the electronic device. If inserted, the application installed with the card corresponding to the user identification card is determined.
[0128] The aidl interface is used to implement two-way communication between the application installed with the card and the framework service layer. The aidl interface includes: ICotaInterface (transmission interface) and ICotaCallBack (return interface), where ICotaInterface is used to pass information from the application layer to the framework service layer, and ICotaCallBack is used to pass information from the framework service layer to the application layer. For example, ICotaInterface can send the application identified by the application installed with the card to the Custom-OTA Service (CotaService) in the framework service layer.
[0129] The framework service layer provides application programming interface (API) and programming framework for the application programs in the application layer. The framework service layer includes some predefined functions.
[0130] like Figure 5 As shown, the framework service layer may include CotaService, HotInstall, PMS, etc. In addition, the framework service layer may also include: window manager, content provider, view system, phone manager, resource manager, notification manager, etc., which are not shown one by one in the figure.
[0131] HotInstall (encapsulation tool class) is a tool class used to encapsulate and call CotaService.
[0132] The driver layer, also known as the kernel layer, includes the SIM card interface driver, SIM card identification and initialization driver, etc. Among them, the SIM card interface driver is responsible for the physical interface communication between the SIM card and the mobile phone. It manages the physical connection of the SIM card slot to ensure that the SIM card can be correctly inserted and communicate with the mobile phone. The SIM card identification and initialization driver is responsible for identifying the presence of the SIM card. For example, it can send specific commands or signals to detect the presence of the SIM card and perform the initialization process after the SIM card is identified.
[0133] In the embodiment of the present application, an application identification adding module may be added to PMS and CotaService. Taking a mobile phone as an example, the method in the embodiment of the present application is described as follows in combination with the above hardware structure and system structure:
[0134] 1. After the user identification card is inserted into the electronic device, the application identifier of the application corresponding to the user identification card and the installation path of the application are obtained.
[0135] After the user identification card is inserted into the electronic device, a broadcast will be performed, and the application installed with the card receives the broadcast event, parses the configuration file installed with the card, and determines the application corresponding to the currently inserted user identification card and the installation path of the application.
[0136] 2. If the installation path of the application corresponding to the user identification card is the preload partition, the application identifier of the application corresponding to the user identification card is added to the preload application set.
[0137] In the embodiment of the present application, if the user identification card is inserted into the electronic device and the electronic device is not restarted, CotaService adds the application identifier of the application corresponding to the user identification card to the preloaded application set, and then CotaService enables PMS to install the application corresponding to the user identification card. If the user identification card is inserted into the electronic device and the electronic device is restarted, during the restart process of the electronic device, when the PMS scans the application to be installed, the application identifier of the application corresponding to the user identification card is added to the preloaded application set.
[0138] 3. PMS installs the application corresponding to the newly added application identifier in the preloaded application set.
[0139] Specifically, the PMS installs the application corresponding to the newly added application identifier in the preloaded application set into the preload partition.
[0140] The following is a detailed description of the application installation method of the present application in conjunction with the accompanying drawings of specific embodiments.
[0141] In an embodiment of the present application, the scanning and installation of the application is realized by the PMS. The installation process of the PMS may be: in the application scanning and installation stage, the application identifier of the scanned application to be installed is compared with the preloaded application set. The application to be installed represented by the application identifier that hits the preloaded application set is installed to the preloaded partition. As mentioned above, through the method in the present application, the application identifier of the target application installed with the card corresponding to the user identification card has been added to the preloaded application set, so the PMS can install the target application installed with the card to the preloaded partition.
[0142] For ease of understanding, an example is given. Before using the solution of the present application, assuming that a user identification card is inserted into an electronic device, the application corresponding to the user identification card that needs to be installed in the preloaded partition is application 1. If the application identifier of application 1 is not included in the preloaded application set, the PMS cannot install application 1 into the preloaded partition. However, after using the solution of the present application, assuming that a user identification card is inserted into an electronic device, if the application identifier of application 1 is not included in the preloaded application set, the application identifier of application 1 can be added to the preloaded application set, so that the PMS can install application 1 into the preloaded partition.
[0143] It can be understood that the present application adds the application identifier of the application corresponding to the user identification card to be installed in the preloaded partition to the preloaded application collection, so that the PMS can install the application corresponding to the user identification card into the preloaded partition, thereby achieving the goal that the application corresponding to the user identification card can be successfully installed into the preloaded partition after the card is inserted, thereby improving the success rate of installing the application with the card.
[0144] From the above, it can be seen that the PMS scans the preloaded application set and installs the application corresponding to the application identifier included in the set. In some embodiments of the present application, Figure 6 FIG. 1 is a schematic diagram showing the principle of an application installation method provided in an embodiment of the present application. Figure 6 As shown, there are two types of application lists in the preloaded application set, the first application list and the second application list, wherein the first application list includes the application identifiers of the application programs installed in the preloaded partition when the electronic device is turned on for the first time, and the first application list is in an unchangeable state after being generated. The second application list is used to store the application identifiers of the application programs that need to be installed in the preloaded partition outside the first application list, and the application identifiers of the target application installed with the card are added to the second application list.
[0145] like Figure 6 As shown, taking the electronic device as a mobile phone as an example, when the user identification card is inserted into the mobile phone, the applications (application 1, application 2, application 3) installed corresponding to the user identification card are obtained, and the installation paths of these applications are obtained. If there is an application (application 3) whose installation path is a preloaded partition, then this application (application 3) is the target application installed with the card, and the application identifier of application 3 is added to the second application list, so that application 3 can be installed in the preloaded partition.
[0146] It is understandable that the first application list is APL. The method of generating APL is as follows: Figure 1As shown, when the electronic device is turned on for the first time, if CPL exists, applications other than those in the CPL list are installed in the preloaded partition, and APL is generated based on the package names of the applications installed in the preloaded partition (i.e., the names of the application installation packages), and then the APL is stored in OEM info. Since it is stored in OEM info, it cannot be modified at the user level, that is, it is in an unchangeable state.
[0147] Since APL cannot be changed after being generated and stored in OEM info, the second application list is an additional preset application list. The application identifier of the application corresponding to the user identification card that needs to be installed in the preloaded partition can be added to the application list, so that applications other than APL can also be installed in the preloaded partition.
[0148] It should be understood that the second application list is equivalent to an exemption list, and the exemption list is used to store application identifiers of applications that still need to be installed in the preloaded partition in addition to the APL, and the applications corresponding to the application identifiers stored in the exemption list are not subject to the control of the APL. For example: Assuming that application 1 needs to be installed in the preloaded partition, the application identifier of application 1 does not exist in the APL, but the application identifier of application 1 exists in the exemption list, then the electronic device can be free from the installation restrictions of the APL and install application 1 in the preloaded partition. Among them, the exemption list can be modified at the user level. For example, if the electronic device performs a factory reset operation, the application identifier stored in the exemption list will be cleared. However, when the application identifier is added to the exemption list, its application identifier will be stored in the memory, and even if the electronic device is turned on again, the application identifier in its exemption list will not be lost.
[0149] The exemption list may also include: the above-mentioned extended application list and the card-installed application list. The extended application list is used to store applications that need to be additionally installed in the preload partition, that is, the extended application list allows the electronic device to install applications other than those restricted by the APL in the preload partition. For example, if the electronic device does not install application 1 in the preload partition when it is first powered on, and subsequently needs to install application 1 due to some special circumstances, in this case, the application identifier of application 1 can be added to the extended application list.
[0150] The application identifiers stored in the application list installed with the card are determined by the user identification card. For example, after the user identification card is inserted into the electronic device, the application identifier of the application program that needs to be installed in the preloaded partition corresponding to the user identification card can be added to the application list installed with the card.
[0151] For example, assuming that the APL contains the application identifiers of application 1, application 2, and application 3, the electronic device can install application 1, application 2, and application 3 in the preload partition. Assuming that a user identification card is inserted into the electronic device, application 4 needs to be installed in the preload partition, but since the application identifier of application 4 is not in the APL, in this case, the application identifier of application 4 can be added to the exemption list, for example, added to the list of applications installed with the card in the exemption list, so that application 4 can be subsequently installed in the preload partition.
[0152] It should be noted that, although both the application list installed with the card and the extended application list allow the electronic device to install applications other than those restricted by the APL in the preloaded partition, the application list installed with the card stores applications that are installed in the preloaded partition as instructed by the user identification card, while the extended application list does not store applications that are installed as instructed by the user identification card.
[0153] Specifically, the card-installed application list, extended application list, and APL are all stored in the memory of the electronic device, so that multiple lists form a preloaded application set. If the application identifier of the application to be installed is included in the preloaded application set, the application to be installed is installed in the preloaded partition.
[0154] It should be understood that there may be multiple applications corresponding to a user identification card, and these applications corresponding to the user identification card can all be called applications installed with the card, but some applications installed with the card indicate installation in the preload partition, and some applications installed with the card do not indicate installation in the preload partition. Therefore, the solution of the present application needs to determine the target application installed with the card (that is, determine the application installed with the card that needs to be installed in the preload partition) from the applications installed with the card corresponding to the user identification card after the user identification card is inserted. Further, the method for determining the target application installed with the card can be: from at least one application installed with the card corresponding to the user identification card, identify the target application installed with the card whose installation path indicates the preload partition.
[0155] For example, assuming that the installed applications of the user identity card include: application 1, application 2, and application 3, if the installation path of application 1 and application 2 is the preload partition, then application 1 and application 2 are target installed applications.
[0156] In some embodiments of the present application, identifying a target installed-with-card application of a preloaded partition indicated by an installation path from at least one installed-with-card application corresponding to a user identification card includes: after the user identification card is inserted into an electronic device, parsing an installed-with-card configuration file, and obtaining an application identifier of at least one installed-with-card application corresponding to the user identification card from the installed-with-card configuration file. From the installation path corresponding to the application identifier of at least one installed-with-card application in the installed-with-card configuration file, identifying an installation path indicating a preloaded partition, and determining that the installed-with-card application corresponding to the identified installation path is the target installed-with-card application.
[0157] In this embodiment, a card-installation configuration file is stored in the electronic device. After the user identification card is inserted into the electronic device, the card-installation configuration file will be parsed. The application identifier of at least one card-installed application corresponding to the user identification card is first determined through the card-installation configuration file, and then the installation path corresponding to the application identifier of each card-installed application in the card-installation configuration file is determined. It is determined whether there is an application with an installation path of a preloaded partition in each card-installed application. If so, the application with an installation path of the preloaded partition is set as the target card-installed application.
[0158] In some embodiments of the present application, the card installation configuration file records at least one application identifier of the card installation application corresponding to the operator identifier. The electronic device can obtain the operator identifier corresponding to the user identification card inserted into the electronic device, which is recorded as the target operator identifier. The electronic device obtains the application identifier of the card installation application corresponding to the target operator identifier from the card installation configuration file.
[0159] In some examples, the user identification card has corresponding MCC and MNC. MCC+MNC can be used to uniquely identify the communication operator. The step of obtaining the application identifier of the application installed with the card corresponding to the target operator identifier from the configuration file for installing with the card may include: the electronic device determines the target operator to which the user identification card belongs according to the MCC and MNC corresponding to the user identification card. Specifically, in the configuration file for installing with the card, the application identifier of the application installed with the card is recorded and stored corresponding to MCC+MNC. Therefore, the electronic device can determine the application identifier of the application corresponding to the MCC+MNC from the configuration file for installing with the card, that is, obtain the application identifier of the application installed with the card corresponding to the target operator identifier. Furthermore, the electronic device can determine from the application identifier of the application installed with the card corresponding to the target operator identifier that the application whose installation path of the target application installed with the card is the preloaded partition is set as the target application installed with the card.
[0160] It should be understood that in actual use, after the user identification card is inserted into the electronic device, at least one of the following two scenarios may exist according to actual device requirements:
[0161] Scenario 1: The user identification card is inserted into the electronic device but the electronic device does not restart.
[0162] Scenario 2: The electronic device is started after the user identification card is inserted into the electronic device. That is, the scenario is determined based on whether the electronic device is started after the user identification card is inserted into the electronic device.
[0163] Next, we will introduce the specific processing under scenario 1 and scenario 2:
[0164] Scenario 1: The user identification card is inserted into the electronic device but the electronic device is not restarted (i.e., the hot-start scenario when the card is installed).
[0165] Since the execution order of PMS precedes the execution order of CotaService when the electronic device is started, in the case of scenario 1, before the user identification card is inserted into the electronic device, PMS has completed scanning the current preloaded application set (i.e., the preloaded application set that existed before the application identifier of the application installed with the card is added), and completed the processing flow of installing the application corresponding to the application identifier in the existing preloaded application set. Therefore, when the user identification card is inserted into the electronic device but not restarted, the PMS scanning process will no longer be actively performed, and the electronic device can call CotaService to initiate application installation to install the target application installed with the card into the preload partition.
[0166] For ease of understanding, Figure 7 This is a flowchart of a card application installation process provided by an embodiment of the present application. Figure 7 The following is a schematic diagram of the card application installation process in the following scenario, which specifically includes the following steps:
[0167] (1) Insert the card without restarting.
[0168] Taking the scenario where the electronic device does not restart after the user identification card is inserted as an example, before the user identification card is inserted into the electronic device, the electronic device is already powered on, and then the user identification card is inserted into the electronic device, and the electronic device is not restarted after the insertion.
[0169] (2) Obtain MCC and MNC.
[0170] The Mobile Country Code (MCC) and Mobile Network Code (MNC) of the user identification card are obtained to identify the operator to which the user identification card belongs through the MCC and MNC.
[0171] (3) Parsing the configuration file installed with the card
[0172] (4) Determine whether the current MCC and MNC are in the configuration file installed with the card.
[0173] In some embodiments, if yes, (5) is executed; if no, the card installation ends, that is, the current user identification card does not have a corresponding card installation application.
[0174] (5) Whether the installation path corresponding to the accompanying card application corresponding to MCC and MNC in the accompanying card installation configuration file is a preloaded partition.
[0175] In this embodiment, the operator corresponding to the user identification card is determined through MCC and MNC, and the application identifier of the application corresponding to the operator is determined through the configuration file installed with the card. The installation path corresponding to the application identifier is determined through the configuration file installed with the card. If the installation path of the application exists as a preloaded partition, the application whose installation path is the preloaded partition is set as the target application installed with the card.
[0176] In some embodiments, if yes, (6) is executed, and if no, the card installation ends, that is, the current user identification card does not have a corresponding target card installation application.
[0177] (6) Call CotaService to initiate application installation.
[0178] Specifically, the installation of the target card-installed application corresponding to the user identification card is initiated by calling CotaService.
[0179] As mentioned above, if you want to install the target application installed with the card, you need to add the application identifier of the target application installed with the card (that is, the application identifier of the application that needs to be installed in the preloaded partition) to the preloaded application set (such as the exemption list) after identifying the target application installed with the card. Then, in scenario one, calling CotaService to initiate application installation can include: calling CotaService to add the application identifier of the target application installed with the card to the preloaded application set. After CotaService adds the application identifier of the target application installed with the card to the preloaded application set, it triggers PMS to scan the application to be installed again, and performs the application scanning and installation phase, comparing the application identifier of the scanned application to be installed with the preloaded application set and subsequent steps. For example, trigger PMS to scan the application to be installed, and in the stage where PMS scans the application to be installed, compare the application identifier of the scanned application to be installed with the preloaded application set, and install the application to be installed represented by the application identifier in the preloaded application set to the preloaded partition. It should be understood that when the PMS scans the target application to be installed with the card, since the application identifier of the target application to be installed with the card is located in the preloaded application set, the target application to be installed with the card can be installed into the preloaded partition.
[0180] Figure 8 is another flowchart of card application installation processing provided by an embodiment of the present application. Fig. 9 This is another flowchart of the card application installation process provided by the embodiment of the present application. Figure 8 and Fig. 9 The following example illustrates the distinction of scenario 1, where: Figure 8 It is used to indicate that when the method in this application is not used, CotaService is called to initiate the application installation process. Fig. 9 It is used to illustrate that when the method in this application is used, CotaService is called to initiate the application installation processing steps.
[0181] Specifically, Figure 8 The execution process is as follows:
[0182] (1)Call CotaService.
[0183] (2) Save the list of applications attached to the card.
[0184] In the related art, after the application installed with the card determines the application corresponding to the currently inserted user identification card, a list of applications installed with the card can be generated. The list of applications installed with the card includes all applications installed corresponding to the user identification card, such as applications that need to be installed in the preloaded partition and applications that do not need to be installed in the preloaded partition. CotaService can save the list of applications installed with the card to a preset path. For example, non-uninstallable applications can be saved to data / system / auto_install / APKInstallListRelease.TXT, and uninstallable applications can be saved to data / system / auto_install / DELAPKInstallListRelease.TXT.
[0185] (3)PMS scanning application.
[0186] CotaService triggers PMS to scan again and install the applications in the data path that need to be installed with the card.
[0187] However, if the method in the present application is not used, because the application identifier of the card-installed application scanned by the PMS is not in the preloaded application set, it will be restricted by the preloaded application set and the target card-installed application specified to be installed in the preloaded partition cannot be installed in the preloaded partition.
[0188] Therefore, in order to solve the problem that the application program that needs to be installed with the card cannot be installed, when the user identification card is inserted into the electronic device and the electronic device is not restarted, by using the solution of the present application, the following can be performed: Fig. 9 The specific process is as follows:
[0189] (1)Call CotaService.
[0190] (2) Save the list of applications attached to the card.
[0191] (3) Determine whether the application is installed in the preload / app path
[0192] Determine whether the application in the card application list needs to be installed in the preload partition (preload / app). If so, execute (4); if not, execute (5).
[0193] (4) The application identifier is stored in the list of applications installed with the card in the exemption list.
[0194] If the application in the application list with the card needs to be installed in the preloaded partition, CotaService will store the application identifier corresponding to the application to be installed in the preloaded partition in the exemption list, for example, it can be stored in the application list with the card installed in the exemption list. It should be understood that in step (4), after the application identifier of the target application installed with the card is stored in the application list with the card installed in the exemption list, the following step (5) will be triggered.
[0195] (5)PMS scanning application.
[0196] Specifically, due to the following scenario (when a user identification card is inserted into the electronic device but it is not restarted), the PMS will no longer go through the related processing of booting up and scanning for and installing applications. Therefore, after CotaService adds the application identifier to the list of applications installed with the card in the exemption list, CotaService can send relevant data to PMS to trigger PMS to rescan the application, so that PMS re-compares the application identifier of the scanned application to be installed with the preloaded application set after the application identifier is added, so as to install the application to be installed represented by the newly added application identifier in the preloaded application set to the preloaded partition.
[0197] Scenario 2: The electronic device is started after the user identification card is inserted into the electronic device.
[0198] Specifically, if a user identification card is inserted into an electronic device and the electronic device is restarted, the PMS power-on scan and installation process will be executed after the restart. Therefore, the PMS can add the application identifier of the target application to the exemption list during the application scan and installation phase. In this scenario, there are two situations. Situation 1: The user identification card is inserted into the electronic device after the electronic device has been turned on for the first time, and then the electronic device is restarted. Situation 2: The user identification card is inserted into the electronic device before the electronic device is turned on for the first time, and the electronic device is started for the first time after the user identification card is inserted.
[0199] The two situations are described in detail below.
[0200] Case 1:
[0201] After the user identification card is inserted into the electronic device and the electronic device is restarted, since the electronic device is not turned on for the first time, the preloaded application set has been generated. Then, in the stage where the PMS scans the application to be installed, if the PMS scans the target application installed with the card, but the application identifier of the target application installed with the card is not in the preloaded application set, the application identifier of the target application installed with the card can be added to the preloaded application set through the PMS, such as the second application list (i.e., the exemption list) in the preloaded application set. Specifically, after the PMS adds the application identifier of the target application installed with the card to the preloaded application set, it is equivalent to updating the preloaded application set. Therefore, the PMS will compare the application identifier of the target application installed with the card with the updated preloaded application set, so that it is no longer restricted and can successfully install the target application installed with the card to the preloaded partition.
[0202] See also Fig.10 , Fig.10 It is a flowchart of a PMS installation application provided in an embodiment of the present application. Fig.10 The complete process of the PMS power-on scanning process in the embodiment of the present application is illustrated (including the complete power-on scanning process for the first power-on and non-first power-on), which specifically includes the following steps:
[0203] S1001: Scan the pre-installed partition to generate a list of applications to be installed.
[0204] S1002: Read APL configuration file from OEM info.
[0205] S1003: Determine whether there is a valid APL.
[0206] In some embodiments, if the APL exists, S1010 is executed, and if the APL does not exist, S1004 is executed.
[0207] S1004: Read CPL from OEM info.
[0208] S1005: Determine whether there is a CPL.
[0209] In some embodiments, if the CPL exists, S1008 is executed, and if the CPL does not exist, S1006 is executed.
[0210] S1006: Install all applications.
[0211] S1007: Whether it is a domestic version.
[0212] The inventor of the present application found during the research process that different countries have different lists of applications that need to be pre-installed after the electronic device is turned on for the first time. Therefore, in the embodiments of the present application, APL and CPL may not be set on the electronic device of the foreign version. However, in other embodiments, APL or CPL may also be set on the electronic device of the foreign version, which is not limited here.
[0213] In some embodiments, if it is a domestic version, execute S1009, and if it is not a domestic version, end.
[0214] S1008: Install an application that is not in the CPL.
[0215] S1009: Generate APL according to the installed application and package name, and write OEM info.
[0216] S1010: Applications installed in APL.
[0217] S1011: Scan and install all applications in the extended application list.
[0218] In some embodiments, after the electronic device installs the application corresponding to the application identifier in the APL into the preloaded partition, it will also install the application corresponding to the application identifier in the extended application list into the preloaded partition, and install the application corresponding to the application identifier in the accompanying card application list into the preloaded partition.
[0219] S1012: Scan and install all application programs in the application list provided with the card.
[0220] It should be understood that the above steps S1004-S1009 describe the APL generation process executed by the PMS when the electronic device is turned on for the first time (i.e., the relevant processing flow for generating the APL). For the above situation 1 (i.e., after the user identification card is inserted into the electronic device and the electronic device is restarted), the electronic device is not turned on for the first time, so there is no need to execute steps S1004-S1009 (i.e., there is no need to execute the APL generation process executed by the PMS when the electronic device is turned on for the first time), and only steps S1001-S1003 and S1010-S1012 need to be executed.
[0221] Case 2:
[0222] It should be understood that if the electronic device has not been powered on for the first time before the user identification card is inserted into the electronic device, then when the electronic device is powered on for the first time after the user identification card is inserted (i.e., situation 2), the electronic device may execute Fig.10 The above steps S1004-S1009 (i.e., executing the APL generation process executed by the PMS when the electronic device is turned on for the first time), and executing S1011-S1012.
[0223] It can be seen from the above content that in the embodiments of the present application, the application identifiers of the applications installed in the preloaded partition all belong to the preloaded application set, that is, the applications corresponding to the application identifiers in the APL and the exemption list can be installed in the preloaded partition, which is explained below with a specific example.
[0224] Fig.11 Schematic diagram of another electronic device version upgrade provided by the embodiment of the present application. Fig.11 As shown, in version 101, after the electronic device is powered on for the first time, the application identifiers corresponding to application A, application B, application C, application D, application E, and application F are stored in the APL. However, when the user identification card is inserted into the electronic device and the electronic device is not restarted, the accompanying card applications corresponding to the user identification card are application X and application Y, and application X and application Y need to be installed in the preload partition. Since the application identifiers of application X and application Y are not included in the APL, the application identifiers corresponding to application X and application Y can be added to the accompanying card application list, that is, the application identifiers of application X and application Y are added to the preload application set.
[0225] Then perform OTA upgrade on the electronic device to update the system version of the electronic device to version 104. Version 104 indicates that application G and application H are newly added in the electronic device, but since the application identifiers corresponding to application G and application H are not included in the APL, and application G and application H are not the target card-mounted applications corresponding to the current user identification card. Therefore, application G and application H will not be installed in the preload partition, and the applications installed in the preload partition are still application A, application B, application C, application D, application E, application F, application X and application Y.
[0226] Similarly, the electronic device is OTA upgraded to update the system version of the electronic device to version 106. Version 106 indicates that application J and application K are newly added in the electronic device, but since the application identifiers corresponding to application J and application K are not included in the APL, and application J and application K are not the target card-mounted applications corresponding to the current user identification card. Therefore, application J and application K will not be installed in the preload partition, and the applications installed in the preload partition are still application A, application B, application C, application D, application E, application F, application X and application Y.
[0227] Therefore, it can be seen from this example that if the user identification card inserted into the electronic device is not replaced, even if the system of the electronic device is updated, the installed applications in the preloaded partition will not change, that is, only the applications corresponding to the application identifiers in the APL and the exemption list can be installed in the preloaded partition.
[0228] However, if the operator of the user identification card inserted into the electronic device changes, the list of card-attached applications included in the exemption list may change.
[0229] In some embodiments of the present application, the operator to which the user identification card inserted in the electronic device belongs changes, and the situation causing the change in the accompanying card application list may be: for example, the accompanying card applications corresponding to operator 1 are application X and application Y, then after inserting the user identification card of operator 1, the accompanying card application list includes the application identifiers corresponding to application X and application Y. The accompanying card applications corresponding to operator 2 are application Z and application W, then after inserting the user identification card of operator 2, the accompanying card application list includes the application identifiers corresponding to application Z and application W. In this case, if the user identification card of operator 1 in the electronic device is replaced with the user identification card of operator 2, the application identifiers included in the accompanying card application list can be replaced from application X and application Y to application Z and application W. It is also possible to add the application identifiers corresponding to application Z and application W to the accompanying card application list, which is not limited here.
[0230] In some other embodiments of the present application, when the operator of the user identification card inserted in the electronic device changes, the situation where the card application list does not change may be that the corresponding operator before the user identification card is replaced and the corresponding operator after the replacement have the same installed applications.
[0231] Some other embodiments of the present application provide an electronic device, which may include: a memory and one or more processors. The memory is coupled to the processor. The memory is used to store computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device performs each function or step in the above method embodiment. The structure of the electronic device can refer to Figure 4 The structure of the electronic device 400 is shown.
[0232] An embodiment of the present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the electronic device in the above-mentioned method embodiment.
[0233] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer executes each function or step executed by the electronic device in the above method embodiment.
[0234] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0235] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0236] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0237] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0238] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0239] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for installing an application, characterized in that: Applied to an electronic device, the electronic device comprises: a preloaded application set, the preloaded application set is used to indicate application programs that are allowed to be installed in a preloaded partition; the preloaded application set comprises: a first application list and a second application list; the first application list comprises application identifiers of application programs installed in the preloaded partition when the electronic device is first powered on; the first application list is in an unchangeable state after being generated; the second application list is used to store application identifiers of application programs that need to be installed in the preloaded partition outside the first application list; the method comprises: After a user identification card is inserted into the electronic device, an application identifier of a target application installed with the card is added to the second application list of the preloaded application set; the target application installed with the card refers to an application corresponding to the user identification card and designated to be installed in the preloaded partition; The target card-installed application is installed into the preload partition based on the preload application set.
2. The method according to claim 1, characterized in that The step of installing the target card-installed application into the preloaded partition based on the preloaded application set includes: In the application scanning and installation phase, the application identifier of the scanned application to be installed is compared with the preloaded application set; The application to be installed represented by the application identifier in the preloaded application set is installed into the preloaded partition; the application identifier in the preloaded application set includes the added application identifier of the target application to be installed with the card.
3. The method according to claim 2, characterized in that After the user identification card is inserted into the electronic device, adding the application identifier of the target application installed with the card to the second application list of the preloaded application set includes: After the user identification card is inserted into the electronic device and the electronic device is not restarted, calling CotaService to add the application identifier of the target card-installed application to the preloaded application set; The method further comprises: After the CotaService adds the application identifier of the target card-installed application to the preloaded application set, it triggers the PMS to scan the applications to be installed again, and executes the application scanning and installation phase, comparing the application identifier of the scanned application to be installed with the preloaded application set and subsequent steps.
4. The method according to claim 2, characterized in that: After the user identification card is inserted into the electronic device, adding the application identifier of the target application installed with the card to the second application list of the preloaded application set includes: After the user identification card is inserted into the electronic device and the electronic device is restarted, in the stage of PMS scanning applications to be installed, the application identifier of the target application to be installed with the card is added to the second application list.
5. The method according to claim 4, characterized in that After the user identification card is inserted into the electronic device and the electronic device is restarted, in the stage where the PMS scans for applications to be installed, before adding the application identifier of the target application installed with the card to the second application list, the method includes: When the electronic device is powered on for the first time, in the stage where the PMS scans the applications to be installed, the application identifiers of the scanned applications to be installed are compared with the cancel preloading list to determine the application identifiers of the applications to be installed that are not in the cancel preloading list; the cancel preloading list includes application identifiers of application programs that are not allowed to be installed to the preloading partition; Installing the to-be-installed application represented by the determined application identifier into the preload partition; The first application list is generated based on the application identifiers corresponding to the application programs installed in the preload partition.
6. The method according to claim 5, characterized in that After the user identification card is inserted into the electronic device and the electronic device is restarted, in the stage where the PMS scans the application to be installed, adding the application identifier of the target application installed with the card to the second application list includes: After the user identification card is inserted into the electronic device and the electronic device is restarted, and the first application list does not include the application identifier of the target application installed with the card, the application identifier of the target application installed with the card is added to the second application list when the PMS scans for applications to be installed.
7. The method according to any one of claims 1 to 6, characterized in that: Before adding the application identifier of the target card-installed application to the second application list of the preloaded application set, the method further includes: A target installed-with-card application of the preloaded partition indicated by an installation path is identified from at least one installed-with-card application corresponding to the user identification card.
8. The method according to claim 7, characterized in that The step of identifying, from at least one application installed with the user identification card corresponding to the user identification card, a target application installed with the card indicating the preloaded partition by the installation path comprises: After the user identification card is inserted into the electronic device, parsing a configuration file installed with the card, and obtaining an application identifier of at least one application installed with the card corresponding to the user identification card from the configuration file installed with the card; The installation path indicating the preloaded partition is identified from the installation path corresponding to the application identifier of the at least one application installed with the card in the configuration file installed with the card, and the application installed with the card corresponding to the identified installation path is determined to be the target application installed with the card.
9. The method according to claim 8, characterized in that The card installation configuration file records at least one application identifier of a card installation application corresponding to an operator identifier; The obtaining, from the configuration file installed with the card, an application identifier of at least one application installed with the card corresponding to the user identification card comprises: An application identifier of the application installed with the card corresponding to the target operator identifier is obtained from the installed with the card configuration file.
10. An electronic device, characterized in that: The electronic device includes a memory and a processor; the memory and the processor are coupled; wherein computer program code is stored in the memory, and the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 9.
11. A computer storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 9.
12. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Data processing method and device, and SIM (Subscriber Identity Module) card
CN106550102A
Method for performing application installation and terminal
CN108664259A