Split APK file formats
Various app download sites were confronted with the same problem. They solved by defining custom file formats and installer for apps that consist of multiple APKs files:
- There is the APKS file format which is is just a ZIP file containing the APK files. They can be installed using the APK Split installer app. Optionally APKS files can contain JSON based meta data (see linked file format spec).
- ApkPure uses the XAPK file format. Basically an XAPK file is just a ZIP file containing the APK files plus a
manifest.json
file.
- ApkMirror uses the proprietary APKM file format which can be installed using their installer app. Not sure how to build apkm youself
Manual installation of split APK files
You don't need to pack the downloaded split APK files to e.g. an Android Bundle file. adb
is capable to install them again as one app, just use the install-multiple
command and specify all the APK files that belong to your saved app:
adb install-multiple apk1 apk2 ...
Re-Building an universal APK
On the Internet you can find a tool named "SAP (Split APKs Packer)" which seems to allow to combine multiple split APK files into one universal APK file (if you have all the necessary split APK files)
This "SAP" tool is available for Linux and Windows, however it is closed source and contains a lot of binaries. I am not sure if it is really trustworthy - I would not recommend to execute it outside of a protected environment (e.g. a virtual machine).
The following blog post describes the SAP tool and provides download links.
For more details see also this forum post How to turn a split APK into a normal non-split APK