WO2023109138A1 - Linux系统中启动安卓应用的方法、装置和电子设备 - Google Patents
Linux系统中启动安卓应用的方法、装置和电子设备 Download PDFInfo
- Publication number
- WO2023109138A1 WO2023109138A1 PCT/CN2022/108371 CN2022108371W WO2023109138A1 WO 2023109138 A1 WO2023109138 A1 WO 2023109138A1 CN 2022108371 W CN2022108371 W CN 2022108371W WO 2023109138 A1 WO2023109138 A1 WO 2023109138A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- android
- file
- application
- desktop
- android application
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 68
- 230000001960 triggered effect Effects 0.000 claims abstract description 14
- 238000009434 installation Methods 0.000 claims description 24
- 238000004891 communication Methods 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 19
- 230000000694 effects Effects 0.000 claims description 8
- 238000012544 monitoring process Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 17
- 230000008569 process Effects 0.000 description 13
- 230000003993 interaction Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 230000009977 dual effect Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000007788 liquid Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 230000007480 spreading Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/04817—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
Definitions
- the present disclosure relates to the field of computer technology, in particular to the field of Linux and Android compatible technology.
- a dual-system IPC Inter-Process Communication, inter-process communication
- IPC Inter-Process Communication, inter-process communication
- the present disclosure provides a method, device, electronic device, storage medium, computer program product and computer program for starting an Android application in a Linux system.
- a method for starting an Android application in a Linux system including:
- a device for starting an Android application in a Linux system including:
- the monitoring module is used to monitor that an icon is triggered on the desktop of the Linux system, and the Android container is run in the Linux system, and the Android system service has been started in the Android container;
- An acquisition module configured to acquire the desktop file corresponding to the icon
- a determining module configured to determine the trigger request to start the Android application according to the desktop file, and obtain the file package information of the Android application;
- a control module 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.
- an electronic device including:
- the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method in any embodiment of the present disclosure.
- a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method in any embodiment of the present disclosure.
- a computer program product including a computer program, the computer program implements the method in any embodiment of the present disclosure when executed by a processor.
- a computer program implements the method in any embodiment of the present disclosure when executed by a processor.
- the Android application by running the Android container in the Linux system and starting the Android system service, when an icon on the desktop of the Linux system is detected to be triggered, if the trigger request is determined according to the desktop file corresponding to the icon
- the Android application sends the file package information of the Android application to the Android system service, triggering it to start the Android application according to the file package information, and the Android application can be started in the Linux system without the simultaneous operation of the Linux and Android dual systems. Since no cross-system data interaction is involved, the complexity is reduced, the startup speed of the Android application is improved, and the performance of the system is improved.
- 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
- FIG. 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
- Fig. 3a is a schematic diagram of a dual system framework in the prior art according to an embodiment of the present disclosure
- Fig. 3b is a schematic diagram of a Linux system framework including an Android container according to an embodiment of the present disclosure
- FIG. 4 is a schematic flow diagram of generating an Android application desktop file according to an embodiment of the present disclosure
- Fig. 5 is a schematic flow chart of starting a Linux system according to an embodiment of the present disclosure
- FIG. 6 is a schematic flow diagram of an Android container starting an Android application in a Linux system according to an embodiment of the present disclosure
- FIG. 7 is a block diagram of a device for starting an Android application in a Linux system according to an embodiment of the present disclosure
- FIG. 8 is a block diagram of an electronic device used to implement the method for starting an Android application in a Linux system according to an embodiment of the present disclosure.
- the technical solution of the embodiment of the present disclosure is applied to a Linux system, where an Android container is run in the Linux system, and an Android system service is started in the Android container, including but not limited to: PKMS or AMS (Activity Manager Service, activity management service) .
- PKMS PKMS
- AMS Activity Manager Service, activity management service
- the start of the Android application is realized without cross-system data interaction, which improves the speed of starting the Android application in the Linux system and improves the system performance.
- 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 Figure 1, the method includes:
- S103 Determine the trigger request to start the Android application according to the desktop file, and obtain the file package information of the Android application;
- S104 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.
- the Android system service refers to Service, one of the four major components of the Android system. It is an Android component that handles long-term tasks in the background and does not provide interface rendering. It is a solution for running programs in the background in Android. It's ideal for long-running tasks that don't require user interaction. The operation of the service does not depend on any user interface. Even if the program is switched to the background or the user opens another application, the service can still run normally.
- the above method also includes:
- the PKMS in the Android system service 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 logo to the desktop file to identify the application corresponding to the desktop file as an Android application.
- This way of generating the desktop files of Android applications and saving them locally in the Linux system can ensure that the Linux system can directly read the relevant desktop file information when it is turned on and running, and there is no need to read the relevant installation information from PKMS across the system to the Android system.
- the running time is shortened, and the startup speed of the Linux system is improved.
- PKMS is one of the core services in the Android system, and manages all work related to Package, such as application installation, application uninstallation, application information query, and the like.
- the above-mentioned PKMS adds an Android logo 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 the specified keyword in the desktop file as an Android identifier, so as to identify the application corresponding to the desktop file as an Android application.
- the above-mentioned determination of triggering the request to start the Android application according to the desktop file includes:
- the specified keyword in the desktop file is judged, and if the value corresponding to the specified keyword is an Android identifier, it is determined to trigger a request to start the Android application.
- the package management service PKMS in the Android system service when the above-mentioned Android application is installed in the Android container, the package management service PKMS in the Android system service generates a desktop file according to the installation information of the Android application, including:
- the PKMS in the Android system service obtains the installation information of the Android application from the manifest configuration file, and generates a desktop file according to the installation information.
- the above manifest configuration file refers to the AndroidManifest.xml file.
- the above-mentioned 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, including:
- the file package information is sent to the activity management service AMS in the Android system service through inter-process communication, and the AMS is triggered to start the Android application according to the file package information.
- This IPC-based mechanism starts the Android application in the Linux system without cross-system interaction, reduces system consumption, improves system performance, improves the startup speed of the Android application, and realizes the fast startup of the Android application in the Linux system.
- the above method also includes:
- a desktop file is generated according to the installation information of the Android application and saved in the specified directory; when the Linux system detects that there is a new desktop file in the specified directory, the corresponding application of the newly added desktop file The icon is displayed on the desktop of the Linux system.
- 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, and improves the speed at which the Linux system displays the icon of the Android application.
- the above-mentioned method provided by the embodiment of the present disclosure can start an Android application in a Linux system without the simultaneous operation of the Linux and Android systems. Since no cross-system data interaction is involved, the complexity is reduced, the startup speed of the Android application is improved, and the performance of the system is improved.
- FIG. 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. As shown in Figure 2, the method includes:
- Android system services have been started in the Android container, including but not limited to: PKMS and AMS.
- AMS is a very important service in Android. It coordinates and manages the four major components of Android, and uniformly schedules each application process.
- the desktop file (Desktop Entry) refers to the .desktop file, which is a file used to describe the program startup configuration information in the Linux desktop system. It uses .desktop as the suffix name, which is equivalent to the desktop shortcut under the Windows system. .
- step S201 may include:
- the PKMS in the Android container obtains the installation information of the Android application from the manifest configuration file, and generates a desktop file according to the installation information.
- PKMS sets the value corresponding to the specified keyword in the desktop file as an Android identifier to identify the application corresponding to the desktop file as an Android application, and saves the desktop file to a specified directory;
- the specified directory for saving the desktop file can be set according to needs, such as specifying the /usr/share/applications directory, etc., which is not specifically limited.
- the specified keyword can be set as required, such as setting the Categories property as the specified keyword, etc., which is not specifically limited.
- the content and length of the Android logo are not limited, as long as it can be distinguished whether the desktop file corresponds to an Android application or a Linux application.
- the file package of the Android application refers to APK (Android application Package, Android application package), which is an application package file format used by the Android operating system, and is used for distributing and installing mobile applications and middleware .
- APK Android application Package, Android application package
- S206 Send the file package information to the AMS in the Android container through inter-process communication, and trigger the AMS to start the Android application according to the file package information.
- IPC refers to spreading or exchanging information between different processes.
- the process address spaces under the IPC mechanism are independent of each other, each process has a different user address space, and the processes cannot access each other, and data exchange must be performed through the kernel.
- Inter-process communication usually uses the following communication methods: half-duplex Unix pipes, FIFOs named pipes, message queues (Message Queue), semaphores (Semaphore), shared memory, sockets (Socket) and so on. Since the file manager and PKMS are two different processes, data transfer between processes needs to use IPC inter-process communication.
- Fig. 3a is a schematic diagram of a dual system framework in the prior art according to an embodiment of the present disclosure.
- the Linux system and the Android system run simultaneously in a device, and the two systems communicate between the two systems, which requires cross-system data interaction to achieve communication, which is complex and reduces system performance.
- android apps start slowly.
- Fig. 3b is a schematic diagram of a Linux system framework including an Android container according to an embodiment of the present disclosure.
- Android can be started in the form of a container in the Linux system.
- the advantage of this method is that there is no need to run the dual system of Linux and Android simultaneously, but the Android system started in the Android container Services to achieve the corresponding functions, reducing the complexity of the system, the operation is more convenient and fast, which in turn improves the startup efficiency of Android applications.
- Fig. 4 is a schematic flowchart of generating an Android application desktop file according to an embodiment of the present disclosure. As shown in Figure 4, the process includes:
- this step can be performed by PKMS in the Android container.
- the AndroidManifest.xml file is an information description file of the entire application program in the Android system, and defines the Activity, Service, Content Provider and Broadcast Receiver component information contained in the application program.
- Each application must contain an AndroidManifest.xml file in the root directory, and the file name cannot be modified.
- S403 read file package name, application name, icon position and activity (MainActivity) information
- the file package name refers to the name of the installation file package of the Android application
- the application name refers to the name of the Android application
- S404 Generate a corresponding desktop file according to the read information, and add an Android character string in the Categories attribute of the desktop file to identify the application corresponding to the desktop file as an Android application;
- the Android character string may also be added to other keywords in the desktop file, which is not specifically limited in this embodiment.
- the above desktop file may be saved under /usr/share/applications, which is not specifically limited in this embodiment.
- the Android application icon may be saved under /usr/share/icons/hicolor/scalable, which is not specifically limited in this embodiment.
- S407 The desktop of the Linux system displays the above-mentioned Android application icon.
- Fig. 5 is a schematic flow chart of starting a Linux system according to an embodiment of the present disclosure. As shown in Figure 5, the process includes:
- S501 The Linux system starts and runs the Android container
- S502 Start the Linux service and start the Android service in the Android container;
- the started Android service includes at least PKMS and AMS.
- the above specified directory may be /usr/share/applications, which is not specifically limited in this embodiment.
- S506 Determine whether to add a new desktop file, if so, execute S504; otherwise, execute S505.
- FIG. 6 is a schematic flow diagram of an Android container starting an Android application in a Linux system according to an embodiment of the present disclosure. As shown in Figure 6, the process includes:
- the Linux system runs an Android container, and Android system services such as AMS have been started in the Android container.
- S603 Determine whether the Categories attribute in the desktop file is an Android character string, if yes, execute S604; otherwise, execute S607;
- the data in the Exec parameter is used to start the Android application.
- S605 Send the data in the Exec parameter to the AMS of the Android container through IPC;
- S606 AMS starts the corresponding Android application according to the received data, and the process ends;
- the above-mentioned method provided by the embodiment of the present disclosure can start an Android application in a Linux system without the simultaneous operation of the Linux and Android systems. Since no cross-system data interaction is involved, the complexity is reduced, the startup speed of the Android application is improved, and the performance of the system is improved.
- Fig. 7 is a block diagram of a device for starting an Android application in a Linux system according to an embodiment of the present disclosure. As shown in Figure 7, the device includes:
- the monitoring module 701 is used to monitor that an icon is triggered on the desktop of the Linux system, and there is an Android container running in the Linux system, and the Android system service has been started in the Android container;
- Obtaining module 702 configured to obtain the desktop file corresponding to the icon
- the determination module 703 is used to determine the trigger request to start the Android application according to the desktop file, and obtain the file package information of the Android application;
- the control module 704 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.
- the above-mentioned device also includes:
- a generation module is used to generate a desktop file according to the installation information of the Android application by the package management service PKMS in the Android system service when the Android application is installed in the Android container;
- the adding module is used for adding an Android logo to the desktop file by the PKMS, so as to identify the application corresponding to the desktop file as an Android application.
- the adding module is specifically used for:
- the PKMS sets the value corresponding to the specified keyword in the desktop file as an Android identifier, so as to identify the application corresponding to the desktop file as an Android application.
- the determination module includes:
- the determining unit is configured to judge the specified keyword in the desktop file, and if the value corresponding to the specified keyword is an Android logo, then determine to trigger a request to start the Android application.
- the generating module is specifically used for:
- the package management service PKMS in the Android system service obtains the installation information of the Android application from the manifest configuration file, and generates a desktop file according to the installation information.
- control module is specifically used for:
- the file package information is sent to the activity management service AMS in the Android system service through inter-process communication, and the AMS is triggered to start the Android application according to the file package information.
- the above-mentioned device also includes:
- the generation module is used to generate a desktop file according to the installation information of the Android application when installing the Android application in the Android container and save it in a specified directory;
- the display module is used for displaying the application icon corresponding to the newly added desktop file on the desktop of the Linux system when the Linux system monitors that there is a newly added desktop file in the specified directory.
- the above-mentioned device provided by the embodiment of the present disclosure can start the Android application in the Linux system without the simultaneous operation of the Linux and Android systems. Since no cross-system data interaction is involved, the complexity is reduced, the startup speed of the Android application is improved, and the performance of the system is improved.
- the present disclosure also provides an electronic device, a readable storage medium, a computer program product, and a computer program.
- FIG. 8 shows a schematic block diagram of an example electronic device 800 that may be used to implement embodiments of the present disclosure.
- Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers.
- Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices.
- the components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
- the device 800 includes a computing unit 801 that can be loaded into a random access memory (Random Access Memory, RAM) according to a computer program stored in a read-only memory (Read-Only Memory, ROM) 802 or from a storage unit 808. ) 803 to execute various appropriate actions and processes. In the RAM 803, various programs and data necessary for the operation of the device 800 can also be stored.
- the computing unit 801, ROM 802, and RAM 803 are connected to each other through a bus 804.
- An input/output (Input/Output, I/O) interface 805 is also connected to the bus 804 .
- the I/O interface 805 includes: 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, and the like.
- the communication unit 809 allows the device 800 to exchange information/data with other devices over a computer network such as the Internet and/or various telecommunication networks.
- the computing unit 801 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphic Processing Unit, GPU), various dedicated artificial intelligence (Artificial Intelligence, AI) computing chips, various operating The computing unit of the machine learning model algorithm, the digital signal processor (Digital Singnal Processor, DSP), and any appropriate processor, controller, microcontroller, etc.
- the computing unit 801 executes the various methods and processes described above. For example, in some embodiments, the methods described above may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 808 .
- part or all of the computer program may be loaded and/or installed on the device 800 via the ROM 802 and/or the communication unit 809.
- a computer program is loaded into RAM 803 and executed by computing unit 801, one or more steps of the methods described above may be performed.
- the computing unit 801 may be configured to execute the above-mentioned method in any other appropriate way (for example, by means of firmware).
- programmable processor can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
- Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented.
- the program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
- a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
- a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
- a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
- machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (Erasable Programmable Read-Only Memory, EPROM or flash memory), optical fiber, portable compact disk read-only memory (Portable Compact Disk Read-Only Memory, CD-ROM), optical storage device, magnetic storage device, or any of the above any suitable combination.
- the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (Cathode Ray Tube) or an LCD (Liquid Tube) for displaying information to the user.
- Crystal Display liquid crystal display
- a keyboard and pointing device such as a mouse or a trackball
- Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.
- the systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system.
- the components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (Wide Area Network, WAN), and the Internet.
- a computer system may include clients and servers.
- Clients and servers are generally remote from each other and typically interact through a communication network.
- the relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
- the server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
- steps may be reordered, added or deleted using the various forms of flow shown above.
- each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Human Computer Interaction (AREA)
- Stored Programmes (AREA)
Abstract
本公开提供了一种Linux系统中启动安卓应用的方法、装置、电子设备和存储介质,涉及计算机技术领域。该方法包括:监听到Linux系统的桌面上有图标被触发,该Linux系统内运行有安卓容器,安卓容器中已启动安卓系统服务,获取该图标对应的桌面文件,根据桌面文件确定上述触发请求启动安卓应用,获取安卓应用的文件包信息发送给安卓系统服务,触发其根据文件包信息启动安卓应用。本公开技术方案无需Linux和Android双系统同步运行,就能实现在Linux系统中启动安卓应用,降低了复杂度,提高了Android应用的启动速度,提升了系统的性能。
Description
本申请要求于2021年12月14日提交中国专利局、申请号为202111518955.2、申请名称为“Linux系统中启动安卓应用的方法、装置和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本公开涉及计算机技术领域,尤其涉及Linux和Android兼容技术领域。
目前,在Linux系统中启动Android应用时,通常采用双系统IPC(Inter-Process Communication,进程间通信)的方法来实现。首先同步运行Linux系统和Android系统,然后Linux系统基于IPC从Android系统内的PKMS(Package Manager Service,包管理服务)获取到已安装的Android应用信息,再将对应的Android应用图标显示到Linux系统的桌面上,当用户点击图标时再通过IPC启动相应的Android应用。
但是,上述方案涉及跨系统的数据交互,不仅交互复杂,而且导致Linux系统的启动速度和Android应用的启动速度都受到影响,降低了系统的性能。
发明内容
本公开提供了一种Linux系统中启动安卓应用的方法、装置、电子设备、存储介质、计算机程序产品和计算机程序。
根据本公开的一方面,提供了一种Linux系统中启动安卓应用的方法,包括:
监听到Linux系统的桌面上有图标被触发,所述Linux系统内运行有安卓容器,所述安卓容器中已启动安卓系统服务;
获取所述图标对应的桌面文件;
根据所述桌面文件确定所述触发请求启动安卓应用,获取所述安卓应用的文件包信息;
将所述文件包信息发送给所述安卓系统服务,触发所述安卓系统服务根据所述文件包信息启动所述安卓应用。
根据本公开的另一方面,提供了一种Linux系统中启动安卓应用的装置,包括:
监听模块,用于监听到Linux系统的桌面上有图标被触发,所述Linux系统内运行有安卓容器,所述安卓容器中已启动安卓系统服务;
获取模块,用于获取所述图标对应的桌面文件;
确定模块,用于根据所述桌面文件确定所述触发请求启动安卓应用,获取所述安卓应用的文件包信息;
控制模块,用于将所述文件包信息发送给所述安卓系统服务,触发所述安卓系统服务根据所述文件包信息启动所述安卓应用。
根据本公开的另一方面,提供了一种电子设备,包括:
至少一个处理器;以及
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本公开任一实施例中的方法。
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行本公开任一实施例中的方法。
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现本公开任一实施例中的方法。
根据本公开的另一方面,提供了一种计算机程序,所述计算机程序在被处理器执行时实现本公开任一实施例中的方法。
本公开实施例的技术方案,通过在Linux系统内运行安卓容器以及启动安卓系统服务,在监听到Linux系统的桌面上有图标被触发时,若根据该图标对应的桌面文件确定所述触发请求启动安卓应用,则将安卓应用的文件包信息发送给安卓系统服务,触发其根据文件包信息启动安卓应用,无需Linux和Android双系统同步运行,就能实现在Linux系统中启动安卓应用。由于不涉及跨系统的数据交互,降低了复杂度,提高了Android应用的启动速度,提升了系统的性能。
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。
附图用于更好地理解本方案,不构成对本公开的限定。其中:
图1是根据本公开一实施例Linux系统中启动安卓应用的方法示意图;
图2是根据本公开另一实施例Linux系统中启动安卓应用的方法示意图;
图3a是根据本公开一实施例现有技术双系统框架示意图;
图3b是根据本公开一实施例包含安卓容器的Linux系统框架示意图;
图4是根据本公开一实施例生成安卓应用桌面文件的流程示意图;
图5是根据本公开一实施例Linux系统启动的流程示意图;
图6是根据本公开一实施例Linux系统内安卓容器启动安卓应用的流程示意图;
图7是根据本公开一实施例Linux系统中启动安卓应用的装置框图;
图8是用来实现本公开实施例的Linux系统中启动安卓应用的方法的电子设备的框图。
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
本公开实施例的技术方案应用于Linux系统中,该Linux系统中运行有Android安卓容器,该安卓容器中启动有安卓系统服务,包括但不限于:PKMS或AMS(Activity Manager Service,活动管理服务)。通过Linux系统中启动的安卓系统服务,实现安卓应用的启动,无需跨系统数据交互,提高了Linux系统启动安卓应用的速度,提升了系统性能。
图1为本公开一实施例Linux系统中启动安卓应用的方法示意图。如图1所示,该方法包括:
S101:监听到Linux系统的桌面上有图标被触发,Linux系统内运行有安卓容器,该安卓容器中已启动安卓系统服务;
S102:获取上述图标对应的桌面文件;
S103:根据桌面文件确定上述触发请求启动安卓应用,获取该安卓应用的文件包信息;
S104:将文件包信息发送给安卓系统服务,触发安卓系统服务根据文件包信息启动该安卓应用。
本公开实施例中,安卓系统服务是指安卓系统的四大组件之一Service。它是一个专门在后台处理长时间任务的Android组件,不提供界面呈现,是Android中实现程序后台运行的解决方案。它非常适合执行不需要和用户交互而且还要求长期运行的任务。服务的运行不依赖于任何用户界面,即使程序被切换到后台,或者用户打开了另外一个应用程序,服务仍然能够保持正常运行。
在一种实施方式中,上述方法还包括:
当在安卓容器内安装安卓应用时,安卓系统服务中的PKMS根据安卓应用的安装信息生成桌面文件,在桌面文件中添加安卓标识,以标识桌面文件对应的应用为安卓应用。
这种生成安卓应用的桌面文件并保存在Linux系统本地的方式,可以保证Linux系统在开机运行时就能直接读取到相关桌面文件信息,无需跨系统至安卓系统的PKMS读取相关安装信息,缩短了运行时间,提高了Linux系统的启动速度。
本公开实施例中,PKMS是Android系统中的核心服务之一,管理着所有跟Package相关的工作,比如应用安装、应用卸载或应用信息查询等等。
在一种实施方式中,上述PKMS在桌面文件中添加安卓标识,以标识桌面文件对应的应用为安卓应用,包括:
PKMS将桌面文件中指定关键字对应的值设置为安卓标识,以标识桌面文件对应的应用为安卓应用。
在一种实施方式中,上述根据桌面文件确定触发请求启动安卓应用,包括:
对桌面文件中的指定关键字进行判断,若指定关键字对应的值为安卓标识,则确定触发请求启动安卓应用。
在一种实施方式中,上述当在安卓容器内安装安卓应用时,安卓系统服务中的包管理服务PKMS根据安卓应用的安装信息生成桌面文件,包括:
当在安卓容器内安装安卓应用时,安卓系统服务中的PKMS从清单配置文件中获取安卓应用的安装信息,根据安装信息生成桌面文件。
本公开实施例中,上述清单配置文件是指AndroidManifest.xml文件。
在一种实施方式中,上述将文件包信息发送给安卓系统服务,触发安卓系统服务根据文件包信息启动安卓应用,包括:
通过进程间通信将文件包信息发送给安卓系统服务中的活动管理服务AMS,触发AMS根据文件包信息启动安卓应用。
这种基于IPC机制在Linux系统中启动安卓应用,无需跨系统交互,减少了系统消耗,提高了系统性能,提高了安卓应用的启动速度,实现了Linux系统中安卓应用的快速启动。
在一种实施方式中,上述方法还包括:
当在安卓容器内安装安卓应用时,根据安卓应用的安装信息生成桌面文件并保存到指定目录下;Linux系统监听到指定目录下有新增的桌面文件时,将新增的桌面文件对应的应用图标显示在Linux系统的桌面上。
上述方式使得安卓应用的图标在Linux系统启动时能够快速显示在Linux系统的桌面上,提高了Linux系统显示安卓应用图标的速度。
本公开实施例提供的上述方法,无需Linux和Android双系统同步运行,就能实现在Linux系统中启动安卓应用。由于不涉及跨系统的数据交互,降低了复杂度,提高了Android应用的启动速度,提升了系统的性能。
图2为本公开另一实施例Linux系统中启动安卓应用的方法示意图。如图2所示,该方法包括:
S201:当在Linux系统的安卓容器内安装安卓应用时,安卓容器内的PKMS根据安卓应用的安装信息生成桌面文件;
本公开实施例中,安卓容器内已启动安卓系统服务,包括但不限于:PKMS和AMS。AMS是安卓中很重要的一个服务,它统筹管理着安卓的四大组件,统一调度各应用进程。
本公开实施例中,桌面文件(Desktop Entry)是指.desktop文件,是Linux桌面系统中用于描述程序启动配置信息的文件,它以.desktop为后缀名,相当于Windows系统下的桌面快捷方式。
在一种实施方式中,步骤S201可以包括:
当在Linux系统的安卓容器内安装安卓应用时,安卓容器内的PKMS从清单配置文件中获取安卓应用的安装信息,根据安装信息生成桌面文件。
S202:PKMS将桌面文件中指定关键字对应的值设置为安卓标识,以标识桌面文件对应的应用为安卓应用,将桌面文件保存到指定目录下;
其中,保存桌面文件的指定目录可以根据需要设置,如指定/usr/share/applications目录等,具体不限定。
S203:Linux系统监听到指定目录下有新增的桌面文件时,将新增的桌面文件对应的应用图标显示在Linux系统的桌面上;
S204:监听到Linux系统的桌面上有图标被触发,获取该图标对应的桌面文件;
S205:对该桌面文件中的指定关键字进行判断,若对应的值为安卓标识,则确定请求启动安卓应用,获取该安卓应用的文件包信息;
其中,指定关键字可以根据需要设置,如设置Categories属性为指定关键字等等,具体不限定。上述安卓标识的内容和长度也不限定,只要能够区分该桌面文件对应安卓应用还是对应Linux应用即可。
本公开实施例中,安卓应用的文件包是指APK(Android application Package,安卓应用程序包),它是Android操作系统使用的一种应用程序包文件格式,用于分发和安装移动应用及中间件。
S206:通过进程间通信将文件包信息发送给安卓容器内的AMS,触发AMS根据文件包信息启动该安卓应用。
本公开实施例中,IPC是指在不同进程之间传播或交换信息。在任一种操作系统下都有相应的IPC机制。IPC机制下的进程地址空间相互独立,每个进程各自有不同的用户地址空间,进程之间不能相互访问,必须通过内核才能进行数据交换。进程间通信通常采用以下几种通信方式:半双工Unix管道、FIFOs命名管道、消息队列(Message Queue)、信号量(Semaphore)、共享内存、套接字(Socket)等等。由于文件管理器和PKMS为两个不同的进程,因此进程间传递数据需要通过IPC进程间通信的方式。
图3a为本公开一实施例现有技术双系统框架示意图。如图3a所示,现有技术中,在一个设备中Linux系统和Android系统同时运行,二者进行双系统间通信,需要跨系统的数据交互才能实现通信,复杂度高,造成系统运行性能降低,安卓应用的启动速度较慢。
图3b为本公开一实施例包含安卓容器的Linux系统框架示意图。如图3b所示,在一种实施方式中,可以在Linux系统中以容器的方式启动Android,这种方式的好处是无需同步运行Linux和Android双系统,而是通过安卓容器中启动的安卓系统服务来实现相应的功能,降低了系统的复杂性,操作更方便快捷,进而也提高了安卓应用的启动效率。
图4是根据本公开一实施例生成安卓应用桌面文件的流程示意图。如图4所示,该流程包括:
S401:Linux系统内的安卓容器启动安装安卓应用;
S402:解析安卓应用的AndroidManifest.xml文件;
示例性地,本步骤可以由安卓容器内的PKMS来执行。
本公开实施例中,AndroidManifest.xml文件是安卓系统内整个应用程序的信息描述文件,定义了应用程序中包含的Activity,Service,Content provider和Broadcast Receiver组件信息。每个应用程序在根目录下必须包含一个AndroidManifest.xml文件,且文件名不能修改。
S403:读取文件包名、应用名、图标位置和活动(MainActivity)信息;
其中,文件包名是指上述安卓应用的安装文件包的名称,应用名是指该安卓应用的名称。
S404:根据读取的信息生成对应的桌面文件,并在该桌面文件的Categories属性中添加安卓字符串,以标识该桌面文件对应的应用为安卓应用;
其中,也可以在桌面文件中的其他关键字中添加安卓字符串,本实施例具体不限定。
S405:将上述桌面文件保存到指定目录下;
示例性地,可以将上述桌面文件保存到/usr/share/applications下,本实施例具体不限定。
S406:将该桌面文件对应的安卓应用图标保存到指定目录下;
示例性地,可以将安卓应用图标保存到/usr/share/icons/hicolor/scalable下,本实施例具体不限定。
相应的,当卸载一个安卓应用时,将/usr/share/applications下的对应桌面文件删除,以及/usr/share/icons/hicolor/scalable下的对应应用图标删除。
S407:Linux系统的桌面显示上述安卓应用图标。
图5是根据本公开一实施例Linux系统启动的流程示意图。如图5所示,该流程包括:
S501:Linux系统启动并运行安卓容器;
S502:启动Linux服务以及在安卓容器中启动安卓服务;
其中,启动的安卓服务至少包括PKMS和AMS。
S503:遍历指定目录下的所有桌面文件;
示例性地,上述指定目录可以为/usr/share/applications,本实施例具体不限定。
S504:解析每个桌面文件读取对应的应用图标并显示到Linux的桌面上;
S505:监听上述指定目录下的桌面文件;
S506:判断是否增加新的桌面文件,如果是,则执行S504;否则,执行S505。
图6是根据本公开一实施例Linux系统内安卓容器启动安卓应用的流程示意图。如图6所示,该流程包括:
S601:Linux系统桌面上的应用图标被点击;
其中,Linux系统中运行有安卓容器,安卓容器中已启动AMS等安卓系统服务。
S602:解析该应用图标对应的桌面文件;
S603:判断桌面文件中的Categories属性是否为安卓字符串,如果是,则执行S604;否则,执行S607;
S604:读取Exec参数中的数据;
其中,Exec参数中的数据用于启动安卓应用。
S605:通过IPC把Exec参数中的数据发送给安卓容器的AMS;
S606:AMS根据收到的数据启动相应的安卓应用,流程结束;
S607:确定上述桌面文件对应的应用为Linux应用,运行该Linux应用,流程结束。
本公开实施例提供的上述方法,无需Linux和Android双系统同步运行,就能实现在Linux系统中启动安卓应用。由于不涉及跨系统的数据交互,降低了复杂度,提高了Android应用的启动速度,提升了系统的性能。
图7是根据本公开一实施例Linux系统中启动安卓应用的装置框图。如图7所示,该装置包括:
监听模块701,用于监听到Linux系统的桌面上有图标被触发,Linux系统内运行有安卓容器,安卓容器中已启动安卓系统服务;
获取模块702,用于获取图标对应的桌面文件;
确定模块703,用于根据桌面文件确定触发请求启动安卓应用,获取安卓应用的文件包信息;
控制模块704,用于将文件包信息发送给安卓系统服务,触发安卓系统服务根据文件包信息启动安卓应用。
在一种实施方式中,上述装置还包括:
生成模块,用于当在安卓容器内安装安卓应用时,由安卓系统服务中的包管理服务PKMS根据安卓应用的安装信息生成桌面文件;
添加模块,用于由PKMS在桌面文件中添加安卓标识,以标识桌面文件对应的应用为安卓应用。
在一种实施方式中,添加模块具体用于:
由PKMS将桌面文件中指定关键字对应的值设置为安卓标识,以标识桌面文件对应的应用为安卓应用。
在一种实施方式中,确定模块包括:
确定单元,用于对桌面文件中的指定关键字进行判断,若指定关键字对应的值为安卓标识,则确定触发请求启动安卓应用。
在一种实施方式中,生成模块具体用于:
当在安卓容器内安装安卓应用时,由安卓系统服务中的包管理服务PKMS从清单配置文件中获取安卓应用的安装信息,根据安装信息生成桌面文件。
在一种实施方式中,控制模块具体用于:
通过进程间通信将文件包信息发送给安卓系统服务中的活动管理服务AMS,触发AMS根据文件包信息启动安卓应用。
在一种实施方式中,上述装置还包括:
生成模块,用于当在安卓容器内安装安卓应用时,根据安卓应用的安装信息生成桌面文件并保存到指定目录下;
显示模块,用于Linux系统监听到指定目录下有新增的桌面文件时,将新增的桌面文件对应的应用图标显示在Linux系统的桌面上。
本公开实施例提供的上述装置,无需Linux和Android双系统同步运行,就能实现在Linux系统中启动安卓应用。由于不涉及跨系统的数据交互,降低了复杂度,提高了Android应用的启动速度,提升了系统的性能。
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质、一种计算机程序产品和一种计算机程序。
图8示出了可以用来实施本公开的实施例的示例电子设备800的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本公开的实现。
如图8所示,设备800包括计算单元801,其可以根据存储在只读存储器(Read-Only Memory,ROM)802中的计算机程序或者从存储单元808加载到随机访问存储器(Random Access Memory,RAM)803中的计算机程序,来执行各种适当的动作和处理。在RAM 803中,还可存储设备800操作所需的各种程序和数据。计算单元801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(Input/Output,I/O)接口805也连接至总线804。
设备800中的多个部件连接至I/O接口805,包括:输入单元806,例如键盘、鼠标等;输出单元807,例如各种类型的显示器、扬声器等;存储单元808,例如磁盘、光盘等;以及通信单元809,例如网卡、调制解调器、无线通信收发机等。通信单元809允许设备800通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。
计算单元801可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元801的一些示例包括但不限于中央处理单元(Central Processing Unit,CPU)、图形处理单元(Graphic Processing Unit,GPU)、各种专用的人工智能(Artificial Intelligence,AI) 计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(Digital Singnal Processor,DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元801执行上文所描述的各个方法和处理。例如,在一些实施例中,上述方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元808。在一些实施例中,计算机程序的部分或者全部可以经由ROM 802和/或通信单元809而被载入和/或安装到设备800上。当计算机程序加载到RAM 803并由计算单元801执行时,可以执行上文描述的方法的一个或多个步骤。备选地,在其他实施例中,计算单元801可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行上述方法。
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(Field-Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Product,ASSP)、芯片上系统的系统(System-on-a-chip,SOC)、负载可编程逻辑设备(Complex Programmable Logic Device,CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM或快闪存储器)、光纤、 便捷式紧凑盘只读存储器(Portable Compact Disk Read-Only Memory,CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(Cathode Ray Tube,阴极射线管)或者LCD(Liquid Crystal Display,液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(Local Area Network,LAN)、广域网(Wide Area Network,WAN)和互联网。
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,也可以为分布式系统的服务器,或者是结合了区块链的服务器。
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。
Claims (18)
- 一种Linux系统中启动安卓应用的方法,包括:监听到Linux系统的桌面上有图标被触发,所述Linux系统内运行有安卓容器,所述安卓容器中已启动安卓系统服务;获取所述图标对应的桌面文件;根据所述桌面文件确定所述触发请求启动安卓应用,获取所述安卓应用的文件包信息;将所述文件包信息发送给所述安卓系统服务,触发所述安卓系统服务根据所述文件包信息启动所述安卓应用。
- 根据权利要求1所述的方法,还包括:当在所述安卓容器内安装安卓应用时,所述安卓系统服务中的包管理服务PKMS根据所述安卓应用的安装信息生成桌面文件;所述PKMS在所述桌面文件中添加安卓标识,以标识所述桌面文件对应的应用为安卓应用。
- 根据权利要求2所述的方法,其中,所述PKMS在所述桌面文件中添加安卓标识,以标识所述桌面文件对应的应用为安卓应用,包括:所述PKMS将所述桌面文件中指定关键字对应的值设置为安卓标识,以标识所述桌面文件对应的应用为安卓应用。
- 根据权利要求3所述的方法,其中,所述根据所述桌面文件确定所述触发请求启动安卓应用,包括:对所述桌面文件中的所述指定关键字进行判断;若所述指定关键字对应的值为安卓标识,则确定所述触发请求启动安卓应用。
- 根据权利要求2-4中任一项所述的方法,其中,所述当在所述安卓容器内安装安卓应用时,所述安卓系统服务中的包管理服务PKMS根据所述安卓应用的安装信息生成桌面文件,包括:当在所述安卓容器内安装安卓应用时,所述安卓系统服务中的包管理服务PKMS从清单配置文件中获取所述安卓应用的安装信息,根据所述安装信息生成桌面文件。
- 根据权利要求1-5中任一项所述的方法,其中,所述将所述文件包信息发送给所述安卓系统服务,触发所述安卓系统服务根据所述文件包信息启动所述安卓应用,包括:通过进程间通信将所述文件包信息发送给所述安卓系统服务中的活动管理服务AMS,触发所述AMS根据所述文件包信息启动所述安卓应用。
- 根据权利要求1-6中任一项所述的方法,还包括:当在所述安卓容器内安装安卓应用时,根据所述安卓应用的安装信息生成桌面文件并保存到指定目录下;所述Linux系统监听到所述指定目录下有新增的桌面文件时,将所述新增的桌面文件对应的应用图标显示在所述Linux系统的桌面上。
- 一种Linux系统中启动安卓应用的装置,包括:监听模块,用于监听到Linux系统的桌面上有图标被触发,所述Linux系统内运行有安卓容器,所述安卓容器中已启动安卓系统服务;获取模块,用于获取所述图标对应的桌面文件;确定模块,用于根据所述桌面文件确定所述触发请求启动安卓应用,获取所述安卓应用的文件包信息;控制模块,用于将所述文件包信息发送给所述安卓系统服务,触发所述安卓系统服务根据所述文件包信息启动所述安卓应用。
- 根据权利要求8所述的装置,还包括:生成模块,用于当在所述安卓容器内安装安卓应用时,由所述安卓系统服务中的包管理服务PKMS根据所述安卓应用的安装信息生成桌面文件;添加模块,用于由所述PKMS在所述桌面文件中添加安卓标识,以标识所述桌面文件对应的应用为安卓应用。
- 根据权利要求9所述的装置,其中,所述添加模块具体用于:由所述PKMS将所述桌面文件中指定关键字对应的值设置为安卓标识,以标识所述桌面文件对应的应用为安卓应用。
- 根据权利要求10所述的装置,其中,所述确定模块包括:确定单元,用于对所述桌面文件中的所述指定关键字进行判断,若所述指定关键字对应的值为安卓标识,则确定所述触发请求启动安卓应用。
- 根据权利要求9-11中任一项所述的装置,其中,所述生成模块具体用于:当在所述安卓容器内安装安卓应用时,由所述安卓系统服务中的包管理服务PKMS从清单配置文件中获取所述安卓应用的安装信息,根据所述安装信息生成桌面文件。
- 根据权利要求8-12中任一项所述的装置,其中,所述控制模块具体用于:通过进程间通信将所述文件包信息发送给所述安卓系统服务中的活动管理服务AMS,触发所述AMS根据所述文件包信息启动所述安卓应用。
- 根据权利要求8-13中任一项所述的装置,还包括:生成模块,用于当在所述安卓容器内安装安卓应用时,根据所述安卓应用的安装信息生成桌面文件并保存到指定目录下;显示模块,用于所述Linux系统监听到所述指定目录下有新增的桌面文件时,将所述新增的桌面文件对应的应用图标显示在所述Linux系统的桌面上。
- 一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-7中任一项所述的方法。
- 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1-7中任一项所述的方法。
- 一种计算机程序产品,包括计算机程序,其中,所述计算机程序被至少一个处理器执行时实现权利要求1-7中任一项所述的方法。
- 一种计算机程序,其中,所述计算机程序在被至少一个处理器执行时实现权利要求1-7中任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111518955.2A CN113934464A (zh) | 2021-12-14 | 2021-12-14 | Linux系统中启动安卓应用的方法、装置和电子设备 |
CN202111518955.2 | 2021-12-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023109138A1 true WO2023109138A1 (zh) | 2023-06-22 |
Family
ID=79288946
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/108371 WO2023109138A1 (zh) | 2021-12-14 | 2022-07-27 | Linux系统中启动安卓应用的方法、装置和电子设备 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113934464A (zh) |
WO (1) | WO2023109138A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117056173A (zh) * | 2023-10-12 | 2023-11-14 | 麒麟软件有限公司 | 在Web操作系统上监控安卓应用生命周期的方法 |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114035863A (zh) * | 2021-11-11 | 2022-02-11 | 北京鲸鲮信息系统技术有限公司 | 在Linux系统中操作安卓应用的方法、装置和设备 |
CN113934464A (zh) * | 2021-12-14 | 2022-01-14 | 北京鲸鲮信息系统技术有限公司 | Linux系统中启动安卓应用的方法、装置和电子设备 |
CN116775118A (zh) * | 2022-03-09 | 2023-09-19 | 华为技术有限公司 | 一种跨系统运行应用程序的方法及电子设备 |
CN114385047A (zh) * | 2022-03-24 | 2022-04-22 | 北京麟卓信息科技有限公司 | Linux平台上基于Intent的安卓应用文件发送方法 |
CN114816585B (zh) * | 2022-06-20 | 2022-09-02 | 北京麟卓信息科技有限公司 | 一种跨运行环境的远程输入重定向方法 |
CN114860327B (zh) * | 2022-07-07 | 2022-09-23 | 北京麟卓信息科技有限公司 | 一种安卓兼容环境中安卓应用的快速启动方法 |
CN117971334A (zh) * | 2022-10-25 | 2024-05-03 | 华为技术有限公司 | 应用的功能界面的打开方法、装置和终端设备 |
CN117234655B (zh) * | 2023-11-13 | 2024-01-26 | 成都阿加犀智能科技有限公司 | 基于安卓系统运行Linux桌面程序的方法、装置、设备及介质 |
CN118377585B (zh) * | 2024-06-25 | 2024-09-17 | 成都阿加犀智能科技有限公司 | 一种Docker容器在安卓系统应用的方法、装置、介质及设备 |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111625246A (zh) * | 2020-05-15 | 2020-09-04 | 武汉蓝星科技股份有限公司 | 一种Linux-Android终端双系统的桌面管理方法 |
US20210105340A1 (en) * | 2019-10-08 | 2021-04-08 | Magic Leap, Inc. | Methods, systems, and computer program products for implementing cross-platform mixed-reality applications with a scripting framework |
CN113254154A (zh) * | 2021-05-21 | 2021-08-13 | 技德技术研究所(武汉)有限公司 | 一种在Linux上兼容运行Android系统的应用启动方法及装置 |
CN113687888A (zh) * | 2021-05-18 | 2021-11-23 | 麒麟软件有限公司 | 在Linux系统上兼容运行Android应用的文件分享方法 |
CN113934464A (zh) * | 2021-12-14 | 2022-01-14 | 北京鲸鲮信息系统技术有限公司 | Linux系统中启动安卓应用的方法、装置和电子设备 |
CN114035863A (zh) * | 2021-11-11 | 2022-02-11 | 北京鲸鲮信息系统技术有限公司 | 在Linux系统中操作安卓应用的方法、装置和设备 |
CN114077367A (zh) * | 2021-11-29 | 2022-02-22 | 北京鲸鲮信息系统技术有限公司 | Linux系统中实现安卓应用快捷方式的方法和装置 |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101876906B (zh) * | 2010-03-31 | 2013-08-21 | 北京播思软件技术有限公司 | 一种利用Linux应用在Android系统中运行的方法及装置 |
US20130091557A1 (en) * | 2011-10-11 | 2013-04-11 | Wheel Innovationz, Inc. | System and method for providing cloud-based cross-platform application stores for mobile computing devices |
EP3561672B1 (en) * | 2015-04-07 | 2022-06-01 | Huawei Technologies Co., Ltd. | Method and apparatus for a mobile device based cluster computing infrastructure |
CN105204913A (zh) * | 2015-10-20 | 2015-12-30 | 福建升腾资讯有限公司 | 一种在Android操作系统上运行Linux应用程序的方法及系统 |
CN105491021A (zh) * | 2015-11-24 | 2016-04-13 | 华东师范大学 | 一种Android云应用服务器及Android云应用服务器系统 |
CN107220083B (zh) * | 2017-05-22 | 2020-12-18 | 南京航空航天大学 | 一种安卓系统中免安装运行应用程序的方法和系统 |
CN108304248A (zh) * | 2017-12-19 | 2018-07-20 | 西安电子科技大学 | 一种多系统虚拟化的移动设备 |
CN108170503B (zh) * | 2018-01-24 | 2022-04-12 | 腾讯科技(深圳)有限公司 | 一种跨系统运行安卓应用的方法、终端及存储介质 |
CN111026406A (zh) * | 2018-10-09 | 2020-04-17 | 中兴通讯股份有限公司 | 应用运行方法、设备和计算机可读存储介质 |
CN112068968B (zh) * | 2019-06-11 | 2022-10-18 | 成都鼎桥通信技术有限公司 | 一种双系统终端的服务访问方法和装置 |
CN112073448B (zh) * | 2019-06-11 | 2022-10-11 | 成都鼎桥通信技术有限公司 | 一种双系统终端的服务隔离方法和装置 |
KR102235556B1 (ko) * | 2019-12-12 | 2021-04-02 | 숭실대학교산학협력단 | 안드로이드 어플리케이션에 의해 실행 가능한 보안 컨테이너 구축 장치, 방법 및 그 프로그램이 기록된 컴퓨터로 읽을 수 있는 기록매체 |
CN112099923B (zh) * | 2020-11-17 | 2021-02-05 | 江苏北弓智能科技有限公司 | 一种运行于Linux操作系统上的Android虚拟化系统 |
CN113190282B (zh) * | 2021-04-07 | 2024-04-09 | 北京字节跳动网络技术有限公司 | 安卓运行环境构建的方法及装置 |
CN113656196B (zh) * | 2021-08-16 | 2024-02-27 | 深圳技德应用技术有限公司 | 一种Linux兼容Android的应用间传送文件方法及装置 |
CN113703926B (zh) * | 2021-10-29 | 2022-03-08 | 北京海誉动想科技股份有限公司 | Android容器创建方法与装置 |
-
2021
- 2021-12-14 CN CN202111518955.2A patent/CN113934464A/zh active Pending
-
2022
- 2022-07-27 WO PCT/CN2022/108371 patent/WO2023109138A1/zh unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210105340A1 (en) * | 2019-10-08 | 2021-04-08 | Magic Leap, Inc. | Methods, systems, and computer program products for implementing cross-platform mixed-reality applications with a scripting framework |
CN111625246A (zh) * | 2020-05-15 | 2020-09-04 | 武汉蓝星科技股份有限公司 | 一种Linux-Android终端双系统的桌面管理方法 |
CN113687888A (zh) * | 2021-05-18 | 2021-11-23 | 麒麟软件有限公司 | 在Linux系统上兼容运行Android应用的文件分享方法 |
CN113254154A (zh) * | 2021-05-21 | 2021-08-13 | 技德技术研究所(武汉)有限公司 | 一种在Linux上兼容运行Android系统的应用启动方法及装置 |
CN114035863A (zh) * | 2021-11-11 | 2022-02-11 | 北京鲸鲮信息系统技术有限公司 | 在Linux系统中操作安卓应用的方法、装置和设备 |
CN114077367A (zh) * | 2021-11-29 | 2022-02-22 | 北京鲸鲮信息系统技术有限公司 | Linux系统中实现安卓应用快捷方式的方法和装置 |
CN113934464A (zh) * | 2021-12-14 | 2022-01-14 | 北京鲸鲮信息系统技术有限公司 | Linux系统中启动安卓应用的方法、装置和电子设备 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117056173A (zh) * | 2023-10-12 | 2023-11-14 | 麒麟软件有限公司 | 在Web操作系统上监控安卓应用生命周期的方法 |
CN117056173B (zh) * | 2023-10-12 | 2024-01-30 | 麒麟软件有限公司 | 在Web操作系统上监控安卓应用生命周期的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN113934464A (zh) | 2022-01-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023109138A1 (zh) | Linux系统中启动安卓应用的方法、装置和电子设备 | |
US11403117B2 (en) | Methods for processing mini program, and related devices | |
CN109976667B (zh) | 一种镜像管理方法、装置及系统 | |
WO2023082716A1 (zh) | 在Linux系统中操作安卓应用的方法、装置和设备 | |
CN111694857B (zh) | 存储资源数据的方法、装置、电子设备及计算机可读介质 | |
CN114077367B (zh) | Linux系统中实现安卓应用快捷方式的方法和装置 | |
EP3813339A1 (en) | Acquisition method, apparatus, device and storage medium for applet data | |
US20170109415A1 (en) | Platform and software framework for data intensive applications in the cloud | |
KR20220151585A (ko) | 업무 데이터 처리 방법, 장치, 전자 기기, 저장 매체 및 컴퓨터 프로그램 | |
CN112612467A (zh) | 一种处理基于qiankun的微前端架构的方法和装置 | |
WO2023093127A1 (zh) | 一种监控集群的方法、装置及电子设备 | |
US10924570B2 (en) | Notification updates for saved sites | |
CN113377665A (zh) | 基于容器技术的测试方法、装置、电子设备及存储介质 | |
EP3213198B1 (en) | Monitoring a mobile device application | |
WO2024045646A1 (zh) | 管理集群访问权限的方法、装置和系统 | |
US11868769B1 (en) | Automatically determining and modifying environments for running microservices in a performant and cost-effective manner | |
US20220311662A1 (en) | Network configuring method for cloud mobile phone, device and storage medium | |
CN113779122B (zh) | 导出数据的方法和装置 | |
CN111325456B (zh) | 资产数据处理方法和装置、计算机系统和存储介质 | |
US9389760B2 (en) | Integrated visualization | |
CN113220576B (zh) | 测试环境的管理方法、装置、设备以及存储介质 | |
CN114268558B (zh) | 监控图的生成方法、装置、设备、介质 | |
CN113220282B (zh) | 小程序的开发处理方法、设备和存储介质 | |
JP2019096244A (ja) | 情報処理システムおよび情報処理方法 | |
CN115080229A (zh) | 资源对象管理方法及装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22905900 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |