From c8af8084328b2d8024dacaa727947c72ff5f3a22 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 18 Aug 2026 16:24:37 -0400 Subject: [PATCH] android: package only the ABIs we actually build for MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first working APK carried libjnidispatch.so for armeabi, mips and mips64 as well as our four — JNA's .aar still ships those, and AGP packages whatever it finds. Android dropped mips in NDK r17 and armeabi in r17 too; nothing that can install this app can load them, so they are pure payload. abiFilters pins the set to the four the Rust is actually cross-compiled for, so the APK's ABI list matches the build's intent rather than the union of every dependency's history. Found by unpacking the artifact rather than trusting the green: the run said "Upload debug APK ✓", which is true and says nothing about what is inside it. Co-Authored-By: Claude Opus 5 (1M context) --- android/app/build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 5b9f679..200558a 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -162,6 +162,16 @@ android { (project.findProperty("THOUGHTSYNC_VERSION_CODE") as String?)?.toIntOrNull() versionCode = codeOverride ?: 1 versionName = nameOverride ?: "dev" + + // Package ONLY the ABIs we build for. + // + // Without this the APK also carries armeabi, mips and mips64 — dead + // architectures Android dropped years ago, which arrive because JNA's + // .aar still ships a libjnidispatch.so for each. They can never be + // loaded on any device this app supports, so they are pure payload. + ndk { + abiFilters += androidAbis + } } buildTypes {