当前位置:网站首页>Sign APK with command line

Sign APK with command line

2022-07-01 13:34:00 Full stack programmer webmaster

Hello everyone , I meet you again , I'm your friend, Quan Jun .

One 、 demand

Put apk Reinforced , Then let me sign again

Two 、 Signature

2.1 It is suggested that apk and Signature (keystore perhaps jks) Put it in the same directory , It's more convenient

2.2 Command line cd Run the following command after reaching the directory ( Be careful , This is for the same directory , And make sure that cd To the current directory ), Will pseudo command Just replace it jarsigner -verbose -keystore Your signature document -storepass Signature file password -signedjar Signed apk name -digestalg SHA1 -sigalg MD5withRSA To be signed apk Signature file alias

2.3 Take a chestnut ( Your favorite part )

2.3.1 Put it under the same folder

2.3.2 Enter the following command , Here I am with The default provided by the system keystore To lift chestnuts . Let's compare two sentences , Fill in your own name and signature

jarsigner -verbose -keystore debug.keystore -storepass android -signedjar test_signed.apk -digestalg SHA1 -sigalg MD5withRSA test.apk androiddebugkey

jarsigner -verbose -keystore Your signature document -storepass Signature file password -signedjar Signed apk name -digestalg SHA1 -sigalg MD5withRSA To be signed apk Signature file alias

2.3.3 The following will appear after returning , You did it .

2.3.4 View the generated signature apk

2.3 explain

-jarsigner yes Java The signature tool for -verbose parameter : Show signature details -keystore Indicates that... In the current directory is used debug.keystore Sign certificate file -storepass android Express Keystore password :“android” -signedjar test_signed.apk Represents the generated after signature APK name test.apk Indicates unsigned APK file -digestalg SHA1 -sigalg MD5withRSA: Must fill in , No why? -androiddebugkey Express Key Alias

Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/131439.html Link to the original text :https://javaforall.cn

原网站

版权声明
本文为[Full stack programmer webmaster]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/182/202207011313193217.html

随机推荐