Control method and electronic equipment

By building virtual devices and dynamically mounting, the problem that the shared path between the host and the virtual machine in the emulator cannot be modified in real time, real-time path adjustment without restarting during the virtual machine operation is achieved, improving the user experience.

CN115543526BActive Publication Date: 2025-09-02HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110729247.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-29
Publication Date
2025-09-02
Estimated Expiration
2041-06-29

AI Technical Summary

Technical Problem

The shared path between the host and the virtual machine in the existing emulator cannot be modified in real time, resulting in the virtual machine being restarted during operation, affecting the user experience.

Method used

By building virtual devices in the emulator and mounting them dynamically, real-time modification of the shared path between the host and the virtual machine is achieved to avoid restarting the virtual machine.

Benefits of technology

Modify the shared path in real time during the virtual machine operation to avoid closing the current application and improve the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543526B_ABST
    Figure CN115543526B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a control method and electronic device, which relate to the field of computer control technology. Through this solution, during the operation of a virtual machine in a simulator, when the download directory set in the application market of the electronic device changes, the simulator can reconstruct the virtual device based on the new download directory, and the virtual machine in the simulator can be mounted to the reconstructed virtual device, so that the virtual machine in the simulator can directly access the installation package in the new download directory and install the installation package in the new download directory, thereby realizing the real-time modification of the shared path between the host machine and the virtual machine during the operation of the virtual machine, without the need to restart the virtual machine, thereby not having to close the application currently in use in the virtual machine, and thus not affecting the application currently in use in the virtual machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a control method and electronic equipment. Background Art

[0002] With the increasing integration of personal computers (PCs) and mobile phones, it's becoming increasingly possible to use Android applications (APPs) on mobile phones on PC systems (such as Windows and iOS) through emulator virtualization technology. This allows users to use Android apps on PCs through emulators. An emulator is software that runs and simulates the Android operating environment on a PC, allowing users to experience Android games and applications on their PCs.

[0003] Currently, for simulators, file sharing between the host machine (i.e., the system on the PC product) and the virtual machine (i.e., the Android system) is an extremely important basic capability. Most simulators now implement the file sharing function by virtualizing the host file directory into a device and mounting it in the virtual machine. However, this method has an obvious disadvantage. During the operation of the virtual machine, the shared path between the host machine and the virtual machine cannot be changed, and if the shared path needs to be changed, the virtual machine can only be restarted, which will cause the running applications in the virtual machine to be closed and affected. Therefore, how to realize real-time modification of the shared path between the host machine and the virtual machine during the operation of the virtual machine without restarting the virtual machine is a technical problem that urgently needs to be solved. Summary of the Invention

[0004] The embodiments of the present application provide a control method and an electronic device, which can realize real-time modification of the shared path between the host machine and the virtual machine during the operation of the virtual machine without restarting the virtual machine, thereby improving the user experience.

[0005] In the first aspect, an embodiment of the present application provides a control method, which is applied to a simulator, the simulator is used to be installed on an electronic device, the electronic device has a first operating system, and the simulator includes a second operating system. The method includes: in response to a first message sent by a first client on the electronic device, determining whether the first storage path is the same as the second storage path, wherein the first message is used to indicate the installation of a first application, and the first storage path is the storage path of the installation package of the first application; when the first storage path and the second storage path are different, constructing a first virtual device based on the first storage path; sending a second message to the second operating system, the second message is used to instruct the second operating system to mount to the first virtual device.

[0006] In this way, during the operation of the virtual machine in the simulator, when the download directory set in the client of the electronic device (such as the application market) changes, the simulator can reconstruct the virtual device based on the new download directory, and the virtual machine in the simulator can be mounted to the reconstructed virtual device, so that the virtual machine in the simulator (i.e., the second operating system) can directly access the installation package in the new download directory and install the installation package in the new download directory, thereby realizing real-time modification of the shared path between the host machine and the virtual machine during the operation of the virtual machine, and there is no need to restart the virtual machine, so there is no need to close the application currently in use in the virtual machine, and thus does not affect the application currently in use in the virtual machine.

[0007] In a possible implementation, the second message is further used to instruct the second operating system to install the first application.

[0008] In one possible implementation, the method further includes: in response to receiving the third message sent by the second operating system, sending a fourth message to the second operating system, wherein the third message is used to indicate that the mounting is successful, and the fourth message is used to instruct the second operating system to install the first application. Thus, after the second operating system is successfully mounted to the first virtual device, the second operating system is instructed to install the first application.

[0009] In a possible implementation, the first message includes one or more of the following: the name of the first application, the first storage path, or information on whether the second storage path is modified.

[0010] In a possible implementation, the second message includes a mounting method and mounting parameters.

[0011] In a possible implementation, the mounting method includes direct mounting or unmounting first and then mounting.

[0012] In a possible implementation, the mounting parameters include one or more of the following: a name of the first virtual device, a directory mounted in the second operating system, or a type of a specified file system.

[0013] In a possible implementation, before constructing the first virtual device based on the first storage path, the method further includes: destroying a second virtual device, where the second virtual device is constructed based on the second storage path.

[0014] In a possible implementation, the first client is a client having an application providing function, or the first client is a client having an application migration function.

[0015] In a possible implementation, the first operating system is a Windows operating system, the second operating system is an Android operating system, and the first application is an Android application.

[0016] In a possible implementation, the first virtual device is used to allow the second operating system to access the first storage path.

[0017] In a possible implementation, the second storage path is a storage path of a second application, and the second application is a previously installed application.

[0018] In second aspect, an embodiment of the present application provides a control method, which is applied to an electronic device, wherein the electronic device has a first operating system, and an emulator is installed on the electronic device, and the emulator includes a second operating system. The method includes: in response to a user's installation operation of a first application on a first client on the electronic device, determining whether the first storage path and the second storage path are the same, the first storage path being the storage path of the installation package of the first application; when the first storage path and the second storage path are different, constructing a first virtual device based on the first storage path, and mounting the second operating system to the first virtual device; installing the first application, and displaying the first application.

[0019] In this way, during the operation of the virtual machine in the simulator, when the download directory set in the client of the electronic device (such as the application market) changes, the simulator can reconstruct the virtual device based on the new download directory, and the virtual machine in the simulator can be mounted to the reconstructed virtual device, so that the virtual machine in the simulator (i.e., the second operating system) can directly access the installation package in the new download directory and install the installation package in the new download directory, thereby realizing real-time modification of the shared path between the host machine and the virtual machine during the operation of the virtual machine, and there is no need to restart the virtual machine, so there is no need to close the application currently in use in the virtual machine, and thus does not affect the application currently in use in the virtual machine.

[0020] In a possible implementation, the first client is a client having an application providing function, or the first client is a client having an application migration function.

[0021] In a possible implementation, the first operating system is a Windows operating system, the second operating system is an Android operating system, and the first application is an Android application.

[0022] In a possible implementation, the first virtual device is used to allow the second operating system to access the first storage path.

[0023] In a possible implementation, before constructing the first virtual device based on the first storage path, the method further includes:

[0024] The second virtual device is destroyed, where the second virtual device is constructed based on the second storage path.

[0025] In a possible implementation, the second storage path is a storage path of a second application, and the second application is a previously installed application.

[0026] In a third aspect, the present application provides a control device comprising a unit for executing the method described in the first aspect. The device may be configured to execute the method described in the first aspect. For a description of the units in the device, please refer to the description of the first aspect above and, for the sake of brevity, will not be repeated here. Exemplarily, the control device may be a simulator.

[0027] The method described in the first aspect above can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a processing module or unit, a display module or unit, etc.

[0028] In a fourth aspect, the present application provides an electronic device, which includes a processor, the processor is coupled to a memory, the memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions stored in the memory, so that the method in the first aspect or the second aspect is executed.

[0029] For example, the processor is configured to execute a computer program or instruction stored in the memory, so that the electronic device executes the method in the first aspect.

[0030] In a fifth aspect, the present application provides a computer-readable storage medium storing a computer program (also referred to as instructions or codes) for implementing the method in the first aspect or the second aspect.

[0031] For example, when the computer program is executed by a computer, the computer can execute the method in the first aspect or the second aspect.

[0032] In a sixth aspect, the present application provides a chip comprising a processor, wherein the processor is configured to read and execute a computer program stored in a memory to perform the method of the first aspect or the second aspect.

[0033] Optionally, the chip further includes a memory, and the memory is connected to the processor via a circuit or wire.

[0034] In a seventh aspect, the present application provides a chip system, comprising a processor, wherein the processor is configured to read and execute a computer program stored in a memory to perform the method of the first aspect or the second aspect.

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

[0036] In an eighth aspect, the present application provides a computer program product, which includes a computer program (also referred to as instructions or codes). When the computer program is executed by a computer, the computer implements the method in the first aspect or the second aspect.

[0037] It can be understood that the beneficial effects of the third to eighth aspects mentioned above can be found in the relevant descriptions in the first or second aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0039] Figure 2 This is a structural block diagram of an electronic device according to an embodiment of the present application;

[0040] Figure 3 This is a schematic diagram of an interface display of an electronic device according to an embodiment of the present application;

[0041] Figure 4a This is a schematic diagram of an interface display of an electronic device according to an embodiment of the present application;

[0042] Figure 4b This is a schematic diagram of an interface display of an electronic device according to an embodiment of the present application;

[0043] Figure 5 This is a schematic diagram of an interface display of an electronic device according to an embodiment of the present application;

[0044] Figure 6 This is a schematic diagram of an interface display of an electronic device according to an embodiment of the present application;

[0045] Figure 7 This is a schematic diagram of an interface display of an electronic device according to an embodiment of the present application;

[0046] Figure 8 This is a flow chart of a control method provided in an embodiment of the present application;

[0047] Figure 9 This is a flow chart of another control method provided in an embodiment of the present application;

[0048] Figure 10 This is a flow chart of another control method provided in an embodiment of the present application;

[0049] Figure 11 This is a schematic diagram of the structure of a chip according to an embodiment of the present application;

[0050] Figure 12 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0052] The term "and / or" as used herein describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The symbol " / " as used herein indicates that the related objects are in an "or" relationship, for example, A / B means either A or B.

[0053] The terms "first" and "second" in this specification and claims are used to distinguish different objects rather than to describe a specific order of objects. For example, "first response message" and "second response message" are used to distinguish different response messages rather than to describe a specific order of response messages.

[0054] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0055] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more, for example, multiple processing units means two or more processing units, etc.; multiple elements means two or more elements, etc.

[0056] First, the technical terms involved in this solution are introduced.

[0057] (1) Mount

[0058] Mounting refers to associating a device with a specific location in the directory tree so that the operating system can find the newly added device starting from the root directory and access the file data in the device. The device here is a general term and can be a real device such as a hard disk or optical disk storage, a directory in the operating system, or other virtual devices.

[0059] For example, when you need to access data stored on a USB flash disk, in order for the computer's operating system to find the USB flash disk, you must mount the USB flash disk to a certain location in the operating system's directory tree structure (for example, / media / usb / ). Assuming the USB flash disk device is / dev / usb, then when you insert the USB flash disk into the computer, the corresponding command executed by the computer is: mount / dev / usb / media / usb, which mounts the USB flash disk to the / media / usb / directory. After the computer executes the above command, the files in the USB flash disk become visible to the computer's operating system. For example, if a file in the USB flash disk is located at / dir / hello.txt, the corresponding path accessible to the operating system is / media / usb / dir / hello.txt.

[0060] Next, the technical solutions in the embodiments of the present application are described.

[0061] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, electronic device A is installed with a simulator 11 and an application market 12. The simulator 11 can simulate the operating environment of the Android system on electronic device A and can run the Android system. The application market 12 can provide applications that are compatible with the system configured on electronic device A, and can also provide applications that are compatible with the Android system. For example, when the system configured on electronic device A is a Windows system, the application market 12 can provide Windows applications and can also provide Android applications, wherein the suffix of the installation package of the Windows application can be .exe, and the suffix of the Android package of the Android application can be .apk; when the system configured on electronic device A is an iOS system, the application market 12 can provide iOS applications and can also provide Android applications, the suffix of the installation package of the iOS application can be .ipa, and the suffix of the Android package of the Android application can be .apk.

[0062] In this solution, the user can set the download directory of the Android application in the application market 12. The download directory can be understood as a shared path between the host machine (i.e., the system configured on the electronic device A) and the virtual machine (i.e., the Android system in the simulator 12). During the operation of the virtual machine in the simulator 12, when the download directory set in the application market 12 changes, the simulator 12 can reconstruct the virtual device based on the new download directory, and the virtual machine in the simulator 12 can mount the reconstructed virtual device, so that the virtual machine in the simulator 12 can directly access the installation package in the new download directory and install the installation package in the new download directory. In this way, the shared path between the host machine and the virtual machine can be modified in real time during the operation of the virtual machine, so that the virtual machine can access the data in the modified shared path without restarting the virtual machine, thereby not having to close the application currently in use in the virtual machine, and thus not affecting the application currently in use in the virtual machine.

[0063] It is understood that the operating system configured on electronic device A may be Windows, iOS, or other operating systems, depending on the actual situation and is not limited here. Furthermore, electronic device A may be a mobile terminal or a non-mobile terminal. For example, a mobile terminal may be a tablet computer, a laptop computer, a PDA, or an in-vehicle terminal, while a non-mobile terminal may be a personal computer (PC), a television (TV), an ATM, or a self-service machine, etc., without specific limitation here.

[0064] Next, based on Figure 1 In the scenario shown, the structure of the electronic device involved in this solution is introduced by taking the Windows system configured on the electronic device A as an example.

[0065] Figure 2 This is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 2 As shown, electronic device A can be an electronic device equipped with a Windows system, and multiple applications can be installed under the Windows system, such as an emulator 11 (emulator name.exe). Among them, the emulator 11 can be an application equipped with an Android system 111, and the Android system 111 can include Android applications and a file manager. Exemplary, Android applications can be email applications, Huawei video applications, etc. The file manager can be understood as a file management tool, which can be used to manage files in the Android system 111, such as viewing files, editing files, deleting files, moving files, etc.

[0066] In this solution, the Android system 111 can be mounted on the virtual device constructed by the simulator 11. After the Android system 111 is mounted on the virtual device, the Android system 111 can access the shared folder 13 in the Windows system in the electronic device A, and the shared folder 13 can be located in the disk directory of the Windows system in the electronic device A. Among them, the installation package of the Android application downloaded by the user from the application market of the electronic device A can be stored in the shared folder 13, so that the Android system 111 can obtain the Android application from the shared folder 13 and install it. It can be understood that in this solution, the shared folder 13 can be set through the application market of the electronic device A. In addition, the virtual device in the Android system 111 can be understood as a disk, which can be figuratively understood as the C drive or D drive in a personal computer, which can provide data storage space for the Android system.

[0067] Next, based on Figure 1 The scene shown and Figure 2 The structure of the electronic device shown is used to introduce the control method involved in this solution.

[0068] (1) Modify the shared path in electronic device A

[0069] Continue reading Figure 1 , the user can open (such as double-click or single-click, etc.) the application market 12 on electronic device A. Afterwards, the display interface of electronic device A can be Figure 1 The interface shown in the figure enters Figure 3 The interface shown. Figure 3 In the App Store 12, users can view the shared path (i.e., download directory) modification entry 121 through the "Settings" entry. Then, users can modify the shared path from modification entry 121. For example, the download directory can be changed from "D:Download\AppGallery" to "E:Download\AppGallery".

[0070] (2) Install the Android app on electronic device A

[0071] Continue reading Figure 1 , the user can open (such as double-click or single-click, etc.) the application market 12 on electronic device A. Afterwards, the display interface of electronic device A can be Figure 1 The interface shown in Figure 4 is entered. Figure 4aIn the application market 12, users can view or search for installable Android applications through the entrance of "Android Applications". Then, the user can select an Android application a and select the installation control 122 corresponding to the Android application a. After that, the electronic device A downloads (i.e., obtains) the Android application a from the application market 12, and stores the installation package of the Android application a in the shared path (i.e., the download directory) in the electronic device A. For example, the Android application a can be stored in the download directory "E: Download\AppGallery". In one example, during the process of electronic device A downloading and / or installing the Android application a, as shown in FIG. Figure 4b As shown, you can install the corresponding control (such as Figure 4a 122 in the update display as a display control (as shown in Figure 4b 123 in the figure), so that the user can observe the download and / or installation progress in real time through the display control 123.

[0072] After electronic device A completes downloading Android application a, the application market 12 can send an installation command to the simulator 11 through inter-process communication (IPC), as well as the application name information and installation package storage path information (i.e., shared path information) of Android application a.

[0073] It is understandable that when the simulator 11 in electronic device A is not in the on state, electronic device A can control the simulator 11 to start silently. For example, when the simulator 11 is not in the on state, electronic device A can send a background start instruction to the simulator 11 to instruct the simulator 11 to start in the background; then, after receiving the background start instruction, the simulator 11 can start and run in the background, thereby controlling the simulator 11 to start silently.

[0074] (3) The simulator verifies whether the shared path has changed

[0075] After the simulator 11 in electronic device A receives the installation command sent by the application market 12 through IPC, as well as the application name information and installation package storage path information (i.e., shared path information) of Android application a, the simulator 11 can verify the shared path information to determine whether the shared path has changed.

[0076] In one example, the simulator 11 may record at least the shared path information received previously. Then, after the simulator 11 receives the shared path information this time, it may compare the shared path information received this time with the shared path information received previously to determine whether the shared path has changed. For example, if the shared path information received previously was "D:Download\AppGallery" and the shared path information received this time was "E:Download\AppGallery," a comparison of the two would indicate that the shared path has changed.

[0077] In one example, electronic device A may also record modification information of the shared path. In this case, electronic device A can determine whether the shared path has changed based on the recorded modification information. When electronic device A determines that the shared path has changed, electronic device A can send a message to simulator 11 indicating the shared path has changed. After simulator 11 receives the message from electronic device A indicating the shared path has changed, simulator 11 is informed that the shared path has changed.

[0078] It should be noted that in this solution, when the shared path changes, the simulator 11 can perform dynamic mounting. When the shared path does not change, the simulator 11 can not perform dynamic mounting and send an installation command to the virtual machine (i.e., the Android system) in the simulator 11 to instruct the virtual machine in the simulator 11 to install the Android application a.

[0079] (4) Dynamic mounting of simulator

[0080] a. Simulator reconstruction virtual device

[0081] In this solution, when the shared path changes, the simulator 11 can destroy the original virtual device and build a new virtual device based on the new shared path, that is, the software initialization of the virtual device. Exemplarily, when the simulator 11 builds a new virtual device, the simulator 11 can request memory from the operating system of electronic device A, and then the simulator 11 sets the corresponding behavior processing function, such as reading or writing the required processing function, and uses the shared path as the read and write directory of the corresponding behavior processing function, that is, the reading and writing of the behavior processing function are all performed in the shared path; finally, the behavior processing function is registered in the simulator, that is, a new virtual device that can point to the shared path can be built, so that when the virtual device is accessed, the files in the shared path can be accessed, thereby completing the software initialization of the virtual device. Exemplarily, the virtual device can allow the virtual machine in the simulator 11 to access the hard disk of electronic device A. It is a virtual device that can point to a certain path under the system of electronic device A, such as a shared path set by the user. Among them, when the virtual device points to the shared path set by the user under the system of electronic device A, the virtual machine in the simulator 11 can access the shared path through the virtual device.

[0082] After the simulator 11 constructs a new virtual device, it can send a mount command to the virtual machine (ie, the Android system) therein through a communication pipeline or communication based on shared memory, so that the virtual machine is mounted on the new virtual device.

[0083] In this solution, the mount command may include a mount method and mount parameters. The mount method may include direct mount or unmount first and then mount; the mount parameters may include: minimum storage unit size, the identifier of the virtual device to be mounted (such as the name, etc.), the directory mounted in the virtual machine, or the type of the specified file system, etc. In one example, the minimum storage unit size can be understood as the size of the minimum storage location allocated for the virtual device. In one example, if there is a device with the same name as the newly constructed virtual device in the mount list of the virtual machine, it means that the newly constructed virtual device is not mounted for the first time. Therefore, in order to avoid conflicts, the mount method may be unmount first and then mount, that is, first unmount the original virtual device and then mount it on the new virtual device. If there is no device with the same name as the newly constructed virtual device in the mount list of the virtual machine, the mount method may be direct mount. In one example, the type of the specified file system may be a 9p file system (plan 9file system, 9pfs).

[0084] In one example, if the virtual machine in the simulator 11 is currently in a dormant state, the simulator 11 may send a wake-up instruction to the virtual machine therein to wake up the virtual machine therein.

[0085] b. Mount the virtual machine in the simulator to the new virtual device

[0086] After the virtual machine in simulator 11 receives the mount command sent by simulator 11, it can uninstall the original virtual device and mount it on a new virtual device. For example, assuming that the name of the virtual device is: virtual_disk, and the directory mounted in the virtual machine is: \data\media, then the corresponding command executed by the virtual machine is: mountvirtual_disk\data\media, that is, the new virtual device is mounted to the \data\media directory; after that, the virtual machine directly accesses \data\media to access the virtual device. Since the virtual device points to a shared path, when the virtual machine accesses the virtual device, it can access the files in the shared path. Exemplarily, the virtual device can be understood as a file sharing medium between the host machine and the virtual machine.

[0087] After the virtual machine is mounted on the new virtual device, the virtual machine may feed back the mounting result to the simulator 11 so that the simulator 11 can obtain the feedback result.

[0088] (5) Installing Android applications in the virtual machine of the simulator

[0089] After learning that the virtual machine therein has been successfully mounted on the new virtual device, the simulator 11 can send an installation command and the application name information of the Android application a to the virtual machine.

[0090] Next, after receiving the installation command sent by emulator 11, the virtual machine can access the virtual device based on the application name information of Android application A, and then access the installation package of Android application A from the shared path pointed to by the virtual device. The virtual machine can then install Android application A. When the virtual machine is successfully installed, the installation result can be fed back to emulator 11 so that the emulator can be informed of the installation result.

[0091] In addition, after the Android application a is successfully installed on the virtual machine, Figure 5 As shown, a shortcut icon of the Android application a can be displayed in the virtual machine, so that the user can easily start or uninstall the Android application a in the virtual machine.

[0092] It is understandable that when the simulator 11 learns that the virtual machine mounting therein fails, it can present failure information to the user so that the user can learn the result of the mounting failure and choose whether to re-mount. Figure 6 As shown, after the mount fails, you can install the corresponding control in Android application a (such as Figure 4a122 in the update display as a retry control (as shown in Figure 6 124 in the figure); thereafter, when the user clicks the retry control 124, the mount can be performed again.

[0093] (6) The application market displays the installation results

[0094] After the simulator 11 learns the installation result, it can send the installation result to the application market 12 via IPC. Afterwards, the application market 12 can display the installation result, such as whether the installation is successful or failed. For example, Figure 7 As shown, after successful installation, you can install the corresponding control in Android application a (such as Figure 4a 122 in the update display as open control or open control (as shown in Figure 7 This completes the installation of the Android app.

[0095] It is understandable that if the simulator 11 in the electronic device A is in an inactive state when the Android application is installed, the simulator 11 can be restored to its inactive state (i.e., initial state) after the Android application is installed. In addition, the above solution is not only applicable to installing Android applications, but also to updating Android applications. The process of updating Android applications is the same as that of installing Android applications, and will not be described in detail here.

[0096] It should be noted that (1), (2), (3), (4), (5), and (6) above do not constitute a restriction on the execution order of the various processes in this solution, and their order can be selectively swapped.

[0097] Therefore, in this solution, during the operation of the virtual machine in the simulator, when the download directory set in the application market of the electronic device changes, the simulator can reconstruct the virtual device based on the new download directory, and the virtual machine in the simulator can be mounted to the reconstructed virtual device, so that the virtual machine in the simulator can directly access the installation package in the new download directory and install the installation package in the new download directory, thereby realizing real-time modification of the shared path between the host machine and the virtual machine during the operation of the virtual machine, and there is no need to restart the virtual machine, so there is no need to close the application currently in use in the virtual machine, and thus does not affect the application currently in use in the virtual machine.

[0098] For ease of understanding, the control method provided in this solution is described below with examples.

[0099] For example, Figure 8 This is a flow chart of a control method provided in an embodiment of the present application. Figure 8The first client and the simulator can be installed on an electronic device, and the electronic device has a first operating system, and the simulator includes a second operating system, and the first operating system is different from the second operating system. Exemplarily, the first operating system can be a Windows operating system, and the second operating system can be an Android operating system. Exemplarily, the first client can be a client with an application providing function, such as an application market, which can provide applications adapted to the second operating system, such as Android applications; the second operating system can be called a virtual machine. Among them, Figure 8 Described in the description is a process of installing an application in a second operating system through a first client.

[0100] like Figure 8 As shown, the control method may include the following steps:

[0101] S801: In response to a user's installation operation on a first application on a first client, the first client downloads an installation package of the first application and stores the installation package in a first storage path.

[0102] Specifically, a user can download a first application in a first client, wherein the first client may have a default download path, namely, a first storage path. In addition, before downloading the first application, the user may also change the first download path. The installation package of the first application may be stored in the first storage path. Exemplarily, the installation operation may be an operation of installing the application or an operation of updating the application, which is not limited here. Exemplarily, the first application may be an Android application. Exemplarily, the first download path may be understood as a shared path.

[0103] S802: The first client sends a first message to the simulator, where the first message is used to instruct the installation of a first application.

[0104] Specifically, after the first client completes the download, a first message can be sent to the simulator via IPC to instruct the simulator to install the first application, so that the simulator can install the first application. Exemplarily, the first message can include one or more of the following: the name of the first application, the first storage path, or information about whether the second storage path has been modified.

[0105] S803: The simulator determines whether the first storage path is the same as the second storage path, where the first storage path is the storage path of the installation package of the first application.

[0106] Specifically, the simulator can verify the first storage path (i.e., the shared path) of the installation package of the first application to determine whether the first storage path is the same as the second storage path, and further determine whether the shared path has changed. The second storage path can be the storage path of the previously installed application or the default storage path on the first client.

[0107] For example, the simulator can compare the first storage path with its recorded storage path information (i.e., shared path information) to determine whether the shared path has changed. In addition, the first client can also send information about whether the second storage path has been modified to the simulator, so that the simulator can determine whether the shared path has changed.

[0108] S804: When the simulator determines that the first storage path is different from the second storage path, the simulator constructs a first virtual device based on the first storage path.

[0109] Specifically, when the simulator determines that the first storage path is different from the second storage path (i.e., the shared path changes), the simulator can construct a first virtual device based on the first storage path. Exemplarily, when constructing the first virtual device, the simulator can apply for memory from the first operating system of the electronic device, and then the simulator sets the corresponding behavior processing function, such as reading or writing the required processing function, and uses the first storage path as the read-write directory of the corresponding behavior processing function, that is, the reading and writing of the behavior processing function are all performed in the first storage path; finally, the behavior processing function is registered in the simulator, and a first virtual device that can point to the first storage path can be constructed. When the second operating system in the simulator accesses the first virtual device, the first storage path can be accessed.

[0110] In one example, before constructing the first virtual device, the simulator may first destroy the second virtual device constructed based on the second storage path.

[0111] S805: The simulator sends a second message to the second operating system, where the second message is used to instruct the second operating system to mount to the first virtual device.

[0112] Specifically, after the simulator creates the first virtual device, it may send a second message for instructing the second operating system to mount to the first virtual device to the second operating system through pipe communication, so that the second operating system is mounted to the first virtual device.

[0113] Exemplarily, the second message may include a mount method and mount parameters. The mount method includes direct mount or unmount first and then mount. The mount parameters include one or more of the following: the name of the first virtual device, the directory mounted in the second operating system, or the type of a specified file system.

[0114] S806: The second operating system is mounted on the first virtual device.

[0115] Specifically, the second operating system can be mounted on the first virtual device according to the mounting method and mounting parameters included in the second message. The detailed mounting process is described above and will not be repeated here.

[0116] S807: The second operating system sends a third message to the simulator, where the third message is used to indicate that the mounting is successful.

[0117] Specifically, after successfully mounting on the first virtual device, the second operating system can send a third message to the simulator to indicate successful mounting via the pipeline communication. In addition, the second operating system can also send a message to the simulator to indicate failed mounting via the pipeline communication when mounting fails.

[0118] S808: In response to the received third message, the simulator sends a fourth message to the second operating system, where the fourth message is used to instruct the second operating system to install the first application.

[0119] Specifically, after the simulator learns that the second operating system is successfully mounted to the first virtual device, it can send a fourth message to the second operating system through pipe communication to instruct the second operating system to install the first application, so that the second operating system installs the first application.

[0120] S809: The second operating system installs the first application.

[0121] Specifically, the second operating system can access the first virtual device, thereby accessing the first storage path, and then obtaining the installation package of the first application stored in the first storage path, and installing the first application.

[0122] S810: The second operating system sends a fifth message to the simulator, where the fifth message is used to indicate the installation result.

[0123] Specifically, the second operating system may send a fifth message indicating an installation result to the simulator via the pipe communication, wherein the installation result may include installation success or installation failure.

[0124] S811. The simulator sends a sixth message to the first client, where the sixth message is used to indicate a result of the second operating system installing the first application.

[0125] Specifically, after the simulator learns the installation result of the first application by the second operating system, it can send a sixth message to the first client via IPC, where the sixth message is used to indicate the installation result of the first application by the second operating system.

[0126] S812. The first client outputs the installation result.

[0127] Specifically, after the first client learns the result of the second operating system installing the first application, it can output the installation result. Exemplarily, the first client can output the installation result in one or more of text, graphics, voice, vibration, etc., so as to show the installation result to the user.

[0128] It is understood that the second message in S805 can also be used to instruct the second operating system to install the first application, that is, after the second operating system is mounted on the first virtual device, the second operating system can install the first application. In this case, in S806, after the second operating system is successfully mounted on the first virtual device, S809 can be directly executed, that is, the second operating system directly installs the first application.

[0129] It is understandable that, at S803, if it is determined that the shared path has not changed, S808 can be directly executed, that is, the fourth message is sent directly to the second operating system via the pipe communication. Detailed descriptions of the above steps can be found in the relevant descriptions above, and will not be repeated here.

[0130] Next, based on the above description, another control method provided in an embodiment of the present application is described.

[0131] For example, Figure 9 This is a flow chart of another control method provided by an embodiment of the present application. Figure 9 The first client and the simulator can both be installed on an electronic device, and the electronic device has a first operating system, and the simulator includes a second operating system, and the first operating system is different from the second operating system. Exemplarily, the first operating system can be a Windows operating system, and the second operating system can be an Android operating system. Exemplarily, the first client can be a client with application provisioning capabilities, such as an application market that can provide applications adapted for the second operating system, such as Android applications; the second operating system can be referred to as a virtual machine. Figure 9 The process of installing an application in a second operating system through a first client is described in [1]. Figure 9 and Figure 8 The difference is that Figure 9 The first client can send the storage path (i.e., shared path) set by the user or information about whether the storage path has changed to the simulator in advance, so that the simulator can know in advance whether the shared path has changed. Then, when installing the application, it can directly determine whether to rebuild the virtual device based on the judgment result, avoiding the need to judge whether the shared path has changed during installation, thereby improving installation efficiency.

[0132] like Figure 9 As shown, the control method may include the following steps:

[0133] S901: A first client sends a sixth message to a simulator, where the sixth message is used to indicate a first storage path in the first client.

[0134] Specifically, the first client may periodically send a sixth message to the simulator. The sixth message is used to indicate the first storage path in the first client. Furthermore, the first client may also send the sixth message to the simulator after the storage path changes, which is not limited here. The first storage path may be a default download path or a download path modified by the user. The first storage path may store the installation package of the first application.

[0135] S902: The simulator determines whether the first storage path and the second storage path are the same, and stores the determination result.

[0136] Specifically, after receiving the sixth message, the simulator can determine whether the first storage path and the second storage path are the same, thereby obtaining a determination result and storing the determination result. The second storage path is the storage path where the installation package of the previously installed application is located, or the storage path sent by the first client that the simulator previously received.

[0137] S903: In response to the user's installation operation on the first client for the first application, the first client downloads the installation package of the first application and stores the installation package in the first storage path.

[0138] Specifically, a user can download a first application in a first client, wherein the first client may have a default download path, namely, a first storage path. In addition, before downloading the first application, the user may also change the first download path. The installation package of the first application may be stored in the first storage path. Exemplarily, the installation operation may be an operation of installing the application or an operation of updating the application, which is not limited here. Exemplarily, the first application may be an Android application. Exemplarily, the first download path may be understood as a shared path.

[0139] S904: The first client sends a first message to the simulator, where the first message is used to instruct the installation of a first application.

[0140] Specifically, after the first client completes the download, a first message can be sent to the simulator via IPC to instruct the simulator to install the first application, so that the simulator can install the first application. Exemplarily, the first message can include one or more of the following: the name of the first application, the first storage path, or information about whether the second storage path has been modified.

[0141] S905 : When the simulator determines that the storage path has changed, it constructs a first virtual device based on the first storage path.

[0142] Specifically, when the judgment result is that the storage path has changed (ie, the shared path has changed), the simulator can construct a first virtual device based on the first storage path. Please refer to the above description for details, which will not be repeated here.

[0143] S906: The simulator sends a second message to the second operating system, where the second message is used to instruct the second operating system to mount to the first virtual device.

[0144] Specifically, after the simulator creates the first virtual device, it can send a second message to the second operating system through pipe communication to instruct the second operating system to mount to the first virtual device, so that the second operating system can mount to the first virtual device. Exemplarily, the second message can include a mount method and mount parameters. The mount method includes direct mount or unmount first and then mount. The mount parameters include one or more of the following: the name of the first virtual device, the directory mounted to the second operating system, or the type of the specified file system.

[0145] S907: The second operating system is mounted on the first virtual device.

[0146] Specifically, the second operating system can be mounted on the first virtual device according to the mounting method and mounting parameters included in the second message. The detailed mounting process is described above and will not be repeated here.

[0147] S908. The second operating system sends a third message to the simulator, where the third message is used to indicate that the mounting is successful.

[0148] Specifically, after successfully mounting on the first virtual device, the second operating system can send a third message to the simulator to indicate successful mounting via the pipeline communication. In addition, the second operating system can also send a message to the simulator to indicate failed mounting via the pipeline communication when mounting fails.

[0149] S909 . In response to the received third message, the simulator sends a fourth message to the second operating system, where the fourth message is used to instruct the second operating system to install the first application.

[0150] Specifically, after the simulator learns that the second operating system is successfully mounted to the first virtual device, it can send a fourth message to the second operating system through pipeline communication to instruct the second operating system to install the first application, so that the second operating system can install the first application.

[0151] S910: The second operating system installs the first application.

[0152] Specifically, the second operating system can access the first virtual device, thereby accessing the first storage path, and then obtaining the installation package of the first application stored in the first storage path, and installing the first application.

[0153] S911. The second operating system sends a fifth message to the simulator, where the fifth message is used to indicate the installation result.

[0154] Specifically, the second operating system may send a fifth message indicating an installation result to the simulator via the pipe communication, wherein the installation result may include installation success or installation failure.

[0155] S912: The simulator sends a sixth message to the first client, where the sixth message is used to indicate a result of the second operating system installing the first application.

[0156] Specifically, after the simulator learns the installation result of the first application by the second operating system, it can send a sixth message to the first client via IPC, where the sixth message is used to indicate the installation result of the first application by the second operating system.

[0157] S913: The first client outputs the installation result.

[0158] Specifically, after the first client learns the result of the second operating system installing the first application, it can output the installation result. Exemplarily, the first client can output the installation result in one or more of text, graphics, voice, vibration, etc., so as to show the installation result to the user.

[0159] It is understood that at S904, if the result of the determination is that the shared path has not changed, S908 can be executed directly, i.e., by directly sending the fourth message to the virtual machine. For detailed descriptions of each of the above steps, please refer to the relevant descriptions above. Furthermore, S902 and S903 can be separated by a preset time interval, or S903 can be executed immediately after S902 is executed, which is not limited here.

[0160] Next, based on the above description, another control method provided in an embodiment of the present application is described.

[0161] For example, Figure 10 This is a flow chart of another control method provided in the embodiment of the present application. Figure 10The first client and the simulator can both be installed on an electronic device, and the electronic device has a first operating system, and the simulator includes a second operating system, and the first operating system is different from the second operating system. In addition, the electronic device can be connected to other electronic devices (such as mobile phones, etc.). Exemplarily, the first operating system can be a Windows operating system, and the second operating system can be an Android operating system. Exemplarily, the first client can be a client with an application migration function, such as a mobile phone manager, etc.; the second operating system can be called a virtual machine. Figure 10 What is mainly described is the process of migrating applications (such as Android applications, etc.) on other electronic devices connected to the electronic device to the second operating system through the first client.

[0162] like Figure 10 As shown, the method may include the following steps:

[0163] S1001: In response to a user's migration operation on a target application on a first client, the first client stores application data of the target application in a first storage path.

[0164] Specifically, after a user establishes a connection between a first electronic device (e.g., a mobile phone) and a second electronic device installed with the simulator, the user can perform a migration operation on a target application installed on the first electronic device in the first client. After receiving the user's migration operation on the target application, the first client can write the application data of the target application to a first storage path preset by the user or by the system default on the second electronic device.

[0165] S1002: The first client sends a seventh message to the simulator. The seventh message is used to instruct the simulator to migrate the target application. The seventh message may include the first storage path.

[0166] Specifically, the first client may send a seventh message to the simulator for instructing the simulator to migrate the target application. Exemplarily, the seventh message may include the name of the target application and the first storage path, or the name of the target application and a migration identifier for indicating the first storage path.

[0167] S1003: The simulator determines whether the first storage path is the same as the second storage path.

[0168] Specifically, the simulator may compare the first storage path with the second storage path to determine whether the two are the same, wherein the second storage path may be a path recorded by the simulator when the application migration was last executed.

[0169] S1004: When the simulator determines that the first storage path is different from the second storage path, the simulator constructs a first virtual device based on the first storage path.

[0170] Specifically, when the simulator determines that the first storage path is different from the second storage path (ie, the shared path changes), the simulator can construct a first virtual device based on the first storage path. See the above description for details and will not be repeated here.

[0171] S1005. The simulator sends a second message to the second operating system, where the second message is used to instruct the second operating system to mount to the first virtual device.

[0172] Specifically, after the simulator creates the first virtual device, it can send a second message to the second operating system through pipe communication to instruct the second operating system to mount to the first virtual device, so that the second operating system can mount to the first virtual device. Exemplarily, the second message can include a mount method and mount parameters. The mount method includes direct mount or unmount first and then mount. The mount parameters include one or more of the following: the name of the first virtual device, the directory mounted to the second operating system, or the type of the specified file system.

[0173] S1006. The second operating system is mounted on the first virtual device.

[0174] Specifically, the second operating system can be mounted on the first virtual device according to the mounting method and mounting parameters included in the second message. The detailed mounting process is described above and will not be repeated here.

[0175] S1007: The second operating system sends a third message to the simulator, where the third message is used to indicate that the mounting is successful.

[0176] Specifically, after successfully mounting on the first virtual device, the second operating system can send a third message to the simulator to indicate successful mounting via the pipeline communication. In addition, the second operating system can also send a message to the simulator to indicate failed mounting via the pipeline communication when mounting fails.

[0177] S1008. In response to the received third message, the simulator sends an eighth message to the second operating system, where the eighth message is used to instruct the second operating system to migrate the target application.

[0178] Specifically, after learning that the virtual machine is mounted successfully, the simulator may send an eighth message to the second operating system for instructing the second operating system to migrate the target application, so that the second operating system can migrate the target application.

[0179] S10010. The second operating system migrates the target application.

[0180] Specifically, after receiving the eighth message, the second operating system can access the application data of the target application in the first storage path by accessing the mounted first virtual device, and then migrate the target application based on the application data of the target application.

[0181] S1010: The second operating system outputs a target application.

[0182] Specifically, after the second operating system completes the migration of the target application, it can output the target application, such as displaying the icon of the target application, and providing a voice prompt to the user that the migration is complete. In addition, the second operating system can also feedback the migration result to the simulator, so that the simulator can feedback the migration result to the first client.

[0183] For example, after the second operating system completes the migration of the target application, the user can open the target application on the second operating system and view its historical usage data on the first electronic device from the target application. For example, if the target application is a social application, the user can view the chat history of the target application on the first electronic device from the target application in the second operating system.

[0184] It is understandable that, if it is determined that the shared path has not changed at S1003, S1008 can be directly executed, that is, the eighth message is directly sent to the virtual machine. Detailed descriptions of the above steps can be found in the relevant descriptions above, and will not be repeated here.

[0185] Based on the method in the above embodiment, the present application embodiment also provides a chip. Figure 11 , Figure 11 This is a schematic diagram of the structure of a chip provided in an embodiment of the present application. Figure 11 As shown, the chip 1100 includes one or more processors 1101 and an interface circuit 1102. Optionally, the chip 1100 may also include a bus 1103.

[0186] The processor 1101 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 1101 or an instruction in the form of software. The above-mentioned processor 1101 can be a general-purpose processor, a digital communicator (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods and steps disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The interface circuit 1102 can be used for sending or receiving data, instructions or information. The processor 1101 can use the data, instructions or other information received by the interface circuit 1102 to process, and the processing completion information can be sent out through the interface circuit 1102.

[0187] Optionally, the chip also includes a memory, which may include a read-only memory and a random access memory, and provides operating instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM). Optionally, the memory stores executable software modules or data structures, and the processor can perform corresponding operations by calling operating instructions stored in the memory (the operating instructions may be stored in the operating system).

[0188] Optionally, the interface circuit 1102 may be configured to output the execution result of the processor 1101 .

[0189] It should be noted that the corresponding functions of the processor 1101 and the interface circuit 1102 can be implemented through hardware design, software design, or a combination of hardware and software, and there is no limitation here.

[0190] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or software-based instructions in a processor. In particular, the chip can be applied to the above-mentioned electronic device A to implement the method performed by the electronic device A provided in the embodiment of the present application.

[0191] Figure 12 1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device includes: a processor 1210, a memory 1220, a communication interface 1230, and a bus 1240. For example, the electronic device can be Figure 2 The electronic device A shown in FIG.

[0192] The processor 1210 may be connected to a memory 1220. The memory 1220 may be used to store the program code and data. Therefore, the memory 1220 may be a storage unit within the processor 1210, an external storage unit independent of the processor 1210, or a component including a storage unit within the processor 1210 and an external storage unit independent of the processor 1210. Exemplarily, the processor 1210 may be used to execute the method provided in the embodiments of the present application.

[0193] Optionally, the electronic device may further include a bus 1240. The memory 1220 and the communication interface 1230 may be connected to the processor 1210 via the bus 1240. The bus 1240 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 1240 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 The fact that only one line is used does not mean that there is only one bus or one type of bus.

[0194] It should be understood that in the embodiments of the present application, the processor 1210 may be a CPU. The processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. Alternatively, the processor 1210 may be one or more integrated circuits for executing relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0195] The memory 1220 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1010. A portion of the processor 1210 may also include a non-volatile random access memory. For example, the processor 1010 may also store device type information.

[0196] When the electronic device is running, the processor 1210 executes the computer-executable instructions in the memory 1220 to perform the operating steps of the above method.

[0197] In an embodiment of the present application, an electronic device may include a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer may include hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system of the operating system layer may be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer may include applications such as a browser, an address book, a word processing software, and an instant messaging software.

[0198] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0199] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0200] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted via the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0201] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.

Claims

1. A control method, characterized in that: Applied to a simulator, the simulator is used to be installed on an electronic device, the electronic device has a first operating system, and the simulator includes a second operating system, the method comprising: In response to receiving a first message sent by a first client on the electronic device, determining whether the first storage path and the second storage path are the same, wherein the first message is used to instruct installation of a first application, and the first storage path is a storage path of an installation package of the first application; When the first storage path is different from the second storage path, destroying the second virtual device and constructing the first virtual device based on the first storage path, and the second virtual device is constructed based on the second storage path; Sending a second message to the second operating system, where the second message is used to instruct the second operating system to mount to the first virtual device; a received third message sent by the second operating system, wherein the third message is used to indicate that the second operating system has been successfully mounted; A fourth message is sent to the second operating system, so that the second operating system responds to the fourth message and installs the first application when the simulator is running.

2. The method according to claim 1, characterized in that The second message is further used to instruct the second operating system to install the first application.

3. The method according to any one of claims 1-2, characterized in that The first message includes one or more of the following: The name of the first application, the first storage path, or information on whether the second storage path has been modified.

4. The method according to claim 3, characterized in that The second message includes the mounting method and mounting parameters.

5. The method according to claim 4, characterized in that The mounting method includes direct mounting or uninstalling first and then mounting.

6. The method according to claim 4, characterized in that The mount parameters include one or more of the following: The name of the first virtual device, the directory mounted to the second operating system, or the type of the specified file system.

7. The method according to claim 6, characterized in that The first client is a client having an application providing function, or the first client is a client having an application migration function.

8. The method according to claim 7, characterized in that The first operating system is a Windows operating system, the second operating system is an Android operating system, and the first application is an Android application.

9. The method according to claim 8, characterized in that The first virtual device is used for the second operating system to access the first storage path.

10. The method according to claim 9, characterized in that The second storage path is a storage path of a second application, and the second application is an application that was installed previously.

11. A control method, characterized in that: Applied to an electronic device, the electronic device having a first operating system, the electronic device having a simulator installed thereon, the simulator including a second operating system, the method comprising: In response to a user performing an installation operation on a first client on the electronic device on a first application, determining whether a first storage path and a second storage path are the same, the first storage path being a storage path of an installation package of the first application; When the first storage path and the second storage path are different, destroying the second virtual device, and constructing the first virtual device based on the first storage path, and mounting the second operating system to the first virtual device; the second virtual device is constructed based on the second storage path; The first application is installed, and the first application is displayed.

12. The method according to claim 11, characterized in that The first client is a client having an application providing function, or the first client is a client having an application migration function.

13. The method according to any one of claims 11 or 12, characterized in that The first operating system is a Windows operating system, the second operating system is an Android operating system, and the first application is an Android application.

14. The method according to claim 13, characterized in that The first virtual device is used for the second operating system to access the first storage path.

15. The method according to claim 14, characterized in that The second storage path is a storage path of a second application, and the second application is an application that was installed previously.

16. An electronic device, characterized in that: The electronic device comprises a processor coupled to a memory, and the processor is configured to execute a computer program or instruction stored in the memory, so that the electronic device implements the method according to any one of claims 1 to 15.

17. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 15.

18. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a computer, the computer is caused to implement the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Virtual machine management system and file access method

    CN102968331A

  • Method and system for installing application program

    CN105700923A