Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7f5fd99
build: pin Gradle distribution and stop logging generated env values
antuz123 Oct 7, 2026
32d4258
docs: add Android payload comparison and reproducibility evidence
antuz123 Oct 7, 2026
b7df207
build: validate Android reproducibility inputs before release builds
antuz123 Oct 8, 2026
19b3e20
build: track provisional Android environment name allowlist
antuz123 Oct 8, 2026
4392106
reproducibility: audit public APK build values without disclosure
antuz123 Oct 8, 2026
a862025
build: add containerized Android diagnostic recipe
antuz123 Oct 8, 2026
962e506
fix: sign sprint diagnostic build with debug key
antuz123 Oct 9, 2026
cc15f59
ci: produce temporary sprint lockfile candidate
antuz123 Oct 9, 2026
3798627
ci: expose lockfile patch from clean runner
antuz123 Oct 9, 2026
a137db1
fix: reconcile sprint lockfile and verify Android output version
antuz123 Oct 9, 2026
95f9a65
ci: report Android reproducibility tools independently
antuz123 Oct 9, 2026
eb224a2
build: pin Android SDK archive bytes for diagnostic container
antuz123 Oct 9, 2026
8d45ef5
docs: clarify independent reproducibility next checks
antuz123 Oct 9, 2026
ceb3b2c
build: remove mutable Maven local repository lookup
antuz123 Oct 9, 2026
702d116
build: register pinned SDK packages and both NDK versions
antuz123 Oct 9, 2026
b5019a9
fix: make pinned Android SDK readable to diagnostic builder
antuz123 Oct 9, 2026
933f41e
Pin diagnostic Ubuntu apt inputs to Jammy snapshot
antuz123 Oct 9, 2026
49a4455
build: pin API 33 and platform tools in diagnostic SDK
antuz123 Oct 9, 2026
0276bf1
fix: consume complete apt policy output under pipefail
antuz123 Oct 9, 2026
4c0e4ed
ci: retain diagnostic Android ZIP entry hashes for repeat builds
antuz123 Oct 9, 2026
ac33225
build: verify Gradle artifacts with reviewed SHA-256 metadata
antuz123 Oct 9, 2026
2e3bf65
docs: record strict Android diagnostic verification
antuz123 Oct 9, 2026
f90bd14
docs: record same-source Android payload comparison
antuz123 Oct 9, 2026
5a6a1ea
docs: locate diagnostic APK byte variance in SDK metadata
antuz123 Oct 9, 2026
c12dcdc
reproducibility: authenticate release evidence and verify native inputs
redkeep-agents Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/android-independent-diagnostic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Android independent diagnostic

on:
push:
branches:
- 'codex/android-repro*'
pull_request:
branches:
- 'release/**'
- sprint
- dev
- main

permissions:
contents: read

concurrency:
group: android-independent-${{ github.event.pull_request.head.ref || github.ref_name }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- name: Check out source
uses: actions/checkout@v4

- name: Build diagnostic APK and AAB from a digest-pinned JDK base
run: |
bash reproducibility/android-diagnostic.sh \
--source-commit "$GITHUB_SHA" \
--output-dir "$RUNNER_TEMP/keeper-android-diagnostic"

- name: Verify diagnostic output manifest
run: |
cd "$RUNNER_TEMP/keeper-android-diagnostic"
sha256sum --check SHA256SUMS
cat SHA256SUMS
test -s Bitcoin_Keeper_DIAGNOSTIC.apk
test -s Bitcoin_Keeper_DIAGNOSTIC.aab
test -s ZIP_ENTRY_SHA256.json
test -s APK_CONTAINER.json
test -s SOURCE_INPUT_AUDIT.json
test -s APT_PACKAGE_SHA256SUMS
test -s DPKG_PACKAGES.tsv
echo 'Diagnostic build only; no distributed binary comparison or reproducibility verdict.'

- name: Retain diagnostic hashes and input evidence for repeat-build checks
uses: actions/upload-artifact@v4
with:
name: android-diagnostic-entry-hashes-${{ github.sha }}
path: |
${{ runner.temp }}/keeper-android-diagnostic/ZIP_ENTRY_SHA256.json
${{ runner.temp }}/keeper-android-diagnostic/APK_CONTAINER.json
${{ runner.temp }}/keeper-android-diagnostic/SOURCE_INPUT_AUDIT.json
${{ runner.temp }}/keeper-android-diagnostic/APT_PACKAGE_SHA256SUMS
${{ runner.temp }}/keeper-android-diagnostic/DPKG_PACKAGES.tsv
${{ runner.temp }}/keeper-android-diagnostic/SHA256SUMS
retention-days: 7
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,14 @@ jobs:

- name: Run tests
run: npm run test

android-reproducibility-tools:
name: Android reproducibility tools
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Test Android reproducibility tools
run: python3 -B -m unittest scripts/test_compare_android_apks.py reproducibility/test_verify_android_inputs.py reproducibility/test_audit_apk_build_values.py reproducibility/test_write_zip_entry_hashes.py reproducibility/test_inspect_apk_container.py reproducibility/test_audit_android_source.py
5 changes: 0 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,6 @@ android {
}
}


repositories{
mavenLocal()
}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation project(':react-native-iap')
Expand Down
1 change: 0 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ buildscript {
repositories {
google()
mavenCentral()
mavenLocal()
}
dependencies {
classpath("com.android.tools.build:gradle:8.8.0")
Expand Down
14,440 changes: 14,440 additions & 0 deletions android/gradle/verification-metadata.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions appcenter-pre-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ ENV_WHITELIST=${ENV_WHITELIST:-"^RN_"}
printf "Creating an .env file with the following whitelist:\n"
printf "%s\n" $ENV_WHITELIST
set | egrep -e $ENV_WHITELIST | sed 's/^RN_//g' > .env
printf "\n.env created with contents:\n\n"
cat .env
printf "\n.env created.\n"
120 changes: 120 additions & 0 deletions patches/realm+12.15.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
diff --git a/node_modules/realm/prebuilds/android/arm64-v8a/share/cmake/Realm/AcquireRealmDependency.cmake b/node_modules/realm/prebuilds/android/arm64-v8a/share/cmake/Realm/AcquireRealmDependency.cmake
--- a/node_modules/realm/prebuilds/android/arm64-v8a/share/cmake/Realm/AcquireRealmDependency.cmake
+++ b/node_modules/realm/prebuilds/android/arm64-v8a/share/cmake/Realm/AcquireRealmDependency.cmake
@@ -31,1 +31,22 @@
+ # Pin Android OpenSSL downloads outside Gradle dependency verification.
+ # These are independently observed archive hashes, not historical release provenance.
+ set(_realm_download_verification_args)
+ if(ANDROID AND dep_name STREQUAL "openssl")
+ if(NOT dep_version STREQUAL "3.3.1")
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency version")
+ endif()
+ if(_target_architecture STREQUAL "armeabi-v7a")
+ set(_realm_expected_sha256 "f7ca33cda546c05ad9c258add4f98b6f8f9764d0883d868d93579b1bc2a80ac4")
+ elseif(_target_architecture STREQUAL "arm64-v8a")
+ set(_realm_expected_sha256 "54e4581c4b123d7f04842a6cec3f153838e8a52c9b162b2a2233efd868247610")
+ elseif(_target_architecture STREQUAL "x86")
+ set(_realm_expected_sha256 "f03642845c924a4f4c5e934494b10e3658dbaab5874339a0fe37b661e80adce8")
+ elseif(_target_architecture STREQUAL "x86_64")
+ set(_realm_expected_sha256 "ff64787be7ee2e29fef1d8341ff543f6d8aaa291a8fc7c2e3849d82a8c2ae6fa")
+ else()
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency architecture")
+ endif()
+ set(_realm_download_verification_args EXPECTED_HASH "SHA256=${_realm_expected_sha256}")
+ endif()
+
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/include.cmake)
@@ -33,2 +54,2 @@
message(STATUS "Getting ${DEP_URL}...")
- file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" STATUS download_status)
+ file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" ${_realm_download_verification_args} STATUS download_status)
diff --git a/node_modules/realm/prebuilds/android/armeabi-v7a/share/cmake/Realm/AcquireRealmDependency.cmake b/node_modules/realm/prebuilds/android/armeabi-v7a/share/cmake/Realm/AcquireRealmDependency.cmake
--- a/node_modules/realm/prebuilds/android/armeabi-v7a/share/cmake/Realm/AcquireRealmDependency.cmake
+++ b/node_modules/realm/prebuilds/android/armeabi-v7a/share/cmake/Realm/AcquireRealmDependency.cmake
@@ -31,1 +31,22 @@
+ # Pin Android OpenSSL downloads outside Gradle dependency verification.
+ # These are independently observed archive hashes, not historical release provenance.
+ set(_realm_download_verification_args)
+ if(ANDROID AND dep_name STREQUAL "openssl")
+ if(NOT dep_version STREQUAL "3.3.1")
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency version")
+ endif()
+ if(_target_architecture STREQUAL "armeabi-v7a")
+ set(_realm_expected_sha256 "f7ca33cda546c05ad9c258add4f98b6f8f9764d0883d868d93579b1bc2a80ac4")
+ elseif(_target_architecture STREQUAL "arm64-v8a")
+ set(_realm_expected_sha256 "54e4581c4b123d7f04842a6cec3f153838e8a52c9b162b2a2233efd868247610")
+ elseif(_target_architecture STREQUAL "x86")
+ set(_realm_expected_sha256 "f03642845c924a4f4c5e934494b10e3658dbaab5874339a0fe37b661e80adce8")
+ elseif(_target_architecture STREQUAL "x86_64")
+ set(_realm_expected_sha256 "ff64787be7ee2e29fef1d8341ff543f6d8aaa291a8fc7c2e3849d82a8c2ae6fa")
+ else()
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency architecture")
+ endif()
+ set(_realm_download_verification_args EXPECTED_HASH "SHA256=${_realm_expected_sha256}")
+ endif()
+
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/include.cmake)
@@ -33,2 +54,2 @@
message(STATUS "Getting ${DEP_URL}...")
- file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" STATUS download_status)
+ file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" ${_realm_download_verification_args} STATUS download_status)
diff --git a/node_modules/realm/prebuilds/android/x86/share/cmake/Realm/AcquireRealmDependency.cmake b/node_modules/realm/prebuilds/android/x86/share/cmake/Realm/AcquireRealmDependency.cmake
--- a/node_modules/realm/prebuilds/android/x86/share/cmake/Realm/AcquireRealmDependency.cmake
+++ b/node_modules/realm/prebuilds/android/x86/share/cmake/Realm/AcquireRealmDependency.cmake
@@ -31,1 +31,22 @@
+ # Pin Android OpenSSL downloads outside Gradle dependency verification.
+ # These are independently observed archive hashes, not historical release provenance.
+ set(_realm_download_verification_args)
+ if(ANDROID AND dep_name STREQUAL "openssl")
+ if(NOT dep_version STREQUAL "3.3.1")
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency version")
+ endif()
+ if(_target_architecture STREQUAL "armeabi-v7a")
+ set(_realm_expected_sha256 "f7ca33cda546c05ad9c258add4f98b6f8f9764d0883d868d93579b1bc2a80ac4")
+ elseif(_target_architecture STREQUAL "arm64-v8a")
+ set(_realm_expected_sha256 "54e4581c4b123d7f04842a6cec3f153838e8a52c9b162b2a2233efd868247610")
+ elseif(_target_architecture STREQUAL "x86")
+ set(_realm_expected_sha256 "f03642845c924a4f4c5e934494b10e3658dbaab5874339a0fe37b661e80adce8")
+ elseif(_target_architecture STREQUAL "x86_64")
+ set(_realm_expected_sha256 "ff64787be7ee2e29fef1d8341ff543f6d8aaa291a8fc7c2e3849d82a8c2ae6fa")
+ else()
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency architecture")
+ endif()
+ set(_realm_download_verification_args EXPECTED_HASH "SHA256=${_realm_expected_sha256}")
+ endif()
+
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/include.cmake)
@@ -33,2 +54,2 @@
message(STATUS "Getting ${DEP_URL}...")
- file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" STATUS download_status)
+ file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" ${_realm_download_verification_args} STATUS download_status)
diff --git a/node_modules/realm/prebuilds/android/x86_64/share/cmake/Realm/AcquireRealmDependency.cmake b/node_modules/realm/prebuilds/android/x86_64/share/cmake/Realm/AcquireRealmDependency.cmake
--- a/node_modules/realm/prebuilds/android/x86_64/share/cmake/Realm/AcquireRealmDependency.cmake
+++ b/node_modules/realm/prebuilds/android/x86_64/share/cmake/Realm/AcquireRealmDependency.cmake
@@ -31,1 +31,22 @@
+ # Pin Android OpenSSL downloads outside Gradle dependency verification.
+ # These are independently observed archive hashes, not historical release provenance.
+ set(_realm_download_verification_args)
+ if(ANDROID AND dep_name STREQUAL "openssl")
+ if(NOT dep_version STREQUAL "3.3.1")
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency version")
+ endif()
+ if(_target_architecture STREQUAL "armeabi-v7a")
+ set(_realm_expected_sha256 "f7ca33cda546c05ad9c258add4f98b6f8f9764d0883d868d93579b1bc2a80ac4")
+ elseif(_target_architecture STREQUAL "arm64-v8a")
+ set(_realm_expected_sha256 "54e4581c4b123d7f04842a6cec3f153838e8a52c9b162b2a2233efd868247610")
+ elseif(_target_architecture STREQUAL "x86")
+ set(_realm_expected_sha256 "f03642845c924a4f4c5e934494b10e3658dbaab5874339a0fe37b661e80adce8")
+ elseif(_target_architecture STREQUAL "x86_64")
+ set(_realm_expected_sha256 "ff64787be7ee2e29fef1d8341ff543f6d8aaa291a8fc7c2e3849d82a8c2ae6fa")
+ else()
+ message(FATAL_ERROR "Unreviewed Android Realm OpenSSL dependency architecture")
+ endif()
+ set(_realm_download_verification_args EXPECTED_HASH "SHA256=${_realm_expected_sha256}")
+ endif()
+
if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/include.cmake)
@@ -33,2 +54,2 @@
message(STATUS "Getting ${DEP_URL}...")
- file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" STATUS download_status)
+ file(DOWNLOAD "${DEP_URL}" "${CMAKE_CURRENT_BINARY_DIR}/${dep_name}/${dep_name}.tar.gz" ${_realm_download_verification_args} STATUS download_status)
Loading
Loading