Skip to content

build: use NDK 29.0.14206865 to strip prebuilt native libraries - #1685

Merged
HashEngineering merged 1 commit into
feat/kotlin-sdk-phase-1from
chore/ndk-29-strip
Nov 9, 2026
Merged

HashEngineering merged 1 commit into
feat/kotlin-sdk-phase-1from
chore/ndk-29-strip

Conversation

@HashEngineering

Copy link
Copy Markdown
Collaborator

What

wallet/build.gradle: android.ndkVersion 21.3.6528147 → 29.0.14206865.

Why

The wallet has no native code of its own (no externalNativeBuild, CMake or ndk-build). Every .so is prebuilt: the Kotlin SDK AAR, dashj-x11 and others. The only thing ndkVersion still controls is which NDK's llvm-strip AGP runs on those libraries at packaging time. The 21.3 pin dates from 2021 (1764a95), when the wallet still had JNI sources.

AGP requires the exact pinned NDK. A host that only has NDK 29, the version the Kotlin SDK is built with, silently skips stripping and packages the libraries with their symbol tables. On such a host the prod APK is about 44 MB larger (12.0.1-beta: 371.1 MB, compared with 326.7 MB for the same SDK stripped with NDK 21.3). Every 12.x build made on a host without NDK 21.3 has shipped unstripped, 12.0.0-beta included.

Verification

  • :wallet:stripProdReleaseDebugSymbols with NDK 29.0.14206865: lib/arm64-v8a/libdash_sdk_jni.so (Kotlin SDK 5.0.0-int32) goes from 74.6 MB to 55.7 MB with no .symtab. Its sha256 f6330b973545d98f… is byte-identical to the same library stripped by NDK 21.3 in an earlier build.
  • No runtime change: the libraries' code is unchanged; only their symbol tables are removed.

Also applied to release/12.0.1-rc1 (fc8e3d2).

🤖 Generated with Claude Code

The wallet has no native code of its own; ndkVersion only selects the
llvm-strip AGP runs on the prebuilt .so files. 21.3.6528147 (pinned in
2021) is missing on hosts that only have the NDK the Kotlin SDK is built
with, and AGP then packages the libraries unstripped. NDK 29's strip
gives byte-identical output to 21.3's for the SDK library.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit fc8e3d2)
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 589e939 and 413524e.

Files selected for processing: 1

  • wallet/build.gradle
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@thepastaclaw

thepastaclaw commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Final review complete — no blockers (commit 413524e) · triage: low

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

Verified the exact head and review range: the only change updates wallet/build.gradle's NDK pin from 21.3.6528147 to 29.0.14206865. Static inspection confirms prebuilt native dependencies and no native compilation configuration; no actionable in-scope defects were found. Current CI build and check jobs pass, with only the automated review pending; no local builds or tests were run.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — The one-line NDK version update is a small, contained build change that affects native library stripping and is straightforward to verify.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 100% left, weekly 29% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Generate and upload native symbols for release crash diagnostics — The release build type does not configure debugSymbolLevel, and the Play upload lane supplies only the APK and Java mapping file. A separate native-symbol artifact would preserve access to stripped, non-exported function names when diagnosing native crashes. This is an existing release-observability gap, not a blocker for updating the stripping tool. The Crashlytics plugin is conditionally applied through gradle/google-services.gradle, contrary to the preliminary review's claim, but no native-symbol upload configuration was found.
    • Follow-up: Create a follow-up PR to generate release native-debug-symbols.zip and upload it to Play Console. The locally available commit e4cb069 provides the debugSymbolLevel SYMBOL_TABLE configuration as a starting point; include the corresponding upload process.

@HashEngineering
HashEngineering merged commit c19fc8a into feat/kotlin-sdk-phase-1 Nov 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants