Let Android Studio integrate system signature, you need to use a toolkeytool-importkeypair
The function of this tool is to import the relevant information of the system signature into the existing signature file. It can be downloaded from here .
Relevant files
platform.x509.pem, platform.pk8, keytool-importkeypair, demo.jks
My approach is to create a new Signature folder in the root directory of the App to store signature-related files.
Step
1. Generate the demo.jks signature file
related files
platform.x509.pem, platform.pk8, keytool-importkeypair, demo.jks
My approach is to create a new Sign folder in the project root directory to store signature related files.
As shown in the picture:
step one:
Step two:
Step three:
ps: The password on the picture should correspond to the password of the command, the alias Alias should also correspond, and the path, other information is secondary
After this step, a demo.jks file can be generated in the corresponding location
Step four:
Notice:
Use the generated application signature file to generate a new system signature file
The content is as follows:
Attention! ! Be sure to compile this file in the linux environment. I don’t have a Linux system installed here, so I use Git;
Step five:
Right-click the newly created Sign folder in the project root directory and select Git Bash Here to open the tool
Step 6: Execute the following commands on the command line
#!/bin/sh
# 转换平台签名命令
./keytool-importkeypair -k demo.jks -p 123456 -pk8 platform.pk8 -cert platform.x509.pem -alias demo
# demo.jks : 签名文件
# 123456 : 签名文件密码
# platform.pk8、platform.x509.pem : 系统签名文件
# demo : 签名文件别名
Execute here and prompt: There is an existing item alias demo during import, overwrite? [No]: Import a new alias (press Enter to cancel the import of this item); here we need to enter an alias that is consistent with the signature of the newly created application above : For example: demo; to cover
Step seven:
The generation of the system signature file is completed here;
Here is the latest system signature file;
Just cite it for packaging.
Note: The package signature of the application system needs to be added to the manifest file: