Application uninstalling method, device, equipment and storage medium

By automatically identifying and uninstalling the installation information and certificates of debug applications, the problem of missing certificate deletion due to developer negligence is solved, achieving resource saving and security improvement.

CN119645432BActive Publication Date: 2026-06-02深圳开鸿数字产业发展有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
深圳开鸿数字产业发展有限公司
Filing Date
2024-10-15
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, developers may inadvertently miss deleting application certificates when uninstalling applications, leading to wasted storage resources and the risk of certificate leakage.

Method used

This invention provides an application uninstallation method that automatically uninstalls and deletes the installation information of debug applications by reading the application version type, including the signature validity period, application usage restriction duration, and installation time. It also utilizes a digital twin platform to generate and manage application certificates, ensuring the security of certificate information.

Benefits of technology

This effectively avoids certificate information consuming memory resources, reduces the risk of certificate leakage, and improves the security and efficiency of the application uninstallation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645432B_ABST
    Figure CN119645432B_ABST
Patent Text Reader

Abstract

The application discloses an application uninstalling method, device and equipment and a storage medium. The method comprises the following steps: in response to an uninstalling instruction of a target application, reading a version type of the target application; when the version type is a debugging type, uninstalling the target application and deleting installation information of the target application, wherein the installation information at least comprises a signature validity period, an application use limitation time length and an installation time. When the uninstalling instruction of the target application is responded, the target application is uninstalled and the certificate information of the target application is synchronously deleted, so that on one hand, the certificate information can avoid occupying memory resources, and on the other hand, the certificate information can avoid being leaked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a method, apparatus, device and storage medium for uninstalling an application. Background Technology

[0002] Currently, applications developed using OpenHarmony undergo application debugging before official release to reduce bugs in the final version. This means that after the application code is written, a debug version is created and installed on a designated debugging device for testing. The debugging device needs to obtain the application's certificate information for verification, and the developer must manually uninstall the application certificate after uninstallation. This presents a risk of developer oversight leading to missed certificate removal, wasted storage resources, and certificate leaks.

[0003] Therefore, existing technologies still need to be improved and enhanced. Summary of the Invention

[0004] The technical problem to be solved by this application is to provide an application uninstallation method, apparatus, device and storage medium to address the shortcomings of the prior art.

[0005] To address the aforementioned technical problems, the first aspect of this application provides a method for uninstalling an application, wherein the method specifically includes:

[0006] Responding to the target application's uninstallation command, read the target application's version type;

[0007] When the version type is debug, uninstall the target application and delete the installation information of the target application, wherein the installation information includes at least the signature validity period, application usage restriction duration, and installation time.

[0008] The method for uninstalling the application, wherein when the version type is debug, uninstalling the target application and deleting the installation information of the target application specifically includes:

[0009] When the version type is debug, uninstall the target application and read the application package name of the target application;

[0010] The installation information is retrieved based on the application package name, and the retrieved installation information is deleted through the signature verification module in the package management module.

[0011] The method for uninstalling the application, wherein the method further includes:

[0012] When the version type is debug, uninstall the target application.

[0013] The method for uninstalling the 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 permissions of the target application installed on the electronic device, and the opening verification is used to verify the permissions of the target application launched on the electronic device.

[0014] The method for uninstalling the application, wherein the method further includes:

[0015] Detect whether the target device identifier of the electronic device is contained in the preset trusted device identifier library, wherein the electronic device is the device that responds to the unload command;

[0016] If the target device identifier is included, the target device identifier is deleted from the preset trusted device identifier database.

[0017] The method for uninstalling the application, wherein the installation information is determined based on the target application's license file and installation time, and the process of generating the license file includes:

[0018] The application certificate generation request is received from the development end through the digital twin platform. 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, the 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] The digital twin platform uses a pre-generated profile key pair and profile signing certificate to issue a profile authorization file based on the application information, and then feeds the profile authorization file back to the development team so that the development team can sign the application based on the profile authorization file.

[0021] The method for uninstalling the application, wherein the step of issuing a protocol signing certificate using a pre-generated protocol key pair and protocol signing certificate based on the application information through a digital twin platform specifically includes:

[0022] Obtain the private key from the proprietary key pair through a digital twin platform;

[0023] The application information is signed using a digital twin platform based on the profile private key to obtain signed application information;

[0024] The signature application information and the proof signature certificate are packaged into p7b format using a digital twin platform to obtain a proof license file.

[0025] A second aspect of this application provides an application uninstallation device, wherein the application uninstallation device specifically includes:

[0026] The read module is used to read the version type of the target application in response to the uninstallation command of the target application;

[0027] The uninstallation module is used to uninstall the target application and delete the installation information of the target application when the version type is debug type. The installation information includes at least the signature validity period, application usage restriction duration, and installation time.

[0028] A third aspect of this application provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the application uninstallation method as described above.

[0029] A fourth aspect of this application provides a terminal device, which includes: a processor and a memory;

[0030] The memory stores a computer-readable program that can be executed by the processor;

[0031] When the processor executes the computer-readable program, it implements the steps in the uninstallation method for the application as described above.

[0032] Beneficial Effects: Compared with the prior art, this application provides a method, apparatus, device, and storage medium for uninstalling an application. The method includes: responding to an uninstallation command of a target application and reading the version type of the target application; when the version type is debug, uninstalling the target application and deleting the installation information of the target application, wherein the installation information includes at least the signature validity period, application usage restriction duration, and installation time. When responding to an uninstallation command of a target application, this application uninstalls the target application and simultaneously deletes the target application's certificate information. This avoids certificate information consuming memory resources and also prevents certificate information leakage. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 A flowchart illustrating the application uninstallation method provided in this application embodiment.

[0035] Figure 2 This is a flowchart illustrating a specific example of an application uninstallation method provided in an embodiment of this application.

[0036] Figure 3 This is a flowchart illustrating one embodiment of step S20.

[0037] Figure 4 A schematic block diagram of an application uninstallation device provided in an embodiment of this application.

[0038] Figure 5 A schematic block diagram of the terminal device provided in the embodiments of this application. Detailed Implementation

[0039] This application provides a method, apparatus, device, and storage medium for uninstalling an application. To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.

[0040] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated 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 say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units 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 used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0042] It should be understood that the sequence number and size of each step in this embodiment do not imply 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 this application embodiment.

[0043] Research has revealed that applications developed using OpenHarmony undergo application debugging before official release to minimize bugs in the final version. This means that after the application code is written, a debug version is created and installed on a designated debugging device for testing. The debugging device needs to access the application's certificate information for verification, and the developer must manually uninstall the application certificate after uninstallation. This presents a risk of developer oversight leading to missed certificate removal, wasted storage resources, and certificate leaks.

[0044] To address the aforementioned issues, in this embodiment, in response to an uninstallation command for the target application, the version type of the target application is read. When the version type is debug, the target application is uninstalled and its installation information is deleted. The installation information includes at least the signature validity period, application usage restriction duration, and installation time. When responding to an uninstallation command for the target application, this application uninstalls the target application and simultaneously deletes its certificate information. This avoids certificate information consuming memory resources and also prevents certificate information leakage.

[0045] The application content will be further explained below with reference to the accompanying drawings and the description of the embodiments.

[0046] This embodiment provides a method for uninstalling an application, such as... Figure 1 As shown, the method includes:

[0047] S10. Respond to the uninstallation command of the target application and read the version type of the target application.

[0048] Specifically, the uninstall command is used to uninstall the target application. This uninstall command can be sent from an external device or triggered by activating the uninstall button on the target application. The version type reflects the application's purpose. The version type can be either debug or release. Debug indicates the target application is for developers to use for self-testing and debugging, while release indicates the target application is intended for user release.

[0049] Furthermore, the version type can be configured for the target application when digitally signing it. That is, when digitally signing the target application, a version type is configured so that the version type can be obtained when the target application is deleted. Of course, in practical applications, since the release version of the application is widely known to users, there is no need to simultaneously delete the application's certificate information when uninstalling the release version. Therefore, when digitally signing the target application, the version type can be configured only for the debug version. That is, the target application generation process can involve compiling the code into a HAP package, checking the version type of the HAP package, and if the version type is debug, then using the JAR command to perform a debug signature on the HAP to obtain a debug application; if the version type is release, then using the JAR command to perform a release signature on the HAP to obtain a release application. In this case, the debug signature configures the version type for the target application, while the release signature does not.

[0050] Therefore, when reading the version type of a target application, it's possible to detect whether the target application carries a version type. If a version type is detected, it indicates that the target application is a debug version, meaning the read version type is debug; conversely, if no version type is detected, it indicates that the target application is a release version, meaning the read version type is release. This ensures that debug versions of target applications carry a version type while reducing unnecessary operations during the signing process of release versions.

[0051] S20. When the version type is debug type, uninstall the target application and delete the installation information of the target application, wherein the installation information includes at least the signature validity period, application usage restriction duration and installation time.

[0052] Specifically, the installation information refers to the restriction information of the debugging device for the target application, used to verify the debugging device. The installation information includes at least the signature validity period, the application usage restriction duration, and the installation time; the installation information is used to verify the opening of the target application, wherein the opening verification is used to verify the electronic device's permission to launch the target application.

[0053] For example, the opening verification process can be as follows: the signature information and the current system time are called to the signature verification module in the package management module. The signature verification module calculates 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. If the relative time interval is less than or equal to the application's usage limit and the absolute time interval is less than or equal to the license validity period, the target application is deemed to have passed verification. If the relative time interval is greater than the application's usage limit and the absolute time interval is less than or equal to the license validity period, the opening verification fails due to the application's usage limit verification failing. If the absolute time interval is greater than the license validity period and the relative time interval is less than or equal to the application's usage limit, the opening verification fails due to the license validity period verification failing. If the relative time interval is greater than the application's usage limit and the absolute time interval is greater than the license validity period, the opening verification fails because both the application's usage limit and the license validity period fail verification.

[0054] Specifically, such as Figure 2 As shown, the signature verification module in the package management module adds the RunVerify and RemoveDebugData interfaces, and configures debug scope verification functionality within the hapVerify interface of the signature verification module. In other words, the signature verification module in the package management module is configured with the hapVerify, RunVerify, and RemoveDebugData interfaces. The hapVerify interface is used to verify the target application during installation, including signature verification and debug scope verification. Debug scope verification is used to verify the signature time and authorization validity period. The RunVerify interface is used to verify the application to be opened when the application is opened. The RemoveDebugData interface is used to delete the installation information of the application to be uninstalled when the application is uninstalled.

[0055] The implementation of the hapVerify interface remains unchanged; only the interface logic is modified. The modified logic determines the application type based on the passed application package name. If the application type is a release application, the verification passes, and HAP_VERIFY_RELEASE_OK is returned. If the application type is a debug application, signature verification and debug scope verification are performed. If the verification fails, HAP_VERIFY_TIME_ERROR is returned, disallowing the application from opening. If the verification passes, HAP_VERIFY_OK is returned, allowing the application to open. If a database lookup error occurs, HAP_VERIFY_FIND_ERROR is returned, disallowing the application from opening.

[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, the usage time limit has passed the verification, and the application can be opened.

[0061] RUN_VERIFY_FIND_ERROR indicates that the database search based on the package name failed and the application is not allowed to be opened;

[0062] RUN_VERIFY_TIME_ERROR indicates that the application type is debug, the validity period of the usage time has failed the verification, and the application is not allowed to be opened.

[0063] RUN_VERIFY_RELEASE_OK indicates that the application type is a release type, with no expiration time, and allows the application to be opened.

[0064] The logic of the RunVerify interface is as follows:

[0065] The application type is determined based on the passed application package name. If the application type is a release application, the validation passes and returns `RUN_VERIFY_RELEASE_OK`. If the application type is a debug application, a usage time validity period validation is performed. If the validation fails, `RUN_VERIFY_TIME_ERROR` is returned, and the application cannot be opened. If the validation passes, `RUN_VERIFY_OK` is returned, and the application can be opened. If a database lookup error occurs, `RUN_VERIFY_FIND_ERROR` is returned, and the application cannot be opened.

[0066] How to use the RunVerify API:

[0067] The package management module calls the RunVerify interface every time the application is opened, adds relevant judgment logic based on the return value, controls whether to allow opening, and pops up an interface to prompt that the application has exceeded its validity period if opening is not allowed.

[0068] The RemoveDebugData interface is represented as intRemoveDebugData(const std::string bundleName).

[0069] Function parameter: application package name

[0070] Function return value:

[0071]

[0072] REMOVE_OK indicates that the application type is debug and the database deletion was successful.

[0073] REMOVE_FIND_ERROR indicates that the database search failed and you need to check if there are any errors in the database.

[0074] REMOVE_DELETE_ERROR indicates that the application type is debug and the database deletion failed. It is necessary to check whether there are any errors in the database.

[0075] REMOVE_RELEASE_OK indicates that the application type is a release type and the database does not need to be deleted;

[0076] The logic of the RemoveDebugData interface:

[0077] The system searches the database based on the passed application package name to determine the application type. A `REMOVE_FIND_ERROR` return value indicates a database search failure. For release applications, `REMOVE_RELEASE_OK` is returned, and no database deletion is required. For debug applications, database deletion is necessary; `REMOVE_OK` indicates successful deletion, while `REMOVE_DELETE_ERROR` indicates deletion failure.

[0078] How to use the RemoveDebugData interface:

[0079] The package management module calls this interface to delete the corresponding record in the database each time an application is uninstalled.

[0080] As can be seen from the signature verification module in the package management module, the signature verification module can also perform installation verification. That is, when the target application is installed on the electronic device, installation verification will be performed. The installation verification process can be as follows: the package management module performs signature verification on the target application; if the signature verification passes, the current system time of the electronic device on which the target application is installed, the signature time of the target application, and the authorization validity period of the application's protocol license are obtained; a first time difference between the current system time and the signature time is calculated, and the calculated first time difference is compared with a first time threshold; if the first time difference is less than the first time threshold, the protocol license is checked for expiration based on the authorization validity period; if the protocol license has not expired, the signature time and the authorization validity period are deemed to be valid, and the target application verification is deemed to have passed.

[0081] Furthermore, in one implementation, the uninstallation of the target application and the deletion of its installation information can also be achieved through a signature verification module within the package management module. Correspondingly, such as Figure 3 As shown, when the version type is debug, uninstalling the target application and deleting the installation information of the target application specifically includes:

[0082] When the version type is debug, uninstall the target application and read the application package name of the target application;

[0083] The installation information is retrieved based on the application package name, and the retrieved installation information is deleted through the signature verification module in the package management module.

[0084] Specifically, the certificate list of an electronic device stores the digital certificates installed on the electronic device. 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, which will search for the certificate information corresponding to the target application in the database and then delete the found certificate information from the database.

[0085] In one implementation, the installation information is determined based on the PROFILE license file and the installation time of the target application. The process of generating the PROFILE license file includes: receiving an application certificate generation request sent by the development end through a digital twin platform. The application certificate generation request is used to apply for an application certificate and a PROFILE license file for the application to be signed.

[0086] When the application certificate generation request carries a CSR file, the 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] The digital twin platform uses a pre-generated profile key pair and profile signing certificate to issue a profile authorization file based on the application information, and then feeds the profile authorization file back to the development team so that the development team can sign the application based on the profile authorization file.

[0088] Specifically, the application certificate generation request is used to apply for an application certificate and protocol authorization file for the application to be signed. The application certificate generation request may include configuration information of the application to be signed, such as a CSR file, the application package name, and version type. The CSR file is a certificate request file used to request the cloud platform to issue an application certificate based on the public key in the key pair specified by the developer. The application certificate generation request can be generated automatically by the cloud platform. For example, the cloud platform may pre-set an issuance interface, and the developer logs into the cloud platform and uploads locally stored configuration information through this interface to trigger the cloud platform to automatically generate the application certificate generation request.

[0089] When the application certificate generation request carries a CSR file, it also indicates that the application certificate needs to be signed using the public key from the key pair specified by the developer. Therefore, when the application certificate generation request carries a CSR file, the public key from the key pair specified by the developer carried in the CSR file is read, and an application certificate is issued for the application to be signed based on the read public key from the key pair specified by the developer. The application certificate is used to digitally sign the application to be signed, ensuring that the data has not been tampered with or corrupted, thereby protecting the computer application from various security vulnerabilities and attacks. This ensures that the application and its data run without attack, improving application security. Of course, in practical 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 from the key pair specified by the developer to issue the application certificate. Furthermore, the cloud platform needs to generate a key pair for the application to be signed, and then use the public key from the key pair to generate a new key pair for the application to be signed.

[0090] Application information may include the application package name and version information, which can be obtained by parsing the application certificate generation request. Of course, if the application certificate generation request does not include the application package name and version information, it can be obtained by sending an application information retrieval request to the development team. In this embodiment, the application certificate generation request includes the application package name and version information. Therefore, when issuing application certificates and protocol licenses for the application to be signed based on the application certificate generation request, the application information can be obtained directly by parsing the application certificate generation request, eliminating the need for further communication with the development team. This reduces communication time and improves application signing efficiency; it also avoids signing failures or errors due to communication anomalies.

[0091] The PROFILE key pair and PROFILE signing certificate are pre-generated and used to issue PROFILE license files for the application to be signed. The specific steps of issuing the PROFILE license file based on the application information using the pre-generated PROFILE key pair and PROFILE signing certificate include:

[0092] Obtain the private key from the specified private key pair;

[0093] The application information is signed using the protocol private key to obtain signed application information;

[0094] The signature application information and the profile signing certificate are packaged into a p7b format to obtain the profile authorization file.

[0095] Specifically, the PROFILE license file includes the PROFILE signing certificate, application package name, application level, signature validity period, and application usage restriction duration. The signature validity period reflects the validity period of the application certificate, and the application usage restriction duration reflects the period during which the debugging device can use the application certificate, facilitating verification of the debugging device through the signature validity period and application usage restriction duration. Furthermore, when the PROFILE license file includes the application usage restriction duration, the application information may not include the debugging device information. This allows the application usage restriction duration to be used as a restriction condition for application access verification. This ensures that the debug version of the application is not used without restriction, avoids the need to apply for debugging permissions for each debugging device, and prevents the application from needing to be re-signed when a new debugging device is added, thus providing convenience for users.

[0096] In one implementation, after uninstalling the target application, it is further checked whether the electronic device is a trusted electronic device. If it is, the trusted permissions of the electronic device need 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] Detect whether the target device identifier of the electronic device is contained in the preset trusted device identifier library, wherein the electronic device is the device that responds to the unload command;

[0098] If the target device identifier is included, the target device identifier is deleted from the preset trusted device identifier database.

[0099] Specifically, the preset trusted device identifier library is pre-established to store target device identifiers of electronic devices. Each target device identifier in the preset trusted device identifier library corresponds to an electronic device that is a trusted debugging device for the target application. In other words, the preset trusted device identifier library corresponding to the application can be found first based on the application package name, and then the target device identifier is deleted from the preset trusted device identifier library when it includes the target device identifier.

[0100] In summary, this embodiment provides a method for uninstalling an application. The method includes: responding to an uninstallation command of a target application and reading the version type of the target application; when the version type is debug, uninstalling the target application and deleting the installation information of the target application, wherein the installation information includes at least the signature validity period, the application usage restriction duration, and the installation time. This application uninstalls the target application and simultaneously deletes its certificate information when responding to the uninstallation command of the target application. This avoids certificate information consuming memory resources and also prevents certificate information leakage.

[0101] Based on the above-described 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 read the version type of the target application in response to the uninstallation command of the target application;

[0103] Uninstall module 200 is used to uninstall the target application and delete the installation information of the target application when the version type is debug type, wherein the installation information includes at least the signature validity period, application usage restriction duration and installation time.

[0104] Based on the above-described application uninstallation method, this embodiment provides a computer-readable storage medium storing one or more programs, which can be executed by one or more processors to implement the steps in the application uninstallation method described in the above embodiment.

[0105] Based on the above-described application uninstallation method, this application also provides a terminal device, such as... Figure 5 As shown, it includes at least one processor 20; a display screen 21; and a memory 22, and may also include a communications interface 23 and a bus 24. The processor 20, display screen 21, memory 22, and communications interface 23 can communicate with each other via the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setup mode. The communications interface 23 can transmit information. The processor 20 can invoke logical instructions in the memory 22 to execute the methods described in the above embodiments.

[0106] Furthermore, the logical instructions in the aforementioned memory 22 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.

[0107] The memory 22, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 22, thereby implementing the methods in the above embodiments.

[0108] The memory 22 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 22 may include high-speed random access memory (RAM) and non-volatile memory. Examples include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as transient storage media.

[0109] Furthermore, the specific process of loading and executing multiple instruction processors in the aforementioned storage medium and terminal device has been described in detail in the above method, and will not be repeated here.

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

Claims

1. A method for uninstalling an application, characterized in that, The specific methods for uninstalling the application include: Responding to the target application's uninstallation command, read the target application's version type; When the version type is debug, uninstall the target application and delete the installation information of the target application. The installation information is used to perform installation verification and opening verification on the application. The installation verification is used to verify the permissions of the electronic device to install the target application, and the opening verification is used to verify the permissions of the electronic device to launch the target application. The installation information includes at least the signature validity period, the application usage restriction duration, and the installation time. When the version type is a release version, uninstall the target application; The process of generating the target application involves compiling the code into a hap package, detecting the version type of the hap package, and if the version type is debug, then using the jar command to perform debug signing on the hap to obtain a debug application; if the version type is release, then using the jar command to perform release signing on the hap to obtain a release application. The debug signature configures the version type for the target application, while the release signature does not.

2. The application uninstallation method according to claim 1, characterized in that, When the version type is debug, uninstalling the target application and deleting the target application's installation information specifically includes: When the version type is debug, uninstall the target application and read the application package name of the target application; The installation information is retrieved based on the application package name, and the retrieved installation information is deleted through the signature verification module in the package management module.

3. The method for uninstalling an application according to any one of claims 1-2, characterized in that, The method further includes: Detect whether the target device identifier of the electronic device is contained in the preset trusted device identifier library, wherein the electronic device is the device that responds to the unload command; If the target device identifier is included, the target device identifier is deleted from the preset trusted device identifier database.

4. The application uninstallation method according to claim 1, characterized in that, The installation information is determined based on the profile license file and installation time when installing the target application. The process of generating the profile license file includes: The application certificate generation request is received from the development end through the digital twin platform. The application certificate generation request is used to apply for an application certificate and profile authorization file for the application to be signed. When the application certificate generation request carries a CSR file, the application certificate is issued to the development end based on the CSR file through the digital twin platform; when the application certificate generation request does not carry 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 application information, and then feeds the profile authorization file back to the development end so that the development end can sign the application based on the profile authorization file.

5. The application uninstallation method according to claim 4, characterized in that, The specific steps of issuing profile authorization files through a digital twin platform based on application information using pre-generated profile key pairs and profile signature certificates include: Obtain the profile private key from the profile key pair through the digital twin platform; The application information is signed using a digital twin platform based on the profile private key to obtain signed application information; The signature application information and the profile signature certificate are packaged into p7b format using a digital twin platform to obtain the profile authorization file.

6. An application uninstallation device, characterized in that, The application uninstallation device specifically includes: The read module is used to read the version type of the target application in response to the uninstallation command of the target application; The uninstallation module is used to uninstall the target application and delete its installation information when the version type is debug. The installation information is used to perform installation verification and opening verification on the application. The installation verification is used to verify the permissions of the target application installed on the electronic device, and the opening verification is used to verify the permissions of the target application launched on the electronic device. The installation information includes at least the signature validity period, application usage restriction duration, and installation time. The process of generating the target application involves compiling the code into a hap package, detecting the version type of the hap package, and if the version type is debug, then using the jar command to perform debug signing on the hap to obtain a debug application; if the version type is release, then using the jar command to perform release signing on the hap to obtain a release application. The debug signature configures the version type for the target application, while the release signature does not.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps in the application uninstallation method as described in any one of claims 1-5.

8. A terminal device, characterized in that, include: Processor and memory; The memory stores a computer-readable program that can be executed by the processor; When the processor executes the computer-readable program, it implements the steps of the application uninstallation method as described in any one of claims 1-5.