Resign apk with different keystore

后端 未结 4 1974
青春惊慌失措
青春惊慌失措 2021-02-01 19:09

Currently I\'m getting the apk signed with the private keystore file but I want to sign that apk with different keystore file. How can I resign that apk..?

4条回答
  •  轮回少年
    2021-02-01 19:58

    1. remove old sign

      zip -d xxxx.apk(your apk file) META-INF/*

    2. sign apk

      jarsigner -verbose -keystore xxxx.keystore(your keystore) -signedjar out_sign.apk(outfile) unsign.apk(unsign apk) xxxxxalias(your alias)

    3. if sign apk not work and jdk >= 1.7

      add params -digestalg SHA1 -sigalg MD5withRSA
      jarsigner -verbose -digestalg SHA1 -sigalg MD5withRSA -keystore xxxx.keystore(your keystore) -signedjar out_sign.apk(outfile) unsign.apk(unsign apk) xxxxxalias(your alias)

提交回复
热议问题