Method and related device for running Linux application through open source swan mongolian operating system

By converting Linux applications into standard packaging formats of the open-source HarmonyOS operating system and deploying a terminal emulator in a sandbox environment, the problem of open-source HarmonyOS being unable to directly run Linux applications is solved, enabling efficient and secure application operation and reducing development costs and complexity.

CN120848971APending Publication Date: 2025-10-28INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510684994.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

The existing open-source HarmonyOS cannot directly run Linux applications. Traditional methods such as virtual machines are inefficient, and recompiling source code is complex and costly, resulting in a poor user experience.

Method used

Linux applications are converted into standard packaging formats of the open-source HarmonyOS operating system and deployed in a sandbox environment. System call requests are dynamically intercepted through a terminal emulator, and the monitoring process is used to convert them into equivalent operations supported by open-source HarmonyOS. Combined with permission management and resource isolation technologies, secure and controlled operation of applications is achieved.

Benefits of technology

It eliminates the need to recompile the source code or rely on a virtual machine, reducing development costs, enriching the software ecosystem of the open-source HarmonyOS operating system, improving user experience and system stability, and preventing malicious software from damaging the core functions of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848971A_ABST
    Figure CN120848971A_ABST
Patent Text Reader

Abstract

The invention provides a method and a related device for running a Linux application by an open source gap operating system. The method comprises the following steps of: converting a Linux application program into a standard packaging format package of the open source gap operating system; the Linux application programs are deployed in a sandbox environment of an open source gap operating system, data spaces among the Linux application programs in the sandbox environment are isolated, and the Linux application programs do not directly access the application programs of the open source gap operating system; a plurality of terminal simulators are deployed on an open source gap operating system, a monitoring process is created through a pseudo terminal provided by the front end of each terminal simulator, the terminal simulators dynamically intercept system calling requests of application programs through the monitoring processes, and the system calling requests of the application programs are converted into equivalent operation supported by the open source gap. According to the method, the application program of the Linux platform is directly operated through the terminal simulator, source codes do not need to be recompiled or a virtual machine does not need to be relied on, the development cost is reduced, and the software ecology of an open-source and wide-gap operating system is enriched.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and related apparatus for running Linux applications on the open-source HarmonyOS operating system. Background Technology

[0002] OpenHarmony is a distributed operating system designed for all scenarios and widely used in IoT, smart terminals, and other fields. However, because Linux is built on glibc while OpenHarmony is built on musl, existing Linux applications cannot run directly on OpenHarmony. Since OpenHarmony uses musl instead of glibc, the dynamic link libraries and system call interfaces of Linux applications are not directly compatible with the OpenHarmony operating system. Currently, running Linux programs on OpenHarmony mainly includes virtual machine methods and source code recompilation methods. The virtual machine method refers to running OpenHarmony and its applications on a Linux system through a virtual machine. However, OpenHarmony itself has limited support for virtual machines, insufficient support for virtualization, and low virtual machine running efficiency, making it difficult to provide a good user experience on resource-constrained devices. The source code recompilation method involves recompiling the source code of Linux applications to adapt it to the OpenHarmony system architecture. However, this method suffers from the problem that closed-source software cannot obtain the source code, leading to portability issues. Recompilation involves a large amount of adaptation work, increasing development costs. Furthermore, running and debugging usually requires external serial ports or debugging tools, making the operation complex. Summary of the Invention

[0003] This invention provides a method and related apparatus for running Linux applications on the open-source HarmonyOS operating system, which solves the shortcomings of traditional methods for running Linux applications on the open-source HarmonyOS operating system, such as affecting user experience or requiring a lot of extra work, increasing development costs and complexity due to recompiling and reinstalling software.

[0004] This invention provides a method for running Linux applications on the open-source HarmonyOS operating system, comprising: Convert Linux applications into standard packaging format packages for the open-source HarmonyOS operating system; The standard packaging format package is deployed to the sandbox environment of the open-source HarmonyOS operating system. The data space between each Linux application in the sandbox environment is isolated and does not directly communicate with the open-source HarmonyOS operating system applications outside the sandbox. Multiple terminal emulators are deployed on the open-source HarmonyOS operating system. A monitoring process is created through a pseudo terminal provided by the front end of each terminal emulator. The terminal emulator dynamically intercepts the system call requests of the Linux application through the monitoring process, converts the system call requests of the Linux application into equivalent operations supported by open-source HarmonyOS, and loads the corresponding Linux application.

[0005] According to the method for running Linux applications on the open-source HarmonyOS provided by the present invention, the monitoring process is further used to dynamically manage the permission requests of Linux applications, specifically including: If the requested permissions are within the permission list of the terminal emulator, then access to the target Linux application's interface is directly granted; If the requested permission is not within the permission list of the terminal emulator, then permission is requested from the open-source HarmonyOS operating system.

[0006] According to the method for running Linux applications on the open-source HarmonyOS provided by the present invention, the permissions in the permission list range are the basic permissions that support the basic operation of Linux applications.

[0007] According to the method for running Linux applications on the open-source HarmonyOS provided by the present invention, the data space isolation between Linux applications in the sandbox environment includes: A unique security context label is assigned to each application's process and file. This security context label is used to restrict cross-context access, so that the data spaces of each Linux application are independent and isolated from each other.

[0008] According to the method for running Linux applications on the open-source HarmonyOS provided by the present invention, the monitoring process is also used to redirect external file access requests to a separate Linux application data space.

[0009] The method for running Linux applications using the open-source HarmonyOS operating system provided by the present invention further includes: A new configuration file is added to the standard packaging format package. The configuration file includes path mapping relationships, which are used to map standard Linux file system paths in the Linux application to private directories within the sandbox environment of the open-source HarmonyOS operating system.

[0010] According to the method for running Linux applications on the open-source HarmonyOS provided by the present invention, the configuration file also includes CPU and memory resource management information; The monitoring process is also used to read preset CPU or memory limit parameters from the configuration file of the standard package format package; Add the preset CPU or memory limit parameters to the corresponding cgroup group; When a Linux application is launched, its process ID is added to the corresponding cgroup group to limit its operation based on preset CPU or memory limit parameters.

[0011] This invention provides an open-source HarmonyOS operating system, comprising: Multiple terminal emulators create monitoring processes through pseudo-terminals provided by each terminal emulator's front end. The terminal emulators dynamically intercept system call requests from the Linux applications through the monitoring processes, convert the system call requests from the Linux applications into equivalent operations supported by the open-source HarmonyOS, and load the corresponding Linux applications. The user framework subsystem is used to convert Linux applications into standard packaging format packages of the open-source HarmonyOS operating system; and to deploy the standard packaging format packages into the sandbox environment of the open-source HarmonyOS operating system. The data space between each Linux application in the sandbox environment is isolated, and they do not directly communicate with open-source HarmonyOS applications outside the sandbox.

[0012] The open-source HarmonyOS operating system provided by this invention also includes: The permission management module is used to dynamically manage permission requests from Linux applications. Specifically, if the requested permission is within the permission list of the terminal emulator, then direct authorization is granted to access the target Linux application's interface; if the requested permission is not within the permission list of the terminal emulator, then permission is requested from the open-source HarmonyOS operating system.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for running Linux applications on the open-source HarmonyOS operating system described in any of the preceding claims.

[0014] This invention provides a method and related apparatus for running Linux applications on the open-source HarmonyOS operating system. The method involves converting Linux applications into standard packaging formats for the open-source HarmonyOS; deploying these standard packaging formats into a sandbox environment within the open-source HarmonyOS operating system, where data spaces are isolated between Linux applications and they do not directly interact with applications outside the sandbox; deploying multiple terminal emulators on the open-source HarmonyOS operating system; creating monitoring processes through pseudo-terminals provided by each terminal emulator's front end; dynamically intercepting system call requests from Linux applications through these monitoring processes; converting these system call requests into equivalent operations supported by open-source HarmonyOS; and loading the corresponding Linux applications. This invention allows direct execution of Linux platform applications via terminal emulators without recompiling source code or relying on virtual machines, reducing development costs and enabling the direct execution of unmodified Linux binaries on open-source HarmonyOS, thus enriching the software ecosystem of the open-source HarmonyOS operating system. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0016] Figure 1 This is one of the flowcharts illustrating the method for running Linux applications on the open-source HarmonyOS operating system provided in this embodiment of the invention; Figure 2 This is the second flowchart illustrating the method for running Linux applications on the open-source HarmonyOS operating system provided in this embodiment of the invention. Figure 3 This is a schematic diagram of the functional structure of the open-source HarmonyOS provided in an embodiment of the present invention. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0018] Figure 1 A flowchart illustrating the method for running Linux applications on the open-source HarmonyOS operating system provided in this embodiment of the invention is shown below. Figure 1 As shown in the embodiment of the present invention, the method for running Linux applications on the open-source HarmonyOS operating system includes: Step 101: Convert the Linux application into a standard packaging format package of the open-source HarmonyOS operating system; In this embodiment of the invention, the Linux application is, for example, an AppImage application. AppImage is a general-purpose package format used to package an application and all its dependencies into a single executable file. The standard packaging format is the HAP (Harmony Ability Package) package. HAP packages include configuration files for information such as paths, permissions, and CPU / memory resource management. The HAP package is used as a carrier for adaptation and conversion. Through HAP packaging, non-graphical programs that originally depended on the Linux environment can run on the open-source HarmonyOS system without recompiling their source code, solving the cross-system ecosystem compatibility problem.

[0019] Step 102: Deploy the standard packaging format package to the sandbox environment of the open source HarmonyOS. The data space between each Linux application in the sandbox environment is isolated and does not directly communicate with the open source HarmonyOS applications outside the sandbox. Step 103: Deploy multiple terminal emulators on the open-source HarmonyOS operating system. Create a monitoring process through the pseudo terminal provided by the front end of each terminal emulator. The terminal emulator dynamically intercepts the system call requests of the Linux application through the monitoring process, converts the system call requests of the Linux application into equivalent operations supported by open-source HarmonyOS, and loads the corresponding Linux application.

[0020] In this embodiment of the invention, since the system call numbers of musl and glibc may be different, the monitoring process needs to maintain a mapping table to convert the glibc call number into the equivalent musl call. For example, if the glibc call is SYS_open(glibc), the corresponding musl call is SYS_openat(musl). The processing logic for converting the glibc call number into the equivalent musl call redirects the path parameter from / usr / bin to the path within the sandbox. Traditionally, running Linux programs on open-source HarmonyOS mainly includes containerization and source code recompilation. Containerization refers to running open-source HarmonyOS and its applications on a Linux system through a container. However, open-source HarmonyOS itself has limited support for containers, making it difficult to provide a good user experience on resource-constrained devices. Source code recompilation involves recompiling the source code of Linux applications to adapt them to the system architecture of open-source HarmonyOS. However, this method has the problem that closed-source software cannot obtain the source code, leading to portability issues. Recompilation involves a lot of adaptation work, increasing development costs. Furthermore, running and debugging usually requires external serial ports or debugging tools, making the operation complex.

[0021] The method for running Linux applications on the open-source HarmonyOS provided in this invention involves converting Linux applications into standard packaging format packages of the open-source HarmonyOS; deploying the standard packaging format packages into a sandbox environment of the open-source HarmonyOS, where the data spaces of each Linux application are isolated and they do not directly communicate with open-source HarmonyOS applications outside the sandbox; deploying multiple terminal emulators on the open-source HarmonyOS, creating a monitoring process through a pseudo-terminal provided by the front end of each terminal emulator, and dynamically intercepting system call requests from the Linux applications through the monitoring process, converting the system call requests from the Linux applications into equivalent operations supported by open-source HarmonyOS, and loading the corresponding Linux applications. This invention allows Linux platform applications to be run directly through terminal emulators without recompiling the source code or relying on virtual machines, reducing development costs and enriching the software ecosystem of the open-source HarmonyOS.

[0022] Based on any of the above embodiments, the monitoring process is also used to dynamically manage permission requests from Linux applications, specifically including: If the requested permissions are within the permission list of the terminal emulator, then access to the target Linux application's interface is directly granted; If the requested permission is not within the permission list of the terminal emulator, then permission is requested from the open-source HarmonyOS operating system.

[0023] The new configuration files added during the conversion (such as path mapping, permission configuration, CPU / memory limits) will be integrated into the HAP package to ensure that the application can access system resources in a controlled manner when running in the open-source HarmonyOS sandbox environment.

[0024] In this embodiment of the invention, the permissions in the permission list are basic permissions that support the basic operation of Linux applications, such as file read / write and network access.

[0025] The terminal emulator front end provides a pseudo-terminal for operation. This pseudo-terminal creates a monitor process that loads and processes each executed program according to its configuration, handling new permission settings such as... Figure 2 As shown: (1) When adding new application permissions, if the permission requested by the application is in the emulator permission list, the target interface can be directly accessed; (2) When the requested permission is not within the emulator's permission scope, request permission from the system; (3) When the requested permissions do not involve sensitive information of the user or device, the system may allow the application to access the target interface; (4) When the requested permissions involve sensitive information of the user or device, request authorization from the user. Once authorized, the user can access the target interface.

[0026] The newly added permission management features described above allow Linux platform applications to be added to the open-source HarmonyOS operating system under supervision. This restricts application access to sensitive resources and prevents malware attacks.

[0027] Based on any of the above embodiments, the data space isolation between Linux applications in the sandbox environment includes: A unique security context label is assigned to each application's process and file. This security context label is used to restrict cross-context access, so that the data spaces of each Linux application are independent and isolated from each other.

[0028] Security context labels are security tags used in SELinux to identify and control access permissions for system resources (such as files, processes, and ports). Each object (such as a file) and subject (such as a process) is assigned a unique security context to define its access rules. Modifying a security context must adhere to SELinux policy rules; incorrect labels may cause services to malfunction. SELinux security contexts, implemented as tags, provide fine-grained access control, facilitating more precise management of resource permissions in security policy configurations.

[0029] In this embodiment of the invention, an independent data space refers to a private runtime environment allocated to each application through isolation technology. The permission rules configured in the HAP package are combined with the SELinux policy to ensure that each application runs in an independent data space and prevent cross-application resource access from going beyond its boundaries.

[0030] In this embodiment of the invention, the monitoring process is also used to redirect external file access requests to a separate Linux application data space.

[0031] In this embodiment of the invention, the `mount` operation redirects application access requests to external files to an independent data space within the sandbox, ensuring isolation from the open-source HarmonyOS main system. For example, standard file paths of Linux applications (such as ` / usr`, ` / var`) are redirected to private directories within the sandbox. If an application attempts to read sensitive user data (such as contacts), its request will be redirected to a virtual file within the independent data space, rather than a real system file.

[0032] Virtual machines achieve system-wide isolation through hardware virtualization, while independent data spaces, based on lightweight isolation technology, have lower resource overhead. Independent data spaces are the core mechanism for security and compatibility assurance in the patented technology. Through file redirection, SELinux policies, namespaces, and other technologies, they provide a "sandbox within a sandbox" for Linux programs, preserving the richness of the Linux ecosystem while complying with the security specifications of the open-source HarmonyOS.

[0033] Based on any of the above embodiments, the method for running Linux applications using the open-source HarmonyOS operating system further includes: A new configuration file is added to the standard packaging format package. The configuration file includes path mapping relationships, which are used to map standard Linux file system paths in the Linux application to private directories within the sandbox environment of the open-source HarmonyOS operating system.

[0034] In this embodiment of the invention, the configuration file also includes CPU and memory resource management information; The monitoring process is also used to read preset CPU or memory limit parameters from the configuration file of the standard package format package; Add the preset CPU or memory limit parameters to the corresponding cgroup group; When a Linux application is launched, its process ID is added to the corresponding cgroup group to limit its operation based on the corresponding CPU or memory limit parameters.

[0035] Cgroups are a resource isolation and management mechanism provided by the Linux kernel. They can limit, allocate, and monitor the following resources of a group of processes: CPU utilization (e.g., allocating CPU time slices, kernel binding), memory usage (e.g., setting memory limits, controlling memory overflow behavior), disk I / O bandwidth (e.g., read / write rate limits), and network bandwidth. In this embodiment of the invention, after the CPU / memory resource management information in the HAP packet is parsed by the monitoring process, cgroup technology is used to impose hard limits on the application's resource usage (e.g., CPU quotas, memory limits) to prevent resource abuse.

[0036] For example, the monitoring process reads preset CPU / memory limit parameters (such as cpu_quota=50%, memory_limit=2GB) from the HAP package's configuration file. Based on these parameters, the monitoring process creates a corresponding cgroup (such as sandbox_app1) in the open-source HarmonyOS sandbox and writes the restriction rules. When the application starts, its process ID (PID) is added to the corresponding cgroup to ensure resource limits are effective: preventing a bug or malicious behavior from exhausting CPU / memory, causing system crashes or other application crashes. It ensures that when multiple applications share resources, CPU time is allocated according to weight, avoiding resource contention. Furthermore, multiple instances of the same application can run in parallel, each with its own independent data copy, avoiding configuration conflicts.

[0037] The method for running Linux applications on the open-source HarmonyOS provided in this invention enables the secure and controlled execution of Linux programs within the open-source HarmonyOS ecosystem. It eliminates the need to modify source code or rely on virtual machines. Developers do not need to modify the source code of Linux applications to adapt to HarmonyOS, significantly reducing porting workload and improving development efficiency. Combined with HarmonyOS's permission management capabilities, it allows for independent permission configuration for each application, restricting access to sensitive interfaces. SELinux and data sandboxing technologies isolate the application runtime environment, preventing malicious software from accessing or damaging core system functions across applications. cgroup technology dynamically allocates CPU, memory, and other resources, preventing single applications from excessively consuming system resources. The independent sandbox environment ensures that Linux applications and native HarmonyOS applications do not interfere with each other, improving overall system stability. It eliminates the need for virtual machines or complex external tools (such as serial ports or HDC), avoiding direct execution of programs as the root user. Users can directly operate Linux applications through a pseudo-terminal. User authorization mechanisms enhance controllability for sensitive operations, balancing convenience and security.

[0038] The open-source HarmonyOS provided by this invention is described below. The open-source HarmonyOS described below and the method of running Linux applications on the open-source HarmonyOS described above can be referred to in correspondence.

[0039] Figure 3 This is a schematic diagram of the structure of the open-source HarmonyOS provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the open-source HarmonyOS provided in this embodiment of the invention includes: Multiple terminal emulators create monitoring processes through pseudo-terminals provided by each terminal emulator's front end. The terminal emulators dynamically intercept system call requests from the Linux applications through the monitoring processes, convert the system call requests from the Linux applications into equivalent operations supported by the open-source HarmonyOS, and load the corresponding Linux applications. The user framework subsystem is used to convert Linux applications into standard packaging format packages of the open-source HarmonyOS operating system; and to deploy the standard packaging format packages into the sandbox environment of the open-source HarmonyOS operating system. The data space between each Linux application in the sandbox environment is isolated, and they do not directly communicate with open-source HarmonyOS applications outside the sandbox.

[0040] In this embodiment of the invention, the open-source HarmonyOS operating system further includes: The permission management module is used to dynamically manage permission requests from Linux applications. Specifically, if the requested permission is within the permission list of the terminal emulator, then direct authorization is granted to access the target Linux application's interface; if the requested permission is not within the permission list of the terminal emulator, then permission is requested from the open-source HarmonyOS operating system.

[0041] The open-source HarmonyOS provided in this invention converts Linux applications into standard packaging formats for the open-source HarmonyOS. These standard packaging formats are then deployed into a sandbox environment within the open-source HarmonyOS. Data spaces between Linux applications within the sandbox environment are isolated, and they do not directly interact with other open-source HarmonyOS applications outside the sandbox. Multiple terminal emulators are deployed on the open-source HarmonyOS. Each terminal emulator creates a monitoring process through a pseudo-terminal provided in its front end. The terminal emulator dynamically intercepts system call requests from Linux applications through these monitoring processes, converting the system call requests into equivalent operations supported by open-source HarmonyOS and loading the corresponding Linux applications. This invention allows Linux platform applications to run directly through terminal emulators without recompiling source code or relying on virtual machines, reducing development costs and enriching the software ecosystem of the open-source HarmonyOS. Users can directly operate Linux applications through pseudo-terminals, and a user authorization mechanism enhances controllability for sensitive operations, balancing convenience and security.

[0042] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for running Linux applications on the open-source HarmonyOS provided by the above methods. The method includes: converting the Linux application into a standard packaging format package of the open-source HarmonyOS; deploying the standard packaging format package into a sandbox environment of the open-source HarmonyOS, wherein the data spaces of each Linux application in the sandbox environment are isolated and do not directly access each other with open-source HarmonyOS applications outside the sandbox; deploying multiple terminal emulators on the open-source HarmonyOS, creating a monitoring process through a pseudo-terminal provided by the front end of each terminal emulator, wherein the terminal emulator dynamically intercepts system call requests of the Linux application through the monitoring process, converts the system call requests of the Linux application into equivalent operations supported by open-source HarmonyOS, and loads the corresponding Linux application.

[0043] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0044] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for running Linux applications on the open-source HarmonyOS operating system, characterized in that, include: Convert Linux applications into standard packaging format packages for the open-source HarmonyOS operating system; The standard packaging format package is deployed to the sandbox environment of the open-source HarmonyOS operating system. The data space between each Linux application in the sandbox environment is isolated and does not directly communicate with the open-source HarmonyOS operating system applications outside the sandbox. Multiple terminal emulators are deployed on the open-source HarmonyOS operating system. A monitoring process is created through a pseudo terminal provided by the front end of each terminal emulator. The terminal emulator dynamically intercepts the system call requests of the Linux application through the monitoring process and converts the system call requests of the Linux application into equivalent operations supported by open-source HarmonyOS to load the corresponding Linux application.

2. The method for running Linux applications on the open-source HarmonyOS operating system according to claim 1, characterized in that, The monitoring process is also used to dynamically manage permission requests from Linux applications, specifically including: If the requested permissions are within the permission list of the terminal emulator, then access to the target Linux application's interface is directly granted; If the requested permission is not within the permission list of the terminal emulator, then permission is requested from the open-source HarmonyOS operating system.

3. The method for running Linux applications on the open-source HarmonyOS operating system according to claim 2, characterized in that, The permissions listed herein are the basic permissions that support the basic operation of Linux applications.

4. The method for running Linux applications on the open-source HarmonyOS operating system according to claim 1, characterized in that, Data space isolation between Linux applications in the sandbox environment includes: A unique security context label is assigned to each application's process and file. This security context label is used to restrict cross-context access, so that the data spaces of each Linux application are independent and isolated from each other.

5. The method for running Linux applications on the open-source HarmonyOS operating system according to claim 4, characterized in that, The monitoring process is also used to redirect external file access requests to a separate Linux application data space.

6. The method for running Linux applications on the open-source HarmonyOS operating system according to claim 1, characterized in that, Also includes: A new configuration file is added to the standard packaging format package. The configuration file includes path mapping relationships, which are used to map standard Linux file system paths in the Linux application to private directories within the sandbox environment of the open-source HarmonyOS operating system.

7. The method for running Linux applications on the open-source HarmonyOS operating system according to claim 6, characterized in that, The configuration file also includes CPU and memory resource management information; The monitoring process is also used to read preset CPU or memory limit parameters from the configuration file of the standard package format package; Add the preset CPU or memory limit parameters to the corresponding cgroup group; When a Linux application is launched, its process ID is added to the corresponding cgroup group to limit its operation based on preset CPU or memory limit parameters.

8. An open-source HarmonyOS operating system, characterized in that, include: Multiple terminal emulators create monitoring processes through pseudo-terminals provided by each terminal emulator's front end. The terminal emulators dynamically intercept system call requests from Linux applications through the monitoring processes, convert the system call requests from Linux applications into equivalent operations supported by the open-source HarmonyOS, and load the corresponding Linux applications. The user framework subsystem is used to convert Linux applications into standard packaging format packages of the open-source HarmonyOS operating system; and to deploy the standard packaging format packages into the sandbox environment of the open-source HarmonyOS operating system. The data space between each Linux application in the sandbox environment is isolated, and they do not directly communicate with open-source HarmonyOS applications outside the sandbox.

9. The open-source HarmonyOS operating system according to claim 8, characterized in that, Also includes: The permission management module is used to dynamically manage permission requests from Linux applications. Specifically, if the requested permission is within the permission list of the terminal emulator, then direct access to the target Linux application's interface is granted. If the requested permission is not within the permission list of the terminal emulator, then permission is requested from the open-source HarmonyOS operating system.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for running Linux applications using the open-source HarmonyOS operating system as described in any one of claims 1 to 7.