Post
Topic
Board Bitcoin Wallet for Android
Re: [HOW-TO] Export seed and private keys from your Bitcoin Wallet for Android
by
jackg
on 19/08/2017, 15:44:38 UTC
I noticed a lot of people are asking how to export or extract the seed and private keys from their Bitcoin Wallet for Android. You probably need them to use your BTC in another wallet, or to use your BCC coins. This how-to will show you how to retrieve your seed and private keys from the Bitcoin Wallet for Android. If you are on Windows, I recommend using VMware Workstation Player with Debian or Ubuntu.

1. Make a backup of your wallet in Bitcoin Wallet for Android:
Code:
## Menu > Safety > Back up wallet
## Enter a password and transfer the backup file to your pc

2. Install OpenSSL, Maven and Java
Code:
sudo apt-get install openssl maven default-jre default-jdk openjfx

3. Decrypt your wallet
Don't forget to change the path to your backup file!
Code:
mkdir ~/AndroidWallet
cd ~/AndroidWallet
openssl enc -d -aes-256-cbc -a -in /PATH/TO/YOUR/BACKUP-FILE -out decrypted-wallet
## Enter the password of your backup

4. Install Bitcoinj
Code:
wget https://github.com/bitcoinj/bitcoinj/archive/master.zip
unzip master.zip
cd bitcoinj-master
sudo mvn clean install -DskipTests

5. Convert the protobuf wallet with the Bitcoinj wallet tool
Code:
cd tools
./wallet-tool dump --dump-privkeys --wallet=decrypted-wallet > wallet.txt

6. Extract the seed and private keys
The seed will be stored in seed.txt and the private keys in private-keys.txt
Code:
grep "Seed as" wallet.txt > seed.txt
grep -o -E "WIF=([a-zA-Z0-9]+)" wallet.txt > private-keys.txt
sed -i 's/WIF=//g' private-keys.txt

7. You now have the seed and a list of your private keys!
You can import/sweep the seed or private keys in another BTC or BCC wallet. In case you will use the seed/private keys for a BCC wallet, I recommend to transfer your BTC to a new wallet first!

Send me a beer if this how-to was helpful to you, or if you just want to test your new BCC wallet:
Code:
BTC: 1JpNrUkbsw1sZVynSLeNMS6qQDcrmjxh3e
BCC: 124KDK76iS51ccJ7dYYtGzDg8kEmhAL4aC

Is it possible to do this all on android device?

I think you might be able to dual boot it with an OS likeUbuntu in order to do it on android but it'd be fairly difficult to do.

It'd be good for the security of your coins if you coluld do it entirely on the android device, but it'd probably need enough ram to be able to launch ubuntu, or maybe there's a fairly minimalistic linux OS that would be able to run it.

If you merely root your device, it'd be almost impossible (there's no sudo command from what I recall).