Change signing key, keep packagename

15,973

Solution 1

No. If you have an APK signed with a signature and containing a package name installed on a device, any subsequent apk with the same package name must have the same signature.

Solution 2

As of 2019

Yes, you can do this in some cases.

If you've enabled Manage Signing Key by Google then your signing key will be managed by Google and you can add an additional Upload Key which you can change/update if necessary. Google recommends this procedure and this procedure is available for new apps and already published apps.

If you are managing signing key by yourself you can still upgrade the signing key only once in the whole lifetime of the app. Users with the previous key will be able to use and update the app with the legacy signing key and the new users will be enabled with the upgraded key. Here is what quoted in the reference:

In some circumstances, you can request an app signing key upgrade. Your new key is used to sign new installs and app updates. Your legacy app signing key is still used to sign updates for users who installed your app before the key upgrade.

Each app can only have its app signing key upgraded once in its lifetime. In the unlikely event that you have multiple apps using the same signing key specifically to run in the same process, you won’t be able to use key upgrade for those apps.

Details is explained here

Share:
15,973
aelveborn
Author by

aelveborn

Updated on July 18, 2022

Comments

  • aelveborn
    aelveborn almost 2 years

    I cant seem to find the answer to this: Is it possible to change signing-key but still use the same packagename? So that the people who bought my app can "re-download" the app with the new key, from the same Google Play page.

    The background to this is that I want to extend my signing key to more then 25 years I have set now. Maybe this is enough but I dont want to be put in a situation where the key expires.

    If this is not possible, could I remove my current Google Play app and create a new one with the same packagename and another key?

  • aelveborn
    aelveborn over 11 years
    Yeah, found this on google publish: Please note that package names for app files are unique and permanent, so please choose wisely. Package names cannot be deleted or re-used in the future. Keep in mind that if you've lost your keystore, you'll have to publish the app with a new package name and a new key. You should also update the description of the original app and unpublish it.
  • Saleh
    Saleh over 4 years
    Here it said we can change signing key once in the lifetime of app: support.google.com/googleplay/android-developer/answer/73844‌​23 Did your answer need to update?
  • njzk2
    njzk2 over 4 years
    @Saleh no. "Your new key is used to sign new installs and app updates. Your legacy app signing key is still used to sign updates for users who installed your app before the key upgrade." You still need the original key to sign the apk if you want to update the app on a device where it's already installed
  • Kislingk
    Kislingk about 4 years
    Android 9+ supports key rotation for this topic. link. But Google play doesn't allow key rotation. Instead of key rotation, Google play allows new key for new installation, but you have to agree let Google signs your app.
  • Keivan.k
    Keivan.k over 3 years
    I don't understand that part about legacy key, doest that mean they are unable to update with the new key?
  • Fereshteh Naji
    Fereshteh Naji over 3 years
    @Keivan.k Exactly keivan. Users who already have the app will be updated with the legacy key and users who installed the app after changing the key will be updated with the new key. This is managed by the Play Store.
  • Keivan.k
    Keivan.k over 3 years
    @FereshtehNaji Thanks for your response. I realized that you are working at BadeSaba, is there anyway I can send you an email or something? I have a big problem with notifications and I would appreciate it if you could help me about that. stackoverflow.com/questions/63501496/… this is the link to my question.