I have an existing unsigned apk and I want to sign it using my debug.keystore file. Here I found a tutorial how it can be done.
jarsigner -verbose -sigalg SHA1w
Expiry of the Debug Certificate The self-signed certificate used to sign your application in debug mode has an expiration date of 365 days from its creation date. When the certificate expires, you will get a build error.