Current location - Quotes Website - Signature design - HarmonyOS system application (OS app) signature method.
HarmonyOS system application (OS app) signature method.
After developing applications based on HarmonyOS system SDK, you can use build->; After compiling Hap/APP, two files will be generated in the project root directory/build/outputs/app/release/:XXX _ unsigned. APP and xxx_signed.app. In some cases, it may be necessary to use XXX _ unsigned. APP file, and then sign it with synchronous signature file.

Then the question is, how to re-sign an unsigned file? This file is the problem to be solved in this paper.

There is a hapsigntoolv2.jar in DevEco Studio. You can re-sign the application through this jar package. The content of the signature script is as follows:

Write the above contents into the signer.sh file and save it. Give the script file feasible permissions through the following instructions:

At this point, a simple signature tool has been completed.

In the previous chapter, a simple signature tool, signer.sh, has been completed. The use is as follows:

If the execution is successful, the xxx_signed.app file will be generated.

Then try to run it.