Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate an upload key for Google App Signing?

I am currently struggling with the upload key, which is the new method of signing APK's to publish it to Google Play.

What I have done

  1. I created a new app which should now on the play store.
  2. I created an app entry on the Play console.
  3. Then I activated Google Play App Signing
  4. I uploaded my signed APK with a normal keystore file.

And then I get the following error message from the upload dialog.

Upload failed You uploaded an APK that is signed with a key that is also used to sign APKs that are delivered to users. Because you are enrolled in App Signing, you should sign your APK with a new key before you upload it.

What's the problem

I did not find anything to upload an upload key or how to generate something like this. Is the upload key equal to the keystore file?

What I've tried to do

Then I looked at the documentation of app signing here. But I don't understand how I can create this upload key and send it Google.

Can anyone help me?

like image 923
Julian Schmuckli Avatar asked May 20 '17 21:05

Julian Schmuckli


People also ask

How do I create a upload key?

Go to someplace you want to store the key. In React Native, there is already a folder called 'keystores' at MyApp > android > app. Choose that as the key store path by clicking the '...' button. Type in whatever you want your key called.

How do I get the SHA key from the Google Play console?

If you've published your app using Play App Signing, a requirement when using Android App Bundle, you can get your SHA-1 from the Google Play Console on the Release > Setup > App Integrity page.

How do I update an app signing key?

Now that you got the certainty that Google is managing your app signing key, you can do following steps: Create a new Keystore File. Generate a PEM Certificate. Send a request to Google to update your App signing key.

What is export encrypted key for enrolling published apps?

If you want Android Studio to also save the signature key as an encrypted file, then select the Export encrypted key check box. In order to be able to upload the bundle, you must also upload this encrypted file to the Google Play console and register the application with Google Play.


1 Answers

I just went through this exhausting process. I'm using React Native so I never even use Android Studio unless I need to launch a virtual device. I'm documenting this for myself and anyone else that has been traumatized by this experience. This is explicitly for the 'Upload Key' option. Google then swaps it out on Play so you aren't really responsible for making sure you don't lose the one and only key to your fortunes.

Open the 'android' file inside your React Native project in Android Studio. Build it and do whatever you have to so it gives you the options to produce an APK (unsigned or whatever). You can also just run it from here on a VD or a phone if it's attached. I had to do updates to get it to build so you may need to do the same.

First go to 'Build' in the menu:

enter image description here

This window will come up:

enter image description here

Click 'Create new...'

A dialog like this will come up. Fill it out with your info. Note that there are two separate passwords. Remember what you put there for later.

enter image description here

Go to someplace you want to store the key. In React Native, there is already a folder called 'keystores' at MyApp > android > app. Choose that as the key store path by clicking the '...' button.

enter image description here

Type in whatever you want your key called. I gave it the same name as the app.

This will bring you back to the previous dialog. Fill in the passwords from before and click 'Next'.

enter image description here

This will bring you to this dialog where you can choose where to put the apk. By default in React Native it goes to MyApp > android > app > app-release.apk. Click those two tick boxes otherwise you will have to change some configs or Google Play will reject it. They start out unchecked.

enter image description here

Go to this page in your Developer Panel. Click 'Edit Release'. This is presuming you've already set up a beta or alpha release. (Not covered here.)

enter image description here

That will bring you to this page. Drag and drop your apk here or upload with the button.

enter image description here

Please, Google, document this process somewhere! Peace out!

like image 56
GenericJam Avatar answered Sep 23 '22 17:09

GenericJam