Skip to content

revert(android): restore all four ABIs for production AAB#30687

Merged
andrepimenta merged 2 commits into
mainfrom
revert/android-abi-architecture-changes
May 27, 2026
Merged

revert(android): restore all four ABIs for production AAB#30687
andrepimenta merged 2 commits into
mainfrom
revert/android-abi-architecture-changes

Conversation

@andrepimenta

@andrepimenta andrepimenta commented May 27, 2026

Copy link
Copy Markdown
Member

Description

Reverts the architecture-narrowing changes from #30590 and #30642 that were rushed in to silence Google Play's 16 KB page-size warning for base/lib/x86_64/libconceal.so and base/lib/x86_64/libsecp256k1.so. Google Play extended their compliance deadline, so we have time to fix the underlying 4 KB alignment issue properly instead of shipping fewer ABIs as a workaround.

The structural fixes are tracked separately:

Once those land, both .so files disappear for every ABI (including arm64-v8a), which is the real fix Play actually cares about.

What this PR restores

File After this PR (= pre-#30590 state)
android/gradle.properties.release reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
android/app/build.gradle reactNativeArchitectures() back to its original one-liner; ndk.abiFilters(*reactNativeArchitectures()) block removed from defaultConfig

Why revert rather than keep abiFilters for safety?

The abiFilters plumbing isn't harmful when paired with all four ABIs (it would just resolve to all four), but keeping it adds non-obvious build behavior tied to a workaround we're abandoning. Cleaner to fully revert and re-introduce when (if) we narrow ABIs again as a deliberate decision.

Untouched (already untouched by the original PRs)

  • android/gradle.properties (default, local dev)
  • android/gradle.properties.github (CI E2E)
  • android/gradle.properties.github.dual-versions (BrowserStack real-device runs)
  • scripts/build.sh -PreactNativeArchitectures=... CLI overrides

Changelog

CHANGELOG entry: null

Related issues

Reverts: #30590, #30642
Tracking the proper fixes: #30591, #30592

Manual testing steps

Feature: Production AAB ships all four ABIs again

  Scenario: A production release build is generated
    Given a clean checkout of this branch
    When the production AAB is built via the standard release workflow
      (cp android/gradle.properties.release android/gradle.properties
       before ./gradlew bundleProdRelease)
    Then `unzip -l app-prod-release.aab | grep '/lib/'` shows
      `lib/arm64-v8a/`, `lib/armeabi-v7a/`, `lib/x86/`, and `lib/x86_64/`
      entries

  Scenario: Local dev unchanged
    Given default android/gradle.properties (unchanged)
    When `yarn android` is run on an x86_64 emulator
    Then app installs and runs as before

  Scenario: CI E2E unchanged
    Given android/gradle.properties.github overlay
    When E2E build runs
    Then x86_64 APK is produced and Detox tests pass

Screenshots/Recordings

Before

Production AAB ships only armeabi-v7a + arm64-v8a. Play 16 KB warning cleared (workaround), but the underlying 4 KB-aligned .so files still ship for arm64-v8a.

After

Production AAB ships all four ABIs again, restoring full device coverage (including Chromebook ARC++ on x86_64). Play 16 KB warning returns for x86_64, but the warning is informational under the extended deadline and the structural fixes (#30591, #30592) are the real path forward.

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs and MetaMask Mobile Coding Standards.
  • I've completed the PR template to the best of my ability
  • I've included tests if applicable — N/A (build-config revert; verification is via the unzip -l check on the produced AAB)
  • I've documented my code using JSDoc format if applicable — N/A
  • I've applied the right labels on the PR — team-mobile-platform

Performance checks (if applicable)

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Made with Cursor


Note

Medium Risk
Changes only release packaging/architecture selection but increases shipped native surface (x86/x86_64) and may re-expose Play 16 KB alignment warnings until dependency fixes land.

Overview
Reverts the Play Store 16 KB page-size workaround that limited production native builds to ARM only. Release gradle.properties.release again sets reactNativeArchitectures to all four ABIs (armeabi-v7a, arm64-v8a, x86, x86_64), so production AABs regain x86/x86_64 coverage (e.g. Chromebooks).

In app/build.gradle, the ndk.abiFilters(*reactNativeArchitectures()) block is removed from defaultConfig, so packaging no longer forces ABI filtering at the NDK layer. reactNativeArchitectures() is collapsed back to a single ternary that reads the property or falls back to the four default ABIs.

Trade-off: Google Play’s x86_64 16 KB alignment warning may return until follow-up work replaces misaligned third-party .so files; that is intentional per the extended compliance timeline.

Reviewed by Cursor Bugbot for commit 61f5095. Bugbot is set up for automated code reviews on this repo. Configure here.

Reverts the architecture-narrowing changes from #30590 and #30642 that
were rushed in to silence Play's 16 KB page-size warning. Google Play
extended their compliance deadline, so we have time to fix the
underlying alignment issue properly instead of shipping fewer ABIs.

This restores:

- android/gradle.properties.release back to all four ABIs:
  armeabi-v7a,arm64-v8a,x86,x86_64

- android/app/build.gradle:
  - reactNativeArchitectures() helper back to its original one-liner.
  - Removes the ndk.abiFilters(*reactNativeArchitectures()) block.

The proper fixes for libconceal.so (#30592) and libsecp256k1.so (#30591)
will close the gap on every ABI, not just x86_64. Once those land we
will no longer need either the abiFilters enforcement or the ABI
exclusion.

Untouched:
- android/gradle.properties (default), android/gradle.properties.github
  (CI E2E), android/gradle.properties.github.dual-versions, and the
  build.sh -PreactNativeArchitectures= overrides were never changed by
  the original PRs, so nothing to revert there.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 27, 2026
@metamaskbotv2 metamaskbotv2 Bot added the team-mobile-platform Mobile Platform team label May 27, 2026
@andrepimenta andrepimenta removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 27, 2026
@andrepimenta andrepimenta marked this pull request as ready for review May 27, 2026 14:37
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 97%
click to see 🤖 AI reasoning details

E2E Test Selection:
The two changed files are Android build configuration files only:

  1. android/app/build.gradle: Minor refactor of reactNativeArchitectures() function (same logic, more concise syntax) and removal of the ndk { abiFilters } block from defaultConfig. The abiFilters block was previously restricting packaged .so files to specific ABIs.

  2. android/gradle.properties.release: Changed the reactNativeArchitectures property from ARM-only (armeabi-v7a,arm64-v8a) to all architectures (armeabi-v7a,arm64-v8a,x86,x86_64). This reverts a previous restriction that excluded x86/x86_64 due to Play Store 16KB alignment warnings.

These changes are purely Android native build/packaging configuration. They affect:

  • Which CPU architectures are included in the release APK/AAB
  • Native library (.so file) packaging behavior

They do NOT affect:

  • Any JavaScript/TypeScript application code
  • UI components or screens
  • Controllers, Engine, or state management
  • Test infrastructure or E2E test flows
  • Any user-facing functionality

No E2E tests are warranted since no app behavior, UI, or logic has changed. The changes only affect how the Android binary is compiled and packaged for distribution.

Performance Test Selection:
These are Android build configuration changes affecting ABI/architecture packaging only. No performance-sensitive code paths, UI components, data loading, or app initialization logic was modified. Performance tests are not warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@andrepimenta andrepimenta added this pull request to the merge queue May 27, 2026
Merged via the queue into main with commit a81cae3 May 27, 2026
129 of 132 checks passed
@andrepimenta andrepimenta deleted the revert/android-abi-architecture-changes branch May 27, 2026 17:27
@github-actions github-actions Bot locked and limited conversation to collaborators May 27, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.80.0 Issue or pull request that will be included in release 7.80.0 label May 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.80.0 Issue or pull request that will be included in release 7.80.0 size-S team-mobile-platform Mobile Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tech-debt(android): replace react-native-fast-crypto with quick-crypto scrypt to drop libsecp256k1.so

2 participants