Hello

25 views
Skip to first unread message

Aleksandar Jovanović

unread,
Mar 1, 2023, 11:08:53 AM3/1/23
to binar...@chromium.org
Hello.
Sorry to bother you.
I am trying to compile chromium android apk.
Exactly ChromePublic.apk.
But the compiled binary size is over 200MB.
I think that is a little bigger than expected.
Can you help me for optimize apk size?
Regards

Samuel Huang

unread,
Mar 1, 2023, 11:16:58 AM3/1/23
to Aleksandar Jovanović, binar...@chromium.org
Hi Aleksandar,

What's the content of your args.gn? Do you have

is_debug = false

to create the Release build?

--
Samuel Huang


--
You received this message because you are subscribed to the Google Groups "binary-size" group.
To unsubscribe from this group and stop receiving emails from it, send an email to binary-size...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/binary-size/CAK%2BHkveOWBegnfykmXap5AOmyMZj8KzhYqjCcgWz4QSERxa8YQ%40mail.gmail.com.

Aleksandar Jovanović

unread,
Mar 1, 2023, 11:18:57 AM3/1/23
to Samuel Huang, binar...@chromium.org
Yes, I do. 
My options are
target_os="android"
target_cpu="arm64"
is_debug=false
use_custom_libcxx=true
symbol_level=0
blink_symbol_level=0
is_java_debug=false
dcheck_always_on=true
enable_nacl=false
v8_symbol_level=0
is_official_build=true
disable_histogram_support=false
strip_debug_info=true
enable_resource_allowlist_generation=false

I put the possible options to reduce but no luck.
I want you to check and let me know what is wrong.
Regards

Samuel Huang

unread,
Mar 1, 2023, 11:30:27 AM3/1/23
to Aleksandar Jovanović, binar...@chromium.org
Some thoughts:
  • 64-bit builds are usually larger. If you don't need the performance and have a device that supports 32-bit, use target_cpu="arm" instead.
  • dcheck_always_on=true likely increases binary size.
  • Running "gn args out/arm64 --list" (replacing out/arm64 with your output dir) will show you more options and defaults, some might affect size.
  • Examine the contents of your APK to see if there are 32-bit binaries that you might not need?
  • See https://source.chromium.org/chromium/chromium/src/+/main:tools/binary_size/README.md for more info on tools to analyze size.
--
Samuel Huang

Aleksandar Jovanović

unread,
Mar 1, 2023, 11:34:41 AM3/1/23
to Samuel Huang, binar...@chromium.org
Thanks, I'll check it out. 
Reply all
Reply to author
Forward
0 new messages