Fix Android 16 installation with extractNativeLibs=true

- Set extractNativeLibs=true to bypass 16KB alignment requirement
- Lower targetSDK to 34 for compatibility mode
- Update RR3-Community-Mod.ps1 with 16KB zipalign command
- Tested on Android 16 (API 36)

Issue: apksigner 0.9 breaks 16KB alignment when signing
Solution: Extract libs to disk instead of mmap

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-19 13:05:22 -08:00
parent b9859224ee
commit 3e907097c9
3 changed files with 5 additions and 4 deletions

View File

@@ -77,7 +77,7 @@
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
<permission android:name="com.ea.games.r3_row.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION" android:protectionLevel="signature"/>
<uses-permission android:name="com.ea.games.r3_row.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"/>
<application android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:banner="@string/icon_name_tv_row" android:dataExtractionRules="@xml/backup_android12" android:extractNativeLibs="false" android:fullBackupContent="@xml/backup_legacy" android:hardwareAccelerated="true" android:icon="@string/icon_name_row" android:isGame="true" android:label="@string/app_name" android:largeHeap="true" android:localeConfig="@xml/locale_config" android:name="androidx.multidex.MultiDexApplication" android:networkSecurityConfig="@xml/network_security_config" android:resizeableActivity="false" android:roundIcon="@string/icon_name_round_row" android:screenOrientation="sensorLandscape" android:supportsRtl="true" android:theme="@style/splashScreenTheme" android:usesCleartextTraffic="false" android:windowSoftInputMode="adjustNothing">
<application android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:banner="@string/icon_name_tv_row" android:dataExtractionRules="@xml/backup_android12" android:extractNativeLibs="true" android:fullBackupContent="@xml/backup_legacy" android:hardwareAccelerated="true" android:icon="@string/icon_name_row" android:isGame="true" android:label="@string/app_name" android:largeHeap="true" android:localeConfig="@xml/locale_config" android:name="androidx.multidex.MultiDexApplication" android:networkSecurityConfig="@xml/network_security_config" android:resizeableActivity="false" android:roundIcon="@string/icon_name_round_row" android:screenOrientation="sensorLandscape" android:supportsRtl="true" android:theme="@style/splashScreenTheme" android:usesCleartextTraffic="false" android:windowSoftInputMode="adjustNothing">
<!-- ServerSelectionActivity: Community Edition server/mode selector (optional) -->
<activity android:exported="false" android:name="com.firemint.realracing.ServerSelectionActivity" android:screenOrientation="sensorLandscape" android:theme="@style/splashScreenTheme"/>
<!-- UnpackAssetsActivity: No longer the launcher, now called by MainActivity -->

View File

@@ -158,11 +158,12 @@ if ($uberSigner) {
exit 1
}
# Zipalign
# Zipalign with 16KB page alignment for Android 15+ (API 35+)
$zipalign = Get-Command zipalign -ErrorAction SilentlyContinue
if ($zipalign) {
$alignedApk = $OutputPath -replace '\.apk$', '-aligned.apk'
& zipalign -v 4 $OutputPath $alignedApk 2>&1 | Out-Null
# Use -p flag for 16KB page alignment (required for Android 15+)
& zipalign -p -f -v 16 $OutputPath $alignedApk 2>&1 | Out-Null
Move-Item -Path $alignedApk -Destination $OutputPath -Force
}
}

View File

@@ -7,7 +7,7 @@ usesFramework:
tag: null
sdkInfo:
minSdkVersion: 26
targetSdkVersion: 36
targetSdkVersion: 34
packageInfo:
forcedPackageId: 127
renameManifestPackage: null