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.


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.

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.
keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias b4a


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

#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)


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


C. Select Manage App Signing Key


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 file name if you wish.



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



  • 1616942914153.png
    21 KB · Views: 485
  • 1616943200855.png
    30 KB · Views: 443
  • 1616944045529.png
    106.8 KB · Views: 503
Last edited:


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


Well-Known Member
Licensed User
Longtime 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: