Application isolation implementation method, mobile terminal, computer device and storage medium
By changing the package name of the application to a custom package name in the Android system, the problem of application isolation in multi-user mode is solved, and the complete isolation and independent use of applications in different user modes are achieved, thereby improving the user experience.
Patent Information
- Application Number
- CN202111656841.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-19
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2039-09-19
AI Technical Summary
The existing Android system cannot achieve complete isolation of applications in multi-user mode, resulting in the failure of installing different versions of applications in different user modes. Moreover, upgrading an application in one user mode will force upgrades in other user modes, resulting in a poor user experience.
By obtaining the account identification information of the current user mode, the package name of the application is modified to a custom package name, which is a combination of the account identification information and the original package name. The application is then processed according to the custom package name, including installation, use, and deletion, to ensure data isolation of applications in different user modes.
It achieves complete isolation of applications in multi-user mode, avoids installation conflicts and forced upgrades between different versions of applications, and improves user experience.
Smart Images

Figure CN114417322B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on September 19, 2019. The application number of the original application is: 2019108871573, and the name of the invention is: Application isolation implementation method, mobile terminal, computer device and storage medium. Technical Field
[0002] The present invention relates to the field of data processing technology, and in particular to an application isolation implementation method, a mobile terminal, a computer device, and a storage medium. Background Art
[0003] With the rapid development of the Android system, a wide variety of features are now available. One such feature is multi-user functionality. For example, different user modes can be created under the primary user, and applications can be installed in each of these user modes. In many scenarios, it is necessary to simultaneously install or pre-install the same application in the primary user mode and other user modes without interfering with each other.
[0004] However, while existing Android systems support multi-user mode and user data isolation, this is achieved by placing installed applications in a fixed directory (data / app). During the parsing process, the Android system then stores the application's version information, the application's storage path, and other information in fixed files (such as packages.xml) based on the application package name. Therefore, the version numbers and installation directory of applications used in different user modes in the native system are the same. This effectively isolates only some of the application's data and does not achieve complete isolation. This presents at least the following issues: 1) If one user installs an application with version 4.0 and another user installs a version lower than 4.0, the installation will fail. 2) If one user upgrades an application, other users will only be able to use the upgraded version. Since applications are not truly isolated, different versions of applications cannot be installed in multi-user mode. Furthermore, if an application in one user mode is upgraded, applications in other user modes will also be forced to upgrade, resulting in a poor user experience.
[0005] Therefore, how to isolate and use applications installed in the multi-user mode of the original Android system and improve the user experience is an urgent problem to be solved. Summary of the Invention
[0006] The purpose of the present invention is to provide an application isolation implementation method, a mobile terminal, a computer device and a storage medium to achieve isolated use of application programs installed in multi-user mode and improve the user experience.
[0007] The technical solutions provided by the present invention are as follows:
[0008] The present invention provides a method for implementing application isolation, comprising the steps of:
[0009] Get the account identification information corresponding to the current user mode;
[0010] When it is determined based on the account identification information that the current user mode is the guest mode, the package name corresponding to the application is modified to a custom package name, and the application processing operation is performed based on the custom package name.
[0011] Furthermore, when it is determined that the current user mode is the guest mode based on the account identification information, the package name corresponding to the application is modified to a custom package name, and the processing operation of the application is performed based on the custom package name, including the steps of:
[0012] When the account identification information is different from the preset owner identification information, determining that the current user mode is the guest mode;
[0013] After obtaining the installation package of the application in the guest mode, parsing the installation package, and obtaining relevant data of the application and the original package name from the installation package;
[0014] Modify the package name corresponding to the application to be installed in the installation instruction to the custom package name; the custom package name is a combination of the account identification information corresponding to the guest mode and the original package name;
[0015] A target installation directory is created according to the custom package name, and relevant data of the application is stored in the target installation directory.
[0016] Furthermore, when it is determined that the current user mode is the guest mode according to the account identification information, the package name corresponding to the application is modified to a custom package name, and the processing operation of the application according to the custom package name also includes the steps of:
[0017] When operation information is obtained in the visitor mode, the operation information is parsed to obtain operation-related instructions;
[0018] Calling the corresponding package name change rule using the relevant instructions according to the operation, and changing the package name involved in the package name call during the use of the application to the custom package name;
[0019] The application is used in response to the operation information according to the custom package name.
[0020] Furthermore, when it is determined that the current user mode is the guest mode according to the account identification information, the package name corresponding to the application is modified to a custom package name, and the processing operation of the application according to the custom package name also includes the steps of:
[0021] When a deletion instruction is obtained in the guest mode, the package name corresponding to the application to be deleted in the deletion instruction is modified to the custom package name;
[0022] Search and delete the relevant files corresponding to the application according to the custom package name.
[0023] The present invention also provides a mobile terminal, comprising:
[0024] The acquisition module is used to obtain the account identification information corresponding to the current user mode;
[0025] The processing module is used to modify the package name corresponding to the application to a custom package name when determining that the current user mode is the guest mode based on the account identification information, and perform processing operations on the application based on the custom package name.
[0026] Furthermore, the processing module includes:
[0027] a judgment unit, configured to determine that the current user mode is the guest mode when the account identification information is different from the preset owner identification information;
[0028] a first parsing unit, configured to, after obtaining the installation package of the application in the guest mode, parse the installation package and obtain relevant data of the application and the original package name from the installation package;
[0029] The installation processing unit is used to modify the package name corresponding to the application to be installed in the installation instruction to the custom package name, create a target installation directory according to the custom package name, and store the relevant data of the application in the target installation directory; the custom package name is a combination of the account identification information corresponding to the guest mode and the original package name.
[0030] Furthermore, the processing module further includes:
[0031] A second parsing unit is configured to, when operation information is acquired in the visitor mode, parse the operation information to obtain operation-related instructions;
[0032] A processing unit is used to call the corresponding package name change rule according to the relevant instructions of the operation, modify the package name involved in the package name call during the use of the application to the custom package name, and respond to the operation information according to the custom package name to use the application.
[0033] Furthermore, the processing module further includes:
[0034] The deletion processing unit, when receiving a deletion instruction in the guest mode, modifies the package name corresponding to the application to be deleted in the deletion instruction to the custom package name; and searches for and deletes related files corresponding to the application according to the custom package name.
[0035] The present invention also provides a computer device, including a processor and a memory, wherein the memory is used to store computer programs; the processor is used to execute the computer programs stored in the memory to implement the operations performed by the application isolation implementation method.
[0036] The present invention also provides a storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor to implement the operations performed by the isolation implementation method of the application.
[0037] Through the application isolation implementation method, mobile terminal, computer device and storage medium provided by the present invention, the application programs installed in the multi-user mode of the present invention can be isolated and used, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The preferred implementation scheme will be described below in a clear and understandable manner with reference to the accompanying drawings, further illustrating the above-mentioned characteristics, technical features, advantages and implementation methods of the application isolation implementation method, mobile terminal, computer device and storage medium.
[0039] Figure 1 It is a flow chart of an embodiment of a method for implementing isolation of an application of the present invention;
[0040] Figure 2 is a flow chart of another embodiment of a method for implementing isolation of an application of the present invention;
[0041] Figure 3 This is a structural diagram of an embodiment of a system for isolating applications in different user modes according to the present invention;
[0042] Figure 4 This is a structural diagram of another embodiment of a system for isolating applications in different user modes according to the present invention;
[0043] Figure 5 It is a structural diagram of an embodiment of a computer device of the present invention. DETAILED DESCRIPTION
[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific embodiments of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings and other embodiments can be obtained based on these drawings without inventive work.
[0045] To simplify the drawings, only the parts relevant to the present invention are schematically shown in each figure. They do not represent the actual structure of the product. Furthermore, to simplify the drawings and facilitate understanding, in some figures, only one of the components with the same structure or function is schematically depicted or labeled. As used herein, "one" not only means "only one" but also "more than one."
[0046] One embodiment of the present invention, as Figure 1 As shown, a method for implementing application isolation includes:
[0047] S100 obtains the account identification information corresponding to the current user mode;
[0048] Specifically, the Android system currently used in mobile terminals supports multi-user mode, which allows different users of the mobile terminal to set up independent user spaces, ensuring that some data between different users is independent of each other. The user of the Android system corresponding to the mobile terminal has two user roles: owner and guest. The owner is the owner of the mobile terminal. After logging into their own Android system account, the guest can use most system functions, but cannot use functions that affect the owner, such as restoring factory settings and Do Not Disturb. Each user mode corresponds to its own user account, and each user account corresponds to its own account identification information.
[0049] When S200 determines that the current user mode is the guest mode based on the account identification information, the package name corresponding to the application is modified to the custom package name, and the processing operation of the application is performed according to the custom package name.
[0050] Specifically, the original Android system stores all data in all user modes (owner mode or guest mode) in a fixed directory by default, resulting in different user accounts having the same application installation space. Although different user accounts cannot see or use the same application of other user accounts, the system messages of each user account are not shared, and the applications corresponding to each user account cannot access each other. However, since the data of applications used in different user modes in the prior art are all in the same fixed directory, it is impossible to achieve complete data isolation. Therefore, once the mobile terminal obtains the account identification information corresponding to the current user mode, it determines whether the account identification information corresponding to the current user mode is the preset owner identification information. Generally, the preset owner identification information is assigned to the owner after the owner registers when purchasing the mobile terminal, and is used to indicate the user's unique identity.
[0051] If the mobile terminal is used by a guest, i.e., the mobile terminal is in guest mode, then during the use of an application in guest mode, the package name of the application is modified to a custom package name that combines the account identification information and the original package name. This allows the guest to perform corresponding processing operations on the application when using the mobile terminal. The order of the combination of the account identification information and the original package name in the custom package name is not limited and is within the scope of protection of the present invention.
[0052] If the mobile terminal is used by the owner, that is, the mobile terminal is in the owner mode, when using the application in the owner mode, the application installed in the owner mode can be used normally in the owner mode without performing the package name modification operation.
[0053] In this embodiment, the package name corresponding to the application in the guest mode is modified to a custom package name, and the custom package name includes the original package name and the custom package name of the account identification information corresponding to each account, so that the applications corresponding to different user accounts have different package names, so that different user accounts cannot see and use the applications of other accounts, and the applications of each user account cannot access each other, so that the data of the same type of applications installed in different user modes are completely isolated, and the applications installed in the multi-user mode under the original Android system can be isolated and used, thereby improving the user experience.
[0054] One embodiment of the present invention, as Figure 2 As shown, a method for implementing application isolation includes:
[0055] S100 obtains the account identification information corresponding to the current user mode;
[0056] S211: When the account identification information is different from the preset owner identification information, determining that the current user mode is the guest mode;
[0057] Specifically, if the account identification information corresponding to the current user mode is different from the preset owner identification information, it indicates that the mobile terminal is being used by a guest, i.e., the mobile terminal is in guest mode. If the account identification information corresponding to the current user mode is the same as the preset owner identification information, it indicates that the mobile terminal is being used by the owner, i.e., the mobile terminal is in owner mode.
[0058] After obtaining the installation package of the application in the guest mode, S212 parses the installation package and obtains relevant data and the original package name of the application from the installation package;
[0059] Specifically, in the Android system, the apk installation file of the application will be saved. By default, the apk installed by the user will first be copied to the / data / app directory. The / data / app directory is a directory that only the owner has permission to access.
[0060] The Android system contains a packages.xml file that records the basic information of all currently installed applications. Each time the system installs or uninstalls any APK file, this packages.xml file is updated. During the APK installation process, the Android system parses the APK's packages.xml file and extracts important APK information (including permissions, package name, APK installation location, version, etc.). In guest mode, after a mobile terminal obtains an application's installation package, it will parse the target APK (i.e., the application's installation package) when installing the application, obtain the relevant data required by the application from the target APK, and obtain the target APK's original package name (i.e., the application package name) based on the parsed result.
[0061] S213: modifying the package name corresponding to the application to be installed in the installation instruction to a custom package name; the custom package name is a combination of the account identification information corresponding to the guest mode and the original package name;
[0062] Specifically, after parsing the relevant data and original package name of the application in the guest mode, the original package name is modified to a custom package name, where the custom package name includes the account identification information corresponding to the guest mode and the original package name.
[0063] S214 creates a target installation directory according to the custom package name, and stores relevant data of the application program in the target installation directory.
[0064] Specifically, in guest mode, a target installation directory is created based on the custom package name, and the application's related data is stored in the target installation directory. A data directory (named after the custom package name) is created within the target installation directory to store application-related data, such as databases and XML files.
[0065] When installing applications in different guest user modes, the original package name of the parsed installation package is dynamically modified into a custom package name (the original package name plus the user mode id, i.e., the account identification information corresponding to the guest mode). The subsequent installation logic then saves the corresponding application information into an XML file based on the dynamically set custom package name, thereby isolating the package name information of the same application in the XML file read in different user modes. In this process, the installed application is also pre-set to the corresponding data / app+user mode id directory, i.e., the target installation directory, so that the installation directory of the application in the current guest mode is isolated from the installation directory of the application in the host mode, and the installation directory of the application in the current guest mode is isolated from the installation directory of the application in other guest modes. The above process is the process of installing applications in different guest modes.
[0066] For example, for example, user A enters the created guest mode A. The guest id corresponding to the created guest mode at this time is the account identification information 10. An application app1 that also exists in the machine owner is installed. Assuming that the normal package name of the application app1, that is, the original package name, is com.aa.bb, the package name of the parsed Package object will be changed during the installation process in the created guest mode A. The subsequent installation process uses the Package object after the package name is modified. The package name information saved in the packages.xml saved thereafter is a custom package name. The custom package name is a combination of the original package name and the corresponding visitor id under the current guest mode A (can be com.aa.bb10 or 10com.aa.bb). Finally, the target apk corresponding to the application app1 installed under guest mode A is stored in the target installation directory. Since the target installation directory is created according to the custom package name, the target apk corresponding to the application app1 to be installed under guest mode A is stored in data / app10.
[0067] S221: When operation information is obtained in the visitor mode, the operation information is parsed to obtain operation-related instructions;
[0068] S222 calls the corresponding package name change rule according to the operation use related instructions, and changes the package name involved in the package name call during the use of the application to the custom package name;
[0069] S223 responds to the operation information according to the custom package name to use the application.
[0070] Specifically, the operation-related instructions include related authorization operations, apk usage operations, operations used by other third-party applications, desktop shortcut creation operations, and operations for obtaining or querying the four major components. The application usage process is actually a subsequent process based on the application installation process. Because after the package name is modified during the application installation process, problems will occur during the application usage process. In the process of opening and using the application, for example, when checking permissions, obtaining and querying some of the four major component information, it is necessary to perform corresponding queries through the package name. Since the package name passed in these usage processes is the original package name, it will result in the inability to find the information of the application package related to this package name. Therefore, it is necessary to add a package name change rule that converts the original package name into a custom package name in the logic code corresponding to these usage processes to ensure that the operations corresponding to these applications can be used normally. That is, after obtaining the operation information in the guest mode and parsing it to obtain the corresponding operation-related instructions, the corresponding package name change rule is called according to the operation-related instructions to modify the package name involved in the package name call during the application usage process to a custom package name.
[0071] For example, when checking permissions (location permission, contact reading permission, SMS reading permission, etc.), the system's checkPermission(..., String packageName, ...) method will be called. The original package name of the application com.aa.bb is generally passed when checking permissions. However, the package name of the application installation process in guest mode is changed to com.aa.bb10, so the original package name com.aa.bb needs to be dynamically modified to the custom package name com.aa.bb10 for use in subsequent logic.
[0072] Exemplary methods are used to obtain the four major components (Activity, Service, Recever, and Provider), such as getActivityInfo when opening the application interface, getServiceInfo when using application services, getReceverInfo when accepting application broadcasts, and getProviderInfo when querying provider data sources. The original package name is obtained from the component parameter, and then the package name is converted into a custom package name, and then the converted custom package name is set to the component parameter.
[0073] For example, query the methods related to the four major components (Activity, Service, Recever, Provider), such as: queryIntentActivities when querying the application interface, queryIntentServices when querying the application service, queryIntentRecevers when querying the application broadcast, queryIntentContentProviders when querying the provider data source, obtain the original package name according to the Intent parameter, and then convert the obtained package name into a custom package name.
[0074] For example, in the Android system, if you want to see the application on the Android desktop, you need to display the installed application on the desktop from the PackageManagerService service, for example, display the installed application on the desktop in the form of a desktop shortcut icon. When creating the desktop shortcut icon, change the package name to a custom package name, find the application file in the corresponding installation directory according to the custom package name, and then generate the desktop shortcut icon corresponding to the application based on the application file.
[0075] S231: When a deletion instruction is obtained in the guest mode, the package name corresponding to the application to be deleted in the deletion instruction is modified to the custom package name;
[0076] S232 searches for and deletes related files corresponding to the application program according to the custom package name.
[0077] Specifically, the application uninstallation process is also a subsequent process based on the application installation process. During uninstallation, the package name of the application to be deleted in the delete instruction needs to be converted to a custom package name. The corresponding target installation directory is then found based on the custom package name, and the relevant files in the target installation directory are deleted. Of course, if other files are generated during the use of the application, these files can also be found and deleted based on the custom package name. For example, desktop shortcut icons can also be found and deleted based on the custom package name. Deletion can be performed using the existing Android system uninstall method deletePackageAsUser(String packageName, ...). This method may pass the original package name com.aa.bb, resulting in the inability to find the application in the current guest mode, causing the application to be unable to be properly uninstalled in the current guest mode. Therefore, it is necessary to convert the package name com.aa.bb corresponding to packageName to the custom package name com.aa.bb10. When uninstalling an application app2 in the current guest mode, the target installation directory data / app10 corresponding to the application app2 is found based on the custom package name, and the relevant files in the target installation directory data / app10 are deleted.
[0078] In this embodiment, the package name is used to distinguish applications on the mobile terminal, and different applications have different package names. Generally speaking, multiple applications with the same package name are not allowed to be installed on the same mobile terminal, and the directory where the application is installed and used is basically determined by the package name. For example, if the host mode or guest mode A installs an application with version number 4.0, then guest mode B will fail to install the same application with a version number lower than 4.0. In addition, if the host mode or guest mode A upgrades the application, after logging in, guest mode B can only use the application upgraded by the host or guest A. Therefore, to isolate the use of multiple identical applications in multi-user mode, the application package name needs to be modified to a customized package name. The customization includes the original package name and account identification information. This avoids the problem of being unable to install different versions of applications in multi-user mode or forced upgrade after upgrade. The data of the same application installed in different user modes is completely isolated, and the problem of an application upgrade in one user mode causing the simultaneous upgrade in another application mode will not occur. The installation directories of different user modes will not be overwritten, so that deleting an application in one user mode will not cause the same application installed in other user modes to become unusable. Therefore, the same application installed in multi-user mode can be completely isolated, so that the use of the same application in different user modes does not conflict, different versions of an application in multi-user mode can coexist at the same time, and the applications installed in multi-user mode under the original Android system can be isolated for use, avoiding data loss and improving user experience.
[0079] One embodiment of the present invention, as Figure 3 As shown, a mobile terminal includes:
[0080] Acquisition module 10, used to obtain account identification information corresponding to the current user mode;
[0081] The processing module 20 is used to modify the package name corresponding to the application to a custom package name when it is determined that the application is in guest mode based on the account identification information, and perform corresponding operations on the application based on the custom package name; the custom package name includes the original package name and account identification information.
[0082] Based on the above embodiments, Figure 4 As shown, the processing module 20 includes:
[0083] The judgment unit 21 is configured to determine that the current user mode is the guest mode when the account identification information is different from the preset owner identification information;
[0084] A first parsing unit 22 is configured to parse the installation package of the application after obtaining it in the guest mode, and obtain relevant data and the original package name of the application from the installation package;
[0085] The installation processing unit 23 is used to modify the package name corresponding to the application to be deleted in the deletion instruction into a custom package name, create a target installation directory according to the custom package name, and store the relevant data of the application in the target installation directory; the custom package name is a combination of the account identification information corresponding to the guest mode and the original package name.
[0086] Based on the above embodiment, the processing module 2 further includes:
[0087] The second parsing unit 24 is configured to parse the operation information obtained in the guest mode to obtain operation-related instructions;
[0088] The processing unit 25 is used to call the corresponding package name change rule according to the operation usage related instruction to modify the package name corresponding to the application to be deleted in the deletion instruction to a custom package name; and respond to the operation information according to the custom package name to use the application.
[0089] Based on the above embodiment, the processing module 2 further includes:
[0090] The deletion processing unit 26 , when receiving a deletion instruction in the guest mode, modifies the package name corresponding to the application to be deleted in the deletion instruction into a custom package name; and searches for and deletes related files corresponding to the application according to the custom package name.
[0091] Specifically, this embodiment is a device embodiment corresponding to the above method embodiment. For specific effects, please refer to the above method embodiment, which will not be described in detail here.
[0092] One embodiment of the present invention, as Figure 5 As shown, a computer device 100 includes a processor 110 and a memory 120, wherein the memory 120 is used to store computer programs; the processor 110 is used to execute the computer programs stored in the memory 120 to implement the operations performed by the corresponding embodiment of the isolation implementation method of the above application.
[0093] Figure 5 FIG is a structural diagram of a computer device 100 provided by an embodiment of the present invention. Figure 5The computer device 100 includes a processor 110 and a memory 120, and may further include a communication interface 140 and a communication bus 120, and may further include an input / output interface 130, wherein the processor 110, the memory 120, the input / output interface 130 and the communication interface 140 communicate with each other via the communication bus 120. The memory 120 stores a computer program, and the processor 110 is used to execute the computer program stored in the memory 120 to implement the above Figure 1-Figure 2 The isolation implementation method of the application in the corresponding method embodiment.
[0094] The communication bus 120 is a circuit that connects the elements described and enables transmission between them. For example, the processor 110 receives commands from other elements via the communication bus 120, decrypts the received commands, and performs calculations or data processing based on the decrypted commands. The memory 120 may include program modules, such as a kernel, middleware, an application programming interface (API), and applications. The program modules may be composed of software, firmware, hardware, or at least two of these. The input / output interface 130 forwards commands or data entered by a user through input / output devices (such as sensors, keyboards, and touch screens). The communication interface 140 connects the computer device 100 to other network devices, user devices, and networks. For example, the communication interface 140 may connect to a network via a wired or wireless connection to connect to other external network devices or user devices. Wireless communications may include at least one of the following: Wi-Fi, Bluetooth (BT), Near Field Communication (NFC), Global Positioning System (GPS), and cellular communications, among others. Wired communication may include at least one of the following: Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), RS-232, etc. The network may be a telecommunications network or a communications network. The communications network may be a computer network, the Internet, the Internet of Things, or a telephone network. The computer device 100 may be connected to a network via the communications interface 140. The protocol used by the computer device 100 to communicate with other network devices may be supported by at least one of an application, an application programming interface (API), middleware, a kernel, and the communications interface 140.
[0095] One embodiment of the present invention is a storage medium, wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the above Figure 1-Figure 2 The isolation implementation method of the application in the corresponding method embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a read-only compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0096] They can be implemented using program code executable by a computing device, and thus, can be stored in a storage device and executed by the computing device, or can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0097] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for implementing application isolation, suitable for execution in a computing device, characterized in that: Including steps: Obtaining account identification information corresponding to the current user mode, where the computing device supports a multi-user mode. In the multi-user mode, independent user spaces are set for different users, and data of the same type of applications installed in different user modes are completely isolated; When it is determined based on the account identification information that the current user mode is guest mode, the package name corresponding to the application is modified to a custom package name, and a processing operation of the application is performed based on the custom package name, where the custom package name includes the original package name and the account identification information, including: After obtaining the installation package of the application in the guest mode, parsing the installation package, and obtaining relevant data of the application and the original package name from the installation package; Modify the package name corresponding to the application to be installed in the installation instruction to the custom package name; A target installation directory is created according to the custom package name, and relevant data of the application is stored in the target installation directory.
2. The method for implementing application isolation according to claim 1, wherein: When it is determined that the current user mode is the guest mode according to the account identification information, the package name corresponding to the application is modified to a custom package name, and the application processing operation is performed according to the custom package name, further comprising the steps of: When the account identification information is different from the preset owner identification information, it is determined that the current user mode is the guest mode.
3. The method for implementing application isolation according to claim 2, wherein: When it is determined that the current user mode is the guest mode according to the account identification information, the package name corresponding to the application is modified to a custom package name, and the application processing operation is performed according to the custom package name, further comprising the steps of: When operation information is obtained in the visitor mode, the operation information is parsed to obtain operation-related instructions; Calling the corresponding package name change rule using the relevant instructions according to the operation, and changing the package name involved in the package name call during the use of the application to the custom package name; The operation information is responded to according to the custom package name to use the application.
4. The method for implementing application isolation according to claim 2 or 3, characterized in that: When it is determined that the current user mode is the guest mode according to the account identification information, the package name corresponding to the application is modified to a custom package name, and the application processing operation is performed according to the custom package name, further comprising the steps of: When a deletion instruction is obtained in the guest mode, the package name corresponding to the application to be deleted in the deletion instruction is modified to the custom package name; Search and delete the relevant files corresponding to the application according to the custom package name.
5. A mobile terminal, characterized in that: include: An acquisition module is used to obtain account identification information corresponding to the current user mode, wherein the mobile terminal supports a multi-user mode and sets independent user spaces for different users in the multi-user mode; A processing module is used to modify the package name corresponding to the application to a custom package name when determining that the current user mode is the guest mode based on the account identification information, and perform processing operations on the application based on the custom package name, wherein the custom package name includes the original package name and the account identification information. The mobile terminal according to claim 5, wherein: The processing module includes: a judgment unit, configured to determine that the current user mode is the guest mode when the account identification information is different from the preset owner identification information; a first parsing unit, configured to, after obtaining the installation package of the application in the guest mode, parse the installation package and obtain relevant data of the application and the original package name from the installation package; The installation processing unit is used to modify the package name corresponding to the application to be installed in the installation instruction to the custom package name, create a target installation directory according to the custom package name, and store relevant data of the application in the target installation directory.
7. The mobile terminal according to claim 6, wherein: The processing module further includes: A second parsing unit is configured to, when operation information is acquired in the visitor mode, parse the operation information to obtain operation-related instructions; A processing unit is used to call the corresponding package name change rule according to the relevant instructions of the operation, modify the package name involved in the package name call during the use of the application to the custom package name, and respond to the operation information according to the custom package name to use the application.
8. The mobile terminal according to claim 6 or 7, characterized in that: The processing module further includes: a deletion processing unit, configured to, when a deletion instruction is obtained in the guest mode, modify the package name corresponding to the application to be deleted in the deletion instruction to the custom package name; Search and delete the relevant files corresponding to the application according to the custom package name.
9. A computer device, characterized in that: It includes a processor and a memory, wherein the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to implement the operations performed by the isolation implementation method of the application as described in any one of claims 1 to 4.
10. A storage medium, characterized in that: The storage medium stores at least one instruction, which is loaded and executed by the processor to implement the operation performed by the isolation implementation method of any one of claims 1 to 4.
Citation Information
Patent Citations
Message managing method and apparatus of application which can be logged in by multiple users, and intelligent terminal
CN107026933A
Multi-user login mode realization method, terminal and computer readable storage medium
CN108171025A