CN-121979597-A - Method and device for running android system in container and electronic equipment
Abstract
The application discloses a method and a device for operating an android system in a container and electronic equipment, and belongs to the field of computers. The method specifically comprises the steps that a host environment of an android container is a Linux environment, a surface synthesizer component receives data to be rendered sent by at least one android application and sends the data to be rendered to a graphic memory distribution component, the graphic memory distribution component sends the data to be rendered to a graphic open source library, the graphic open source library renders the data to be rendered, rendering results reach the surface synthesizer component through the graphic open source library and the graphic memory distribution component, the surface synthesizer component sends rendering results of the at least one android application to a remote control server, and the remote control server sends the rendering results to a remote control client so that the remote control client can display the rendering results. The method can enhance the application range and the universality of the android container, so that the android container can be more flexibly adapted to different Linux host environments.
Inventors
- Request for anonymity
Assignees
- 中科方德软件有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251212
Claims (10)
- 1. A method of operating an android system in a container, the method comprising: The method comprises the steps of running android application in an android container, wherein the host environment of the android container is a Linux environment, and the android container comprises a system partition and a manufacturer partition, wherein the manufacturer partition comprises a surface synthesizer component, a graphic open source library, a graphic memory allocation component and a remote control server; The surface synthesizer component receives data to be rendered sent by at least one android application and sends the data to be rendered to the graphic memory allocation component; the graphic memory allocation component sends the data to be rendered to the graphic open source library; The graphics open source library renders the data to be rendered to obtain a rendering result corresponding to the data to be rendered, and the rendering result reaches the surface synthesizer component through the graphics open source library and the graphics memory allocation component; the surface synthesizer component sends a rendering result of at least one android application to the remote control server according to the data request sent by the remote control server; the remote control server side sends the rendering result to a remote control client side so that the remote control client side displays the rendering result.
- 2. The method of claim 1, wherein the vendor partition further comprises a hardware synthesizer component; The method further comprises the steps of: The surface synthesizer component sends layer data to the hardware synthesizer component; the hardware synthesizer component synthesizes the layer data and stores the obtained synthesis result into a memory; the surface synthesizer component sends the synthesis result to the remote control server according to the layer request sent by the remote control server; And the remote control server side sends the synthesis result to a remote control client side so that the remote control client side displays the synthesis result.
- 3. The method of claim 1, wherein the android container further comprises a script file of an entry process of a container image, wherein the script file is used for enabling the system partition to have access rights of a device node of a Linux kernel, and a folder for inter-process communication is created under a root directory of the Linux environment.
- 4. A method according to claim 3, wherein the script file comprises: the first configuration is used for setting the authority of the system partition aiming at the equipment node of the linux kernel as a read-write authority or a read authority; And a second configuration, configured to create a folder for inter-process communication under a root directory of the Linux environment, and set a right of the system partition to the folder as a read-write execution right.
- 5. The method according to any one of claims 1 to 4, further comprising: compiling a Binder module of the android system into a kernel module of the Linux system; compiling an anonymous shared memory driving module of the android system into a kernel module of the Linux system.
- 6. The method according to any one of claims 1 to 4, further comprising: installing a mirror image deployment package of the android container in a Linux environment so as to run the android container in the Linux environment; The mirror image deployment package is obtained by packaging a container mirror image of an android container, wherein the modified android open source project code is compiled into a disk mirror image, and the disk mirror image is converted into the container mirror image; the method comprises the steps of modifying an original android open source project code to obtain a modified android open source project code, wherein the modification comprises the steps of adding codes of a graphic open source library and modifying codes of a graphic memory allocation component and a hardware synthesizer component.
- 7. The method of claim 6, further comprising installing a deployment package of the remote control server in the android container environment to run the remote control server in the android container environment.
- 8. The device for operating the android system in the container is characterized by comprising an android application operating module, a surface synthesizer component, a graphic open source library, a graphic memory allocation component and a remote control server; The android application running module is used for running the android application in an android container, wherein the host environment of the android container is a Linux environment, and the android container comprises a system partition and a manufacturer partition, wherein the manufacturer partition comprises a surface synthesizer component, a graph open source library, a graph memory allocation component and a remote control server; The surface synthesizer component is used for receiving data to be rendered sent by at least one android application and sending the data to be rendered to the graphic memory allocation component; The graphic memory allocation component is used for sending the data to be rendered to the graphic open source library; the image open source library is used for rendering the data to be rendered to obtain a rendering result corresponding to the data to be rendered, and the rendering result reaches the surface synthesizer component through the image open source library and the image memory allocation component; the surface synthesizer component is further used for sending rendering results of at least one android application to the remote control server according to the data request sent by the remote control server; The remote control server is used for sending the rendering result to the remote control client so that the remote control client displays the rendering result.
- 9. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which program or instruction when executed by the processor implements the steps of the method as claimed in claims 1-7.
- 10. A readable storage medium, characterized in that it stores thereon a program or instructions, which when executed by a processor, implement the steps of the method according to claims 1-7.
Description
Method and device for running android system in container and electronic equipment Technical Field The application belongs to the technical field of computers, and particularly relates to a method, a device and electronic equipment for operating an android system in a container. Background With the development of computer technology, the technology of operating an android system in a container is applied to various scenes such as cloud game scenes, intelligent vehicle-mounted scenes and the like. The technology breaks through barriers among operating systems, so that the rich android application ecology breaks through the limitation of mobile equipment, and is flexibly deployed in various computing environments. For example, in a cloud gaming scenario, the technology can enable the Ann Zhuo Youhu to run on a Linux server cluster, thereby providing a consistent and smooth gaming experience across operating systems, across terminal devices, and to users. In the intelligent vehicle-mounted field, for example, applications such as navigation, video entertainment and the like can be seamlessly integrated based on the android running environment of the container, so that the service capability of the vehicle-mounted intelligent terminal is remarkably improved. One prior art builds an android virtualization system on a Linux system consisting of Dockdroid (android container adaptation, docker-Android Compatibility) layers and multiple Docker (application container engine) containers. When an android application within the Docker container issues a graphics rendering request, the graphics rendering request is converted to OpenGL ES (open graphics library embedded system, openGL for Embedded Systems) instructions at the HAL layer (hardware abstraction layer ). The Dockdroid layer firstly establishes a high-speed transmission channel to a host GPU (graphics processor, graphics Processing Unit) for the OpenGL ES instructions, and then converts the OpenGL ES instructions into native graphics instructions which can be directly identified and executed by the host GPU by utilizing a built-in translation library, so that the direct calling and acceleration of GPU hardware resources are realized. While the prior art is capable of successfully virtualizing a complete android environment and implementing efficient running of android applications on a Linux system, the depth of implementation depends on custom modifications to the Dockdroid layers of the host system (e.g., building a high-speed transmission channel of graphics processing instructions connecting the Docker container with the host GPU). The deep coupling makes the Docker container highly bound with the host environment, so that the android virtualization system is difficult to directly migrate to other non-customized Linux system operation, and the limitation significantly restricts the application range and popularization potential of the technology. Disclosure of Invention The embodiment of the application aims to provide a method, a device and electronic equipment for running an android system in a container, which can enhance the application range and universality of the android container and enable the android container to be more flexibly adapted to different Linux host environments. In order to solve the technical problems, the application is realized as follows: in a first aspect, an embodiment of the present application provides a method for running an android system in a container, where the method includes: The method comprises the steps of running android application in an android container, wherein the host environment of the android container is a Linux environment, and the android container comprises a system partition and a manufacturer partition, wherein the manufacturer partition comprises a surface synthesizer component, a graphic open source library, a graphic memory allocation component and a remote control server; The surface synthesizer component receives data to be rendered sent by at least one android application and sends the data to be rendered to the graphic memory allocation component; the graphic memory allocation component sends the data to be rendered to the graphic open source library; The graphics open source library renders the data to be rendered to obtain a rendering result corresponding to the data to be rendered, and the rendering result reaches the surface synthesizer component through the graphics open source library and the graphics memory allocation component; the surface synthesizer component sends a rendering result of at least one android application to the remote control server according to the data request sent by the remote control server; the remote control server side sends the rendering result to a remote control client side so that the remote control client side displays the rendering result. In a second aspect, the embodiment of the application provides a device for operating an android system in a container,