Pages:
Author

Topic: [HOW-TO] Export seed and private keys from your Bitcoin Wallet for Android - page 2. (Read 11481 times)

newbie
Activity: 20
Merit: 14
well then, i've just thought to add my progress too.. yerr-nahh it hasn't worked for me, or more so i havn't worked for it...it's running and all, but seems to be going backwards, each time i open it i gota wait more days... i think i muffed the files transfere and it's going back and replacing blocks, i can see a mix of seeds in there and there is no date on the block files when the program is closed...it'll be my fault.... it was a long process installing deb8 for my usbwifi then upgrading to deb9 then a sid kernel...then it did what the instruction said it wouldnt do, ie got the 4.8 berkley in...then i worked out i prolly didnt install it in the right place, nonetheless i take the blame, mite try electron now, seems much easier just a client an all'...

The whole process should take maybe 10 minutes. What kind of errors do you get? Or where do you get stuck?
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Finally sorted it! Thanks. Yes, I did follow step 3, but I had to modify it to get rid of an SSL error: openssl enc -d -aes-256-cbc -md md5 -a -in bitcoin-wallet-backup -out decrypted_wallet

Also I had to insert an additional step before step 5 to decrypt the PIN-protection I had set for sending bitcoins on the phone. If you have set a sending PIN on your phone and you don't do this step you won't get your private keys at step 5, only the public keys and initialisation vectors etc. You need to run: ./wallet-tool --decrypt --password= --wallet=decrypted_wallet.

I found the instructions for wallet-tool very helpful also: https://github.com/bitcoinj/bitcoinj/blob/master/tools/src/main/resources/org/bitcoinj/tools/wallet-tool-help.txt

The whole process is a bit long-winded, but it does work and I have finally recovered my Bitcoin Cash from my phone after the split - Whoopee!

Thanks for all your help.

--------------------------------------------
BTC: 1MqYtrevyngvpyyKXZr8CgoNZXvJdtjkS7
BCC: 18crH68qTFr2yxz9mdRKvkf6gJANViSYda

Good to hear and thanks for adding this information!

well then, i've just thought to add my progress too.. yerr-nahh it hasn't worked for me, or more so i havn't worked for it...it's running and all, but seems to be going backwards, each time i open it i gota wait more days... i think i muffed the files transfere and it's going back and replacing blocks, i can see a mix of seeds in there and there is no date on the block files when the program is closed...it'll be my fault.... it was a long process installing deb8 for my usbwifi then upgrading to deb9 then a sid kernel...then it did what the instruction said it wouldnt do, ie got the 4.8 berkley in...then i worked out i prolly didnt install it in the right place, nonetheless i take the blame, mite try electron now, seems much easier just a client an all'...

HCP made this guide as well which might work better for you.

Although, if you're still stuck, I can try to get them out for you (but that'd require you to trust me with your private keys, you might want to move your bitcoins out first at least).
member
Activity: 61
Merit: 10
AWorldWideWebOfReasons AWorldWideWebOfResults
Finally sorted it! Thanks. Yes, I did follow step 3, but I had to modify it to get rid of an SSL error: openssl enc -d -aes-256-cbc -md md5 -a -in bitcoin-wallet-backup -out decrypted_wallet

Also I had to insert an additional step before step 5 to decrypt the PIN-protection I had set for sending bitcoins on the phone. If you have set a sending PIN on your phone and you don't do this step you won't get your private keys at step 5, only the public keys and initialisation vectors etc. You need to run: ./wallet-tool --decrypt --password= --wallet=decrypted_wallet.

I found the instructions for wallet-tool very helpful also: https://github.com/bitcoinj/bitcoinj/blob/master/tools/src/main/resources/org/bitcoinj/tools/wallet-tool-help.txt

The whole process is a bit long-winded, but it does work and I have finally recovered my Bitcoin Cash from my phone after the split - Whoopee!

Thanks for all your help.

--------------------------------------------
BTC: 1MqYtrevyngvpyyKXZr8CgoNZXvJdtjkS7
BCC: 18crH68qTFr2yxz9mdRKvkf6gJANViSYda

Good to hear and thanks for adding this information!

well then, i've just thought to add my progress too.. yerr-nahh it hasn't worked for me, or more so i havn't worked for it...it's running and all, but seems to be going backwards, each time i open it i gota wait more days... i think i muffed the files transfere and it's going back and replacing blocks, i can see a mix of seeds in there and there is no date on the block files when the program is closed...it'll be my fault.... it was a long process installing deb8 for my usbwifi then upgrading to deb9 then a sid kernel...then it did what the instruction said it wouldnt do, ie got the 4.8 berkley in...then i worked out i prolly didnt install it in the right place, nonetheless i take the blame, mite try electron now, seems much easier just a client an all'...
newbie
Activity: 20
Merit: 14
If anyone is interested in the instructions to install a Linux virtual machine on Windows using VMware, let me know!
newbie
Activity: 20
Merit: 14
Finally sorted it! Thanks. Yes, I did follow step 3, but I had to modify it to get rid of an SSL error: openssl enc -d -aes-256-cbc -md md5 -a -in bitcoin-wallet-backup -out decrypted_wallet

Also I had to insert an additional step before step 5 to decrypt the PIN-protection I had set for sending bitcoins on the phone. If you have set a sending PIN on your phone and you don't do this step you won't get your private keys at step 5, only the public keys and initialisation vectors etc. You need to run: ./wallet-tool --decrypt --password= --wallet=decrypted_wallet.

I found the instructions for wallet-tool very helpful also: https://github.com/bitcoinj/bitcoinj/blob/master/tools/src/main/resources/org/bitcoinj/tools/wallet-tool-help.txt

The whole process is a bit long-winded, but it does work and I have finally recovered my Bitcoin Cash from my phone after the split - Whoopee!

Thanks for all your help.

--------------------------------------------
BTC: 1MqYtrevyngvpyyKXZr8CgoNZXvJdtjkS7
BCC: 18crH68qTFr2yxz9mdRKvkf6gJANViSYda

Good to hear and thanks for adding this information!
newbie
Activity: 20
Merit: 14
Is it possible to do this all on android device?

The Bitcoin Wallet for Android app uses Bitcoinj, so it is possible to do this on an Android device. However, it would take a lot of time. You will need root and terminal access (or code an app). If you don't use Linux, it will be much easier to just use VMware.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
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).
newbie
Activity: 53
Merit: 0
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?
newbie
Activity: 3
Merit: 0

I was using an older version of Debian. Now I have V9.1.0 and it is working.... However, now I can get a readable "wallet.txt" at step 5, but in plaintext it says "Seed is encrypted" and although it shows Xpub (for a watching only wallet) all of the private keys are shown as:-

"encryptedPrivateKey=EncryptedData [initialisationVector=[104, -105, -15, 72, -51,.... etc".

Presumably there needs to be additional calculations done to extract the actual private keys?

Did you follow step 3 to decrypt the wallet? You will be asked for the password of the backup.

Finally sorted it! Thanks. Yes, I did follow step 3, but I had to modify it to get rid of an SSL error: openssl enc -d -aes-256-cbc -md md5 -a -in bitcoin-wallet-backup -out decrypted_wallet

Also I had to insert an additional step before step 5 to decrypt the PIN-protection I had set for sending bitcoins on the phone. If you have set a sending PIN on your phone and you don't do this step you won't get your private keys at step 5, only the public keys and initialisation vectors etc. You need to run: ./wallet-tool --decrypt --password= --wallet=decrypted_wallet.

I found the instructions for wallet-tool very helpful also: https://github.com/bitcoinj/bitcoinj/blob/master/tools/src/main/resources/org/bitcoinj/tools/wallet-tool-help.txt

The whole process is a bit long-winded, but it does work and I have finally recovered my Bitcoin Cash from my phone after the split - Whoopee!

Thanks for all your help.

--------------------------------------------
BTC: 1MqYtrevyngvpyyKXZr8CgoNZXvJdtjkS7
BCC: 18crH68qTFr2yxz9mdRKvkf6gJANViSYda
newbie
Activity: 20
Merit: 14

I was using an older version of Debian. Now I have V9.1.0 and it is working.... However, now I can get a readable "wallet.txt" at step 5, but in plaintext it says "Seed is encrypted" and although it shows Xpub (for a watching only wallet) all of the private keys are shown as:-

"encryptedPrivateKey=EncryptedData [initialisationVector=[104, -105, -15, 72, -51,.... etc".

Presumably there needs to be additional calculations done to extract the actual private keys?

Did you follow step 3 to decrypt the wallet? You will be asked for the password of the backup.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
Can you do any of this on Windows? isn't there a simpler way to do it?

Thanks!

Try this guide instead for Windows: https://bitcointalksearch.org/topic/m.20002671

I used this for windows 7 and it worked quite well.
newbie
Activity: 3
Merit: 0
Do you use an older version of Debian?

+1?

I was using an older version of Debian. Now I have V9.1.0 and it is working.... However, now I can get a readable "wallet.txt" at step 5, but in plaintext it says "Seed is encrypted" and although it shows Xpub (for a watching only wallet) all of the private keys are shown as:-

"encryptedPrivateKey=EncryptedData [initialisationVector=[104, -105, -15, 72, -51,.... etc".

Presumably there needs to be additional calculations done to extract the actual private keys?
member
Activity: 61
Merit: 10
AWorldWideWebOfReasons AWorldWideWebOfResults
newbie
Activity: 20
Merit: 14
Great, I got to decode using the method of extracting the seed from the wallet, thanks to this topic that helped me a lot too: https://bitcointalksearch.org/topic/has-anyone-here-been-able-to-decode-the-backup-of-bitcoin-wallet-schildbatch-1997031
That might work as well. However this method uses Bitcoinj which is also used by Bitcoin Wallet for Android.

Extracting privates from different client will always depend on its client itself. They have their own step on how to export private keys depending their formats, if not private keys its the recovery seed rather, and there's a tool for converting from recovery seed to private keys just simply as that.
I have edited the post so that you can also extract the seed.

Can you do any of this on Windows? isn't there a simpler way to do it?

Thanks!
I don't use Windows. However you can download VMware Workstation Player for free and install Debian as a virtual machine. It's very easy and will only take about 10 minutes.

Bit of a Newbie - at step 2 I get "unable to locate package openjfx". I am running Debian on Oracle Virtualbox. Any ideas please? Thanks.
Do you use an older version of Debian?
newbie
Activity: 3
Merit: 0
Bit of a Newbie - at step 2 I get "unable to locate package openjfx". I am running Debian on Oracle Virtualbox. Any ideas please? Thanks.
full member
Activity: 228
Merit: 106
Can you do any of this on Windows? isn't there a simpler way to do it?

Thanks!
copper member
Activity: 2142
Merit: 1305
Limited in number. Limitless in potential.
Extracting privates from different client will always depend on its client itself. They have their own step on how to export private keys depending their formats, if not private keys its the recovery seed rather, and there's a tool for converting from recovery seed to private keys just simply as that.
hero member
Activity: 1120
Merit: 540
Press F for Leo
 Great, I got to decode using the method of extracting the seed from the wallet, thanks to this topic that helped me a lot too: https://bitcointalksearch.org/topic/has-anyone-here-been-able-to-decode-the-backup-of-bitcoin-wallet-schildbatch-1997031
newbie
Activity: 20
Merit: 14
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:
Bitcoin Cash:
124KDK76iS51ccJ7dYYtGzDg8kEmhAL4aC

Bitcoin:
1JpNrUkbsw1sZVynSLeNMS6qQDcrmjxh3e

Ethereum:
0x18204402a9203F8ABe0CaD97C656049be1577a29

----

This how-to was written exclusively for Bitcointalk. I do not allow publication of this article on any other website. However, feel free to link to this topic if you find it helpful.
Pages:
Jump to: