A cuttlefish cloud mobile phone management method and device

By configuring a dual-channel QMP interface, libvirt and Cuttlefish can simultaneously connect to the QEMU process monitor, resolving the issue of libvirt's inability to manage Cuttlefish cloud phones and achieving effective control over Cuttlefish cloud phones.

CN119728433BActive Publication Date: 2025-11-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411763960.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-11-11
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

In existing technologies, libvirt cannot manage the QEMU virtual machine launched by Cuttlefish, which prevents Cuttlefish cloud phones from being managed.

Method used

Configure two QEMU machine protocol QMP channels, one connected by libvirt and the other by Cuttlefish, to enable both libvirt and Cuttlefish to connect to the QEMU process monitor simultaneously. Control over the Cuttlefish cloud phone is achieved by monitoring the process identifier (PID).

Benefits of technology

This implementation enables effective management of the Cuttlefish cloud phone using libvirt, resolving the issue of libvirt's inability to be managed and ensuring the normal operation and management of the Cuttlefish cloud phone.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728433B_ABST
    Figure CN119728433B_ABST
Patent Text Reader

Abstract

This application provides a Cuttlefish cloud phone management method and apparatus. The method includes: when starting the open-source machine emulator and QEMU virtual machine, configuring two QEMU machine protocol (QMP) channels, one channel connected by the C library libvirt (which manages virtualization technology), and the other connected by the configurable virtual Android device Cuttlefish, enabling both libvirt and Cuttlefish to simultaneously connect to the monitor (moniter) of the open-source machine emulator and QEMU processes; after the open-source machine emulator and QEMU processes start, simultaneously monitoring both the process identifier (PID) of the Cuttlefish process and the process identifier (PID) of the open-source machine emulator and QEMU processes, thus enabling libvirt to control the configurable virtual Android device Cuttlefish cloud phone.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer software development technology, and in particular to a Cuttlefish cloud phone management method and device. Background Technology

[0002] Cuttlefish is an Android emulator that uses QEMU to launch virtual machines. However, because the QMP channel enabled by default in QEMU is constantly occupied by Cuttlefish, libvirt cannot connect and therefore cannot manage the QEMU virtual machine launched by Cuttlefish. Currently, the virtualization management software libvirt cannot manage Cuttlefish cloud phones.

[0003] Therefore, one or more methods are needed to solve the above problems.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] This application discloses a Cuttlefish cloud phone management method and device.

[0006] Firstly, this application discloses a Cuttlefish cloud phone management method, the method comprising:

[0007] When starting the open-source machine emulator and the QEMU virtual machine, two QEMU machine protocol QMP channels are configured. One channel is connected by the C library libvirt, which manages virtualization technology, and the other is connected by the configurable virtual Android device Cuttlefish. This allows the C library libvirt and the configurable virtual Android device Cuttlefish to connect to the monitor of the open-source machine emulator and the QEMU virtual machine process simultaneously.

[0008] After the open-source machine emulator and virtualizer qemu process starts, the process identifier pid of the cutttlefish process and the process identifier pid of the open-source machine emulator and virtualizer qemu process are monitored simultaneously to realize the management and control of the configurable virtual Android device cutttlefish cloud phone by the C library libvirt, which manages virtualization technology.

[0009] In one exemplary embodiment of this disclosure, the method further includes:

[0010] Configure two QEMU machine protocol QMP channels of type Unix socket in the virtual machine XML configuration document.

[0011] In one exemplary embodiment of this disclosure, the method further includes:

[0012] The C library libvirt, which manages virtualization technology, finds the first Direct Render Manager (DRM) device on the node, converts the bus number of the peripheral component interconnect (PCI) address corresponding to the DRM from hexadecimal to decimal, adds the resulting value to the command-line parameter -gpu_device of the configurable virtual Android device cutttlefish, and updates the display value in the virtual machine XML configuration file.

[0013] In one exemplary embodiment of this disclosure, the method further includes:

[0014] The C library libvirt, which manages virtualization technology, allocates a new ID and records it as bitmap data. This ID is then added to the command-line parameter `-base_instance_num` of the configurable virtual Android device `cuttlefish` to avoid port conflicts when multiple configurable virtual Android device `cuttlefish` processes are launched concurrently. Finally, the ID is updated in the virtual machine XML configuration file.

[0015] In one exemplary embodiment of this disclosure, the method further includes:

[0016] The C library libvirt manages virtualization technologies. The owner and group of the configurable virtual Android device's `cuttlefish` directory can be modified according to the `user` and `group` settings in `qemu.conf`.

[0017] In one exemplary embodiment of this disclosure, the method further includes:

[0018] The C library libvirt, which manages virtualization technology, starts a configurable virtual Android device process called Cuttlefish and records its process ID (PID). It then passes the first QMP channel to the Cuttlefish process, which connects to the monitor of the open-source machine emulator and virtualizer QEMU process through this QEMU machine protocol QMP channel.

[0019] In one exemplary embodiment of this disclosure, the method further includes:

[0020] The C library libvirt, which manages virtualization technology, connects to the monitor of the open-source machine emulator and virtualizer QEMU process via a second QEMU machine protocol QMP channel.

[0021] Secondly, this application discloses a Cuttlefish cloud phone management device, the device comprising:

[0022] The dual-channel configuration module is used to configure two QEMU machine protocol QMP channels when starting the open-source machine emulator and the QEMU virtual machine. One channel is connected by the C library libvirt, which manages virtualization technology, and the other is connected by the configurable virtual Android device Cuttlefish. This allows libvirt and Cuttlefish to connect to the monitor of the open-source machine emulator and the QEMU virtual machine process simultaneously.

[0023] The dual-channel monitoring module is used to simultaneously monitor the process identifier (PID) of the Cuttlefish process and the process identifier (PID) of the open-source machine emulator and virtualizer (QEMU) after the QEMU process starts. This enables the C library libvirt, which manages virtualization technology, to control the configurable virtual Android device Cuttlefish cloud phone.

[0024] Thirdly, this application discloses an electronic device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to perform the method as described in any of the preceding aspects.

[0025] Fourthly, this application discloses a non-transitory computer-readable storage medium in which, when the instructions in the storage medium are executed by a processor of an electronic device, enable the electronic device to perform the methods described in any of the preceding aspects.

[0026] Fifthly, this application discloses a computer program product in which, when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the method described in any of the preceding aspects.

[0027] This application provides a Cuttlefish cloud phone management method and apparatus. The method includes: when starting the open-source machine emulator and QEMU virtual machine, configuring two QEMU machine protocol (QMP) channels, one channel connected by the C library libvirt (which manages virtualization technology), and the other connected by the configurable virtual Android device Cuttlefish, enabling both libvirt and Cuttlefish to simultaneously connect to the monitor (moniter) of the open-source machine emulator and QEMU processes; after the open-source machine emulator and QEMU processes start, simultaneously monitoring both the process identifier (PID) of the Cuttlefish process and the process identifier (PID) of the open-source machine emulator and QEMU processes, thus enabling libvirt to control the configurable virtual Android device Cuttlefish cloud phone. Attached Figure Description

[0028] Figure 1 This is a flowchart illustrating the steps of a Cuttlefish cloud phone management method according to this application.

[0029] Figure 2 This is a management architecture diagram of a Cuttlefish cloud phone management method proposed in this application.

[0030] Figure 3 This is a structural block diagram of a Cuttlefish cloud phone management device according to this application.

[0031] Figure 4 This is a block diagram of an electronic device according to this application.

[0032] Figure 5 This is a block diagram of a computer-readable storage medium according to this application. Detailed Implementation

[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0034] This application provides a Cuttlefish cloud phone management method and apparatus. The method includes:

[0035] Step S110: When starting the open-source machine emulator and the QEMU virtual machine, configure two QEMU machine protocol QMP channels. One channel is connected by the C library libvirt, which manages virtualization technology, and the other is connected by the configurable virtual Android device Cuttlefish. This enables the C library libvirt, which manages virtualization technology, and the configurable virtual Android device Cuttlefish to simultaneously connect to the monitor of the open-source machine emulator and the QEMU virtual machine process, Moniter.

[0036] Step S120: After the open-source machine emulator and virtualizer qemu process starts, monitor the process identifier pid of the cutttlefish process and the process identifier pid of the open-source machine emulator and virtualizer qemu process simultaneously to realize the management and control of the configurable virtual Android device cutttlefish cloud phone by the C library libvirt, which manages virtualization technology.

[0037] This application provides a Cuttlefish cloud phone management method and apparatus. The method includes: when starting the open-source machine emulator and QEMU virtual machine, configuring two QEMU machine protocol (QMP) channels, one channel connected by the C library libvirt (which manages virtualization technology), and the other connected by the configurable virtual Android device Cuttlefish, enabling both libvirt and Cuttlefish to simultaneously connect to the monitor (moniter) of the open-source machine emulator and QEMU processes; after the open-source machine emulator and QEMU processes start, simultaneously monitoring both the process identifier (PID) of the Cuttlefish process and the process identifier (PID) of the open-source machine emulator and QEMU processes, thus enabling libvirt to control the configurable virtual Android device Cuttlefish cloud phone.

[0038] Example 1:

[0039] Reference Figure 1 The diagram illustrates a flowchart of a Cuttlefish cloud phone management method according to this application. This method can be applied to electronic devices, and specifically includes the following steps:

[0040] In step S110, when starting the open-source machine emulator and the QEMU virtual machine, two QEMU machine protocol QMP channels can be configured. One channel is connected by the C library libvirt, which manages virtualization technology, and the other is connected by the configurable virtual Android device Cuttlefish. This allows the C library libvirt and the configurable virtual Android device Cuttlefish to simultaneously connect to the monitor of the open-source machine emulator and the QEMU virtual machine process, Moniter.

[0041] In step S120, after the open-source machine emulator and virtualizer qemu process starts, the process identifier pid of the cutttlefish process and the process identifier pid of the open-source machine emulator and virtualizer qemu process can be monitored simultaneously to realize the control of the configurable virtual Android device cutttlefish cloud phone by the C library libvirt, which manages virtualization technology.

[0042] In this example embodiment, the method further includes:

[0043] Configure two QEMU machine protocol QMP channels of type Unix socket in the virtual machine XML configuration document.

[0044] In this example embodiment, the method further includes:

[0045] The C library libvirt, which manages virtualization technology, finds the first Direct Render Manager (DRM) device on the node, converts the bus number of the peripheral component interconnect (PCI) address corresponding to the DRM from hexadecimal to decimal, adds the resulting value to the command-line parameter -gpu_device of the configurable virtual Android device cutttlefish, and updates the display value in the virtual machine XML configuration file.

[0046] In this example embodiment, the method further includes:

[0047] The C library libvirt, which manages virtualization technology, allocates a new ID and records it as bitmap data. This ID is then added to the command-line parameter `-base_instance_num` of the configurable virtual Android device `cuttlefish` to avoid port conflicts when multiple configurable virtual Android device `cuttlefish` processes are launched concurrently. Finally, the ID is updated in the virtual machine XML configuration file.

[0048] In this example embodiment, the method further includes:

[0049] The C library libvirt manages virtualization technologies. The owner and group of the configurable virtual Android device's `cuttlefish` directory can be modified according to the `user` and `group` settings in `qemu.conf`.

[0050] In this example embodiment, the method further includes:

[0051] The C library libvirt, which manages virtualization technology, starts a configurable virtual Android device process called Cuttlefish and records its process ID (PID). It then passes the first QMP channel to the Cuttlefish process, which connects to the monitor of the open-source machine emulator and virtualizer QEMU process through this QEMU machine protocol QMP channel.

[0052] In this example embodiment, the method further includes:

[0053] The C library libvirt, which manages virtualization technology, connects to the monitor of the open-source machine emulator and virtualizer QEMU process via a second QEMU machine protocol QMP channel.

[0054] Example 2:

[0055] In this example embodiment, Cuttlefish is an Android emulator that uses QEMU to launch a virtual machine.

[0056] Libvirt is an open-source toolset for managing virtualization platforms. It provides a set of APIs and tools for managing, monitoring, and controlling virtualization technologies such as KVM (Kernel-based Virtual Machine), QEMU, Xen, and LXC (Linux Containers).

[0057] In the embodiments of this example, as Figure 2 The method shown includes the following steps:

[0058] 1) libvirt receives a request to start a Cuttlefish cloud phone.

[0059] 2) Configure two Unix socket type QMP channels in the virtual machine XML configuration file.

[0060] 3) libvirt finds the first DRM device on the node, converts the bus number of its corresponding PCI address from hexadecimal to decimal, adds the resulting value to the -gpu_device parameter in the Cuttlefish command line, and updates the display value in the virtual machine XML configuration file.

[0061] 4) libvirt allocates a new ID and records it in the bitmap. The ID is added to the -base_instance_num parameter of the cutttlefish command line to avoid port conflicts when multiple cutttlefish processes are started concurrently. The ID is then updated in the virtual machine xml configuration file.

[0062] 5) Modify the owner and group of the cutttlefish directory according to the user and group configuration in qemu.conf.

[0063] 6) libvirt starts the cutttlefish process and records the process PID. Then it passes the first QMP channel to the cutttlefish process, and the cutttlefish process connects to the monitor of the qemu process through this QMP channel.

[0064] 7) libvirt connects to the monitor of the qemu process through a second qmp channel.

[0065] 8) The Cuttlefish cloud phone has started up.

[0066] Example 3:

[0067] In this example embodiment, the method includes the following steps:

[0068] 1) libvirt receives a request to start a Cuttlefish cloud phone.

[0069] 2) Configure two Unix socket type QMP channels in the virtual machine XML configuration file.

[0070] 3) libvirt finds the first drm device on the node, / dev / dri / renderD128, whose GPU PCI address is 81:00.0 and bus number is 81. The display value of the DOM XML is 129. The obtained value 129 is added to the -gpu_device parameter of the Cuttlefish command line and updated to the display value in the virtual machine XML configuration file.

[0071] 4) libvirt allocates a new ID and records it in the bitmap. The ID is added to the -base_instance_num parameter of the cutttlefish command line to avoid port conflicts when multiple cutttlefish processes are started concurrently. The ID is then updated in the virtual machine xml configuration file.

[0072] 5) Modify the owner and group of the cutttlefish directory according to the user and group configuration in qemu.conf.

[0073] 6) libvirt starts the cutttlefish process and records the process PID. Then it passes the first QMP channel to the cutttlefish process, and the cutttlefish process connects to the monitor of the qemu process through this QMP channel.

[0074] 7) libvirt connects to the monitor of the qemu process through a second qmp channel.

[0075] 8) The Cuttlefish cloud phone has started up.

[0076] In this example embodiment, when starting the QEMU virtual machine, two QMP channels are configured: one connected by libvirt and the other by Cuttlefish. libvirt starts the Cuttlefish process and records its PID. Then, it passes the first QMP channel to the Cuttlefish process, which connects to the QEMU process's monitor through this QMP channel. libvirt connects to the QEMU process's monitor through the second QMP channel, allowing both libvirt and Cuttlefish to connect to the QEMU process's monitor simultaneously. After the QEMU process starts, both the Cuttlefish and QEMU process PIDs are monitored, enabling libvirt to manage the Cuttlefish cloud phone.

[0077] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by this application.

[0078] Reference Figure 3The diagram shows a structural block diagram of a Cuttlefish cloud phone management device according to this application. The device includes:

[0079] The dual-channel configuration module 210 is used to configure two QEMU machine protocol QMP channels when starting the open-source machine emulator and the QEMU virtual machine. One channel is connected by the C library libvirt, which manages virtualization technology, and the other is connected by the configurable virtual Android device Cuttlefish. This enables the C library libvirt and the configurable virtual Android device Cuttlefish to connect to the monitor of the open-source machine emulator and the QEMU virtual machine process simultaneously.

[0080] The dual-channel monitoring module 220 is used to simultaneously monitor the process identifier (PID) of the Cuttlefish process and the process identifier (PID) of the open-source machine emulator and virtualizer (QEMU) process after the QEMU process is started. This enables the C library libvirt, which manages virtualization technology, to control the configurable virtual Android device Cuttlefish cloud phone.

[0081] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0082] Optionally, this application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0083] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0084] The figure is a block diagram of an electronic device 800 shown in the four applications. For example, the electronic device 800 can be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0085] Reference Figure 4 The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0086] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0087] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, images, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0088] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.

[0089] Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0090] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0091] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0092] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0093] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast operation information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0094] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0095] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of an electronic device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0096] Figure 5 This is a block diagram illustrating a computer-readable storage medium 1900. For example, the computer-readable storage medium 1900 can be provided as a server.

[0097] Reference Figure 5 The computer-readable storage medium 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by the processing component 1922, such as an application program. The application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.

[0098] The computer-readable storage medium 1900 may also include a power supply component 1926 configured to perform power management of the computer-readable storage medium 1900, a wired or wireless network interface 1950 configured to connect the computer-readable storage medium 1900 to a network, and an input / output (I / O) interface 1958. The computer-readable storage medium 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0099] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0101] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0102] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0103] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0104] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0106] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0107] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0108] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A Cuttlefish cloud phone management method, characterized in that, The method includes: When starting the open-source machine emulator and the QEMU virtual machine, two QEMU machine protocol QMP channels are configured. One channel is connected by the C library libvirt, which manages virtualization technology, and the other is connected by the configurable virtual Android device Cuttlefish. This allows libvirt and Cuttlefish to connect to the monitor of the open-source machine emulator and the QEMU virtual machine process simultaneously. After the open-source machine emulator and virtualizer qemu process starts, the process identifier pid of the cutttlefish process and the process identifier pid of the open-source machine emulator and virtualizer qemu process are monitored simultaneously to realize the control of the configurable virtual Android device cutttlefish cloud phone by the C library libvirt, which manages virtualization technology. The C library libvirt, which manages virtualization technology, starts a configurable virtual Android device, the cuttlefish process, and records the process ID (PID). It then passes the first QMP channel to the configurable virtual Android device, the cuttlefish process. The configurable virtual Android device, the cuttlefish process, connects to the monitor of the open-source machine emulator and the virtualizer QEMU process through this QEMU machine protocol QMP channel. The C library libvirt, which manages virtualization technology, connects to the monitor of the open-source machine emulator and virtualizer QEMU process via a second QEMU machine protocol QMP channel.

2. The method as described in claim 1, characterized in that, The method further includes: Configure two QMP channels of type Unix socket in the virtual machine XML configuration document.

3. The method as described in claim 1, characterized in that, The method further includes: The C library libvirt, which manages virtualization technology, finds the first Direct Render Manager (DRM) device on the node, converts the bus number of the peripheral component interconnect (PCI) address corresponding to the DRM from hexadecimal to decimal, writes the resulting value as a parameter to the command-line parameter -gpu_device of the configurable virtual Android device cutttlefish, and updates the display value on the virtual machine XML configuration file.

4. The method as described in claim 1, characterized in that, The method further includes: The C library libvirt, which manages virtualization technology, allocates a new ID and records it in bitmap data. This ID is then added to the command-line parameter `-base_instance_num` of the configurable virtual Android device `cuttlefish` to avoid port conflicts when multiple configurable virtual Android device `cuttlefish` processes are launched concurrently. Finally, the ID is updated in the virtual machine XML configuration file.

5. The method as described in claim 1, characterized in that, The method further includes: The C library libvirt manages virtualization technologies. Modify the owner and group of the configurable virtual Android device's cuttlefish directory according to the user and group settings configured in qemu.conf.

6. A Cuttlefish cloud phone management device, characterized in that, The device includes: The dual-channel configuration module is used to configure two QEMU machine protocol QMP channels when starting the open-source machine emulator and the QEMU virtual machine. One channel is connected by the C library libvirt, which manages virtualization technology, and the other is connected by the configurable virtual Android device Cuttlefish. This allows libvirt and Cuttlefish to connect to the monitor of the open-source machine emulator and the QEMU virtual machine process simultaneously. The dual-channel monitoring module is used to monitor both the process identifier (PID) of the Cuttlefish process and the process identifier (PID) of the open-source machine emulator and virtualizer (QEMU) process after they start. This enables the C library libvirt, which manages virtualization technology, to control the configurable virtual Android device Cuttlefish cloud phone. The C library libvirt, which manages virtualization technology, starts a configurable virtual Android device process called Cuttlefish and records the process ID (PID). Then, it sends the first QMP channel to the configurable virtual Android device process called Cuttlefish. The configurable virtual Android device process called Cuttlefish connects to the monitor of the open-source machine emulator and the virtualizer QEMU process through this QEMU machine protocol QMP channel. The C library libvirt, which manages virtualization technology, connects to the monitor of the open-source machine emulator and virtualizer QEMU process via a second QEMU machine protocol QMP channel.

7. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Batch control method of Android cloud mobile phone, computer readable medium and electronic equipment

    CN113452830A

  • Interactive method, computer device, and computer storage medium

    WO2023065922A1