Application program unloading method and device, equipment and storage medium
By automatically uninstalling the debugging-type application and deleting its certificate information in the application uninstall method, the problem of easily missing certificates by developers manually uninstalling certificates is solved, and the risk of wasted storage resources and certificate leakage is avoided.
Patent Information
- Application Number
- CN202411439056.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-10-15
AI Technical Summary
In the prior art, after the application is uninstalled, developers need to manually uninstall the application certificate, which is prone to negligence to cause certificate deletion, resulting in waste of storage resources and risk of certificate leakage.
Provides an application uninstall method, responds to the target application uninstall instruction and reads the version type of the target application. When the version type is debug type, uninstall the target application and delete its installation information, including the signature validity period, the application usage limit, and the installation time.
By automatically uninstalling the target application and its certificate information, the risk of certificate information occupies memory resources and leaks is avoided.
Smart Images

Figure CN119645432A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a method, device, equipment and storage medium for uninstalling an application. Background Art
[0002] Currently, all applications developed based on OpenHarmony will be debugged before they are officially released to reduce program bugs in the released version. That is to say, after the application code is written, a debug version of the application will be formed, and then the debug version of the application will be installed through the designated debugging device to debug the application. Then, the debugging device needs to know the certificate information of the application in order to verify the application, and after the application is uninstalled, the developer needs to manually uninstall the application certificate of the application. This will lead to the risk of missing the deletion of the application certificate due to the developer's negligence, resulting in a waste of storage resources and certificate leakage.
[0003] Therefore the prior art still needs to be improved and enhanced. Summary of the invention
[0004] The technical problem to be solved by the present application is to provide a method, device, equipment and storage medium for uninstalling an application program in view of the deficiencies in the prior art.
[0005] In order to solve the above technical problems, the first aspect of the present application provides a method for uninstalling an application, wherein the method for uninstalling an application specifically includes:
[0006] In response to an uninstall instruction of the target application, read the version type of the target application;
[0007] When the version type is a debugging type, the target application is uninstalled and the installation information of the target application is deleted, wherein the installation information at least includes a signature validity period, an application usage restriction duration, and an installation time.
[0008] The method for uninstalling an application, wherein when the version type is a debugging type, uninstalling the target application and deleting the installation information of the target application specifically includes:
[0009] When the version type is a debugging type, uninstalling the target application and reading the application package name of the target application;
[0010] The installation information is searched based on the application package name, and the read installation information is deleted through the signature verification module in the package management module.
[0011] The method for uninstalling an application, wherein the method further comprises:
[0012] When the version type is a debugging type, the target application is uninstalled.
[0013] The method for uninstalling an application, wherein the installation information is used to perform installation verification and opening verification on the application, wherein the installation verification is used to verify the installation target application permission of the electronic device, and the opening verification is used to verify the launch target application permission of the electronic device.
[0014] The method for uninstalling an application, wherein the method further comprises:
[0015] Detecting whether a preset trusted device identification library contains a target device identification of an electronic device, wherein the electronic device is a device that responds to the uninstall instruction;
[0016] If the target device identifier is included, the target device identifier is deleted from the preset trusted device identifier library.
[0017] The method for uninstalling an application, wherein the installation information is determined based on a profile authorization file and an installation time when installing a target application, wherein the generation process of the profile authorization file includes:
[0018] Receiving an application certificate generation request sent by a development end through the digital twin platform, wherein the application certificate generation request is used to apply for an application certificate and a profile authorization file for the application to be signed;
[0019] When the application certificate generation request carries a csr file, an application certificate is issued to the development end based on the csr file through the digital twin platform; when the application certificate generation request carries a csr file, a key pair and an application certificate are generated for the development end;
[0020] A profile authorization file is issued based on the application information through the digital twin platform using a pre-generated profile key pair and profile signature certificate, and the profile authorization file is fed back to the development end so that the development end signs the application based on the profile authorization file.
[0021] The method for uninstalling the application, wherein the issuing of the profile signature certificate using the pre-generated profile key pair and profile signature certificate based on the application information through the digital twin platform specifically includes:
[0022] Obtaining a profile private key in the profile key pair through the digital twin platform;
[0023] Performing a profile file signing on the application information based on the profile private key through the digital twin platform to obtain signed application information;
[0024] The signature application information and the profile signature certificate are packaged into p7b format through the digital twin platform to obtain a profile authorization file.
[0025] A second aspect of the present application provides an application uninstallation device, wherein the application uninstallation device specifically includes:
[0026] A reading module, used for responding to an uninstallation instruction of a target application and reading a version type of the target application;
[0027] An uninstall module is used to uninstall the target application and delete the installation information of the target application when the version type is a debugging type, wherein the installation information at least includes a signature validity period, an application usage restriction duration, and an installation time.
[0028] A third aspect of the present application provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in any of the above-described methods for uninstalling an application.
[0029] A fourth aspect of the present application provides a terminal device, comprising: a processor and a memory;
[0030] The memory stores a computer-readable program executable by the processor;
[0031] When the processor executes the computer-readable program, the steps in any of the above-mentioned methods for uninstalling an application are implemented.
[0032] Beneficial effects: Compared with the prior art, the present application provides an application uninstallation method, apparatus, device and storage medium, the method comprising: responding to the uninstallation instruction of the target application, reading the version type of the target application; when the version type is a debugging type, uninstalling the target application and deleting the installation information of the target application, wherein the installation information at least includes the validity period of the signature, the application usage restriction duration and the installation time. When responding to the uninstallation instruction of the target application, the present application will uninstall the target application and simultaneously delete the certificate information of the target application, which can avoid the certificate information occupying memory resources on the one hand, and avoid the certificate information leakage on the other hand. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 A flowchart of a method for uninstalling an application provided in an embodiment of the present application.
[0035] Figure 2 A flowchart of a specific example of a method for uninstalling an application provided in an embodiment of the present application.
[0036] Figure 3 FIG. 4 is a flow chart of an embodiment of step S20 .
[0037] Figure 4 This is a functional block diagram of a device for uninstalling an application provided in an embodiment of the present application.
[0038] Figure 5 A functional block diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The embodiments of the present application provide a method, device, equipment and storage medium for uninstalling an application. To make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0040] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0041] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0042] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not mean the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0043] After research, it was found that all applications developed based on openharmony will be debugged before they are officially released to reduce program bugs in the released version. In other words, after the application code is written, a debug version of the application will be formed, and then the debug version of the application will be installed through the designated debugging device to debug the application. Then, the debugging device needs to know the certificate information of the application in order to verify the application, and after the application is uninstalled, the developer needs to manually uninstall the application certificate of the application. This will lead to the risk of missing the deletion of the application certificate due to the developer's negligence, resulting in a waste of storage resources and certificate leakage.
[0044] In order to solve the above problem, in an embodiment of the present application, in response to the uninstall instruction of the target application, the version type of the target application is read; when the version type is a debug type, the target application is uninstalled and the installation information of the target application is deleted, wherein the installation information at least includes the validity period of the signature, the application usage restriction duration, and the installation time. When responding to the uninstall instruction of the target application, the present application will uninstall the target application and simultaneously delete the certificate information of the target application, which can avoid the certificate information from occupying memory resources on the one hand, and avoid the certificate information from being leaked on the other hand.
[0045] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.
[0046] This embodiment provides a method for uninstalling an application program. Figure 1 As shown, the method includes:
[0047] S10. Respond to the uninstall instruction of the target application and read the version type of the target application.
[0048] Specifically, the uninstall instruction is used to uninstall the target application, wherein the uninstall instruction may be sent by an external device, or may be formed by triggering an uninstall button corresponding to the target application, etc. The version type is used to reflect the purpose of the application, and the version type may be a debug type or a release type. The debug type indicates that the target application is used by developers for self-testing and debugging, and the release type indicates that the target application is open to users.
[0049] Further, the version type can be configured for the target application when the target application is digitally signed, that is, when the target application is digitally signed, the version type will be configured for the target application so that the version type of the target application can be obtained when the target application is deleted. Of course, in actual applications, since the release version of the application can be known by the majority of users, there is no need to synchronously delete the certificate information of the application when the release version of the application is uninstalled. Therefore, when the target application is digitally signed, the version type can be configured only for the debug version of the application, that is, the generation process of the target application can be to compile the code into a hap package, detect the version type of the hap package, if the version type is a debug type, then the hap is debugged and signed by the jar command to obtain a debug type application; if the version type is a release version, then the hap is released and signed by the jar command to obtain a release type application, wherein the debug signature configures the version type for the target application, and the release signature does not configure the version type for the target application.
[0050] Based on this, when reading the version type of the target application, it is possible to detect whether the target application carries the version type. If the version type is detected, it means that the target application is a debug version, that is, the version type read is the debug version; otherwise, if the version type is not detected, it means that the target application is a release version, that is, the version type read is the release version. This can ensure that the target application of the debug version carries the version type and reduce useless operations in the signing process of the release version.
[0051] S20. When the version type is a debugging type, uninstall the target application and delete the installation information of the target application, wherein the installation information at least includes a signature validity period, an application usage restriction duration, and an installation time.
[0052] Specifically, the installation information is the restriction information of the debugging device of the target application, which is used to verify the debugging device. The installation information at least includes the validity period of the signature, the application usage restriction duration and the installation time; the installation information is used to perform an opening verification on the target application, wherein the opening verification is used to verify the authority of the electronic device to start the target application.
[0053] Exemplarily, the process of opening verification may be: calling the signature information and the current system time to the signature verification module in the package management module, and calculating the relative time interval between the installation time and the current system time, and the absolute time interval between the signature time and the current system time through the signature verification module; if the relative time interval is less than or equal to the application restriction usage time, and the absolute time interval is less than or equal to the authorization time limit, it is determined that the target application has passed the verification; if the relative time interval is greater than the application restriction usage time, and the absolute time interval is less than or equal to the authorization time limit, it is determined that the opening verification has failed due to the failure of the application restriction usage time verification; if the absolute time interval is greater than the authorization validity period, and the relative time interval is less than or equal to the application restriction usage time, it is determined that the opening verification has failed due to the failure of the authorization validity period verification; if the relative time interval is greater than the application restriction usage time, and the absolute time interval is greater than the authorization validity period, it is determined that the opening verification has failed due to the failure of both the application restriction usage time and the authorization validity period verification.
[0054] Specifically, if Figure 2 As shown, the RunVerify interface and the RemoveDebugData interface are newly added in the signature verification module in the package management module, and the debug range verification function is configured in the hapVerify interface in the signature verification module, that is, the signature verification module in the package management module is configured with the hapVerify interface, the RunVerify interface and the RemoveDebugData interface; the hapVerify interface is used to verify the target application when installing the application, and the verification of the target application when installing the application includes signature verification and debug range verification, and the debug range verification is used to perform signature time verification and authorization validity period verification; the RunVerify interface is used to verify the application to be opened when opening the application; the RemoveDebugData interface is used to delete the installation information of the program to be uninstalled when uninstalling the application.
[0055] The implementation process of the hapVerify interface remains unchanged, only the interface logic of the hapVerify interface is changed. The modified interface logic can determine the application type according to the incoming application package name. If the application type is a release type, the verification passes and returns HAP_VERIFY_RELEASE_OK; if the application type is a debug type, a signature verification and a debug range verification are performed. If the verification fails, HAP_VERIFY_TIME_ERROR is returned and the application is not allowed to be opened; if the verification passes, HAP_VERIFY_OK is returned and the application is allowed to be opened. If an error occurs in searching the database, HAP_VERIFY_FIND_ERROR is returned and the application is not allowed to be opened.
[0056] The RunVerify interface is represented as int RunVerify(const std::string bundleName);
[0057] Function parameter: application package name bundleName.
[0058] Function return value:
[0059]
[0060] RUN_VERIFY_OK indicates that the application type is debug type, the usage time is limited and the verification has passed, and the application is allowed to be opened;
[0061] RUN_VERIFY_FIND_ERROR means that the database search based on the package name fails and the application cannot be opened;
[0062] RUN_VERIFY_TIME_ERROR indicates that the application type is debugging type, the validity period verification fails, and the application is not allowed to be opened;
[0063] RUN_VERIFY_RELEASE_OK indicates that the application type is a release type, there is no validity period, and the application is allowed to be opened.
[0064] The interface logic of the RunVerify interface is:
[0065] The application type is determined based on the incoming application package name. If the application type is a release type, the verification passes and RUN_VERIFY_RELEASE_OK is returned. If the application type is a debug type, the validity period verification is performed. If the verification fails, RUN_VERIFY_TIME_ERROR is returned and the application is not allowed to be opened. If the verification passes, RUN_VERIFY_OK is returned and the application is allowed to be opened. If an error occurs in searching the database, RUN_VERIFY_FIND_ERROR is returned and the application is not allowed to be opened.
[0066] How to use the RunVerify interface:
[0067] The package management module calls the RunVerify interface every time the application is opened, and adds relevant judgment logic based on the return value to control whether the opening is allowed, and if not allowed, a pop-up interface prompts that the application has exceeded the validity period.
[0068] The RemoveDebugData interface is represented by intRemoveDebugData(const std::stringbundleName)
[0069] Function parameter: application package name
[0070] Function return value:
[0071]
[0072] REMOVE_OK means the application type is debugging type and the database is deleted successfully;
[0073] REMOVE_FIND_ERROR means that the database search failed and you need to check whether the database is wrong;
[0074] REMOVE_DELETE_ERROR indicates that the application type is debugging type, and database deletion fails. You need to check whether the database is correct.
[0075] REMOVE_RELEASE_OK indicates that the application type is release type and the database does not need to be deleted;
[0076] The interface logic of the RemoveDebugData interface:
[0077] The application type is determined by searching the database based on the passed application package name. If REMOVE_FIND_ERROR is returned, it means that the database search failed. If it is a release type, REMOVE_RELEASE_OK is returned, and there is no need to delete the database. If it is a debug type, the database needs to be deleted. Returning REMOVE_OK means the deletion is successful, and returning REMOVE_DELETE_ERROR means the deletion failed.
[0078] How to use the RemoveDebugData interface:
[0079] The package management module calls this interface to delete the corresponding record in the database every time the application is uninstalled.
[0080] It can be seen from the signature verification module in the package management module that the signature verification module can also perform installation verification, that is, when the target application is installed in an electronic device, an installation verification will be performed, wherein the installation verification process can be: performing signature verification on the target application through the package management module; if the signature verification passes, obtaining the current system time of the electronic device where the target application is installed, the signature time of the target application, and the authorization validity period of the profile authorization file of the application; calculating a first time difference between the current system time and the signature time, and comparing the calculated first time difference with a first time threshold; when the first time difference is less than the first time threshold, verifying whether the profile authorization file is expired based on the authorization validity period; if the profile authorization file is not expired, determining that the signature time and the authorization validity period pass, and then determining that the target application verification passes.
[0081] Furthermore, in one implementation, after uninstalling the target application and deleting the installation information of the target application, the installation information may also be deleted by the signature verification module in the package management module. Figure 3 As shown, when the version type is the debugging type, uninstalling the target application and deleting the installation information of the target application specifically includes:
[0082] When the version type is a debugging type, uninstalling the target application and reading the application package name of the target application;
[0083] The installation information is searched based on the application package name, and the read installation information is deleted through the signature verification module in the package management module.
[0084] Specifically, the certificate list of the electronic device stores the digital certificates loaded on the electronic device. The certificate information can be deleted through the RemoveDebugData interface. That is, the application package name of the target application can be passed to the RemoveDebugData interface, and the certificate information corresponding to the target application can be searched in the database through the RemoveDebugData interface, and then the found certificate information can be deleted from the database.
[0085] In one implementation, the installation information is determined based on the profile authorization file and the installation time when the target application is installed, wherein the generation process of the profile authorization file includes: receiving an application certificate generation request sent by the development end through the digital twin platform, wherein the application certificate generation request is used to apply for an application certificate and a profile authorization file for the application to be signed;
[0086] When the application certificate generation request carries a csr file, an application certificate is issued to the development end based on the csr file through the digital twin platform; when the application certificate generation request carries a csr file, a key pair and an application certificate are generated for the development end;
[0087] A profile authorization file is issued based on the application information through the digital twin platform using a pre-generated profile key pair and profile signature certificate, and the profile authorization file is fed back to the development end so that the development end signs the application based on the profile authorization file.
[0088] Specifically, the application certificate generation request is used to apply for an application certificate and a profile authorization file for the application to be signed, wherein the application certificate generation request may include configuration information of the application to be signed, and the configuration information may include a csr file, the application package name of the application to be signed, and the version type, etc. The csr file is a certificate request file, which is used to request the cloud platform to issue an application certificate according to the public key in the key pair specified by the developer. The application certificate generation request can be generated by the cloud platform itself, for example, the cloud platform pre-sets an issuance interface, the developer logs in to the cloud platform and uploads the locally stored configuration information through the issuance interface to trigger the cloud platform to generate an application certificate generation request by itself.
[0089] When the application certificate generation request carries a csr file, it also indicates that the application certificate needs to be issued using the public key in the key pair specified by the development end. To this end, when the application certificate generation request carries a csr file, the public key in the key pair specified by the development end carried in the csr file is read, and the application certificate is issued for the application to be signed based on the public key in the key pair specified by the development end. Among them, the application certificate is used to digitally sign the application to be signed, so as to ensure that the data has not been tampered with or damaged through the digital signature, thereby protecting the computer application from various security vulnerabilities and attacks, and can ensure that the application and its data run without being attacked, thereby improving the security of the application. Of course, in actual applications, the application certificate generation request may not carry a csr file, that is, the cloud platform does not need to use the public key in the key pair specified by the development end to issue the application certificate. In addition, the cloud platform needs to generate a key pair for the application to be signed, and then use the public key in the key pair to generate a key pair for the application to be signed.
[0090] The application information may include the application package name and version information, etc., wherein the application information can be obtained by parsing the application certificate generation request. Of course, when the application certificate generation request does not include the application package name and version information, it can be obtained by sending an application information acquisition request to the development end. In an embodiment of the present application, the application certificate generation request includes the application package name and version information, so that when issuing an application certificate and a profile authorization file for the application to be signed based on the application certificate generation request, the application information can be obtained by directly parsing the application certificate generation request, and no communication with the development end is required. This can reduce the time spent on communication and improve the efficiency of application signing on the one hand; on the other hand, it can also avoid the problem of signature failure or signature error caused by communication anomalies.
[0091] The profile key pair and profile signature certificate are pre-generated and used to issue a profile authorization file for the application to be signed. The issuing of the profile authorization file based on the application information using the pre-generated profile key pair and profile signature certificate specifically includes:
[0092] Obtaining a profile private key in the profile key pair;
[0093] Performing a profile file signing on the application information based on the profile private key to obtain signed application information;
[0094] The signed application information and the profile signature certificate are packaged into p7b format to obtain a profile authorization file.
[0095] Specifically, the profile authorization file includes the profile signature certificate, application package name, application level, signature validity period, and application usage restriction period. The signature validity period is used to reflect the validity period of the application certificate, and the application usage restriction period is used to reflect the period of use of the application certificate that the debugging device can use, so as to verify the debugging device through the signature validity period and the application usage restriction period. In addition, when the profile authorization file includes the application usage restriction period, the application information may not include the device information of the debugging device, so as to use the application usage restriction period as the application usage restriction condition for opening verification. This can not only ensure that the debug version of the application will not be used without restriction, but also avoid the need to apply for debugging permissions for each debugging device, and even when a new debugging device is added, the application needs to be re-signed, which brings convenience to users.
[0096] In one implementation, after uninstalling the target application, it is also detected whether the electronic device is a trusted electronic device. If it is a trusted electronic device, the trusted authority of the electronic device needs to be revoked. To this end, after obtaining the certificate information of the target application and uninstalling the target application based on the certificate information, the method further includes:
[0097] Detecting whether a preset trusted device identification library contains a target device identification of an electronic device, wherein the electronic device is a device that responds to the uninstall instruction;
[0098] If the target device identifier is included, the target device identifier is deleted from the preset trusted device identifier library.
[0099] Specifically, the preset trusted device identification library is pre-established and used to store target device identifications of electronic devices, and each target device identification in the preset trusted device identification library corresponds to the electronic device that is the trusted debugging device of the target application. In other words, the preset trusted device identification library corresponding to the application can be found according to the application package name, and then when the preset trusted device identification library includes the target device identification, the target device identification is deleted from the preset trusted device identification library.
[0100] In summary, this embodiment provides a method for uninstalling an application, the method comprising: responding to an uninstall instruction of a target application, reading the version type of the target application; when the version type is a debug type, uninstalling the target application and deleting the installation information of the target application, wherein the installation information at least includes the validity period of the signature, the application usage restriction duration, and the installation time. When responding to an uninstall instruction of a target application, the present application will uninstall the target application and simultaneously delete the certificate information of the target application, which can avoid the certificate information occupying memory resources on the one hand, and avoid the certificate information leakage on the other hand.
[0101] Based on the above-mentioned application uninstallation method, this embodiment provides an application uninstallation device, such as Figure 4 As shown, the application uninstallation device specifically includes:
[0102] The reading module 100 is used to respond to the uninstallation instruction of the target application and read the version type of the target application;
[0103] The uninstall module 200 is used to uninstall the target application and delete the installation information of the target application when the version type is the debugging type, wherein the installation information at least includes the signature validity period, the application usage restriction duration and the installation time.
[0104] Based on the above-mentioned application uninstallation method, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the application uninstallation method as described in the above-mentioned embodiment.
[0105] Based on the above-mentioned application uninstallation method, the present application also provides a terminal device, such as Figure 5 As shown, it includes at least one processor (processor) 20; display screen 21; and memory (memory) 22, and may also include a communications interface (Communications Interface) 23 and a bus 24. Among them, the processor 20, the display screen 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setting mode. The communication interface 23 can transmit information. The processor 20 can call the logic instructions in the memory 22 to execute the method in the above embodiment.
[0106] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0107] The memory 22 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implementing the methods in the above embodiments.
[0108] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient storage medium.
[0109] In addition, the specific process of loading and executing the multiple instruction processors in the above-mentioned storage medium and the terminal device has been described in detail in the above-mentioned method, and will not be described one by one here.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for uninstalling an application, characterized in that: The method for uninstalling the application program specifically includes: In response to an uninstall instruction of the target application, read the version type of the target application; When the version type is a debugging type, the target application is uninstalled and the installation information of the target application is deleted, wherein the installation information at least includes a signature validity period, an application usage restriction duration, and an installation time.
2. The method for uninstalling an application according to claim 1, characterized in that: When the version type is a debugging type, uninstalling the target application and deleting the installation information of the target application specifically includes: When the version type is a debugging type, uninstalling the target application and reading the application package name of the target application; The installation information is searched based on the application package name, and the read installation information is deleted through the signature verification module in the package management module.
3. The method for uninstalling an application according to claim 1, characterized in that: The method further comprises: When the version type is a debugging type, the target application is uninstalled.
4. The method for uninstalling an application according to claim 1, characterized in that: The installation information is used to perform installation verification and opening verification on the application, wherein the installation verification is used to verify the installation target application permission of the electronic device, and the opening verification is used to verify the launch target application permission of the electronic device.
5. The method for uninstalling an application according to any one of claims 1 to 4, characterized in that: The method further comprises: Detecting whether a preset trusted device identification library contains a target device identification of an electronic device, wherein the electronic device is a device that responds to the uninstall instruction; If the target device identifier is included, the target device identifier is deleted from the preset trusted device identifier library.
6. The method for uninstalling an application according to claim 1, characterized in that: The installation information is determined when installing the target application based on the profile authorization file and the installation time, wherein the generation process of the profile authorization file includes: Receiving an application certificate generation request sent by a development end through the digital twin platform, wherein the application certificate generation request is used to apply for an application certificate and a profile authorization file for the application to be signed; When the application certificate generation request carries a csr file, an application certificate is issued to the development end based on the csr file through the digital twin platform; when the application certificate generation request carries a csr file, a key pair and an application certificate are generated for the development end; The digital twin platform uses a pre-generated profile key pair and profile signature certificate to issue a profile authorization file based on the application information, and feeds the profile authorization file back to the developer so that the developer can sign the application based on the profile authorization file.
7. The method for uninstalling an application according to claim 6, characterized in that: The issuing of the profile signing certificate by using the pre-generated profile key pair and profile signing certificate based on the application information through the digital twin platform specifically includes: Obtaining the profile private key in the profile key pair through the digital twin platform; The application information is signed by the digital twin platform based on the profile private key to obtain the signed application information; The signed application information and the profile signing certificate are packaged into p7b format through the digital twin platform to obtain a profile authorization file.
8. An application uninstallation device, characterized in that: The application uninstallation device specifically includes: A reading module, used for responding to an uninstallation instruction of a target application and reading a version type of the target application; An uninstall module is used to uninstall the target application and delete the installation information of the target application when the version type is a debugging type, wherein the installation information at least includes a signature validity period, an application usage restriction duration, and an installation time.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the method for uninstalling an application as described in any one of claims 1 to 7.
10. A terminal device, characterized in that: include: Processor and memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the processor implements the steps in the method for uninstalling the application program according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for unloading application program
CN105404537A
Method and device for uninstalling application program and terminal equipment
CN109710278A
Mobile terminal, unloading method of preset application program of mobile terminal and memory
CN109739519A
A program unloading method and a mobile terminal
CN109918088A
Application authorization method and device, equipment and storage medium
CN114282193A