Trying to manually sign android package with jarsigner.exe and install with adb.exe

ぃ、小莉子 提交于 2019-11-28 04:45:04

We had this exact same problem. Try using the following parameter values:

jarsigner ... -digestalg SHA1 -sigalg MD5withRSA ...

By the way, using explicit sigalg and digestalg seems to be mandatory with JDK 7.

Harsha.Vaswani

To sign apks using JDK 1.7 one has to use these keywords "-sigalg MD5withRSA -digestalg SHA1 "

Reason: As of JDK 7, the default signing algorithim has changed, requiring you to specify the signature and digest algorithims (-sigalg and -digestalg) when you sign an APK.

Command:

jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore [keystorefile]
[originalapk] alias_name

If you're using JDK 7, try

jarsigner -sigalg SHA1withRSA -digestalg SHA1

If you get

jarsigner error: java.security.SignatureException: private key algorithm is not compatible with signature algorithm

then try

jarsigner -sigalg MD5withRSA -digestalg SHA1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!