Please help with Android Key

I have spent 3 days trying to figure out how to use my Android public key and have no luck. The Corona docs are seriously lacking in this department as all it gives is a link to the Android documentation but the Android docs implement the key using eclipse when you build the apk file but none of that applies to the Corona build process.

Basically I have used the examples and created a keystore using the keytool but I can not find anything on how to add my Android key into the keystore and have wasted 3 days trying to figure it out.

The Corona docs for the iPhone setup was great but is super frustrating with Android.

Can someone please help give some steps in adding my Android key to the keystore or at least point me in the right direction.

Thanks, Joe

Hi Joe,

If you already have a keystore you created with keytool, then the rest should be straight-forward.

In Corona, select File > Open for Build. In the Build dialog, click Browse next to the Keystore field, locate your keystore file and click Open. You should be prompted to provide your keystore password. Click Build. The first time you build with the key you will also be prompted to enter the password for the key alias.

Let me know how it goes.


Tim thanks so much for the reply.

Where does the key from my Android account fit in then? Thats the part where I loose it. Am I suppose to import my Android key into the keystore I created on my computer? Just not sure what to do with it.

Thanks again


Yes, if you have just the key (a .cert file) then you should be able to use the keytool utility to generate a keystore from it, which you then point to when you open the Build for Device dialog.


"To import a certificate from a file, use the -import command, as in

keytool -import -alias joe -file jcertfile.cer

This sample command imports the certificate(s) in the file jcertfile.cer and stores it in the keystore entry identified by the alias joe."

Let me know if this helps.


I just keep striking out.

I copied the Android key from my account page, pasted it into a txt file and renamed it mykey.cer. Then i ran the keytool -import and I keep getting an error stating "Input not an X.509 certificate"

I tried it without a keystore so one would be created and I tried it on a keystore I made with -genkey

I can't begin to describe how stupid this is making me feel that i and now on 4 days of trying to figure this out.

Any other suggestions would be super appreciated. Corona really needs to add this into the "Build for Android" section.

Hi Joe,

I'm stuck at exactly the same point as you with working out how to import the public key/cert. Did you work this out? Or can anyone help here? I checked the link posted above and have progressed no further.


Hey NRC,
sorry to hear you got stuck in the same lack of information abyss that I was lost in as well. The reason for the lack of information is the fact that no such procedure of importing the anrdroid key exists. Just ignore the key in the android market place and follow the directions for creating the keystore, thats it. I, like you, got totally confused on the purpose of the key android gives you and swore that if they gave me the key that i needed it but i was totally wrong.
For future reference and consolidation here are the steps I used:

1. Open Terminal

2. Run this command without the quotes " keytool -genkey -v -keystore yourkeystorename.keystore -alias yourkeyalias -keyalg RSA -keysize 2048 -validity 10000 "

3. Open your username home folder and you will see the keystore you just created.

4. Open for Build in Corona and Browse to the keystore you just created

5. Select the key alias you specified in step 2. ( incase there is no alias listed in the dropdown restart corona and then it will show up, just my experience)

6. The Build button should now be clickable and the build process working.

Yes its that easy once you stop over thinking what the android key is for but just for the heck of it.. I beleive that the android key is for actual java security and authentication code to verify the android app is legitly yours if you wanted to perform extra security checks but thats above me at the moment. When you do upload your app in the android markeyplace there is a section about the copy protection, I chose the "ON" radio button but there is a sentence in red that states the copy protection will be depreciated soon so I think thats where the Android Key comes in.

One last detail I am still unsure about is if I still need to run zipalign command on the apk file that corona gives me or does corona do that automatically at build time?
Devs please shine in here.

Hope this summed it all up for you.
Good Luck!

Hi Joe,

Thanks VERY much for that detailed explanation. How on earth Google can present the developer with an additional key without providing additional information on how/when to use it seems utterly stupid to me.

I read so many 'this worked for me' blogs & FAQs about signing the apk and none of them were useful, until your update and this:

Wasted days over this and not happy about it. Very disappointed with Google.

Thank you Joe for taking the time to provide the information.


No Problem, I too wasted about a week. I had replied to your post 7 hours after you posted and I had wished I was able to reply even sooner so you wouldn't waste your time as well. I like many others am an independant developer so every hour lost is serious money lost. Ansca did such a complete job detailing the build process of the iPhone and really wish they put the same level of detail into the Android build process.

Hopefully this thread saves wasted hours for other developers as well.

Glad I could be of assistance.


@joe2101, Corona runs zipalign, you don't need to do that.

Based on your feedback here, we'll definitely improve our documentation.

views:1453 update:2011/10/9 22:34:50
corona forums © 2003-2011