Files
amethyst/tools
Claude 4406019059 fix(android): build Arti for all four shipped ABIs
The APK is split four ways (arm64-v8a, x86_64, armeabi-v7a, x86) and
create-release.yml publishes every one of them, but libarti_android.so
existed only for arm64-v8a and x86_64. The armeabi-v7a and x86 APKs
therefore installed with each dependency's native library present
(secp256k1's JNI ships all four ABIs) and Arti's missing:
System.loadLibrary throws, TorManager's status flow swallows the error,
and Tor reports Off for the life of the install. With the defaults
(TorType.INTERNAL, DM relays and unknown relays routed over Tor) those
relays then dial a SOCKS port nothing listens on and never connect, so
those ABIs lost their DMs as well as Tor.

Build Arti for armv7-linux-androideabi and i686-linux-android, and keep
the lists from drifting again:

- rust-toolchain.toml / build-arti.sh: all four targets by default, plus
  --target=<triple> to add one ABI without rewriting the .so files
  already committed.
- verify-reproducible.sh: verifies all four, or one ABI by triple.
- verifyArtiAbis (wired into preBuild): fails the build when an ABI
  split has no libarti_android.so, and names the build-arti.sh command
  that produces it.

Both new binaries come from the pinned Rust 1.98.1 + NDK 30.0.16248370,
export every JNI symbol, and link only libc/libm/libdl like the existing
two. 16 KB page alignment stays a 64-bit concern; the 32-bit libraries
link at 4 KB as their targets specify.

They have not been exercised on a 32-bit device or emulator.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MX1p385SiQMd2Lhkbg2YKc
2026-09-18 15:11:36 +00:00
..