How large is the optimized size for a simple Android build and the build flags to achieve that size?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By GameSi

I’m trying to reduce my APK size for a simple 2D game. I followed some guides and now the compiled .so lib is around 37MB, and I think it’s still pretty big.
I’m using Godot 4 on Windows 11 and here is the build command:
scons platform=android target=template_release arch=armv7 optimize=size use_lto=yes disable_advanced_gui=yes
I’m also using a custom.py file:

production = "yes"
deprecated = "no"
minizip = "no"
module_bmp_enabled = "no"
module_camera_enabled = "no"
module_csg_enabled = "no"
module_dds_enabled = "no"
module_enet_enabled = "no"
module_gridmap_enabled = "no"
module_hdr_enabled = "no"
module_jsonrpc_enabled = "no"
module_mbedtls_enabled = "no"
module_meshoptimizer_enabled = "no"
module_mobile_vr_enabled = "no"
module_msdfgen_enabled = "no"
module_navigation_enabled = "no"
module_multiplayer_enabled = "no"
module_noise_enabled = "no"
module_openxr_enabled = "no"
module_regex_enabled = "no"
module_tga_enabled = "no"
module_theora_enabled = "no"
module_upnp_enabled = "no"
module_vhacd_enabled = "no"
module_webm_enabled = "no"
module_webrtc_enabled = "no"
module_websocket_enabled = "no"
module_webxr_enabled = "no"

Does anyone have any idea to improve this? What is your smallest APK size you have achieved?
Any help is greatly appreciated, thank you.

:bust_in_silhouette: Reply From: egoist

I’m also troubled by this…
And I found this solution isn’t working with custom gradle build