Zipalign the split APK before installing
Similar to but prevents the split APK (`--split_apks`) from being installed on Android 11 devices due to the fact that the contents of the APK are not aligned on a 4-byte boundary.
Closes
@@ -200,6 +200,7 @@ public final class AndroidBinaryMobileInstall {
.setSignedApk(resourceSplitApk)
.setSigningKeys(signingKeys)
.setSigningLineageFile(signingLineage)
+ .setZipalignApk(true)
.registerActions(ruleContext);
splitApkSetBuilder.add(resourceSplitApk);
@@ -270,6 +271,7 @@ public final class AndroidBinaryMobileInstall {
.setSignedApk(splitMainApk)
.setSigningKeys(signingKeys)
.setSigningLineageFile(signingLineage)
+ .setZipalignApk(true)
.registerActions(ruleContext);
splitApkSetBuilder.add(splitMainApk);
NestedSet<Artifact> allSplitApks = splitApkSetBuilder.build();
