1 introduction

A signature file, also known as a signature certificate (usually with the.jks suffix), is used to prove that you created the app and that others cannot impersonate you without your signature certificate. So many third-party service providers need you to provide the MD5 signature certificate, such as Baidu face recognition. It is recommended that both test APK and formal APK have the same certificate, otherwise it is easy to cause trouble for yourself.

2 Production method

There are many ways to create a signature certificate. This section describes three common methods.

2.1 Method 1: Command generation. This method is recommended without software installation.

Execute this command in any folder, and a signed certificate will be generated in this folder. Last step press y press Enter, some systems do not ignore good. The first two passwords are the signature certificate passwords, and the second two passwords are alias passwords. You are advised to set the same passwords. For example, uniapp, if the two passwords are inconsistent, cloud packaging cannot be performed.

-alias: indicates the alias name. It can be used after recording.

-validity: validity period, measured in days. Too small is problematic, too big is unavailable. Recommended same as mine.

-keystore: specifies the name of the generated signature file. The. JKS suffix is recommended.

D:\android>keytool -genkey -alias longyoung -keyalg RSA -validity 36500 -keystore longyoung.jks

2.2 Method 2: Generate it using Android Studio.

Build -> Generate Signed Bundle/APK… -> APK -> Create New, popup window, fill in the data can be generated.

2.3 Method 3: Generate it using 360 Hardening Assistant.

To download and install 360 Hardening Assistant, click toolkit -> Create signature.

3 for the md5

Enter the signature certificate path and alias (-alias). The following the red box, some third-party case-sensitive, recommended to the colon all lowercase, I have always been so with no encountered problems, such as my: 00043049173620694 d0dfd13dda152ea.

D:\android>keytool -list -v -keystore “D:\android\longyoung.jks” -alias longyoung

PS: This article was originally posted on the wechat public account Longyoung. Follow and reply to “51 Ebook” to get the classic ebook for free for programmers.