Android mobile wallet using the bchwallet/neutrino backend
Neutrino isn't on Google Play. It needs Android 9 or newer; download the APK for your phone from the releases:
arm64-v8afor almost every phone from the last several yearsarmeabi-v7afor older 32-bit phonesx86_64for emulators and x86 Chromebooksuniversalif you aren't sure, which works on all of them at about twice the size
Android asks you to allow installs from the app you open the APK with, such as your browser. You
can check the download against the release's SHA256SUMS, and its signature against the
certificate fingerprint in the release notes:
sha256sum --check --ignore-missing SHA256SUMS
apksigner verify --print-certs neutrino-*.apkThe Neutrino that was on Google Play was signed with a different key, so Android won't install this one over it. Write down its recovery phrase, uninstall it, install this one and restore the wallet from the phrase.
Settings → Network switches the app to testnet4, the Bitcoin Cash network for testing, whose coins have no value. Each network has a wallet of its own, with its own recovery phrase, so switching leaves the other wallet as it is. On testnet4 the app shows a TESTNET4 badge and no fiat amounts.
The app embeds the bchwallet daemon, built for Android
with gomobile, as bchwallet/bchwallet.aar.
Requirements:
- JDK 17 or newer, such as the one bundled with Android Studio
- The Android SDK with platform 36
- To build
bchwallet.aar: git, Go 1.26 or newer and the Android NDK r28 or newer
-
Build the wallet library. This clones bchwallet at the given git ref,
masterby default, and writesbchwallet/bchwallet.aarwith libraries for arm64-v8a, armeabi-v7a and x86_64:export ANDROID_HOME=$HOME/Android/Sdk scripts/build-bchwallet-aar.sh master
Set
BCHWALLET_DIRto build from a local bchwallet checkout instead. -
Build the app:
./gradlew assembleDebug
Run the unit tests with ./gradlew testDebugUnitTest.
Releases are signed with a key kept outside the repo. Android installs an update only if it is signed with the same key as the installed app, so keep a backup of the keystore and its password. Create it once:
keytool -genkeypair -keystore ~/neutrino-release.jks -alias neutrino \
-keyalg RSA -keysize 4096 -validity 10950 -dname "CN=Neutrino"Before each release, bring the token files in app/src/main/assets/bcmr/ up to date:
-
Hints tables. For mainnet and testnet4, on a node of that network with
--bcmrindexthat has finished catching up, run bchd'sbcmrhintsat a height at least 100 blocks below the tip, as bchd's guide explains:BCMRHINTS_RPCUSER=user BCMRHINTS_RPCPASS=pass bcmrhints --height <height> -o mainnet-hints.bin
Copy the result to
<network>-hints.bin, and give each table's height and SHA-256, whichbcmrhintsprints, and the version of bchd that made it, whichbchd --versionprints, in the release notes, so that anyone with a node of that version can make the same file and compare. -
Known list. Check that each entry of
mainnet-known.jsonstill matches its token's own registry: the category ID, name, symbol and decimals, which are all an entry holds. The maintainer decides what's added. -
AAR. Rebuild
bchwallet/bchwallet.aarfrom the bchwallet commit being released, and note that commit. It needs Go, the Android SDK inANDROID_HOMEand the Android NDK r28 or newer, in$ANDROID_HOME/ndkor else inANDROID_NDK_HOME:ANDROID_HOME=<Android SDK> BCHWALLET_DIR=<bchwallet checkout> scripts/build-bchwallet-aar.sh
Set the version in app/build.gradle, then build and sign the release:
scripts/build-release.sh ~/neutrino-release.jksThis asks for the keystore's password and writes an APK for each ABI, a universal APK and
SHA256SUMS to build/release/<version>/. Attach them to the GitHub release, and give the
certificate's SHA-256 digest, which the script prints, in the release notes.
Before publishing, install it on a phone and check a mainnet wallet that holds tokens: their names, icons and NFT art, and a payment sent and received.
