Let's suppose that for some reason we are interested in doing some tests with the version of Android that is in production and we cannot install it directly from the Play Store because it is being published progressively, one option is to download the AAB file from the Google Play Console and generate the APK.
To generate the APK, we will need the signing key and install the bundletool.
What is bundletool
bundletool is a tool used by Android Studio and Google Play to compile an Android App Bundle.
bundletool can be used via the command line, allowing us to generate an APK from an AAB.
How to install bundletool
It is possible to download it from the GitHub repository and run the jar file.
On the other hand, if you have MacOS, the easiest way to install bundletool is through Homebrew, a package manager. In this case, once Homebrew is installed, simply run in the terminal:
$ brew install bundletool
During the installation, it will notify us if the tool is not in the PATH and, if so, how to solve it.