1.cordova build -release android
< /p>
2. Run the command keytool -genkeypair -alias name.keystore -keyalg RSA -validity 4000 -keystore name.keystore
Execute the above command to enter some information, the contents of which need to be remembered Next, you will be asked to enter the password, name, unit, organization area, etc.
The name.keystore file will be generated in the root directory afterwards. The name can be changed. This is a signed package, not a signature.
3. Create a new folder unpack in the root directory. The name can be whatever you want. Put the apk package generated in the first step and the signature package generated in the second step into it.
cd unpack, execute jarsigner -verbose -keystore name.keystore -signedjar name.apk app-release-unsigned.apk name.keystore
After execution, name.apk will be generated, which is the signed package.
4. View the signature
Install name.apk on the phone
Download and view the signature package
https://open.weixin .qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419319167&token=&lang=zh_CN
There is a signature generation tool at the bottom to download it and install it on the phone
Enter the registration to see the signature