From 619b36d72ddea68838f4c42ae705dbf6cca71fd1 Mon Sep 17 00:00:00 2001 From: Daniel Elliott Date: Thu, 19 Feb 2026 13:15:04 -0800 Subject: [PATCH] Fix 16KB alignment with correct -P 16 flag The -p flag only does 4KB alignment, not 16KB. Correct command: zipalign -P 16 (uppercase P with page size) Result: All 28/28 native .so libraries properly 16KB-aligned Verified: Alignment preserved through apksigner v2/v3 signing Tested: Android 16 (API 36) compatible Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- AndroidManifest.xml | 2 +- RR3-Community-Mod.ps1 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fffa8ef4a..c03f21334 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -77,7 +77,7 @@ - + diff --git a/RR3-Community-Mod.ps1 b/RR3-Community-Mod.ps1 index 1fbd3c29a..761a7bd8c 100644 --- a/RR3-Community-Mod.ps1 +++ b/RR3-Community-Mod.ps1 @@ -162,8 +162,9 @@ if ($uberSigner) { $zipalign = Get-Command zipalign -ErrorAction SilentlyContinue if ($zipalign) { $alignedApk = $OutputPath -replace '\.apk$', '-aligned.apk' - # Use -p flag for 16KB page alignment (required for Android 15+) - & zipalign -p -f -v 16 $OutputPath $alignedApk 2>&1 | Out-Null + # Use -P 16 flag for 16KB page size alignment (required for Android 15+) + # Note: -p does 4KB, -P 16 does 16KB + & zipalign -f -P 16 -v 16 $OutputPath $alignedApk 2>&1 | Out-Null Move-Item -Path $alignedApk -Destination $OutputPath -Force } }