GreenBits - A native GreenAddress wallet for Android
You need to have the following Android developer tools installed:
- "Android SDK Platform-tools" version 25.0.0 recommended
- "Android SDK Tools" version 25.2.2 recommended
- "Android SDK Build-tools" version 25.0.0 recommended
- "Android Support Library" version 23.2.1 recommended
- "Android Support Repository" version 39.0.0 recommended
- "Android NDK" version r13b recommended
The above tools can be installed from the Android SDK manager.
GreenBits uses libwally which requires the following to be installed for building:
- SWIG. Most Linux distributions have this packaged,
for example on debian
sudo apt-get install swigshould work.
Clone the repo
git clone https://github.com/greenaddress/GreenBits.git
How to build
Cross-compile the native libraries:
This step requires the environment variables
be set correctly.
cd app && ./prepare_fdroid.sh && cd ..
Build the Android app
This will build both MAINNET and TESTNET builds
For TESTNET only run
Rebuild the checkpoints (optional)
Checkpoint files reduce the amount of data that SPV has to download. The checkpoint data is rebuilt periodically but you may wish to update it if you will be making and testing changes.
To rebuild, start both MAINNET and TESTNET instances of bitcoind on localhost. Make sure they are fully synchronized and have finished booting (verifying blocks, etc).
./gradlew --project-dir=bitcoinj/tools buildMainnetCheckpoints && mv bitcoinj/tools/checkpoints app/src/production/assets/checkpoints
./gradlew --project-dir=bitcoinj/tools buildTestnetCheckpoints && mv bitcoinj/tools/checkpoints-testnet app/src/btctestnet/assets/checkpoints
Or to build both at once, run:
Thanks to Bitcoin Wallet for Android for their QR scanning activity source code!
Thanks to Riccardo Casatta for code and big UX contributions!