- scripts/build-randomx-android.sh: NDK cross-build of the pinned native/ engine (light mode) for arm64-v8a and x86_64, packaged as jniLibs/<abi>/libwikideck_randomx.so - MinerPlugin.java (Capacitor "WikiDeckMiner"): runs engine processes over the line protocol, on-device self-test, and halts on background, battery saver, thermal, hot or low battery. Never receives wallet keys. - src/mobile-miner.ts: template -> mine -> sign -> submit loop in the WebView, byte-identical to consensus miningBlob/mintId (tests/mobile-mining-miner.test.ts) - src/MobileMiningPanel.tsx: consent, intensity (1 thread default; Max = 4 only while charging), live hashrate/status; testnet-only (disabled on mainnet builds) - docs/night2/MOBILE_MINING.md: how it works, safeguards, measured hashrate, store policies (sideload APK only), options for Eric No protocol, consensus or server changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
897 B
Bash
Executable File
17 lines
897 B
Bash
Executable File
#!/bin/sh
|
|
# Build the WikiDeck debug APK against the private Night-1 testnet.
|
|
# Needs ANDROID_HOME (with an NDK and CMake for the RandomX engine) and a JDK 21 (JAVA_HOME). Output: android/app/build/outputs/apk/debug/app-debug.apk
|
|
set -eu
|
|
cd "$(dirname "$0")/.."
|
|
export VITE_WIKIDECK_NETWORK="${VITE_WIKIDECK_NETWORK:-testnet}"
|
|
export VITE_WIKIDECK_GENESIS_TIME="${VITE_WIKIDECK_GENESIS_TIME:-1792411200}"
|
|
export VITE_NODE_URL="${VITE_NODE_URL:-http://192.168.1.32:3101}"
|
|
# Native RandomX engine (jniLibs/<abi>/libwikideck_randomx.so); built once, reused after (scripts/build-randomx-android.sh).
|
|
for abi in ${ABIS:-arm64-v8a x86_64}; do
|
|
[ -x "android/app/src/main/jniLibs/$abi/libwikideck_randomx.so" ] || ABIS="$abi" sh scripts/build-randomx-android.sh
|
|
done
|
|
npm run build
|
|
npx cap sync android
|
|
cd android && ./gradlew --no-daemon -q assembleDebug
|
|
ls -l app/build/outputs/apk/debug/app-debug.apk
|