How to Use the Same Keystore File to Sign Two Different Applications

Can I use the same keystore file to sign two different applications?

You can use that keystore for any number of applications.

No need to generate a new keystore.

Is it OK to use same keystore for several apps?

The Android developer site actually recommends signing all of your apps with the same certificate:

You should sign all of your apps with the same certificate throughout the expected lifespan of your applications. There are several reasons why you should do so:

  • App upgrade: When the system is installing an update to an app, it compares the certificate(s) in the new version with those in the existing version. The system allows the update if the certificates match. If you sign the new version with a different certificate, you must assign a different package name to the application—in this case, the user installs the new version as a completely new application.

  • App modularity: Android allows apps signed by the same certificate to run in the same process, if the applications so requests, so that the system treats them as a single application. In this way you can deploy your app in modules, and users can update each of the modules independently.

  • Code/data sharing through permissions: Android provides signature-based permissions enforcement, so that an app can expose functionality to another app that is signed with a specified certificate. By signing multiple apps with the same certificate and using signature-based permissions checks, your apps can share code and data in a secure manner.

However, you should take this advice with a grain of salt. The first bullet point only applies to updated versions of a given app, not to multiple unrelated apps. The second and third bullet points are only relevant if you intend your different apps to work closely together as described.

Same Keystore for different app

Keystore file, or signing of the apps, represent that some developer or company certify that application has been developed or verified by that particular company or developer, not the application itself.

So, as far you are developing the app, with name of your company, or yours, you should sign app with same keystore, though not mandatory.

Can I use same Alias and keystore file for different application for playstore upload

Keystore is just container holding your keys (like jar for cookies), so from technical point of view is completely irrelevant if you keep all your keys in single keystore or you have them splited among many (you can even have separated keystore file for each key - nothing prevents that).

Alias is also irrelevant - it's just "human friendly name" for your key, just for your convenience. It also makes no difference technically, however you cannot have more than one keys using the same alias in given keystore:

KeyStore Aliases

All keystore entries (key and trusted certificate
entries) are accessed via unique aliases.

http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/keytool.html

However you can use the same alias in different keystores w/o any problems.

NOTE: You can technically sign all your apps with the same key but this is strongly discouraged. You should create separate key for each released app - that will make your life much easier when i.e. you will decide to sell your project for instance.

Can I use the same keystore in different systems?

Yes. You can use the same keystore.

If your application code is the same and the location it reads the keystore from is the same, you can basically replicate your application on your new workstation exactly like your old workstation.

Android - Can Publish different Apps with same keystore file in multiple Accounts?

Key Store has a collection of digital certificates, which are unique to a publisher, like your signature. They are used to verify that Apps come from a genuine source.

Package name + signature combo must be unique, i.e. one App can't have multiple official publishers:

  1. Device won't update same App package with different signature.
  2. Play store won't let you update same package file with different signature.

but a publisher can publish multiple apps:

  1. Device can have many Apps with different package names but same signature.
  2. Play Store can host many apps with different package but same signature.

Apart from that, each Play Store Account is given a unique Licence key, unlike signature, its bound to the Account. You can't use one Account's Licence Key for an app published from other account.

As far as Google policy is concerned, I don't think they limit 1 signature per developer account as of now.



Related Topics



Leave a reply



Submit