Bismuth Tornado Wallet on Android via Termux
The Bismuth Tornado Wallet can be used on an Android mobile phone in combination with Termux.
How to Use Tornado Wallet on Android with Termux
This document describes how to get the wallet running under this setup. First, find Termux in the Play Store and install it as shown in the screenshot on the left.
Once installed, start Termux and type in the following commands (except the lines starting with #
, which are comments):
pkg install python wget clang
pkg install build-essential
pkg install git
# default wget doesn’t handle https
# pycryptodomex doesn’t seem to build unless clang is installed manually
# [maybe optional] needed hash -r to force use of newly installed wget because it kept using old
hash -r
git clone https://github.com/Bismuthfoundation/TornadoWallet
cd TornadoWallet
pip install -r requirements.txt
cd wallet
python wallet.py
# wait a little while and open web browser at localhost:8888
If localhost:8888
shows an error or timeout, it means that the wallet has not booted yet. In this case wait a bit more and retry.
The instructions above will create a new wallet.json
file. If you already have a wallet created on a PC which you would also like to use on your phone, you need to transfer the following file from your PC to the phone (replace username with your own):
C:\Users\username\bismuth-private\wallet.json
First, make sure that your wallet on the PC is encrypted and protected by a password. Then, the file wallet.json can be transferred to the phone, for example by email or by using a cloud storage such as Dropbox, Google Drive, etc. You can then use Termux to transfer the wallet.json file to the correct location:
# Stop the Tornado wallet (using ctrl+c) before copying wallet.json
# Allow phone to access the storage area (answer Allow)
termux-setup-storage
cd $HOME/bismuth-private
# Make a backup of existing wallet, if it exists
mv wallet.json wallet-backup.json
# Copy wallet from the phone’s download folder
cp /storage/emulated/0/Download/wallet.json .
cd ..
python wallet.py
# wait a little while and open web browser at localhost:8888
Another option is to install openssh and then copy wallet.json using sftp, if you have your own server available:
pkg install openssh
cd ~/bismuth-private
sftp username@mysecureserver.com
get wallet.json / after successful login
The screenshot below shows the phone’s web browser after wallet.py has been restarted with an encrypted wallet.json file successfully copied from a PC to the phone’s bismuth-private folder. Note that the wallet decryption takes some time on the phone, especially if wallet.json contains multiple addresses.
- credits go to Discord users bizzy and heavens for working out how to use the Tornado wallet with Termux.
- heavens also provided the following script, which can be used to start the wallet and automatically launch the web-browser
#!/bin/bash
cd ~/TornadoWallet/wallet
(sleep 7;am start −−user 0 -a android.intent.action.VIEW -d http://localhost:8888) &
python wallet.py
This script can be written directly on the phone, for example using the nano text editor:
nano mystart
Then use CTRL+O to save and CTRL+X to return to the terminal window. To make the script executable:
chmod u+x mystart
and to run it:
./mystart
Termux Widget is an addon available at Google Play or F-droid (both Termux and the Widget need to be installed from the same source, you cannot mix). Widget provides an easy way to start small scriptlets from the home screen of the phone. The script “mystartup” needs to be moved to the $HOME/.shortcuts directory, see https://wiki.termux.com/wiki/Termux:Widget.
After that, add Termux:Widget to your phone’s home screen and select to launch the “mystartup” script. The home screen should then look as shown below. The Bismuth Tornado Wallet can now be launched on Android with one simple touch.