Generating play store ready aab builds

Hi everyone, I am working on a browser based on the brave-core source code. I have been able to modify and generate apks for testing. Next step is to generate aab files for release builds. The issues I am currently facing:-

  1. I have multiple out directories for each separate arch type like android_Release_X86 and android_Release_arm. But all the aabs inside these builds are not complete packages. The aab files are missing BuildConfig.pb and throwing error- The archive doesnt seem to be an App Bundle.

npm run build -- Release --target_os=android --target_arch=arm --target_android_output_format=apk

  1. Then I tried generating a build without providing target_arch so I go a new out folder with. name android_Release. The aab file in this folder doesnt throw the same errors and we are able to generate apks out of the aab. But the issue we discovered with this aab was that it only supports x86 arch which is like 40 devices. Also the apks generated from this aab crashes right after opening in the android devices.

npm run build -- Release --target_os=android --target_android_output_format=aab

I did some further research in this topic and discovered that chromium itself cant generate arch neutral aabs or apks.

So my main questions are:-

  1. Am I missing any steps in the build which is causing the broken aabs for specific arch?

  2. Also given that universal aab isnt feasible then how should we proceed further with google play store as they only accept aab and we cant provide them with multiple aabs for same version. Also we cant push multiple apks anymore.

I found the solution to above problem so we can close this now.