How to sign an app for release?

I’ve been looking at all the documentation for signing an app to release to android, and it’s just not making any sense… I’m really sorry for my ignorance but could someone give me a step by step on how to create a release code?

See these docs!

https://docs.coronalabs.com/daily/guide/distribution/androidBuild/index.html#signrelease

But to put some context to this.  You have to create a “Keystore” file. It’s a binary file with an encryption codes that you need to generate. This is the command:

keytool -genkey -v -keystore mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999

You cannot copy and paste this command as there are parts you have to make up for your own needs. It will seem rather cryptic, but it’s not that difficult. The red/bold parts are above where you have to replace with your values.  But even this isn’t enough.  On a Mac you can open a terminal, do a “cd” command to a folder where you want to keep the keystore and run the command, replacing the values:

mykeystore.keystore is the name of the file.

aliasname is a name you make up.

Windows is more challenging. The “keytool” command is very likely not in your command path (the list of folders where command programs live). So you have to “cd” to that directory which will be something like:

cd C:\Program Files(x86)\Java\jdk1.8.0_60\bin

(I made that up, but it’s something similar…)

Then you have to include as part of your file name, the path to your home directory something like:

keytool -genkey -v -keystore %HOMEPATH%\Desktop\ mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999

When that’s done you will have your keystore on your desktop. Then you can go into Corona SDK and when you build for Android, navigate to your desktop and pick the keystore file you created. You will need the passwords you entered when running the command above.

Rob

Thank you very much for this!!

I could be wrong about this but as far as I know if you lose the keystore file that you used to sign the app, there is no way to retrieve it, and therefore no way to update your game on the store in future.

So keep a copy of it somewhere safe!  :slight_smile:

You are correct Alan. Once you use a Keystore for an app, you have to always use that keystore for that app.  If you loose it, you would have to create an all new app.

Rob

See these docs!

https://docs.coronalabs.com/daily/guide/distribution/androidBuild/index.html#signrelease

But to put some context to this.  You have to create a “Keystore” file. It’s a binary file with an encryption codes that you need to generate. This is the command:

keytool -genkey -v -keystore mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999

You cannot copy and paste this command as there are parts you have to make up for your own needs. It will seem rather cryptic, but it’s not that difficult. The red/bold parts are above where you have to replace with your values.  But even this isn’t enough.  On a Mac you can open a terminal, do a “cd” command to a folder where you want to keep the keystore and run the command, replacing the values:

mykeystore.keystore is the name of the file.

aliasname is a name you make up.

Windows is more challenging. The “keytool” command is very likely not in your command path (the list of folders where command programs live). So you have to “cd” to that directory which will be something like:

cd C:\Program Files(x86)\Java\jdk1.8.0_60\bin

(I made that up, but it’s something similar…)

Then you have to include as part of your file name, the path to your home directory something like:

keytool -genkey -v -keystore %HOMEPATH%\Desktop\ mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999

When that’s done you will have your keystore on your desktop. Then you can go into Corona SDK and when you build for Android, navigate to your desktop and pick the keystore file you created. You will need the passwords you entered when running the command above.

Rob

Thank you very much for this!!

I could be wrong about this but as far as I know if you lose the keystore file that you used to sign the app, there is no way to retrieve it, and therefore no way to update your game on the store in future.

So keep a copy of it somewhere safe!  :slight_smile:

You are correct Alan. Once you use a Keystore for an app, you have to always use that keystore for that app.  If you loose it, you would have to create an all new app.

Rob