Application scanning installation method and electronic equipment

By creating virtual preinstalled application partitions under the AOSP framework and establishing soft links, the adaptability problem of preinstalled application scanning and installation under different partition frameworks is solved, simplifying the scanning and installation process of electronic devices and reducing the difficulty of system upgrade.

CN120428982AActive Publication Date: 2025-08-05HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411397846.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-08-05
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

The scanning and installation methods of pre-installed applications in electronic devices cannot adapt to different partition frameworks, resulting in increased difficulty in system upgrades and other work.

Method used

Create a virtual preinstalled application partition under the AOSP framework and create soft links within that partition to link to preinstalled applications with different attributes, simplifying the scanning and installation process.

Benefits of technology

It simplifies the scanning and installation process of electronic devices for various pre-installed applications, and reduces the difficulty of system upgrades and other work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428982A_ABST
    Figure CN120428982A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application scanning installation method and electronic equipment, the method is executed by the electronic equipment, the electronic equipment comprises a first system partition and a second system partition, the second system partition and the first system partition are located in different partition frames, and a pre-installed application is placed in the second system partition. The method comprises the steps of creating a virtual pre-installed application partition corresponding to a second system partition in a partition frame where a first system partition is located in a system starting process of the electronic equipment; creating a first directory and a second directory in the virtual pre-installed application partition; creating a soft link under the first directory or the second directory based on the attribute of the pre-installed application in the second system partition so as to link to the pre-installed application; and when the pre-installed application is scanned and installed, the pre-installed application is scanned and installed through the soft link. Therefore, the process of scanning and installing various pre-installed applications by the electronic equipment can be simplified, and the difficulty of work such as system upgrading of the electronic equipment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to an application scanning installation method and electronic equipment. Background Art

[0002] Currently, electronic devices (such as mobile phones, tablets, etc.) come with some pre-installed applications when they are factory set up or the system is upgraded. These pre-installed applications will be automatically installed on the electronic device during the system startup (such as turning on the computer) without the need for users to manually download and install them.

[0003] Typically, pre-installed applications can be placed in different system partitions. During system startup, electronic devices can scan different system partitions to obtain the directory paths of pre-installed applications in each system partition and scan and install the pre-installed applications. However, due to the different operating systems of electronic devices, the traditional scanning and installation method is not suitable for all electronic devices. Therefore, the scanning and installation procedures of some electronic devices need to be modified, and these modifications may increase the difficulty of electronic device system upgrades. Summary of the Invention

[0004] The present application provides an application scanning and installation method and an electronic device, which can simplify the scanning and installation process of various pre-installed applications on electronic devices and reduce the difficulty of tasks such as electronic device system upgrades.

[0005] In a first aspect, the present application provides a method for scanning and installing an application, which is executed by an electronic device, wherein the electronic device includes a first system partition and a second system partition, the second system partition and the first system partition are in different partition frameworks, and a pre-installed application is placed in the second system partition. The method includes: during the startup of the electronic device system, in the partition framework where the first system partition is located, creating a virtual pre-installed application partition corresponding to the second system partition; creating a first directory and a second directory in the virtual pre-installed application partition; based on the attributes of the pre-installed application in the second system partition, creating a soft link in the first directory or the second directory to link to the pre-installed application; when scanning and installing the pre-installed application, scanning and installing the pre-installed application through the soft link.

[0006] Among them, there may be multiple partition frameworks supported by electronic devices, and different partition frameworks will also divide different system partitions. For example, the system partition under the Android Open Source Project (AOSP) may include system partition, product partition, oem partition, system_ext partition, etc., which can be called the first system partition, but there are some extended partitions (such as product_h partition) that are not system partitions supported by AOSP, which can be called the second system partition. Therefore, if some pre-installed applications are not placed in the system partition supported by AOSP, the electronic device cannot use the pre-installed application scanning method based on the AOSP framework to scan and install these pre-installed applications. Generally, complex modifications to the pre-installed programs are required, which increases the difficulty of tasks such as electronic device system upgrades. Based on this, the present application can create a virtual pre-installed application partition under the partition framework where the first system partition is located (i.e., under the AOSP framework), and create a first directory and a second directory similar to the AOSP scanning mechanism to soft-link to the corresponding pre-installed applications with different attributes. Then, when the electronic device scans and installs pre-installed applications, it can scan the system partition under the AOSP framework and the created virtual pre-installed application partition separately based on the AOSP scanning mechanism. When scanning to the virtual pre-installed application partition, the corresponding pre-installed application can be scanned and installed through the created soft link.

[0007] Thus, the electronic device can directly scan the virtual pre-installed application partition to simplify the scanning and installation process of various pre-installed applications in the electronic device and reduce the difficulty of tasks such as electronic device system upgrades.

[0008] In some implementations, the first directory is the app directory, and the second directory is the priv-app directory. In the AOSP framework, the app directory is used to store system applications, and the priv-app directory is used to store privileged applications. Therefore, when creating the virtual pre-installed application partition, these two types of directories can also be created to store pre-installed applications with corresponding attributes.

[0009] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned creation of a soft link in the first directory or the second directory based on the attributes of the preinstalled application in the second system partition to link to the preinstalled application includes: obtaining the attributes of the preinstalled application from a configuration file corresponding to the second system partition, wherein the preinstalled application includes a first application and a second application, the attribute of the first application is a system application, and the attribute of the second application is a privileged application; when the attribute of the preinstalled application is a system application, creating a first soft link in the first directory to link to the first application; when the attribute of the preinstalled application is a privileged application, creating a second soft link in the second directory to link to the second application.

[0010] Because the preinstalled applications with different attributes need to be linked to the first directory or the second directory, the electronic device needs to determine which preinstalled applications are system applications and which preinstalled applications are privileged applications, so as to accurately link the system applications to the first directory or the second directory.

[0011] Among them, for the pre-installed applications in the second system partition (such as the extended partition), there may be a corresponding configuration file, in which the attribute tag of each pre-installed application is recorded, and this attribute tag can be used to characterize whether the pre-installed application is a system application or a privileged application. For example, the configuration file can be stored in the / etc / xml directory of the extended partition, and the electronic device obtains the configuration file through the directory. Then, the electronic device can determine whether it is a system application or a privileged application based on the attributes of the pre-installed application in the configuration file. If it is a system application, a soft link is created in the first directory to link to the first application (i.e., the system application). If it is a privileged application, a soft link is created in the second directory to link to the second application (i.e., the privileged application). For example, a soft link corresponding to apk-1 can be created in the first directory and linked to the actual apk-1, and a soft link corresponding to apk-2 can be created in the second directory and linked to the actual apk-2. In this way, the attributes of each pre-installed application can be accurately divided in the constructed virtual pre-installed application partition.

[0012] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned scanning and installation of the pre-installed application through the soft link includes: obtaining the installation file of the first application through the first soft link, and scanning and installing the first application; obtaining the installation file of the second application through the second soft link, and scanning and installing the second application.

[0013] Based on the above implementation, after soft-linking the pre-installed applications placed in the second system partition to the corresponding directories, if you want to scan and install these pre-installed applications, the electronic device can obtain the installation file of the first application through the first soft link and scan and install the first application, and obtain the installation file of the second application through the second soft link and scan and install the second application. This simplifies the scanning and installation process of various pre-installed applications on the electronic device.

[0014] In some implementations, after scanning and installing the first application, the electronic device may further add a SYSTEM tag to the first application to characterize the attributes of each application. After scanning and installing the second application, the electronic device may further add a PRIVILLEGED tag to the second application to characterize the attributes of each application.

[0015] In combination with the first aspect, in some implementations of the first aspect, when scanning and installing pre-installed applications, the pre-installed applications are scanned and installed through the soft link, including: when triggering the start of scanning and installing pre-installed applications, all system partitions in the electronic device are obtained, and all system partitions include the first system partition and the virtual pre-installed application partition; the directory paths in all the system partitions are scanned in turn; when scanning to the virtual pre-installed application partition, the soft link under the first directory or the second directory is obtained, and the pre-installed application is scanned and installed through the soft link.

[0016] Among them, during the system startup process, the electronic device will trigger the scanning and installation of pre-installed applications. Here, all pre-installed applications in the electronic device need to be installed. Therefore, the electronic device needs to obtain all system partitions. For example, the partition information of the electronic device can be recorded in the partition table of the system, and the electronic device can obtain all system partitions from the partition table. It can be understood that all system partitions obtained here include the system partition (i.e., the first system partition) that actually exists under the AOSP framework in the electronic device and the virtual pre-installed application partition created above. Then, the electronic device can scan the directory path in each partition in turn. When scanning to the virtual pre-installed application partition, it can scan and install the corresponding pre-installed application through the soft link under the first directory or the second directory.

[0017] In combination with the first aspect, in some implementations of the first aspect, when scanning the virtual pre-installed application partition, obtaining the soft link under the first directory or the second directory, and scanning and installing the pre-installed application through the soft link, including: when scanning the virtual pre-installed application partition, first scanning the second directory, obtaining the second soft link under the second directory, and scanning and installing the corresponding pre-installed application through the second soft link; then scanning the first directory, obtaining the first soft link under the first directory, and scanning and installing the corresponding pre-installed application through the first soft link.

[0018] Since the AOSP framework typically scans the priv-app directory first and then the app directory when scanning directory paths, the electronic device can also follow this logic when scanning the virtual pre-installed application partition by first scanning the second directory (i.e., the priv-app directory) and then the first directory (i.e., the app directory). Of course, this application does not impose any restrictions on this scanning order.

[0019] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned creation of a virtual pre-installed application partition corresponding to the second system partition under the partition framework where the first system partition is located includes: creating a virtual pre-installed application partition corresponding to the second system partition through an interface provided by the partition framework where the first system partition is located.

[0020] Among them, the electronic device can create a virtual pre-installed application partition under AOSP based on the interface for adding a system partition provided by AOSP, and soft-link pre-installed applications under the non-AOSP framework (such as pre-installed applications in the extended partition) to the virtual pre-installed application partition.

[0021] In combination with the first aspect, in some implementations of the first aspect, the above-mentioned interface is an original equipment manufacturer OEM software development kit SDK interface.

[0022] Exemplarily, the interface for adding a system partition provided by AOSP may be an OEM SDK interface, and the created virtual pre-installed application partition may be an OEM pre-installed partition. The virtual pre-installed application partition may be created in a user directory, for example, in the / data / system / preinstall-app directory.

[0023] In a second aspect, the present application provides a device, which is included in an electronic device and has the function of implementing the electronic device behavior described in the first aspect and possible implementations of the first aspect. The function can be implemented through hardware or through hardware executing corresponding software implementations. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a receiving module or unit, a processing module or unit, etc.

[0024] In a third aspect, the present application provides an electronic device, the electronic device comprising: one or more processors, and a memory;

[0025] The memory is coupled to the one or more processors, and the memory is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute any one of the methods in the technical solution of the first aspect.

[0026] In a fourth aspect, the present application provides a chip system, which is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the method in the first aspect and any possible implementation thereof.

[0027] Optionally, the chip system also includes a memory, and the memory is connected to the processor via circuits or wires.

[0028] Further optionally, the chip system also includes a communication interface.

[0029] In a fifth aspect, the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device executes any one of the methods in the technical solution of the first aspect.

[0030] In a sixth aspect, the present application provides a computer program product, which includes: a computer program code, which, when the computer program code runs on an electronic device, enables the electronic device to execute any one of the methods in the technical solution of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a schematic diagram of system partitioning under the AOSP framework provided in an embodiment of the present application;

[0032] Figure 2 This is a timing flow chart of an example of PMS scanning and installing pre-installed applications in each system partition, provided by the related art;

[0033] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0034] Figure 4 This is a software structure diagram of an electronic device provided in an embodiment of the present application;

[0035] Figure 5 This is a schematic diagram of a design concept for scanning and installing pre-installed applications provided in an embodiment of the present application;

[0036] Figure 6 This is a schematic diagram of a process for creating a virtual pre-installed application partition provided in an embodiment of the present application;

[0037] Figure 7 This is a timing flow diagram of a scanning and installation method for an application provided in an embodiment of the present application;

[0038] Figure 8 This is a flowchart of a scanning installation method for an application provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0040] In the following, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the technical features indicated. Therefore, a feature specified as "first," "second," or "third" may explicitly or implicitly include one or more of the features.

[0041] Currently, electronic devices (such as mobile phones, tablets, etc.) come with some pre-installed applications when they are factory set up or the system is upgraded. For example, when the electronic device is first shipped from the factory, the system comes with three pre-installed applications A, B, and C. Later, when the new version of the system is upgraded, the system upgrade comes with four pre-installed applications A, B, C, and D. These pre-installed applications will be automatically installed on the electronic device during the system startup (such as powering on) of the electronic device, without the need for the user to manually download and install them. For example, the above-mentioned three pre-installed applications A, B, and C can be installed on the electronic device during the first power-on process after the electronic device leaves the factory. After the electronic device is powered on, the user can use these three pre-installed applications normally.

[0042] Typically, pre-installed applications can be placed in different system partitions. During system startup, the electronic device can scan different system partitions to obtain directory paths of pre-installed applications in each system partition, so as to scan and install the pre-installed applications.

[0043] For example, for the native Android open source project (AOSP), the Android package manager service (PMS) is an important component of the Android system. It can manage the installation, uninstallation, and update of all applications in the Android system. Therefore, PMS can be responsible for scanning and installing pre-installed applications. Figure 1 As shown, the system partitions of an electronic device may include a system partition, a product partition, an oem partition, a system_ext partition, etc. Each system partition may include an app directory (such as / system / app) and a priv-app directory (such as / system / priv-app). System applications may be placed in the app directory, and privileged applications may be placed in the priv-app directory. Privileged applications may apply for more system-level permissions than system applications. For example, system-level core applications such as the system user interface (SystemUI) may be placed in the / system / priv-app directory, and basic applications such as calendars, alarms, and weather may be placed in the / system / app directory. Based on these system partitions, during the system startup process of the electronic device, the PMS can scan the files in different directories of all partitions through the partition scanning mechanism (ScanPartition), and organize the directories of all pre-installed applications into a data structure corresponding to the ScanPartition. That is, all system partitions may be scanned first, and then the corresponding directory path of each system partition may be scanned. Based on the directory path, it may be determined whether the corresponding pre-installed application is a system application or a privileged application, so as to perform scanning and installation. For example, if the directory path of a pre-installed application A is / system / app / A, then A is a system application; if the directory path of a pre-installed application B is / system / priv-app / B, then B is a privileged application.

[0044] In the related art, the timing flow chart of PMS scanning and installing pre-installed applications in each system partition can be found in Figure 2 , where the pre-installed application scanning module (InitAppsHelper) and the directory scanning module (ScanPartition) can be sub-modules under PMS, or can be understood as sub-classes under the PMS class. PMS can assign the task of pre-installed application scanning to InitAppsHelper, and the directory path that InitAppsHelper needs to obtain during the pre-installed application scanning process can be scanned and obtained by ScanPartition. Figure 2 As shown, the specific process may include:

[0045] S11, PMS sends a scan message to InitAppsHelper.

[0046] Among them, when the electronic device is in the process of system startup, various corresponding services will also be started. Then, after the PMS is started, it can send a scan message to InitAppsHelper to instruct InitAppsHelper to prepare to start executing the pre-installed application scanning task.

[0047] S12, InitAppsHelper obtains all system partitions in the electronic device.

[0048] The electronic device's partition information can be recorded in the system's partition table. This partition table can record information such as the name, size, and device number of each partition. InitAppsHelper can then retrieve all system partitions of the electronic device from this partition table. For example, InitAppsHelper retrieves all system partitions of the electronic device, including the system partition, product partition, and OEM partition.

[0049] In some implementations, InitAppsHelper may call the getSystemScanPartitions method to obtain all system partitions in the electronic device.

[0050] S13, InitAppsHelper starts to trigger scanning of directory paths for each system partition.

[0051] Based on the above acquisition of all system partitions, InitAppsHelper can trigger a scan of each system partition. In some implementations, InitAppsHelper can call the scanSystemDirs method to trigger a scan of the directory path of each system partition.

[0052] In other implementations, after InitAppsHelper obtains all system partitions in the electronic device, it may also receive a startup message from the PMS. For example, the PMS may instruct InitAppsHelper to start scanning a directory path through the InitSystemApps method.

[0053] It is understood that since there may be multiple system partitions in an electronic device, InitAppsHelper may sequentially execute the following steps S14-S21 for each system partition. Alternatively, if parallel processing capabilities are available, InitAppsHelper may also execute the following steps S14-S21 for each system partition simultaneously.

[0054] S14, InitAppsHelper sends a request to ScanPartition to obtain the priv-app directory path.

[0055] Among them, the specific operation of scanning to obtain the priv-app directory path can be performed by ScanPartition, and then InitAppsHelper can send a request to ScanPartition to obtain the corresponding priv-app directory path.

[0056] In some implementations, InitAppsHelper may send a request to the ScanPartition to obtain the priv-app directory path through the getPrivAppFolder method.

[0057] S15, ScanPartition scans the priv-app directory.

[0058] S16, ScanPartition returns the priv-app directory to InitAppsHelper.

[0059] In other words, ScanPartition can scan the directories under the system partition, first obtain and return the priv-app directory, which is the directory corresponding to the privileged application.

[0060] S17, InitAppsHelper scans and installs privileged applications according to the priv-app directory.

[0061] Among them, InitAppsHelper can scan and install privileged applications in the priv-app directory in turn, and at the same time, it can also add a PRIVILLEGED tag to each privileged application to represent the attributes of each application.

[0062] In some implementations, InitAppsHelper can scan and install privileged applications through the scanDirTracedL1 method.

[0063] S18, InitAppsHelper sends a request to ScanPartition to obtain the app directory path.

[0064] Among them, the specific operation of scanning and obtaining the app directory path can also be performed by ScanPartition, so InitAppsHelper can send a request to ScanPartition to obtain the corresponding app directory path.

[0065] In some implementations, InitAppsHelper may send a request to ScanPartition to obtain the app directory path through the getAppFolder method.

[0066] S19, ScanPartition scans to the app directory.

[0067] S20, ScanPartition returns the app directory to InitAppsHelper.

[0068] In other words, ScanPartition can scan the directories under the system partition, and obtain and return the app directory, which is the directory corresponding to the system application.

[0069] S21, InitAppsHelper scans and installs system applications according to the app directory.

[0070] Among them, InitAppsHelper can scan and install the system applications in the app directory in turn. At the same time, it can also add a SYSTEM tag to each system application to represent the properties of each application.

[0071] In some implementations, InitAppsHelper can scan and install system applications through the scanDirTracedL1 method.

[0072] It can be understood that the process of S14-S21 must be executed for each system partition. For example, when the system partition includes a system partition, a product partition, and an OEM partition, it is necessary to scan the system partition to obtain the corresponding priv-app directory and app directory respectively, scan the product partition to obtain the corresponding priv-app directory and app directory respectively, and scan the OEM partition to obtain the corresponding priv-app directory and app directory respectively.

[0073] For the above Figure 2The process shown is the pre-installed application scanning and installation process supported under the AOSP framework, and the system partitions obtained by InitAppsHelper are also system partitions supported by AOSP. However, with the continuous development and update of electronic devices, there may be pre-installed applications in electronic devices that are not placed in the system partition supported by AOSP, but are placed in some extended partitions (such as product_h partitions), which will result in the inability to scan all pre-installed applications. In some scenarios, in the extended partition, all pre-installed applications may be placed in the app directory, and it is necessary to distinguish between privileged applications and system applications based on some configuration files. This is also different from the placement path of pre-installed applications under the AOSP framework. Therefore, the above-mentioned traditional scanning and installation method cannot be adapted to various electronic devices, and the scanning installation program of some electronic devices needs to be modified to scan and install pre-installed programs for the system partitions supported by AOSP and the system partitions not supported by AOSP respectively. These modifications are usually more complicated and may increase the difficulty of tasks such as upgrading the electronic device system.

[0074] In view of this, an embodiment of the present application provides a method for scanning and installing applications. An electronic device can create a virtual pre-installed application partition under the AOSP framework. The virtual pre-installed application partition is a system partition supported by AOSP, and a soft link is created in the virtual pre-installed application partition to link to the installation file of the actual pre-installed application. Then, when the PMS starts to scan and install the pre-installed application, it can directly scan the virtual pre-installed application partition to simplify the scanning and installation process of the electronic device for various pre-installed applications and reduce the difficulty of tasks such as upgrading the electronic device system.

[0075] It can be understood that the scanning and installation method of the application provided in the embodiment of the present application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other electronic devices that can be pre-installed with applications. The embodiment of the present application does not impose any restrictions on the specific type of electronic device.

[0076] For example, Figure 31 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identity module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0077] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, an audio digital signal processor (ADSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0078] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0079] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0080] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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.

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

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

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

[0084] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0085] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0086] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can 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 can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0087] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0088] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present application, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0089] Figure 4 This is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.

[0090] like Figure 4 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

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

[0092] like Figure 4 As shown, the application framework layer may include a package management service PMS, a pre-installed application scanning service, a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0093] The PMS manages the installation, uninstallation, and update of all applications in the Android system, as well as scanning and installing pre-installed applications. Upon receiving instructions from the PMS, the pre-installed application scanning service creates a virtual pre-installed application partition and corresponding soft links to the actual pre-installed applications. The window manager manages window programs. It can obtain the display size, determine whether a status bar is present, lock the screen, and take screenshots. The content provider stores and retrieves data and makes it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and the phone book. The view system includes visual controls, such as those for displaying text and images. The view system can be used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon can include a view for displaying text and a view for displaying images. The call manager provides communication functionality for the electronic device 100, such as managing call status (including connected and ended calls). The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, and video files. The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0094] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for scheduling and management of the Android system.

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

[0096] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0097] The system library can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc. The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.

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

[0099] For ease of understanding, the following examples of this application will be described with Figure 3 and Figure 4 Taking the electronic device with the structure shown as an example, the scanning and installation method of the application provided in the embodiment of the present application is specifically explained in combination with the accompanying drawings and application scenarios.

[0100] First, let's briefly introduce the design idea of scanning and installing pre-installed applications in this embodiment of the application. Figure 5 As shown, under the AOSP framework, the PMS can scan and obtain the system partitions supported by AOSP, obtain a system partition list (such as AOSPScanPartitions), and then scan and install the pre-installed applications in each system partition. Based on this, the electronic device of the embodiment of the present application can create a virtual pre-installed application partition under AOSP based on the interface for adding system partitions provided by AOSP, and add pre-installed applications under the non-AOSP framework (such as pre-installed applications in the extended partition) to the scan list corresponding to the virtual pre-installed application partition. Exemplarily, the interface for adding system partitions provided by AOSP can be an original equipment manufacturer (OEM) software development kit (SDK) interface, the virtual pre-installed application partition created can be an OEM pre-installed partition, and the scan list corresponding to the virtual pre-installed application partition can be OEM ScanPartition. Therefore, when scanning the pre-installed applications under AOSP, the PMS can first scan the pre-installed applications in the system partition list (such as AOSP ScanPartitions), and then scan the scan list corresponding to the virtual pre-installed application partition to complete the scanning and installation process of all pre-installed applications.

[0101] exist Figure 5 As shown on the basis of Figure 6 As shown, it is a schematic diagram of the process of creating a virtual pre-installed application partition. For the AOSP pre-installed application scanner, the AOSP system partition list scanning function and the virtual pre-installed application partition scanning function can be realized. The directory structure corresponding to the AOSP system partition list scanning function can be seen above. Figure 1 As shown, the scanning installation process can be seen in the above Figure 2 As shown. As for the virtual pre-installed application partition scanning function, the electronic device needs to first create a virtual pre-installed application partition (such as an OEM pre-installed partition); optionally, the virtual pre-installed application partition can be created in the user directory, for example, in the / data / system / preinstall-app directory. Then, the electronic device can create an app directory and a priv-app directory in the virtual pre-installed application partition to form a scan list (such as OEM ScanPartition), wherein system applications (such as OEM pre-installed system applications) can be placed in the app directory, and privileged applications (such as OEM pre-installed privileged applications) can be placed in the priv-app directory; optionally, the electronic device can also create a nosys-app directory in the virtual pre-installed application partition to place non-system applications, such as some third-party applications. Next, the electronic device needs to create a soft link in the virtual pre-installed application partition to link to pre-installed applications under the non-AOSP framework (such as pre-installed applications in the extended partition). These pre-installed applications may all be placed in the app directory in the extended partition. Since the app directory and priv-app directory have been created in the virtual pre-installed application partition, the electronic device needs to determine which pre-installed applications are system applications and which pre-installed applications are privileged applications, so as to accurately link system applications to the app directory and privileged applications to the priv-app directory.

[0102] For example, pre-installed applications in the extended partition, while all placed in the app directory, may have corresponding configuration files. This configuration file contains attribute tags for each pre-installed application, which can be used to indicate whether the pre-installed application is a system application or a privileged application. For example, the configuration file can be stored in the / etc / xml directory of the extended partition, and the electronic device can access the configuration file through this directory. For another example, the configuration file may include files such as DelAPKInstallListRelease.txt and APKInstallListRelease.txt.

[0103] For example, assuming that the extended partition is a product_h partition, and that the product_h partition contains pre-installed applications apk-1, apk-2, and so on, the electronic device determines through the attribute tags recorded in the configuration file that apk-1 is a system application and apk-2 is a privileged application. Then, the electronic device can further determine that apk-1 needs to be soft-linked to the app directory in the virtual pre-installed application partition, and apk-2 needs to be soft-linked to the priv-app directory in the virtual pre-installed application partition. For example, a soft link corresponding to apk-1 can be created in the app directory, linked to the actual apk-1, and a soft link corresponding to apk-2 can be created in the priv-app directory, linked to the actual apk-2.

[0104] It can be understood that since electronic devices may include multiple extended partitions, multiple virtual pre-installed application partitions can be created, one virtual pre-installed partition corresponds to one extended partition, and then the above-mentioned soft link creation process is performed on each virtual pre-installed partition to link each pre-installed application to the AOSP framework.

[0105] Based on the above Figure 6 During the process of creating a virtual pre-installed application partition, the PMS can reuse the above Figure 2 The scanning installation process shown in the figure performs AOSP pre-installed application scanning, wherein the pre-installed application scanning service can also be a subclass in PMS, which is used to create a virtual pre-installed application partition. Specifically, Figure 7 This is a timing flow diagram of a scanning and installation method for an application provided in an embodiment of the present application, the method comprising:

[0106] S71: The PMS sends a first message to the pre-installed application scanning service.

[0107] When the electronic device starts up its system, various corresponding services will also be started. After the PMS starts up, it can send a first message to the pre-installed application scanning service to instruct the pre-installed application scanning service to create a virtual pre-installed application partition.

[0108] S72: The pre-installed application scanning service creates a virtual pre-installed application partition and creates a soft link to the corresponding pre-installed application.

[0109] The S72 process performed by the pre-installed application scanning service can be referred to in the above Figure 6 As shown in the process, after this process, each directory (including the app directory and the priv-app directory) in the virtual pre-installed application partition created by the pre-installed application scanning service can correspond to an actual pre-installed application.

[0110] In some implementations, the pre-installed application scanning service may call the createVirtualScanPartitions method to create virtual pre-installed application partitions, where the number of virtual pre-installed application partitions created is at least one.

[0111] S73: The pre-installed application scanning service returns the creation result to the PMS.

[0112] After the pre-installed application scanning service completes the creation of the virtual pre-installed application partition, the creation result can be returned to the PMS so that the PMS can trigger and start the subsequent scanning and installation process.

[0113] In some implementations, the preinstalled application scanning service may return the creation result to the PMS through the addVirtualScanPartition method.

[0114] S74, PMS sends a scan message to InitAppsHelper.

[0115] Since the virtual pre-installed application partition has been created, PMS can reuse the scanning and installation process of the above-mentioned AOSP framework to scan the partitions corresponding to all pre-installed applications under the AOSP framework. Therefore, PMS can send a scan message to InitAppsHelper to instruct InitAppsHelper to prepare to start executing the pre-installed application scanning task.

[0116] S75, InitAppsHelper obtains all system partitions in the electronic device.

[0117] The electronic device's partition information can be recorded in the system's partition table, which can record information such as the name, size, and device number of each partition. InitAppsHelper can then retrieve all system partitions in the electronic device from the partition table. It should be noted that all system partitions retrieved here include the actual system partitions in the electronic device under the AOSP framework and the virtual pre-installed application partitions created above.

[0118] For example, InitAppsHelper obtains all system partitions of the electronic device, including the system partition, product partition, OEM partition, and the created OEM pre-installed partition.

[0119] In some implementations, InitAppsHelper may call the getSystemScanPartitions method to obtain all system partitions in the electronic device.

[0120] S76, InitAppsHelper starts to trigger scanning of directory paths for each system partition.

[0121] Based on the above acquisition of all system partitions, InitAppsHelper can trigger a scan of each system partition. In some implementations, InitAppsHelper can call the scanSystemDirs method to trigger a scan of the directory path of each system partition.

[0122] In other implementations, after InitAppsHelper obtains all system partitions in the electronic device, it may also receive a startup message from the PMS. For example, the PMS may instruct InitAppsHelper to start scanning a directory path through the InitSystemApps method.

[0123] It is understood that since an electronic device may have multiple system partitions, InitAppsHelper may sequentially execute the following steps S77-S84 for each system partition. Alternatively, if parallel processing is available, InitAppsHelper may simultaneously execute the following steps S77-S84 for each system partition.

[0124] The following describes the scanning process of the created virtual pre-installed application partition as an example. For the scanning process of the actual AOSP system partition, please refer to the above Figure 2 The process shown.

[0125] S77, InitAppsHelper sends a request to ScanPartition to obtain the priv-app directory path.

[0126] Among them, the specific operation of scanning to obtain the priv-app directory path can be performed by ScanPartition, and then InitAppsHelper can send a request to ScanPartition to obtain the corresponding priv-app directory path.

[0127] In some implementations, InitAppsHelper may send a request to the ScanPartition to obtain the priv-app directory path through the getPrivAppFolder method.

[0128] S78, ScanPartition scans the priv-app directory.

[0129] S79, ScanPartition returns the priv-app directory to InitAppsHelper.

[0130] That is to say, ScanPartition can scan the directory under the virtual pre-installed application partition, first obtain and return the priv-app directory, that is, the directory corresponding to the privileged application under the virtual pre-installed application partition.

[0131] S80, InitAppsHelper scans and installs privileged applications through soft links according to the priv-app directory.

[0132] Among them, since there is no actual privileged application in the priv-app directory, but it is connected to the actual privileged application through a soft link, InitAppsHelper can scan the soft links in the priv-app directory in turn, link to the actual privileged application for scanning and installation, and at the same time, add a PRIVILLEGED tag to each privileged application to represent the attributes of each application.

[0133] In some implementations, InitAppsHelper can scan and install privileged applications through the scanDirTracedL1 method.

[0134] S81, InitAppsHelper sends a request to ScanPartition to obtain the app directory path.

[0135] Among them, the specific operation of scanning and obtaining the app directory path can also be performed by ScanPartition, so InitAppsHelper can send a request to ScanPartition to obtain the corresponding app directory path.

[0136] In some implementations, InitAppsHelper may send a request to ScanPartition to obtain the app directory path through the getAppFolder method.

[0137] S82, ScanPartition scans to the app directory.

[0138] S83, ScanPartition returns the app directory to InitAppsHelper.

[0139] That is to say, ScanPartition can scan the directory under the virtual pre-installed application partition, and obtain and return the app directory, that is, the directory corresponding to the system application under the virtual pre-installed application partition.

[0140] S84, InitAppsHelper scans and installs system applications through soft links according to the app directory.

[0141] Among them, since there is no actual system application under the priv-app directory, but it is connected to the actual system application through a soft link, InitAppsHelper can scan the soft links in the app directory in turn, link to the actual system application for scanning and installation, and at the same time, add a SYSTEM tag to each system application to represent the properties of each application.

[0142] In some implementations, InitAppsHelper can scan and install system applications through the scanDirTracedL1 method.

[0143] It can be understood that the electronic device needs to execute the S77-S84 process for each system partition and the virtual pre-installed application partition, wherein each system partition can be scanned first and then the virtual pre-installed application partition can be scanned, or the virtual pre-installed application partition can be scanned first and then each system partition can be scanned. The embodiment of the present application does not limit this.

[0144] It can also be understood that the above embodiment is illustrated by first scanning the priv-app directory in the system partition and then scanning the app directory as an example. Of course, the app directory can also be scanned first and then the priv-app directory. The embodiment of the present application does not limit this.

[0145] With the scanning and installation method for the above-mentioned applications, the electronic device can create a virtual pre-installed application partition under the AOSP framework. The virtual pre-installed application partition is a system partition supported by AOSP, and a soft link is created in the virtual pre-installed application partition to link to the installation file of the actual pre-installed application. Then, when the PMS starts to scan and install the pre-installed applications, it can directly scan the virtual pre-installed application partition to simplify the scanning and installation process of the electronic device for various pre-installed applications and reduce the difficulty of tasks such as upgrading the electronic device system.

[0146] Based on the above Figure 7 Description of the illustrated embodiment, Figure 8 This is a flowchart of a scanning and installation method for an application provided in an embodiment of the present application. The method can be executed by an electronic device and may specifically include:

[0147] S101: During the process of starting up the electronic device system, a virtual pre-installed application partition is created.

[0148] Among them, the startup process of the electronic device here can be the first startup process of the electronic device after leaving the factory, or the startup process after the electronic device system is upgraded, or the startup process of the electronic device each time it is turned off and then turned on. The embodiment of the present application does not limit this.

[0149] During the process of starting up the electronic device system, the created virtual pre-installed application partition may be, for example, an OEM pre-installed system application.

[0150] S102: Create a first directory and a second directory in a virtual pre-installed application partition.

[0151] The first directory may be an app directory, and the second directory may be a priv-app directory.

[0152] S103: Create a first soft link in the first directory, linking to the first application; create a second soft link in the second directory, linking to the second application.

[0153] The first application may be a system application in the extended partition, and the second application may be a privileged application in the extended partition. The attribute tags of the first application and the second application may be determined according to the content recorded in the configuration file.

[0154] S104 , when performing scanning and installation of pre-installed applications, scan and install the first application through the first soft link, and scan and install the second application through the second soft link.

[0155] That is, the electronic device can connect to the actual pre-installed application in the form of a soft link, obtain the installation file of the pre-installed application, and complete the scanning and installation of the pre-installed application.

[0156] With the scanning and installation method for the above-mentioned applications, the electronic device can create a virtual pre-installed application partition and create a soft link in the virtual pre-installed application partition, linking to the installation file of the actual pre-installed application. Then, when the electronic device starts to scan and install the pre-installed application, it can directly scan the virtual pre-installed application partition to simplify the scanning and installation process of the electronic device for various pre-installed applications and reduce the difficulty of tasks such as upgrading the electronic device system.

[0157] The above describes in detail an example of a scanning and installation method for an application provided in an embodiment of the present application. It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

[0158] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each function can be divided into various functional modules, such as a detection unit, a processing unit, a display unit, etc., or two or more functions can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0159] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0160] The electronic device provided in this embodiment is used to execute the scanning and installation method of the above application, and thus can achieve the same effect as the above implementation method.

[0161] When integrated, the electronic device may also include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the operation of the electronic device. The storage module may be used to support the execution of program code and data stored in the electronic device. The communication module may be used to support communication between the electronic device and other devices.

[0162] The processing module may be a processor or controller. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.

[0163] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 3 Device with the structure shown.

[0164] The present application also provides a computer-readable storage medium that stores a computer program. When the computer program is executed by a processor, the processor executes the scanning and installation method of the application according to any of the above embodiments. The storage medium may include a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.

[0165] An embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the scanning and installation method of the application in the above-mentioned embodiment.

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

[0167] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0168] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by 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.

[0169] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0170] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A scanning and installation method for an application, the method being executed by an electronic device, characterized in that: The electronic device includes a first system partition and a second system partition, the second system partition and the first system partition are in different partition frameworks, and a preinstalled application is placed in the second system partition. The method includes: During the process of starting the electronic device system, creating a virtual pre-installed application partition corresponding to the second system partition under the partition framework where the first system partition is located; Creating a first directory and a second directory in the virtual pre-installed application partition; Creating a soft link in the first directory or the second directory based on the attributes of the preinstalled application in the second system partition to link to the preinstalled application; When scanning and installing the pre-installed application, the pre-installed application is scanned and installed through the soft link.

2. The scanning and installation method of the application according to claim 1, characterized in that: The creating a soft link in the first directory or the second directory based on the attribute of the preinstalled application in the second system partition to link to the preinstalled application includes: Obtaining attributes of the preinstalled applications from a configuration file corresponding to the second system partition, wherein the preinstalled applications include a first application and a second application, the first application being a system application and the second application being a privileged application; In a case where the attribute of the pre-installed application is a system application, creating a first soft link in the first directory to link to the first application; In a case where the attribute of the pre-installed application is a privileged application, a second soft link is created in the second directory to link to the second application.

3. The scanning and installation method of the application according to claim 2, characterized in that: Scanning and installing the pre-installed application through the soft link includes: Obtaining the installation file of the first application through the first soft link, and scanning and installing the first application; The installation file of the second application is obtained through the second soft link, and the second application is scanned and installed.

4. The scanning installation method of an application according to any one of claims 1 to 3, characterized in that: When performing the scanning and installation of the pre-installed application, scanning and installing the pre-installed application through the soft link includes: When triggering to start scanning and installing pre-installed applications, obtaining all system partitions in the electronic device, wherein all system partitions include the first system partition and the virtual pre-installed application partition; Scanning the directory paths in all the system partitions in sequence; When scanning to the virtual pre-installed application partition, a soft link under the first directory or the second directory is obtained, and the pre-installed application is scanned and installed through the soft link.

5. The scanning and installation method of the application according to claim 4, characterized in that: The step of obtaining a soft link under the first directory or the second directory when scanning the virtual pre-installed application partition, and scanning and installing the pre-installed application through the soft link, includes: When scanning the virtual pre-installed application partition, first scan the second directory, obtain the second soft link under the second directory, and scan and install the corresponding pre-installed application through the second soft link; Then scan the first directory to obtain the first soft link under the first directory, and scan and install the corresponding pre-installed application through the first soft link.

6. The scanning installation method for an application according to any one of claims 1 to 5, characterized in that: The step of creating a virtual pre-installed application partition corresponding to the second system partition within the partition framework where the first system partition is located includes: A virtual pre-installed application partition corresponding to the second system partition is created through an interface provided by the partition framework where the first system partition is located.

7. The scanning and installation method of the application according to claim 6, characterized in that: The interface is an original equipment manufacturer OEM software development kit SDK interface.

8. The scanning installation method of the application according to claim 6 or 7, characterized in that: The partition framework in which the first system partition is located is the Android open source project AOSP framework.

9. The scanning installation method for an application according to any one of claims 1 to 8, characterized in that: The first directory is the app directory, and the second directory is the priv-app directory.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors, and memory; The memory is coupled to the one or more processors, and the memory is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the scanning and installation method of the application as described in any one of claims 1 to 9.

11. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the electronic device to execute the scanning and installation method of the application as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium includes instructions, and when the instructions are executed on an electronic device, the electronic device executes the scanning and installation method for an application according to any one of claims 1 to 9.

13. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is run on an electronic device, the electronic device is caused to execute the scanning and installation method for an application according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Terminal device pre-loaded application management method and terminal device

    CN106406919A

  • Android system storage space structure construction method and device and construction structure thereof

    CN110543369A

  • System application upgrading system based on Android framework

    CN112925549A

  • Integrated consumable data management system & platform

    WO2017015636A1

  • Method for identifying SDK in application, terminal, and server

    WO2023169212A1