Size differs between bundletool and apkanalyzer.
Describe the bug
Analyzing the .apks file differs between the 2 tools -> bundletool & apkanalyzer.
Running bundletool get-size total --apks nia.apks returns a total of 17929747,17929747 (MIN, MAX)
Running apkanalyzer apk download-size --apks nia.apks returns a total of 17931058
As you can see, there's a small difference between them. (And the difference is much more in other projects, talking about MB)
I'm assuming they are both returning in bytes, so either I'm definitely not taking into account something or something's wrong. (Probably the first one) Maybe apkanalyzer is involving something else that the bundletool doesn't? What's the size the end-user is going to download from Google Play?
version(s) used Bundletool version: 1.15.4-all Apkanalyzer version: 11
How to reproduce
- Clone Now in android repo.
- Generate bundle debug (Can't upload aab file, extension not supported)
- Bundletool step
- Generate device spec
-
bundletool get-device-spec --output=device-spec.json - Or use mine device-spec-redmi-note-8-pro.json
-
- Generate apks file from aab using previous device spec
-
bundletool build-apks --device-spec=device-spec-redmi-note-8-pro.json --bundle=nia.aab --output=nia.apks
-
- Get size from apks file
-
bundletool get-size total --apks nia.apks
-
- Generate device spec
- Apkanalyzer step
- Get download size from generated apks file
-
apkanalyzer apk download-size nia.apks
-
- Get download size from generated apks file