How to sign my already made android app / .apk

I made an Android Live wallpaper application using software, and the application works fine on my device, so I thought about downloading it to Playstore. When I downloaded my application, he told me the following error:

**

"You downloaded an APK signed with a certificate that expires too soon. You need to sign an APK with a certificate that is expiring in the future.

Now, how can I sign my certificate again? Please, I need a detailed guide!

+4
source share
3 answers

you need to create a new signature key that expires in 25 years or so, and sign your application to this key

0
source

to create a card key: =

go to C: \ users .... android. keytool -list -alias androiddebugkey -keystore C: \ users .... android \ debug.keystore -storepass android -keypass android Fingerprint MD5: 79: 9F: B9: 2B: F0: 51: C8: 48: 2E: 39 : 5B: 72: AB: 42: 24: 91 Card key: 0lujtKtuh8x_MfEUSN5OpCj6HVCxX9lvBDgCT2w


to create a certificate: =

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 password1 -..., 123

password2 -...., 1234

previous map generated: 0Vd9Hpw3AaaLfuaYgC8btoNu8OkuZe4bPXD9oPg

0
source

You need:

  • Create release.keystore (it's not done yet):
    keytool -genkey -v -keystore release.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

  • Delete the old signature:
    zip -d foo.apk META-INF/\*

  • Sign the new key:
    jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release.keystore my_application.apk alias_name

  • Verify the signature:
    jarsigner -verify -verbose -certs my_application.apk

0
source

Source: https://habr.com/ru/post/1484350/


All Articles