bundletool icon indicating copy to clipboard operation
bundletool copied to clipboard

Size differs between bundletool and apkanalyzer.

Open robercoding opened this issue 2 years ago • 0 comments

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
    • 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

robercoding avatar Oct 11 '23 11:10 robercoding