Method, device and electronic equipment for starting an android application in a linux system
By running an Android container within a Linux system and utilizing Android system services to generate desktop files, Android applications can be launched directly, solving the problem of complex cross-system data interaction and achieving fast startup and performance improvement.
Patent Information
- Application Number
- CN202111518955.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2041-12-14
AI Technical Summary
Existing technologies for launching Android applications on Linux systems involve complex cross-system data interactions, leading to a decrease in system performance.
Running an Android container within a Linux system, and triggering it by listening to the desktop icon, utilizes PKMS in the Android system service to generate desktop files, directly launching Android applications without cross-system data interaction.
It improves the startup speed of Android applications, enhances system performance, and reduces complexity.
Smart Images

Figure CN113934464B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to the technical field of Linux and Android compatibility. BACKGROUND
[0002] The method is implemented by using a method of Inter-Process Communication (IPC). First, the Linux system and the Android system are synchronized, and then the Linux system acquires the installed Android application information from the PKMS (Package Manager) in the Android system based on the IPC, and displays the corresponding Android application icon on the desktop of the Linux system. When the user clicks the icon, the corresponding Android application is started through the IPC.
[0003] However, the above scheme involves cross-system data interaction, which is not only complex, but also affects the starting speed of the Linux system and the starting speed of the Android application, and reduces the performance of the system. SUMMARY
[0004] The present disclosure provides a method and device for starting an Android application in a Linux system, an electronic device, a storage medium and a computer program product.
[0005] According to an aspect of the present disclosure, a method for starting an Android application in a Linux system is provided, comprising:
[0006] listening to an icon on the desktop of the Linux system being triggered, wherein an Android container is running in the Linux system, and an Android system service has been started in the Android container;
[0007] obtaining a desktop file corresponding to the icon;
[0008] determining that the Android application is started according to the trigger request according to the desktop file, and obtaining file package information of the Android application;
[0009] sending the file package information to the Android system service, and triggering the Android system service to start the Android application according to the file package information.
[0010] According to another aspect of the present disclosure, a device for starting an Android application in a Linux system is provided, comprising:
[0011] The listening module is configured to listen to that an icon on a desktop of a Linux system is triggered, the Linux system runs an Android container, and an Android system service has been started in the Android container.
[0012] The obtaining module is configured to obtain a desktop file corresponding to the icon.
[0013] The determining module is configured to determine, according to the desktop file, that the trigger request starts an Android application, and obtain file package information of the Android application.
[0014] The control module is configured to send the file package information to the Android system service, and trigger the Android system service to start the Android application according to the file package information.
[0015] According to another aspect of the present disclosure, an electronic device is provided, comprising:
[0016] at least one processor; and
[0017] a memory connected to the at least one processor in communication; wherein
[0018] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method in any embodiment of the present disclosure.
[0019] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method in any embodiment of the present disclosure.
[0020] According to another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method in any embodiment of the present disclosure.
[0021] The technical solution of the embodiments of the present disclosure runs an Android container in a Linux system and starts an Android system service, and when it is listened that an icon on a desktop of the Linux system is triggered, if it is determined according to a desktop file corresponding to the icon that the trigger request starts an Android application, the file package information of the Android application is sent to the Android system service, and the Android system service is triggered to start the Android application according to the file package information, without the synchronous running of the Linux and Android dual systems, the Android application can be started in the Linux system. Since no cross-system data interaction is involved, the complexity is reduced, the starting speed of the Android application is improved, and the performance of the system is improved.
[0022] It should be understood that nothing in this section is intended to limit the scope of the embodiments of the present disclosure. Other aspects of the present disclosure will become apparent to those of ordinary skill in the art upon reviewing the description below in conjunction with the accompanying figures. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings are included to provide a further understanding of the present application, and are incorporated in and constitute a part of this specification. Illustrations in the drawings are for purposes of illustrating an implementation of the present application and are not intended to limit the present application.
[0024] Figure 1 is a schematic diagram of a method for starting an Android application in a Linux system according to an embodiment of the present disclosure;
[0025] Figure 2 is a schematic diagram of a method for starting an Android application in a Linux system according to another embodiment of the present disclosure;
[0026] Figure 3a is a schematic diagram of a prior art dual system framework according to an embodiment of the present disclosure;
[0027] Figure 3b is a schematic diagram of a Linux system framework containing an Android container according to an embodiment of the present disclosure;
[0028] Figure 4 is a schematic diagram of a process for generating a desktop file for an Android application according to an embodiment of the present disclosure;
[0029] Figure 5 is a schematic diagram of a process for starting a Linux system according to an embodiment of the present disclosure;
[0030] Figure 6 is a schematic diagram of a process for starting an Android application in an Android container in a Linux system according to an embodiment of the present disclosure;
[0031] Figure 7 is a block diagram of an apparatus for starting an Android application in a Linux system according to an embodiment of the present disclosure;
[0032] Figure 8 is a block diagram of an electronic device for implementing a method for starting an Android application in a Linux system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are included to provide a thorough understanding of embodiments of the present disclosure and are not intended to be limiting. One of ordinary skill in the art will immediately appreciate the benefits offered by the embodiments of the present disclosure upon a reading of the description of the embodiments below in conjunction with the accompanying drawings.
[0034] The technical scheme of the embodiment of the present disclosure is applied to a Linux system, the Linux system runs an Android container, and the Android container starts an Android system service, including but not limited to: PKMS or AMS (Activity Manager Service). Through the Android system service started in the Linux system, the starting of the Android application is realized, without cross-system data interaction, thereby improving the speed of starting the Android application in the Linux system and improving the system performance.
[0035] Figure 1 The method for starting an Android application in the Linux system of an embodiment of the present disclosure is shown in a schematic diagram. As shown in the figure, the method comprises the following steps. Figure 1
[0036] S101: It is detected that an icon on the desktop of the Linux system is triggered, an Android container is running in the Linux system, and an Android system service has been started in the Android container.
[0037] S102: A desktop file corresponding to the icon is acquired.
[0038] S103: The Android application is started according to the desktop file, and file package information of the Android application is acquired.
[0039] S104: The file package information is sent to the Android system service, and the Android system service is triggered to start the Android application according to the file package information.
[0040] In the embodiment of the present disclosure, the Android system service refers to Service, one of the four components of the Android system. It is an Android component that is specially used to process long-time tasks in the background, does not provide interface presentation, and is a solution for realizing the background running of programs in Android. It is very suitable for executing tasks that do not need to interact with the user and require long-time running. The running of the service does not depend on any user interface, and even if the program is switched to the background or the user opens another application, the service can still run normally.
[0041] In an implementation manner, the method further comprises the following steps.
[0042] When the Android application is installed in the Android container, the PKMS in the Android system service generates a desktop file according to the installation information of the Android application, and adds an Android identifier in the desktop file to identify that the application corresponding to the desktop file is an Android application.
[0043] The desktop file of the generated Android application is saved locally on the Linux system, so that the Linux system can directly read the desktop file information when starting, without reading the installation information from the PMS of the Android system, thereby shortening the running time and improving the starting speed of the Linux system.
[0044] In the embodiments of the present disclosure, the PKMS is one of the core services in the Android system, and manages all package-related work, such as application installation, application uninstallation, application information query, and the like.
[0045] In an embodiment, the PKMS adds an Android identifier in the desktop file to identify the application corresponding to the desktop file as an Android application, including:
[0046] The PKMS sets the value corresponding to the specified keyword in the desktop file as the Android identifier to identify the application corresponding to the desktop file as an Android application.
[0047] In an embodiment, the above determining to trigger the request to start the Android application according to the desktop file includes:
[0048] Determining to trigger the request to start the Android application by judging the specified keyword in the desktop file, if the value corresponding to the specified keyword is the Android identifier.
[0049] In an embodiment, when the Android application is installed in the Android container, the package management service PKMS in the Android system service generates the desktop file according to the installation information of the Android application, including:
[0050] When the Android application is installed in the Android container, the PKMS in the Android system service obtains the installation information of the Android application from the manifest configuration file, and generates the desktop file according to the installation information.
[0051] In the embodiments of the present disclosure, the manifest configuration file refers to the AndroidManifest.xml file.
[0052] In an embodiment, the above sending the file package information to the Android system service to trigger the Android system service to start the Android application according to the file package information includes:
[0053] The file package information is sent to the activity management service AMS in the Android system service through inter-process communication, to trigger the AMS to start the Android application according to the file package information.
[0054] The Android application is started in the Linux system based on the IPC mechanism, without cross-system interaction, thereby reducing system consumption, improving system performance, improving the starting speed of the Android application, and realizing the fast starting of the Android application in the Linux system.
[0055] In an implementation, the method further includes:
[0056] When the Android application is installed in the Android container, a desktop file is generated according to installation information of the Android application and saved to a specified directory; and the Linux system displays an application icon corresponding to the newly added desktop file on a desktop of the Linux system when the Linux system detects that the newly added desktop file is added to the specified directory.
[0057] The above method enables the icon of the Android application to be quickly displayed on the desktop of the Linux system when the Linux system is started, thereby improving the speed of displaying the icon of the Android application on the Linux system.
[0058] The above method provided by the embodiments of the present disclosure enables the Android application to be started in the Linux system without the Linux and Android dual systems being synchronously run. Since no cross-system data interaction is involved, the complexity is reduced, the starting speed of the Android application is improved, and the performance of the system is improved.
[0059] Figure 2 FIG. 1 is a schematic diagram of a method for starting an Android application in a Linux system according to an embodiment of the present disclosure. As shown in the figure, the method includes: Figure 2
[0060] S201: When an Android application is installed in an Android container of a Linux system, a PKMS in the Android container generates a desktop file according to installation information of the Android application.
[0061] In the embodiments of the present disclosure, an Android system service has been started in the Android container, including but not limited to: a PKMS and an AMS (Activity Manager Service). The AMS is a very important service in Android, which manages the four components of Android and uniformly schedules various application processes.
[0062] In the embodiments of the present disclosure, the desktop file (Desktop Entry) refers to a.desktop file, which is a file used to describe program starting configuration information in a Linux desktop system. The.desktop file has a.desktop suffix, which is equivalent to a desktop shortcut in a Windows system.
[0063] In an implementation, step S201 can include:
[0064] When the Android application is installed in the Android container of the Linux system, the PKMS in the Android container obtains the installation information of the Android application from a manifest configuration file, and generates the desktop file according to the installation information.
[0065] S202: The PKMS sets the value corresponding to the specified keyword in the desktop file to an Android identifier, identifies the application corresponding to the desktop file as an Android application, and saves the desktop file to a specified directory;
[0066] The specified directory for saving the desktop file can be set as needed, such as the / usr / share / applications directory, and is not limited in particular.
[0067] S203: When the Linux system detects that a new desktop file is added to the specified directory, the application icon corresponding to the new desktop file is displayed on the desktop of the Linux system;
[0068] S204: When it is detected that an icon on the desktop of the Linux system is triggered, the desktop file corresponding to the icon is obtained;
[0069] S205: The specified keyword in the desktop file is judged, and if the corresponding value is an Android identifier, it is determined that an Android application is requested to be started, and the file package information of the Android application is obtained;
[0070] The specified keyword can be set as needed, such as setting the Categories attribute as the specified keyword, and is not limited in particular. The content and length of the above-mentioned Android identifier are also not limited, as long as they can distinguish whether the desktop file corresponds to an Android application or a Linux application.
[0071] In the embodiments of the present disclosure, the file package of the Android application refers to APK (Android application Package), which is an application package file format used by the Android operating system to distribute and install mobile applications and middleware.
[0072] S206: The file package information is sent to the AMS in the Android container through inter-process communication, and the AMS is triggered to start the Android application according to the file package information.
[0073] In the embodiments of the present disclosure, IPC refers to the communication or exchange of information between different processes. There is a corresponding IPC mechanism under any operating system. The process address space under the IPC mechanism is independent of each other, and each process has a different user address space, and the processes cannot access each other and must exchange data through the kernel. Inter-process communication usually uses the following communication methods: half-duplex Unix pipe, FIFO named pipe, message queue (Message Queue), semaphore (Semaphore), shared memory, socket (Socket), etc. Since the file manager and the PKMS are two different processes, data transmission between processes needs to be through the IPC inter-process communication method.
[0074] Figure 3a Figure 1 is a schematic diagram of a prior art dual-system framework for an embodiment of the present disclosure. As shown in Figure 1, in the prior art, a Linux system and an Android system run simultaneously in one device, and the two systems communicate with each other. In order to realize the communication, data interaction across the systems is required, which is complicated and causes the system to run slowly and the Android application to start slowly. Figure 3a
[0075] Figure 3b Figure 2 is a schematic diagram of a Linux system framework containing an Android container for an embodiment of the present disclosure. As shown in Figure 2, in an embodiment, the Android can be started in the form of a container in the Linux system. The advantage of this form is that the Linux and Android dual systems do not need to run synchronously, but the corresponding functions are realized through the Android system service started in the Android container, which reduces the complexity of the system, is more convenient and fast to operate, and further improves the starting efficiency of the Android application. Figure 3b
[0076] Figure 4 Figure 3 is a schematic diagram of a process of generating an Android application desktop file according to an embodiment of the present disclosure. As shown in Figure 3, the process includes: Figure 4
[0077] S401: The Android container in the Linux system starts to install an Android application.
[0078] S402: The AndroidManifest.xml file of the Android application is parsed.
[0079] Exemplarily, this step can be performed by the PKMS in the Android container.
[0080] In an embodiment of the present disclosure, the AndroidManifest.xml file is an information description file of the entire application program in the Android system, which defines the Activity, Service, Content provider and BroadcastReceiver component information contained in the application program. Each application program must contain an AndroidManifest.xml file in the root directory, and the file name cannot be modified.
[0081] S403: The file package name, application name, icon position and activity (MainActivity) information are read.
[0082] Among them, the file package name refers to the name of the installation file package of the Android application, and the application name refers to the name of the Android application.
[0083] S404: generate a corresponding desktop file according to the read information, and add an Android string in the Categories attribute of the desktop file to identify the application corresponding to the desktop file as an Android application;
[0084] In addition, the Android string can also be added in other keywords in the desktop file, and the embodiment is not limited specifically.
[0085] S405: save the desktop file to a specified directory;
[0086] For example, the desktop file can be saved to / usr / share / applications, and the embodiment is not limited specifically.
[0087] S406: save the Android application icon corresponding to the desktop file to a specified directory;
[0088] For example, the Android application icon can be saved to / usr / share / icons / hicolor / scalable, and the embodiment is not limited specifically.
[0089] Correspondingly, when uninstalling an Android application, the corresponding desktop file under / usr / share / applications is deleted, and the corresponding application icon under / usr / share / icons / hicolor / scalable is deleted.
[0090] S407: the Linux system displays the Android application icon on the desktop.
[0091] Figure 5 is a flowchart of a Linux system started according to an embodiment of the present disclosure. As shown in Figure 5 , the flowchart includes:
[0092] S501: the Linux system starts and runs an Android container;
[0093] S502: start a Linux service and start an Android service in the Android container;
[0094] The started Android service includes at least PKMS and AMS.
[0095] S503: traverse all desktop files in a specified directory;
[0096] For example, the specified directory can be / usr / share / applications, and the embodiment is not limited specifically.
[0097] S504: parse each desktop file to read the corresponding application icon and display it on the Linux desktop.
[0098] S505: Listening to the desktop file in the specified directory;
[0099] S506: Determining whether to add a new desktop file, if yes, performing S504; otherwise, performing S505.
[0100] Figure 6 is a flowchart of starting an Android application in a Linux system according to an embodiment of the present disclosure. As shown in the figure, the flowchart includes: Figure 6
[0101] S601: An application icon on the Linux system desktop is clicked;
[0102] wherein an Android container is running in the Linux system, and an Android system service such as AMS has been started in the Android container.
[0103] S602: Parsing the desktop file corresponding to the application icon;
[0104] S603: Determining whether the Categories attribute in the desktop file is an Android string, if yes, performing S604; otherwise, performing S607;
[0105] S604: Reading the data in the Exec parameter;
[0106] wherein the data in the Exec parameter is used to start an Android application.
[0107] S605: Sending the data in the Exec parameter to the AMS of the Android container through IPC;
[0108] S606: Starting the corresponding Android application according to the received data by the AMS, and the flowchart ends;
[0109] S607: Determining that the application corresponding to the above desktop file is a Linux application, running the Linux application, and the flowchart ends.
[0110] The above method provided by the embodiments of the present disclosure can start an Android application in a Linux system without synchronous running of the Linux and Android dual systems. Since no cross-system data interaction is involved, the complexity is reduced, the starting speed of the Android application is improved, and the performance of the system is improved.
[0111] Figure 7 is a block diagram of an apparatus for starting an Android application in a Linux system according to an embodiment of the present disclosure. As shown in the figure, the apparatus includes: Figure 7
[0112] The listening module 701 is configured to listen to that an icon on a desktop of a Linux system is triggered, that an Android container is running in the Linux system, and that an Android system service has been started in the Android container.
[0113] The obtaining module 702 is configured to obtain a desktop file corresponding to the icon.
[0114] The determining module 703 is configured to determine, according to the desktop file, that an Android application is started according to a triggering request, and to obtain file package information of the Android application.
[0115] The control module 704 is configured to send the file package information to the Android system service, and to trigger the Android system service to start the Android application according to the file package information.
[0116] In an embodiment, the apparatus further includes:
[0117] The generating module is configured to generate, by a package management service (PKMS) in the Android system service, the desktop file according to installation information of the Android application when the Android application is installed in the Android container.
[0118] The adding module is configured to add, by the PKMS, an Android identifier in the desktop file, so as to identify that an application corresponding to the desktop file is the Android application.
[0119] In an embodiment, the adding module is specifically configured to:
[0120] The PKMS sets a value corresponding to a specified keyword in the desktop file as the Android identifier, so as to identify that an application corresponding to the desktop file is the Android application.
[0121] In an embodiment, the determining module includes:
[0122] The determining unit is configured to determine, according to a specified keyword in the desktop file, that the Android application is started according to the triggering request if a value corresponding to the specified keyword is the Android identifier.
[0123] In an embodiment, the generating module is specifically configured to:
[0124] The PKMS in the Android system service obtains installation information of the Android application from a manifest configuration file when the Android application is installed in the Android container, and generates the desktop file according to the installation information.
[0125] In an embodiment, the control module is specifically configured to:
[0126] The control module sends the file package information to an activity management service (AMS) in the Android system service through inter-process communication, and triggers the AMS to start the Android application according to the file package information.
[0127] In an embodiment, the apparatus further includes:
[0128] The generating module is configured to generate a desktop file according to installation information of the Android application and save the desktop file to a specified directory when the Android application is installed in the Android container.
[0129] The display module is configured to display an application icon corresponding to the newly added desktop file on a desktop of the Linux system when the Linux system detects that there is a newly added desktop file in the specified directory.
[0130] The above device provided by the embodiments of the present disclosure can start the Android application in the Linux system without synchronous running of the Linux and Android dual systems. Since no cross-system data interaction is involved, the complexity is reduced, the starting speed of the Android application is improved, and the performance of the system is improved.
[0131] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.
[0132] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0133] As shown in Figure 8 The device 800 includes a computing unit 801 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. Various programs and data required for the operation of the device 800 can also be stored in the RAM 803. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0134] A plurality of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0135] The computing unit 801 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above. For example, in some embodiments, the above-described methods can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded onto the RAM 803 and executed by the computing unit 801, one or more steps of the above-described methods can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the above-described methods by any other appropriate means, such as by means of firmware.
[0136] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0137] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0138] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0139] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0140] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0141] The computer system can include clients and servers. This relationship can be. The servers are typically remote from the clients with the interactions between them occurring over a communication network. The relationship between client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The servers can be cloud servers, servers of a distributed system, or servers incorporating blockchain.
[0142] It should be understood that the steps shown in the various forms above can be reordered, added to, or deleted from. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present disclosure are achieved, which is not limited herein.
[0143] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A method for launching an Android application in a Linux system, comprising: When an Android application is installed in an Android container running within a Linux system, the Android system service that has been started in the Android container generates a desktop file for the Linux system based on the installation information of the Android application. The generated desktop file is saved to a specified directory, and an Android identifier is added to the desktop file to identify the application corresponding to the desktop file as an Android application. When the Linux system detects a newly added desktop file in the specified directory, it displays the application icon corresponding to the newly added desktop file on the desktop of the Linux system. The Linux system detected that an icon on the desktop was being triggered. The Linux system obtains the desktop file corresponding to the icon; The Linux system determines the trigger request to launch the Android application based on the Android identifier in the desktop file and obtains the file package information of the Android application. The Linux system sends the file package information to the Android system service, triggering the Android system service to launch the Android application based on the file package information.
2. The method according to claim 1, wherein, When an Android application is installed in an Android container running within a Linux system, the Android system service already running in the Android container generates a desktop file for the Linux system based on the installation information of the Android application. An Android identifier is added to the desktop file to identify the application corresponding to the desktop file as an Android application, including: When an Android application is installed in an Android container running within a Linux system, the Package Management Service (PKMS) in the Android system services already started in the Android container generates the desktop file of the Linux system based on the installation information of the Android application. The PKMS adds an Android identifier to the desktop file to identify the application corresponding to the desktop file as an Android application.
3. The method according to claim 2, wherein, The PKMS adds an Android identifier to the desktop file to identify the application corresponding to the desktop file as an Android application, including: The PKMS sets the value corresponding to a specified keyword in the desktop file to an Android identifier to identify the application corresponding to the desktop file as an Android application.
4. The method according to claim 3, wherein, The Linux system determines the trigger request to launch the Android application based on the Android identifier in the desktop file, including: The Linux system determines the specified keyword in the desktop file; If the value corresponding to the specified keyword is an Android identifier, then it is determined that the trigger request starts the Android application.
5. The method according to claim 2, wherein, When an Android application is installed in an Android container running within a Linux system, the Package Management Service (PKMS) in the Android system services already started in the Android container generates the desktop file for the Linux system based on the installation information of the Android application, including: When an Android application is installed in an Android container running within a Linux system, the Package Management Service (PKMS) in the Android system services already started in the Android container obtains the installation information of the Android application from the manifest configuration file and generates the desktop file of the Linux system based on the installation information.
6. The method according to claim 1, wherein, The Linux system sends the file package information to the Android system service, triggering the Android system service to launch the Android application based on the file package information, including: The Linux system sends the file package information to the Activity Management Service (AMS) in the Android system services via inter-process communication, triggering the AMS to launch the Android application based on the file package information.
7. A device for launching Android applications in a Linux system, comprising: The generation module is used to generate a desktop file for the Linux system based on the installation information of the Android application when an Android application is installed in an Android container running within a Linux system. The generated desktop file is then saved to a specified directory. An add module is used by the Android system service to add an Android identifier to the desktop file to identify the application corresponding to the desktop file as an Android application; The display module is used to display the application icon corresponding to the newly added desktop file on the desktop of the Linux system when the Linux system detects that a new desktop file has been added in the specified directory. The monitoring module is used by the Linux system to listen for the presence of an icon on the desktop that triggers a notification. The acquisition module is used by the Linux system to obtain the desktop file corresponding to the icon; The determination module is used by the Linux system to determine the trigger request to start the Android application based on the Android identifier in the desktop file, and to obtain the file package information of the Android application. The control module is used to send the file package information from the Linux system to the Android system service, triggering the Android system service to start the Android application based on the file package information.
8. The apparatus according to claim 7, wherein, The generation module is used to: when an Android application is installed in an Android container running within a Linux system, the package management service PKMS in the Android system service that has been started in the Android container generates the desktop file of the Linux system based on the installation information of the Android application; The adding module is used to: add an Android identifier to the desktop file by the PKMS to identify the application corresponding to the desktop file as an Android application.
9. The apparatus according to claim 8, wherein, The added module is specifically used for: The PKMS sets the value corresponding to a specified keyword in the desktop file to an Android identifier to identify the application corresponding to the desktop file as an Android application.
10. The apparatus according to claim 9, wherein, The determining module includes: The determining unit is used by the Linux system to determine the specified keyword in the desktop file. If the value corresponding to the specified keyword is an Android identifier, then it is determined that the trigger request is to start the Android application.
11. The apparatus according to claim 8, wherein, The generation module is specifically used for: When an Android application is installed in an Android container running within a Linux system, the Package Management Service (PKMS) in the Android system service that has been started in the Android container obtains the installation information of the Android application from the manifest configuration file, and generates the desktop file of the Linux system based on the installation information.
12. The apparatus according to claim 7, wherein, The control module is specifically used for: The Linux system sends the file package information to the Activity Management Service (AMS) in the Android system services via inter-process communication, triggering the AMS to launch the Android application based on the file package information.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
Citation Information
Patent Citations
Method and system for running Linux application on Android operating system and system
CN105204913A
Android cloud application server and Android cloud application server system
CN105491021A
Method and system for running applications without installation in Android system
CN107220083A
Method of running Android application across systems, terminal and storage medium
CN108170503A
Multi-system virtualized mobile equipment
CN108304248A