版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qingfeng812/article/details/78814382
jarsigner对未签名的apk进行签名
1.标准格式:
jarsigner -verbose -keystore 签名文件路径(去掉后缀
.keystore)
-signedjar 签名后的apk路径
-digestalg SHA1 -sigalg MD5withRSA 签名前的apk路径
签名文件别名keyAlias
2.成功案例:
jarsigner -verbose -keystore C:\sigin\
applicationsignname[20150409]
-signedjar C:\sigin\apk\Baidu_Claim_signed
.apk
-digestalg SHA1 -sigalg MD5withRSA C:\sigin\Baidu_Claim_unsigned
.apk
jie-20150409
jarsigner -verbose -keystore C:\sigin\
applicationsignname[20150409] -signedjar C:\sigin\Baidu_Claim_signed1
.apk -digestalg SHA1 -sigalg MD5withRSA C:\sigin\Baidu_Claim_unsigned
.apk
jie-20150409
3.失败案例:
签名路径不能添加.keystore
签名后的apk路径文件夹必须是存在的,否则会报无法创建apk的错误
jarsigner -verbose -keystore C:\sigin\
applicationsignname[20150409].keystore -signedjar Baidu_Claim_signed
.apk -digestalg SHA1 -sigalg MD5withRSA C:\sigin\Baidu_Claim_unsigned
.apk
jie-20150409
参考文献