Android Signing using my own public key

3 posts / 0 new
Last post
noddy
noddy's picture
Offline
Mobile Conjurer
Joined: 20 Aug 2010
Posts:
Android Signing using my own public key

Hi All,

I just got my own public key from Android market. Does anyone know how to use my public key to sign my application in MoSync?

Thanks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

In Eclipse, right-click your project name and select Properties. Select MoSync Project and then Android and then Signing. Click the 'enable project specific settings' and you can add your key.

noddy
noddy's picture
Offline
Mobile Conjurer
Joined: 20 Aug 2010
Posts:

Thanks Sam,

I had gone through that setting page you mentioned. I had no previous code signing experience before, thus forgive me if my question is too basic/silly. My question is, how do I use the "Public Key" I got from Android market to sign my application in MoSync? I've done research on how to create my own keystore with my own key, but no luck. Here is what I am doing.

1. My public key provided Android market is just a key string (i.e. no a file), I made a copy of the MoSync's default.key and replaced the keystring with my own, I call it myandroid.key.

2. Then I ran:
keytool -genkey -alias my.keystore -keystore my.keystore

3. Then I ran:
keytool -import -alias my.keystore -file myandroid.key -keystore my.keystore

But I got error:
keytool error: java.security.cert.CertificateException: sun.security.pkcs.ParsingException: ObjectIdentifier() -- data isn't an object ID (tag = 48)

I know I must be not doing it properly. But I could not find anything on the Android SDK documentation talking about using the key outside of the SDK.

Any tips will be very much appreciated.