2

I have finish the first version of an application, now I need to signed my apk and upload it to the PlayStore.

As Google say I want to use one keystore that I have (an old "keystore.jks" used in another apps), with different alias, alias password and key stored password (BUT using the same "keystore.jks" of the old application in this brand new app)

As far I haven't achieve this, I understand that with the help of 'keytool' I can achieve this but don't know how...

Than you~

Pablo Jimenez
  • 21
  • 1
  • 4

2 Answers2

0

Step 1 Go to Build>Generate Signed APK>Next

Step 2 select your keystore file and provide password, alias name and alias password.

Step 3 Click on Next and then select Release and you are done.

you can find very well description explained here

Man
  • 2,720
  • 2
  • 13
  • 21
  • This doesn't work, The project its brand new, it doesn't have any key store password, alias and alias password, it only has the existing keystore.jks... I think I need to configure first a new key store password, key alias and alias password and integrate it to my existing keystore.jks but I'm not sure how to do that, also if I try to use new store password, alias, password android studio report an error: "No key with alias 'alias' found in keystore /~./keystore.jks" – Pablo Jimenez Apr 12 '18 at 23:19
0

First of all you cannot do anything if you have forgotten the password for your old keystore.

If you remember your password, you can use following command to provide new password:

keytool -keypass "old password" -new "new password" -keystore "keystore location"

If you want to change alias, you can use following command:

keytool -changealias -alias "your-very-very-long-alias" -destalias "new-alias" -keypass keypass -keystore /path/to/keystore -storepass storepass

In case you have misplaced/forgotten the password, only alternative would be to create a new Keystore. You would need to save its password securely.

But doing this has a drawback:

If your new app is just a new Version of old app then the update process of it on play store will yield error. You have to deploy it was a brand new app with new Keystore

Sagar
  • 23,903
  • 4
  • 62
  • 62
  • 1
    Ok, first of all thank you for your answer. Maybe I make a mistake explaining my situation: I have a existing keystore and I have its password, etc., I want to use this keystore in a **new** project; this project doesn't have configure an Alias, alias pass and store pass (because its a new project) and the thing its that I want to set a new Alias, pass, etc., for **this** new project into my existing keystore, so it can signed this apk with this existing keystore **but** with its own new alias, alias pass and store pass. I don't know how to achieve this and its making me frustrating... Thx – Pablo Jimenez Apr 13 '18 at 04:53
  • Why do you need to use same keystore? You can still use the command I have mentioned in order to change Alias name and the password. – Sagar Apr 13 '18 at 05:44
  • 1
    @Sagar I am have the similar situation. I have completely re-created my app. for that i made brand new project. This new project is intended to be update version of already published app on playstore. So, i want to use my existing keystore file in new project. How can i do this? – Robert Williams Apr 04 '19 at 11:54