Unzipping Android app bundle and zipping again

1.8k Views Asked by At

I just started to make changes to my application to use app bundle feature. During my build process, I used to unzip an apk and modified the application id in the manifest file, then zipped it back to apk using apktool in order to create two apks with different ids. I am wondering whether similar process is possible with app bundle. I can see the app bundle contains multiple apks using bundeltool with build-apk. Is anyone know is there any way I can put this unzipped app bundle back to the normal app bundle file using bundletool or any other command line tool?

1

There are 1 best solutions below

2
Pierre On

Yes, you can unzip, modify the AndroidManifest.xml an re-zip an App Bundle.

I have written how to do that in this answer: Modify Android App Bundle (aab) Contents before deploying