How to set a custom keystore for debugging in eclipse for android
Asked Answered
B

5

22

I have a custom keystore that I use for signing my apk. now I want to use the same keystore for debugging. when I go to eclipse->windows->preferences->android->build and set my custom key store I get "Keystore was tampered with, or password was incorrect"?

Bulbous answered 2/4, 2013 at 0:20 Comment(2)
Eclipse creates a debug key when you run your app through itOleate
check out this #9020333Angelaangele
M
46

I had the same issue and here are the steps to properly create a custom keystore that can be used for debugging in Eclipse:

Basically what you should do is that change both storepasswd and keypasswd for the alias androiddebugkey to "android".

Here are the commands:

keytool -changealias -keystore mykeystore.keystore -alias [old alias] -destalias androiddebugkey
keytool -keypasswd -keystore mykeystore.keystore -alias androiddebugkey
keytool -storepasswd -keystore mykeystore.keystore

If you don't know your old alias, look it up using

keytool -list -v -keystore mykeystore.keystore

in Command prompt not able to enter the password

Maure answered 2/4, 2013 at 0:32 Comment(3)
This is a great way to switch from the default debug keystore to your release/custom one and still be able to debug! Great answer Saeid!Diahann
worth noting: if "App Signing Certificate" is enabled, then this is not going to work.Seigniorage
For android studio users, follow steps here: #16965558Hyohyoid
S
9

Simplest way to set custom keystor.

No need of commands.

Steps (for ADT):

1.Export any project (It will show you an option to create custom keystore).

enter image description here

create your keystore with an extention ".keystore" and give password android and press next.

2.enter image description here

give alias name = androiddebugkey and password = android

now press finish and your keystore is ready.

1.Go to windows -> preference

and give the path of your custom keystore file

enter image description here

Shorten answered 20/5, 2014 at 5:29 Comment(1)
Just make sure to clean the project before launching. Sometimes the eclipse will cache the previous key and ignore the new setting.Bandanna
C
5

I got the same problem when trying to debug the released apk.. so I tried the Saeid solution with no success. Then I found this blog (http://blogprogramistyandroid.blogspot.com.br/2011/04/converting-release-keys-to-debug.html) which I got the simplest solution for the problem:

Make this command:

keytool -importkeystore -v -srckeystore release.keystore -destkeystore custom-debug.keystore -srcstorepass release-pass -deststorepass android -srcalias release-key -destalias androiddebugkey -srckeypass release-pass -destkeypass android

Of course substitute passwords and alias of source keystore with the one used in creation of release keystore.

Done

Culhert answered 24/1, 2014 at 12:17 Comment(1)
And of course, don't forget to do a rebuild after putting your new custom-debug.keystore in c:\users\xxx\.andrdoid\debug.keystoreClaimant
B
1

We have the same problem some time ago at our office. Since we needed this quite often we wrote a simple script to make it easy to to convert release keystores to debug ones.

The script is available on https://github.com/IntellexApps/key2debug

We are using it for some time now, so should be quite stable.

cheers!

Bandanna answered 11/2, 2015 at 23:40 Comment(0)
K
0

After change the keystore content, you can setup eclipse in: Preferences->Android->Build, as show below: Eclipse change debug keystore

Kati answered 28/10, 2015 at 11:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.