Skip to content
tezvyn:
Menu

App Signing by Google Play: Trust Google with Your Keys

Source: developer.android.comMediumHow cards are made

App Signing by Google Play: Trust Google with Your Keys

App Signing by Google Play separates your app's identity from the key you use for uploads. Google manages the final, user-facing signing key, which is mandatory for new apps. The footgun is thinking your upload key is the final key; losing it is recoverable.

Why it exists

Before this system, if a developer lost their app's signing key, they could never publish an update to that app again. The app was permanently orphaned, forcing them to publish a new app under a new package name and lose all their users and ratings. App Signing by Google Play was created to prevent this catastrophic, unrecoverable failure mode.

The mental model

Think of it like a bank's safe deposit box system. The app signing key is the master key held securely in the bank's (Google's) vault. Your upload key is your personal key that gets you past the front desk to prove your identity. If you lose your personal key, the bank can verify your identity and issue you a new one. You can't access the master key directly, but you don't have to worry about losing it, either.

How it works

When you opt into App Signing by Google Play (which is mandatory for new apps), you designate an app signing key. Google can generate this for you, or you can upload your existing one. You also create a separate upload key, which you keep private. To release an update, you build and sign an Android App Bundle (.aab) with your upload key and upload it to the Play Console. Google verifies the signature from your upload key. Then, Google uses the official app signing key to sign the final, optimized APKs that are delivered to users' devices.

When to use it

It is mandatory for all new apps submitted to Google Play since August 2021. It is the standard, secure way to manage your app's identity and allows you to use the modern Android App Bundle format, which helps reduce app size.

When not to use it

You can't opt out for new apps. For very old apps still using the APK format, you might still be self-managing your key, but migrating to App Signing is strongly recommended to avoid the risk of permanently losing your key.

One canonical example

A developer's laptop, containing their upload keystore, is stolen. Because they use App Signing by Google Play, this is not a disaster. They can contact Play Console support, prove their identity as the account owner, and request that their upload key be reset. Google will revoke the old key and allow the developer to generate and register a new one. They can then resume publishing updates. Without this system, they would be locked out of their own app forever.

Interview question

How does App Signing by Google Play mitigate the risk of a developer losing their private upload key?

  • a.It ensures that the final app signing key, managed by Google, can still be used to sign updates for users.Correct
  • b.It automatically creates a new app listing on Google Play, transferring all user data and ratings.
  • c.It allows Google to recover the lost upload key from their secure servers and provide it to the developer.
  • d.It enables the developer to publish updates without any signing key, as Google handles all signing.
Why?

App Signing by Google Play separates the upload key (developer-managed) from the final app signing key (Google-managed). If the upload key is lost, Google can revoke it and allow a new one to be registered, while the crucial app signing key remains secure and enables continued updates. Google does not recover the developer's private upload key, nor does it allow unsigned bundles or create new app listings.

Just read this? Test yourself on what you have been reading.

Read the original → developer.android.com

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on android — each one lists the topics its interview covers.

See open roles