Вопрос

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 SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name

But what should I write as alias_name and what should be the passphrase? Is there any way to find out what alias_name and passphrase are used by Eclipse during the signing?

Это было полезно?

Решение

You don't really want to create it with your debug key, but;

-alias androiddebugkey 
-keystore /the/path/debug.keystore 
-storepass android 
-keypass android

Другие советы

jarsigner -verbose -keystore ~/.android/debug.keystore -storepass android -keypass android path/to/my.apk androiddebugkey

This worked for me.

For me, I have create a debug keystore first with all passwords, alias... are 'android' then go to Preferences -> Android -> Build and enter that as Custom debug keystore. Now any my debug will be auto signed with that key without requiring me to do any extra work!

Warning: I have learnt hard from my mistakes. I have uploaded my APK with that debug keystore to Google Store then published it for alpha testing (to test purchasing, signing in Google game play...). First that was very convenience since I could compile and run my app in debug mode without being trouble to re-enter keystore, passwords, create apk, install it on devices...

However, the problem is that after testing, I cannot upload the released apk (with my official keystore) to that project (because it has different key than previous loaded ones). I cannot delete that project either (since it has been published). At the end, I have to keep that one, rename the package of the app, create a new project, update new Google Api id, upload new apk... for official releasing.

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top