diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp index e565183db7..84630cd77c 100644 --- a/platform/android/export/export_plugin.cpp +++ b/platform/android/export/export_plugin.cpp @@ -3820,6 +3820,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref Align long new_offset = file_offset + bias; padding = (ZIP_ALIGNMENT - (new_offset % ZIP_ALIGNMENT)) % ZIP_ALIGNMENT; + const char *ext = strrchr(fname, '.'); + if (ext && strcmp(ext, ".so") == 0) { + padding = (PAGE_SIZE_KB - (new_offset % PAGE_SIZE_KB)) % PAGE_SIZE_KB; + } else { + padding = (ZIP_ALIGNMENT - (new_offset % ZIP_ALIGNMENT)) % ZIP_ALIGNMENT; + } } memset(extra + info.size_file_extra, 0, padding);