Help with reducing Android APK sizes

254 views
Skip to first unread message

Philby Dias

unread,
Jul 18, 2025, 8:27:53 PM7/18/25
to Chromium-dev

Hello,


I am working on upgrading my chromium version from 114 to 138 but the chromium build itself without any customisation generates x64 APKs around 108MB in “Download size”- when analysis in Android Studio. I currently build all 4 variants for arm64, arm7, x64 and x86 and distribute separately.


I had similar issues when migrating to 126 last time and could not proceed with the upgrade, would really appreciate any assistance with this. I currently build chromium with the following args.gn:

target_os = "android"

target_cpu = "x64"

is_debug = false

android_channel = "stable"

is_official_build = true

is_component_build = false

symbol_level = 0

v8_use_external_startup_data = true

icu_use_data_file = false

ffmpeg_branding = "Chrome"

proprietary_codecs = true

update_android_aar_prebuilts = true

is_high_end_android=true

chrome_pgo_phase = 0

enable_nacl = false

enable_webrtc = false

enable_web_speech = false


And I build it using: ninja -C out/Release chrome_public_apk. Attached below is also the APK analyser result.


I realise AABs can be used to increase this limit, but I am concerned about zip align issues, especially considering once I enable play signing there is no going back and I would not want our users to be affected by getting a new application to download. So I would still prefer to somehow reduce the size of APKs if there is some way I have missed, please let me know.


Greatly appreciate your advice, thanks!


Philby


chrm-analyser.png

Andrew Grieve

unread,
Jul 21, 2025, 9:47:54 AM7/21/25
to philbyalo...@rakuten.com, Chromium-dev
You can try setting `optimize_for_size = true` GN arg. That's really the main knob for size vs performance.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/3df45ac6-dccd-4ce4-8873-fa89e781e683n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages