Size differs between bundletool and apkanalyzer.
- Dominant language
- Java
- Stars
- 4k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
**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](https://github.com/google/bundletool/files/12868666/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 `
- Apkanalyzer step
- Get download size from generated _apks_ file
- `apkanalyzer apk download-size nia.apks`
Contributor guide
Assessment
This issue has not been assessed yet.