Application running method, apparatus, device, and storage medium

By creating a copy directory of the application in a non-system volume and mounting the superuser privilege authorization file, the compatibility issue of applications with different permissions running on the same device is resolved, achieving stability and convenience in application operation.

CN114372256BActive Publication Date: 2026-01-30BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210015662.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-07
Publication Date
2026-01-30
Estimated Expiration
2042-01-07

AI Technical Summary

Technical Problem

Existing technologies have difficulty in supporting applications with different permissions to run simultaneously on the same device, especially applications whose root privileges are determined solely by their executable files.

Method used

By creating a copy of the executable directory in a non-system volume and storing the superuser privilege authorization file in the copy directory, the root privileges of the application are determined in combination with the preset permission configuration file. The copy directory is then mounted to the executable directory using the mount binding function, thus enabling the application to run.

Benefits of technology

It improves the compatibility and versatility of application operation, avoids the impact on system volumes, simplifies the management process, and enhances the stability and convenience of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114372256B_ABST
    Figure CN114372256B_ABST
Patent Text Reader

Abstract

The present disclosure provides a running method, an application program running device, an electronic device and a non-transitory computer readable storage medium, relates to the technical field of computers, and particularly relates to information flow technology. The specific implementation scheme is as follows: in response to a starting operation on a target application program, it is determined whether the target application program has superuser permission; based on the permission determination result, the target application program is run according to a copy directory of an executable file directory; wherein the copy directory includes a superuser permission authorization file, and the copy directory is located in a non-system volume. According to the technology of the present disclosure, the compatibility and universality of the running mode of application programs with different permissions are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, in particular, to the information flow technology, and more particularly to an application program running method, an application program running apparatus, an electronic device and a non-transitory computer readable storage medium. BACKGROUND

[0002] Super user permission (also known as root permission) is the only super management user in an operating system (such as Unix, Unix-like system, Android system and iOS system, etc.), which can perform read, write and execution operations on the root directory and has the highest permission in the operating system.

[0003] In order to balance security and facilitate user development, there are usually applications that allow root and prohibit root, which run together in the same device. SUMMARY

[0004] The present disclosure provides an application program running method, an application program running apparatus, an electronic device and a non-transitory computer readable storage medium.

[0005] According to an aspect of the present disclosure, an application program running method is provided, comprising:

[0006] In response to a start operation on a target application program, determining whether the target application program has super user permission;

[0007] Based on the permission determination result, running the target application program according to a copy directory of an executable file directory;

[0008] The copy directory includes a super user permission authorization file, and the copy directory is located in a non-system volume.

[0009] According to another aspect of the present disclosure, an electronic device is also provided, comprising:

[0010] At least one processor; and

[0011] A memory in communication connection with the at least one processor; wherein

[0012] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any one of the application program running methods provided by the embodiments of the present disclosure.

[0013] According to another aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to enable a computer to execute any one of the application program running methods provided by the embodiments of the present disclosure.

[0014] According to the technology of the present disclosure, compatibility and universality of application programs of different permissions are improved.

[0015] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings are used to better understand the present scheme and do not limit the present disclosure. Among them:

[0017] Figure 1 is a flowchart of an application running method provided by an embodiment of the present disclosure;

[0018] Figure 2 is a flowchart of another application running method provided by an embodiment of the present disclosure;

[0019] Figure 3 is a structural diagram of an application running device provided by an embodiment of the present disclosure;

[0020] Figure 4 is a block diagram of an electronic device for implementing the application running method of the embodiments of the present disclosure. DETAILED DESCRIPTION

[0021] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of the present disclosure to help understanding. They should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to be clear and concise, descriptions of well-known functions and structures are omitted in the following description.

[0022] The application running methods and application running devices provided by the embodiments of the present disclosure are suitable for scenarios of running target application programs of different permissions. The application running methods provided by the embodiments of the present disclosure can be executed by an application running device, which can be implemented by software and / or hardware and specifically configured in an electronic device. The operating system of the electronic device can be an Android system or other systems, and the present disclosure does not make any limitation on the type of operating system.

[0023] In order to facilitate understanding, the application running methods are first described in detail.

[0024] Referring to Figure 1 An application running method shown in FIG. 1 includes the following steps.

[0025] S101, in response to a start operation of a target application program, determine whether the target application program has super user permission.

[0026] The target application program is an application program to be run.

[0027] The start operation of the target application program can be triggered by a target application program icon in a touch interface or triggered by an association call of another application program.

[0028] The super user permission, also known as root permission, is the only super user in the operating system, which has the highest permission in the system and can perform read, write and execution operations on the root directory.

[0029] For example, the existence of the super user permission of different application programs can be marked in advance, so that the determination of whether the target application program has root permission is made according to the marking result.

[0030] For example, the configuration item of the target application program can be determined according to the preset permission configuration file, and whether the target application program has root permission is determined according to the configuration item of the target application program.

[0031] The preset permission configuration file includes the configuration item of the root permission of different application programs, so that the configuration item, that is, the root permission configuration result, is determined by querying the permission configuration file.

[0032] It can be understood that the root permission configuration of different application programs is uniformly managed by introducing the preset permission configuration file, which improves the convenience of the management process and is easy to maintain.

[0033] In one specific implementation, a blacklist mechanism can be introduced, that is, each application program in the default device has root permission, and the application program identifier without root permission is added in the preset permission configuration file. Correspondingly, if the target application program identifier is found in the preset permission configuration file, it is determined that the target application program does not have root permission; otherwise, the target application program has root permission.

[0034] In another specific implementation, a whitelist mechanism can be introduced, that is, each application program in the default device does not have root permission, and the application program identifier with root permission is added in the preset permission configuration file. Correspondingly, if the target application program identifier is found in the preset permission configuration file, it is determined that the target application program has root permission; otherwise, the target application program does not have root permission.

[0035] The application program identifier can be an application program package name.

[0036] It should be noted that the preset permission configuration file can be pre-stored in the local of the electronic device executing the application running method, or in other storage devices or cloud associated with the electronic device, and the preset permission configuration file is searched and obtained when needed.

[0037] S102, based on the permission determination result, running the target application according to the copy directory of the executable file directory.

[0038] Among them, the copy directory includes a superuser permission authorization file, and the copy directory is located in a non-system volume.

[0039] Among them, the executable file is usually a binary instruction file; the executable file directory can be understood as the storage directory of the executable file.

[0040] Usually, the executable file directory is a subdirectory under the system volume. In an optional implementation manner, the executable file directory can include a " / system / bin / " subdirectory under the system volume, which is used to store all native binary files and daemons built by the system open source code project. In another optional implementation manner, the executable file directory can also include a " / system / xbin / " subdirectory under the system volume, which is used to store Extra binary files that are not very important to system operation, also built by the system open source code project. Among them, the system open source code project can be an Android Open Source Project (AOSP).

[0041] It should be noted that the above only exemplarily illustrates the executable file directory, thereby improving the richness of the application running method of the present disclosure, and should not be understood as a specific limitation of the executable file directory.

[0042] Among them, the superuser permission authorization file is usually a superuser permission authorization program, which is used to give the application superuser permission, that is, root permission. For example, the Superuser.apk program (also known as su file) corresponding to the Android system is a superuser permission authorization program.

[0043] It should be noted that by storing the superuser permission authorization file in the copy directory of the executable file directory under the system volume in the non-system volume, data support is provided for the running of the target application based on the copy directory.

[0044] Exemplarily, based on the permission determination result, the target application program can be run according to the copy directory of the executable file directory, which can be: if it is determined that the target application program has root permission, the copy directory is mounted to the executable file directory, and the target application program is run. Further, if it is determined that the target application program does not have root permission, the mounting of the copy directory is not required, and the target application program is directly run.

[0045] It can be understood that by controlling the mounting of the copy directory in the executable file directory according to the existence of the root permission of the target application program, the switching control of the running process of the target application program is realized, which facilitates the running of different permission application programs and improves the universality of the application program running method.

[0046] In one specific implementation, the copy directory can be mounted to the executable file directory based on a preset mounting binding function according to the copy directory and the executable file directory. The mounting of the copy directory to the executable file directory by the preset mounting binding function is convenient and helps to improve the efficiency of the application program.

[0047] Specifically, the copy directory can be mounted to the executable file directory by a preset mounting binding function (such as a mount-bind function). During the running of the target application program, the executable file directory will be shielded, that is, the sub-path of the executable file directory is hidden; a binding relationship between the copy directory and the executable file directory is established in the memory; when accessing the executable file directory, the directory identifier of the executable file directory and the binding relationship are used to redirect to the directory identifier of the copy directory, so that the access to the executable file directory is converted to the access to the copy directory.

[0048] It can be understood that the running of the target application program is based on the copy directory rather than the executable file directory in the system volume, and the content in the executable file directory under the system volume does not need to be changed during the running of the target application program, so the executable file directory is not affected.

[0049] Exemplarily, the copy directory of the executable file directory can be created in the non-system volume in response to a system startup operation, thereby providing data support for subsequent running of the target application program based on the copy directory. In addition, the automatic creation of the copy directory by the system startup improves the convenience of the copy directory creation process, and avoids the system disorder caused by the random creation of the copy directory in other cases, which helps to improve the stability of the overall operation process of the device.

[0050] In one specific implementation, the copy directory of the executable file directory is created in the non-system volume in response to a system startup operation; and a superuser permission authorization file is added to the copy directory.

[0051] Specifically, in response to a system startup operation, a copy creation script can be run to create a copy directory of an executable file directory in a system volume in a non-system volume. It should be noted that the present disclosure does not make any limitation on the storage location and running manner of the copy creation script.

[0052] It can be understood that by uniformly adding the superuser permission authorization file to the copy directory, the running of the subsequent application with root permission is ensured, and the situation that the application with root permission cannot normally run due to the absence of the superuser permission authorization file in the copy directory is avoided, which helps to improve the stability of the application running process.

[0053] In the prior art, a global temporary file system usually needs to be created, and the temporary file system needs to be added to the PATH environment variable. When an application without root permission is detected, the temporary file system needs to be bound by other daemon processes, but this way cannot be compatible with some applications that can only determine whether there is root permission through an executable file. However, by introducing the copy directory of the executable file directory under the non-system volume and in combination with the determination of the root permission, the target application is run, which can be compatible with the applications of different root permission determination manners, and the universality of the application running process is improved.

[0054] On the basis of the above technical solutions, the present disclosure further provides a preferred embodiment of a method for implementing application running. In the embodiment of the present disclosure, the running of an application in an Android device is taken as an example for detailed description.

[0055] Referring to Figure 2 An application running method shown in FIG. 1, comprising a system startup stage and an application startup stage.

[0056] Specifically, the system startup stage comprises:

[0057] In response to a system startup operation, an init process is started, and a copy creation script is started in an init.rc configuration file to create a copy directory of an executable file directory (“ / system / bin / ” or “ / system / xbin / ”) in a system volume in a non-system volume, and a superuser permission authorization file (referred to as su file) is saved to the copy directory.

[0058] After the init process is started, an su daemon process is pulled up for subsequent application running to obtain and use the su file.

[0059] After starting the init process, the Zygote hatching process is pulled up to create the system service (SystemServer), read the preset permission configuration file in the Android device, and obtain the root permission configuration item of each application.

[0060] Optionally, the preset permission configuration file can adopt a blacklist mechanism, that is, all applications in the Android device have root permissions by default, and the application identifiers without root permissions are configured in the preset permission configuration file.

[0061] Alternatively, the preset permission configuration file can adopt a whitelist mechanism, that is, all applications in the Android device do not have root permissions by default, and the application identifiers with root permissions are configured in the preset permission configuration file.

[0062] Exemplarily, the application startup stage includes:

[0063] In response to the startup operation of the target application, the target application is created, and the target application process is hatched through the Zygote. When the hatching is successful, whether the target application has root permissions is determined according to the configuration item of the target application in the preset permission configuration file; if yes, a preset mounting binding function (such as a mount-bind function) is called to mount the copy directory to the executable file directory, and the target application is run; otherwise, the target application is directly run.

[0064] The embodiments of the present disclosure can be compatible with applications that detect root environments in different ways, thereby adapting the running of different applications and improving the compatibility and universality of the application running mode. In addition, the above-mentioned method does not need to create a temporary file system, nor does it need to execute the addition of the temporary file system to the path environment variable, which is convenient to operate and has no effect on the content in the executable file directory in the system volume.

[0065] As an implementation of the above-mentioned application running method, the present disclosure further provides an optional embodiment of an execution device for implementing the application running method. Further referring to Figure 3 An application running device 300 is shown, which includes a permission determination module 301 and a program running module 302. Wherein,

[0066] The permission determination module 301 is configured to determine whether the target application has superuser permissions in response to the startup operation of the target application;

[0067] The program running module 302 is configured to run the target application according to the copy directory of the executable file directory based on the permission determination result;

[0068] The copy directory includes a superuser permission authorization file, and the copy directory is located in a non-system volume.

[0069] In the prior art, a global temporary file system is usually created and added to a PATH environment variable. When an application without root permission is detected, a temporary file system is bound by other daemons. However, this method cannot be compatible with some applications that can only determine whether root permission exists by using an executable file. The embodiments of the present disclosure introduce a copy directory of an executable file directory in a non-system volume, and run a target application in combination with a root permission determination condition. The embodiments of the present disclosure can be compatible with applications with different root permission determination methods, and improve the versatility of an application running process.

[0070] In an optional embodiment, the program running module 302 includes:

[0071] The copy directory mounting unit is configured to mount the copy directory to the executable file directory and run the target application if it is determined that the target application has superuser permission.

[0072] In an optional embodiment, the copy directory mounting unit includes:

[0073] The copy directory mounting subunit is configured to mount the copy directory to the executable file directory based on a preset mounting binding function.

[0074] In an optional embodiment, the application running apparatus 300 further includes:

[0075] The copy directory creating module is configured to create a copy directory of an executable file directory in a non-system volume in response to a system startup operation.

[0076] In an optional embodiment, the copy directory creating module includes:

[0077] The copy directory creating unit is configured to create a copy directory of an executable file directory in a non-system volume.

[0078] The authorization file adding unit is configured to add a superuser permission authorization file to the copy directory.

[0079] In an optional embodiment, the executable file directory includes a “ / system / bin / ” subdirectory and / or a “ / system / xbin / ” subdirectory in a system volume.

[0080] In an optional embodiment, the permission determining module 301 includes:

[0081] The configuration item determination unit is configured to determine, in response to a starting operation of the target application program, a configuration item of the target application program according to a preset permission configuration file.

[0082] The permission determination unit is configured to determine, according to the configuration item of the target application program, whether the target application program has a superuser permission.

[0083] The application program running device can execute the application program running method provided by any embodiment of the present disclosure, and has the function modules and beneficial effects corresponding to the execution of each application program running method.

[0084] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of the superuser permission comply with relevant laws and regulations and do not violate public order and good customs.

[0085] According to embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0086] Figure 4 A schematic block diagram of an example electronic device 400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.

[0087] As shown in Figure 4 The device 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded into a random access memory (RAM) 403 from a storage unit 408. Various programs and data required for the operation of the device 400 can also be stored in the RAM 403. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0088] A plurality of components in the device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a magnetic disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0089] The computing unit 401 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 401 performs various methods and processes described above, such as the application running method. For example, in some embodiments, the application running method can be implemented as a computer software program, which is tangibly embodied in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device 400 via the ROM 402 and / or the communication unit 409. When the computer program is loaded onto the RAM 403 and executed by the computing unit 401, one or more steps of the application running method described above can be performed. Alternatively, in other embodiments, the computing unit 401 can be configured to perform the application running method by any other appropriate means, such as by means of firmware.

[0090] Various implementations of the systems and techniques described above herein can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0091] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package, or entirely on a remote machine or server.

[0092] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0093] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0094] The systems and techniques described here can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here, or a combination of one or more such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0095] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service. The server can also be a server of a distributed system, or a server combined with a blockchain.

[0096] Artificial intelligence is a discipline that studies enabling computers to simulate some human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both hardware and software technologies. Artificial intelligence hardware technology generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing, etc.; artificial intelligence software technology mainly includes computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, etc. several major directions.

[0097] Cloud computing refers to accessing elastic and scalable shared physical or virtual resource pools through a network, resources can include servers, operating systems, networks, software, applications, and storage devices, etc., and resources can be deployed and managed in a self-service manner as needed. Through cloud computing technology, efficient and powerful data processing capabilities can be provided for artificial intelligence, blockchain and other technology applications, model training.

[0098] It should be understood that various forms of flow shown above can be used to reorder, add or delete steps. For example, each step described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions provided by the present disclosure can be achieved, which is not limited herein.

[0099] The foregoing detailed description has set forth various embodiments of the devices and / or processes via the use of specific terminology. However, embodiments thereof can be practiced with the exact description not being set forth but with the same essence; the principles set forth herein can be practiced to achieve the same ends and others like them. Accordingly, the disclosure disclosed should be understood to encompass all such variations, modifications and alternatives.

Claims

1. An application program running method, comprising: determining whether a target application program has superuser authority in response to a starting operation of the target application program; running the target application program according to a copy directory of an executable file directory based on the authority determination result; wherein the copy directory includes a superuser authority authorization file, and the copy directory is located in a non-system volume; the running of the target application program according to the copy directory of the executable file directory based on the authority determination result comprises: if it is determined that the target application program has the superuser authority, mounting the copy directory to the executable file directory and running the target application program; if it is determined that the target application program does not have the superuser authority, directly running the target application program.

2. The application execution method according to claim 1, wherein the mounting of the copy directory to the executable file directory comprises: mounting the copy directory to the executable file directory according to the copy directory and the executable file directory based on a preset mounting binding function.

3. The application program running method according to any one of claims 1-2, further comprising: creating a copy directory of the executable file directory in a non-system volume in response to a system starting operation.

4. The application execution method according to Claim 3, wherein the creating of the copy directory of the executable file directory in the non-system volume comprises: creating a copy directory of the executable file directory in a non-system volume; adding the superuser authority authorization file to the copy directory.

5. The application execution method according to Claim 1, wherein the executable file directory includes a " / system / bin / " subdirectory and / or a " / system / xbin / " subdirectory under a system volume.

6. The application execution method according to Claim 1, wherein the determining of whether the target application program has superuser authority in response to a starting operation of the target application program comprises: determining a configuration item of the target application program according to a preset authority configuration file in response to a starting operation of the target application program; determining whether the target application program has superuser authority according to the configuration item of the target application program.

7. An application program running apparatus, comprising: an authority determination module configured to determine whether a target application program has superuser authority in response to a starting operation of the target application program; a program running module configured to run the target application program according to a copy directory of an executable file directory based on an authority determination result; wherein the copy directory includes a superuser authority authorization file, and the copy directory is located in a non-system volume; the program running module is specifically configured to: if it is determined that the target application program has the superuser authority, mount the copy directory to the executable file directory and run the target application program; if it is determined that the target application program does not have the superuser authority, directly run the target application program.

8. The application execution apparatus according to claim 7, wherein the copy directory mounting unit comprises: a copy directory mounting subunit configured to mount the copy directory to the executable file directory according to the copy directory and the executable file directory based on a preset mounting binding function.

9. The application running apparatus according to any one of claims 7-8, further comprising: a copy directory creating module, configured to create a copy directory of the executable file directory in the non-system volume in response to a system starting operation.

10. The application execution apparatus according to claim 9, wherein The copy directory creating module comprises: a copy directory creating unit, configured to create a copy directory of the executable file directory in the non-system volume; an authorization file adding unit, configured to add the superuser permission authorization file to the copy directory.

11. The application execution apparatus according to claim 7, wherein The executable file directory comprises a " / system / bin / " subdirectory and / or a " / system / xbin / " subdirectory under the system volume.

12. The application execution apparatus according to claim 7, wherein The permission determining module comprises: a configuration item determining unit, configured to determine a configuration item of the target application according to a preset permission configuration file in response to a starting operation of the target application; a permission determining unit, configured to determine whether the target application has superuser permission according to the configuration item of the target application.

13. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the application running method of any one of claims 1-6.

14. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the application running method of any one of claims 1-6.

15. A computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the application running method of any one of claims 1-6.

Citation Information

Patent Citations

  • Android application program permanent Root permission acquiring method

    CN102981835A

  • Method and device for running application program by superuser identity

    CN104572158A