Bash script to combine split APKs (android app bundles) into a single decompiled APK on mac.
path/to/SplitPacker.sh <dir>
- The directory should contain all the split APKs
- The base APK file should be named exactly 'base.apk'
- It will decompile the base APK with apktool
- Then it will process all the split APKs and add what's missing to the base APK.
- Lastly, the decompiled base APK directory is then moved to where you call this script from.
- Handles
resources
,assets
andlib-config
split APKs. apktool
is needed to decompile the base APK and resource-only split APKs as well as asset-based split APKs.- If you use
SplitPacker_AAPT
, then you must have a working aapt executable in the script's directory. It is much faster (around 3x) than the normal script when handling asset-only split APKs. (resources are not decompiled andaapt
is used instead to get the asset's name) lib-config
split APKs are handled usingunzip
, no other adjustments have to be made for those.- The script is customized to my needs, which is combining the split APKs into a single decompiled folder, so I can mod the application and recompile it later.
- You can edit the script at the end and add an automatic call to
apktool b
andapksigner
if you wish to do so.
Normal Script:
Screen_Recording_2021-09-16_at_10.27.02_PM.1.mp4
AAPT Script: