What kind of pitfals exist for the Android APK signing?

*爱你&永不变心* 提交于 2019-11-28 06:50:35
ATom

The solution is add this to the <configuration> of the maven-jarsigner-plugin:

<arguments>
  <argument>-sigalg</argument><argument>MD5withRSA</argument>
  <argument>-digestalg</argument><argument>SHA1</argument>
</arguments>

Ant already has direct support for this, but the Maven plugin does not.

It is very tricky to find info on the usage with 1.7, but once found it is reasonable simple:

For keytool include:

-sigalg SHA1withDSA -keyalg DSA -keysize 1024

For jarsigner include:

-sigalg SHA1withDSA -digestalg SHA1

(1024 is the maximum and works, less might do the trick)

Alejadro Xalabarder

The solution from Baqueta works also for me.

Use these arguments in the keytool:

-sigalg MD5withRSA -keyalg RSA -keysize 1024 

I am still using there in jarsigner:

-sigalg MD5withRSA -digestalg SHA1

Thank you, the APK compiled and installed on a device using Java 7, finally!

Rajesh Rameshan

Thank you... It helped me in correcting signing issues...

jarsigner -verbose -sigalg SHA1withRSA -digestalg
keytool -sigalg MD5withRSA -keyalg RSA

Finally, don't forget to zipalign.

I used similar keytool and jarsigner methods and the issue was resolved.

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