processing-android
processing-android copied to clipboard
Using an existing key/keystore
Hi I have an app that in the past I have had to export from Processing in order to make a signed apk (in the days before processing had this). I would like to use my existing key to sign my app from Processing now, but all I get is an on option to set up a new one when I try to export. Is there a way to use my existing key, or can this be added in at some time maybe?
Many thanks
The Android mode saves the keystore inside the folder sketchbook path/android/keystore
, in a file named android-release.keystore. Maybe you can copy your existing keystore file to that location and see if the mode can use it. I haven't tried that myself.
OK I will try that ... thanks
Cool, let me know if it works.
I stumbled across this also, I found the keystore after having processing create one, in C:\Users<user>\Documents\Processing\android\keystore\android-release-key.keystore (Windows) -- replacing this with my old one (that I want to use for signing) leads to a password prompt.
However I still get an error:
java.security.KeyStoreException: Couldn't get key
at processing.mode.android.JarSigner.signJar(JarSigner.java:74)
at processing.mode.android.AndroidBuild.signPackage(AndroidBuild.java:800)
at processing.mode.android.AndroidBuild.exportPackage(AndroidBuild.java:780)
at processing.mode.android.AndroidEditor$17.run(AndroidEditor.java:442)
The password is right, cause the error differs in case of wrong password.
Is there any progress on this? I have tried everything I can think of by replacing the default keystore file with my existing keystore and renaming it to the default name, but it still doesn't work. I still get the same error as @atomy. Is this likely to have a solution soon, ideally a means to select the keystore path in the export dialogue? If not I will need to try and find another way, but it would be really great if it could be done from within Processing Android Mode!!
@hudsonm4000 No, there has no been progress on this, but I think it would be very convenient to reuse an existing keystore, although not sure if it is more complex that it sounds. I will tag it for the 4.1 milestone.
@codeanticode That would be fantastic! Many many thanks!
I was able to move a keystore file between two different computers using Android Studio, so that makes me optimistic we can do it with Processing as well
@codeanticode That's great news!
I too have done that. My key was originally made using AIDE on my phone, about 3 years ago and am able to use it from Android Studio on my PC.
For info the AIDE key generation only ever asked for one password when I set it up, plus an alias .... but Android Studio asks for 2 passwords, one for the keystore and a second for the actual key. It works if I put the same original password in for both.
@codeanticode Hi ... a while since I posted. I see that this was removed from the 4.1 milestone ... is it likely to ever be looked at again or am I best just moving to Android Studio now? Would be a shame as I really do like using Processing for Android! No worries though ... it's really just for my older apps when I want to update them. New apps I can use the key generated by Processing.