Change alias passwords of your Android Keystore

I recently gave one of my applications to another developer to work on. They where to upload updates to Google Play and therefore needed the keystore to sign the application.

Now me being naive to start with my keystore had an alias that was specific to me and not the app, it also had a password that I was using elsewhere (tut tut). So I wanted to change these so I could give this user a copy of my keystore that was specific to them.

The initial keystore has a structure like this:

1
2
3
4
5
6
7
8
Name:
    old.keystore
Password:
    password123
    Alias:
       my_name
    Alias Password:
       password456

Here’s how you’d go about it from already having your initial keystore.

  • Copy your original keystore to a new location
  • Change the keystore password
  • Change the alias name
  • Change the alias password
  • Give to your new developer

Ok.. here .. we go.

Copy and Paste, thats easy! Now we have a new keystore called:

1
my.keystore

Next if we want to change the keystore password, ensure you have keytool on your path and you are in the directory of your keystore. Use the command:

1
keytool -storepasswd -keystore my.keystore

This will prompt you to enter the current password then enter a new password.
Keystore change password

That’s your keystore password changed!


Next if we want to change the keystore alias password, ensure you have keytool on your path and you are in the directory of your keystore. Use the command:

1
keytool -keypasswd -keystore my.keystore -alias my_name

This will prompt you to enter the current password for the keystore then the current password for the keystore alias. You can then enter the new password that you wish you use.
Keytool - change keystore alias password

That’s your keystore alias password changed!


Next if we want to change the keystore alias, ensure you have keytool on your path and you are in the directory of your keystore. Use the command:

1
keytool -changealias -keystore my.keystore -alias my_name -destalias my_new_name

This will prompt you to enter the current password for the keystore then the current password for the keystore alias.
keystore - change alias

That’s your keystore alias changed!


If you followed all three steps your keystore now looks like this:

1
2
3
4
5
6
7
8
Name:
    my.keystore
Password:
    newPassword123
    Alias:
       my_new_name
    Alias Password:
       newPassword456

So there you go, now you can pass that keystore to the new developer knowing they can still update the application but not giving away any sensitive data about yourself!

Enjoy

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值