Android Tutorial App Bundle - Publishing NEW apps using AAB to play store with New keystore

There is an increasing concern about how to publish apps using the app bundle (aab) format. I will try as much as possible to simplify the steps for you.

IMPORTANT UPDATE IN POST #3

OPTION 1: Creating and Using New Keystore File

This option can be used by those who are new and about to create a new Keystore file, or having existing keystore but want to create RSA Supported Keystore file.
Google play store is requiring an RSA-generated Keystore file for newly created applications.

Steps:
1. Navigate to bin folder of your java directory, example C:\java\jdk-11.0.1\bin
2. Run the following command and supply your information like password, name, city, company name, etc.
B4X:
keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias b4a

1616942314337.png


Keep your Keystore File and password safe and private

So far so good.

Next, To compile your application, If you don't have bundletool.jar make sure to Download bundletool.jar and put it in <android sdk>\tools\bin

Next: Select Release or Release Obsfucated in the IDE.

Add this conditional compilation command with your password and location of the Keystore file

B4X:
#if AAB
   #SignKeyFile: C:\keyfile\my-release-key.keystore
    #SignKeyPassword: 12345678
    #SignKeyAlgorithm: -digestalg SHA1 -sigalg SHA256withRSA
#end if


Next: Goto Project -> Build App Bundle (the AAB file will be created in the objects folder)

UPLOADING TO PLAY STORE

A. Goto your developer Dashboard (Google play console) and create a NEW APP. Fill in the information.
B. Click on Production and click on Create New Release

1616944060276.png


C. Select Manage App Signing Key

1616944254079.png


D. Next, Choose option 3 (Export and upload a key from Java Keystore). Also, download the pepk.jar tool. Place it possible at the location where the new Keystore file is.

Next Copy the code and Run in cmd using the pepk.jar. Enter password and alias password (The passwords should be the same, unless you changed the alias password)

Note: Remove the $ simple from the beginning of the Code. Also, Change the Keystore file name to the name you use, and alias as well. You can choose to change the output.zip file name if you wish.

1616945475670.png


1616946068732.png


E. After your output file is generated, upload it to the play store console (screenshot above) and click UPdate
Next. Click CONTINUE. You will see a green mark with inscription Releases signed by Google Play


You can now upload your AAB file

1616946997472.png
 

Attachments

  • 1616942914153.png
    1616942914153.png
    21 KB · Views: 249
  • 1616943200855.png
    1616943200855.png
    30 KB · Views: 205
  • 1616944045529.png
    1616944045529.png
    106.8 KB · Views: 236
Last edited:

mcqueccu

Well-Known Member
Licensed User
Steps for Updating Existing Application
 
Last edited:

mcqueccu

Well-Known Member
Licensed User
The Above Steps are no longer needed. Just follow these 2 Steps


Starting from B4A v10.9+, you can create RSA Keys to enable you create AAB and upload to playstore without problem.

(If your Keystore is already using RSA algorithm, then there is no need to create new key - Skip step 1.
But if you check and it's a DSA key, then please create new key once as in Step 1, which can be used for all your applications)


1. Goto Tools->Private Sign Key, Fill in your details and create key. Remember to save it securely

To create AAB (Also make sure you are using latest B4A Version, and you are using Release or Release Obfuscated compilation mode)
2. Goto Project->Build App Bundle


Your aab Bundle will be created under the Objects folder of your projects folder
 
Last edited:
Top