Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Kamiil on November 11, 2021, 08:06:11 AM



Title: Wallet recovery
Post by: Kamiil on November 11, 2021, 08:06:11 AM
Hi.
Let me ask you a question.
I set up my wallet in 2014, I think it was Bitcoin Wallet software from Google Play.
I bought a 0.05 BTC.
I made a backup (bitcoin-wallet-backup-2014-08-18)
The address is 1MV2No1t2VAyoKhXAKNzGFyZmcXiNfjdB3.

Unfortunately, when I restore this backup in the new version of Bitcoin Wallet software, I don't see anything there.

Is there any way to get back to my bitcoins?

The file "bitcoin-wallet-backup-2014-08-18" contains a number of characters:

1MV2No1t2VAyoKiXAKNzGFyZmcXiNfjdB3
149cen8AKLfWrfhpWS5cHnBFZLkfXSDZoK
13bCDmpKyccq8fx8ZTnsDSBrjs2MLcCQ98


(I intentionally changed a few characters so that it would not be misused)

Thank you very much for any advice
Kamil


Title: Re: Wallet recovery
Post by: PawGo on November 11, 2021, 08:27:52 AM
I am not an expert in Bitcoin Wallet (for android), but it is possible that something has changed during 7 years, it would be necessary to check release notes.
Maybe they by default work now on (Native)Segwit, not on old 1xxxx format? No idea.
Did you protect wallet with PIN?

Anyway, they say you may manually restore private keys from backup file (scroll to the bottom):
https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md
You may try to use their tool (preferably being offline).

As you receive WIF, you may probably easily import it to any other client, mobile or desktop.


Title: Re: Wallet recovery
Post by: Kamiil on November 11, 2021, 08:33:07 AM
Thank you.
Yes, I secured my wallet with a password. I know the password.


Title: Re: Wallet recovery
Post by: PawGo on November 11, 2021, 08:35:52 AM
I think the best would be to extract private key and use other client - anyway you will need to do it if you want to get your altcoins (check https://findmycoins.ninja/ for your address)


Title: Re: Wallet recovery
Post by: o_e_l_e_o on November 11, 2021, 10:11:56 AM
Unfortunately, when I restore this backup in the new version of Bitcoin Wallet software, I don't see anything there.
What happens when you restore the wallet? When you say "you don't see anything", do you mean the app can't find the wallet file to restore it, it finds it but won't restore at all, or it does restore but shows you an empty wallet? If it doesn't restore at all, does it give you an error message? If it does restore, do the addresses in the wallet match the addresses you have above? Do they begin with "1" or do they begin with something else?

If you are going to go down the route of dumping your raw private keys, then you should preferably be doing this on an offline computer for security reasons.


Title: Re: Wallet recovery
Post by: LoyceV on November 11, 2021, 10:57:58 AM
I made a backup (bitcoin-wallet-backup-2014-08-18)
From my Recover Bitcoin topic (https://bitcointalk.org/index.php?topic=4959742.0) topic:
Determine wallets based on filenames (note: these are the default filenames, you could have renamed yours)
  • bitcoin-wallet-backup-YYYY-MM-DD. Example: bitcoin-wallet-backup-2015-12-31
    Use Bitcoin Wallet on Android (https://play.google.com/store/apps/details?id=de.schildbach.wallet) or do a manual recovery (https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md).
I assume you've tried the first option, that leaves the second option.

I am not an expert in Bitcoin Wallet (for android), but it is possible that something has changed during 7 years, it would be necessary to check release notes.
Maybe they by default work now on (Native)Segwit, not on old 1xxxx format?
I just installed Bitcoin Wallet on Android myself, and opened a backup from early 2015. Weirdly enough it instantly crashes, but after restarting it started syncing my backup (with legacy addresses). It's currently still syncing my old transactions (80 months to go), but instantly showed several old transactions, so it looks like it's still working.
Syncing this wallet takes a very long time. To ask the obvious: did you wait long enough?
Update: After 3.5 hours, I still have 73 out of 80 months to go. It looks like it's going to take more than a day to fully sync.

altcoins (check https://findmycoins.ninja/ for your address)
They're called Forkcoins ;) Note for Kamiil: don't even think about this before moving your Bitcoin out of that address. Otherwise you risk losing it to a compromised wallet.


Title: Re: Wallet recovery
Post by: DaveF on November 11, 2021, 06:58:19 PM
I am not an expert in Bitcoin Wallet (for android), but it is possible that something has changed during 7 years, it would be necessary to check release notes.
Maybe they by default work now on (Native)Segwit, not on old 1xxxx format?
I just installed Bitcoin Wallet on Android myself, and opened a backup from early 2015. Weirdly enough it instantly crashes, but after restarting it started syncing my backup (with legacy addresses). It's currently still syncing my old transactions (80 months to go), but instantly showed several old transactions, so it looks like it's still working.
Syncing this wallet takes a very long time. To ask the obvious: did you wait long enough?
Update: After 3.5 hours, I still have 73 out of 80 months to go. It looks like it's going to take more than a day to fully sync.

Much like core on a PC, there are a lot of variables as to the speed of sync.
Older phone / tablet with 2GB ram? Or new flagship?
But unless something else is going on it seems like way to long a time.
I have not used the wallet in years but I can probably dig up an old backup and check when I get home to see how long it takes.

-Dave


Title: Re: Wallet recovery
Post by: LoyceV on November 11, 2021, 07:31:18 PM
Older phone / tablet with 2GB ram?
Even less :o

Quote
But unless something else is going on it seems like way to long a time.
I'm not sure exactly what it's doing. Electrum or Mycelium would just instantly get the full data on my addresses from the server and it's done, this wallet seems to somehow check or download something in chronological order.


Title: Re: Wallet recovery
Post by: Kamiil on November 15, 2021, 04:15:58 PM

What happens when you restore the wallet? When you say "you don't see anything", do you mean the app can't find the wallet file to restore it, it finds it but won't restore at all, or it does restore but shows you an empty wallet? If it doesn't restore at all, does it give you an error message? If it does restore, do the addresses in the wallet match the addresses you have above? Do they begin with "1" or do they begin with something else?

If you are going to go down the route of dumping your raw private keys, then you should preferably be doing this on an offline computer for security reasons.


Now I've renewed my wallet. I waited a long time for 60 months to load.
Now I see mBTC 0.00 - so the wallet is empty.
No error message.

The wallet address is different and there is a comment that this address will change after each transaction for security reasons.

In the first post I wrote incorrectly what my backup file "bitcoin-wallet-backup-2014-08-18" contains

It correctly contains the following:
U2FsdGVkX1809I / daCCv4Qor7gyUZNvp00Z3Z5TMpJKSRpvDVs1wxikwES5UiKeU0Z4R ....



and many other characters


Title: Re: Wallet recovery
Post by: Kamiil on November 15, 2021, 04:22:02 PM
I am not an expert in Bitcoin Wallet (for android), but it is possible that something has changed during 7 years, it would be necessary to check release notes.
Maybe they by default work now on (Native)Segwit, not on old 1xxxx format? No idea.
Did you protect wallet with PIN?

Anyway, they say you may manually restore private keys from backup file (scroll to the bottom):
https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md
You may try to use their tool (preferably being offline).

As you receive WIF, you may probably easily import it to any other client, mobile or desktop.


Thank you, I tried it according to the instructions, I got to the DECRYPTING paragraph.
I have Windows, I have installed Ubuntu, but I do not know how to enter the path to the file in the command line :-(


Title: Re: Wallet recovery
Post by: o_e_l_e_o on November 15, 2021, 05:02:59 PM
The wallet address is different and there is a comment that this address will change after each transaction for security reasons.
Does the new address in the restored wallet being with "1", or with something else ("3" or "bc1")?

It correctly contains the following:
U2FsdGVkX1809I / daCCv4Qor7gyUZNvp00Z3Z5TMpJKSRpvDVs1wxikwES5UiKeU0Z4R
That is OpenSSL encrypted Base64 data. The initial string U2FsdGVkX1 decodes to "Salted_". This is normal for a backup from Schildbach's Bitcoin Wallet.

When you open the wallet file with your Bitcoin Wallet app, are you prompted for your password? Do you get an option to choose an address type or derivation path?

I have installed Ubuntu, but I do not know how to enter the path to the file in the command line :-(
/path/to/wallet/bitcoin-wallet-backup-2014-08-18


Title: Re: Wallet recovery
Post by: BitMaxz on November 15, 2021, 05:15:00 PM
Thank you, I tried it according to the instructions, I got to the DECRYPTING paragraph.
I have Windows, I have installed Ubuntu, but I do not know how to enter the path to the file in the command line :-(

What step you are now following? Is that the "RECOVERING FROM BASE58 KEY FORMAT" or "RECOVERING FROM PROTOBUF WALLET FORMAT" or are you still decrypting the wallet?

Anyway I found an old guide and maybe it can help you [HOW-TO] Export seed and private keys from your Bitcoin Wallet for Android (https://bitcointalk.org/index.php?topic=2061691.0)


Title: Re: Wallet recovery
Post by: Kamiil on November 16, 2021, 05:04:10 PM
Does the new address in the restored wallet being with "1", or with something else ("3" or "bc1")?

The new address is "bc1qve5gf6juven........"

That is OpenSSL encrypted Base64 data. The initial string U2FsdGVkX1 decodes to "Salted_". This is normal for a backup from Schildbach's Bitcoin Wallet.

When you open the wallet file with your Bitcoin Wallet app, are you prompted for your password? Do you get an option to choose an address type or derivation path?

Yes, I am prompted for a password. I know the password. Nothing more to choose from.

/path/to/wallet/bitcoin-wallet-backup-2014-08-18

But where should I copy the file to disk if I have Windows with Ubuntu installed?
By the way - thank you for your willingness!






Title: Re: Wallet recovery
Post by: Kamiil on November 16, 2021, 05:10:17 PM

What step you are now following? Is that the "RECOVERING FROM BASE58 KEY FORMAT" or "RECOVERING FROM PROTOBUF WALLET FORMAT" or are you still decrypting the wallet?

Still decrypting the wallet. I don't know where to upload the backup file. I have Windows (C: \ ..) and installed Ubuntu on Windows. I'm sorry, I'm an amateur in Linux.


Anyway I found an old guide and maybe it can help you [HOW-TO] Export seed and private keys from your Bitcoin Wallet for Android (https://bitcointalk.org/index.php?topic=2061691.0)


Thank you, I'll look into it


Title: Re: Wallet recovery
Post by: LoyceV on November 16, 2021, 05:16:16 PM
Now I've renewed my wallet. I waited a long time for 60 months to load.
Now I see mBTC 0.00 - so the wallet is empty.
No error message.
For what it's worth: my old transactions showed up when I restored my backup. If there are no transactions: any chance you have the wrong backup?


Title: Re: Wallet recovery
Post by: o_e_l_e_o on November 16, 2021, 05:56:47 PM
The new address is "bc1qve5gf6juven........"
This is a segwit address. The address you had before, beginning with "1", is a legacy address. This is why your wallet cannot see your coins. In your wallet, try going to Options (three small dots at the top right) and click on "Request to legacy address". Then hit the share button and look at the address which pops up. Does this match any of your old addresses?

But where should I copy the file to disk if I have Windows with Ubuntu installed?
How have you installed Ubuntu? In a virtual machine? You can copy it anywhere your Ubuntu install can see it. I would just stick it in /home/ for ease.


Title: Re: Wallet recovery
Post by: Kamiil on November 17, 2021, 08:20:29 PM
In your wallet, try going to Options (three small dots at the top right) and click on "Request to legacy address". Then hit the share button and look at the address which pops up. Does this match any of your old addresses?

When I do this twice in a row, the old address is always different.

First:
113EEBvAoP16AZtmsL6UjUdtvCxY8xdNYM
Second time:
18QRDZbjEbmPojspNqvEMsBpgmMxmwjwL6
Third:
18x23KHaTwmuA72VSVoBWkSQd6GAcGoFmg


Title: Re: Wallet recovery
Post by: o_e_l_e_o on November 17, 2021, 08:29:28 PM
When I do this twice in a row, the old address is always different.
Yes, that's normal. Every time you request coins to an address, it considers that address "used" and will generate the next address in the wallet when you request another one. If the first handful don't match any of your old addresses, then you can stop going down this path.

I think your best option at this point is going to be to decrypt the wallet file as discussed above and dump the raw private keys. How are you getting on with using Ubuntu?


Title: Re: Wallet recovery
Post by: Kamiil on November 17, 2021, 08:31:51 PM
If there are no transactions: any chance you have the wrong backup?



I hope I have the right backup.
If I make a backup before buying bitcoins, do I always need to make a new backup?


Title: Re: Wallet recovery
Post by: Kamiil on November 17, 2021, 08:38:04 PM
How are you getting on with using Ubuntu?

I followed the instructions - I installed Ubuntu from the Windows Store.
But I still don't know where to copy the backup file to my computer :-(



kamiil@vitasekk10:~$ openssl enc -d -aes-256-cbc -md md5 -a -in bitcoin-wallet-backup-2014-08-18 > bitcoin-wallet-decrypted-backup
Can't open bitcoin-wallet-backup-2014-08-18 for reading, No such file or directory
139925001474688:error:02001002:system library:fopen:No such file or directory:../crypto/bio/bss_file.c:69:fopen('bitcoin-wallet-backup-2014-08-18','r')
139925001474688:error:2006D080:BIO routines:BIO_new_file:no such file:../crypto/bio/bss_file.c:76:


Title: Re: Wallet recovery
Post by: Kamiil on November 17, 2021, 08:50:52 PM

But I still don't know where to copy the backup file to my computer :-(



So change - I succeeded.
I am now in this chapter:

RECOVERING FROM PROTOBUF WALLET FORMAT

But something is wrong:

kamiil@vitasekk10:~$ cd bitcoinj/tools
kamiil@vitasekk10:~/bitcoinj/tools$ ./wallet-tool
./wallet-tool: line 19: gradle: command not found
kamiil@vitasekk10:~/bitcoinj/tools$ ./wallet-tool reset --wallet=/tmp/bitcoin-wallet-decrypted-backup
./wallet-tool: line 19: gradle: command not found
kamiil@vitasekk10:~/bitcoinj/tools$


Title: Re: Wallet recovery
Post by: PawGo on November 17, 2021, 08:53:00 PM
Command 'pwd' prints the name of folder in which you are (path)
But HOME in Ubuntu could be different than your Windows HOME.
I think it is well described here: https://askubuntu.com/questions/759880/where-is-the-ubuntu-file-system-root-directory-in-windows-subsystem-for-linux-an
and here: https://www.howtogeek.com/261383/how-to-access-your-ubuntu-bash-files-in-windows-and-your-windows-system-drive-in-bash/



./wallet-tool: line 19: gradle: command not found

https://linuxize.com/post/how-to-install-gradle-on-ubuntu-20-04/


If you do not want to play with Ubuntu, there is another tutorial:
https://www.youtube.com/watch?v=NGgY0MFtLFU
but still expects some extraordinary (for normal user) actions.


Title: Re: Wallet recovery
Post by: Kamiil on November 17, 2021, 08:57:24 PM
Thanks for the links, I'm going to study it.


Title: Re: Wallet recovery
Post by: HCP on November 18, 2021, 01:57:37 AM
Honestly, I think you're wasting your time mucking about with Linux/Ubuntu and attempting to decrypt the file manually.

If you were able to successfully import the backup file into "Bitcoin Wallet for Android" and use your password and it didn't give you any errors, then the app will have already decrypted the file correctly and loaded in all the private keys from the file.

So, if, after importing the backup file, the wallet was showing as zero balance, then the wallet is likely empty. If it also showed zero transaction history, then chances are that you have the "wrong" backup file... and the backup file you have is for a wallet that never contained any coins :-\


Title: Re: Wallet recovery
Post by: o_e_l_e_o on November 18, 2021, 08:21:19 AM
So, if, after importing the backup file, the wallet was showing as zero balance, then the wallet is likely empty.
Maybe. However, OP's original addresses were all legacy (since they were from 2014). At some point between then and now, the Schildbach wallet switched to only recovering segwit addresses, which is what he now generates when he recovers his wallet file. Requesting to legacy addresses as I suggested above might not reveal the correct addresses, as Schildbach wallet does not follow BIP44 conventions. The only way to know for sure is to dump his private keys and import them in to a new wallet.


Title: Re: Wallet recovery
Post by: HCP on November 18, 2021, 10:47:35 PM
At some point between then and now, the Schildbach wallet switched to only recovering segwit addresses
Wait what??!? It only recovers SegWit addresses and does not also check the legacy addresses generated from the backed up keys for transaction history etc??!? :o :o :o

That is ridiculous!


Title: Re: Wallet recovery
Post by: LoyceV on November 19, 2021, 08:35:03 AM
At some point between then and now, the Schildbach wallet switched to only recovering segwit addresses
That's not what happened when I restored my old backup (https://bitcointalk.org/index.php?topic=5370301.msg58452648#msg58452648):  all legacy transactions from 2015 showed up just fine.


Title: Re: Wallet recovery
Post by: HCP on November 19, 2021, 11:33:09 AM
Well, in any case, if OP has managed to get as far as "decrypting" the wallet backup file using openssl... then they can very easily load their wallet/keys into a BIP39 compatible wallet that allows you to specify the derivation path (such as Electrum). If you simply open the "decrypted" file in a text editor, you should see "org.bitcoin.production" (as you say you are recovering from a PROTOBUF wallet)... and then shortly after that, you should see 12 plain english words... this is your 12 word seed.

Here is an example of a decrypted wallet backup:
https://talkimg.com/images/2023/11/14/zz6fl.png


If you load that seed into Electrum... ("New/Restore -> Standard Wallet -> I already have a Seed -> Enter seed, click options -> select the BIP39 seed option) and then on the derivation path screen select "legacy" and then set the derivation path to: m/0' [1] then it will load up all your old legacy addresses.
https://talkimg.com/images/2023/11/14/zzPK1.png

https://talkimg.com/images/2023/11/14/zzTHm.png
 
https://talkimg.com/images/2023/11/14/zztIW.png

https://talkimg.com/images/2023/11/14/zzz7J.png

https://talkimg.com/images/2023/11/14/zzNaC.png

https://talkimg.com/images/2023/11/14/zzETb.png
[1] NOTE: this derivation path is slightly different to the one used by ian coleman's tool below because of the way Electrum works

https://talkimg.com/images/2023/11/14/zzILv.png





Alternatively, you can put the seed into iancoleman's BIP39 mnemonic code convertor... click the "BIP32" tab, and then select the "MultiBit HD" option from the "Client" dropdown box (This will automatically set the derivation path to m/0'/0 for you). Then it will show all your legacy addresses/private keys at the bottom:
https://talkimg.com/images/2023/11/14/zzsqH.png

All your keys displayed below:
https://talkimg.com/images/2023/11/14/zzkGg.png






Title: Re: Wallet recovery
Post by: o_e_l_e_o on November 20, 2021, 06:56:57 AM
That's not what happened when I restored my old backup (https://bitcointalk.org/index.php?topic=5370301.msg58452648#msg58452648):  all legacy transactions from 2015 showed up just fine.
That's strange. I recovered an old back up and was only given segwit addresses. The only way for me to view legacy addresses was to go in to options and select "Request to legacy address" repeatedly, as I suggested OP tried above. My old back up did have old transactions, but it was long emptied - maybe that's the issue? Did your back up still have coins on it?


Title: Re: Wallet recovery
Post by: LoyceV on November 20, 2021, 08:08:21 AM
That's strange. I recovered an old back up and was only given segwit addresses. The only way for me to view legacy addresses was to go in to options and select "Request to legacy address" repeatedly, as I suggested OP tried above. My old back up did have old transactions, but it was long emptied - maybe that's the issue? Did your back up still have coins on it?
My old wallet was empty since 2015. I checked if I may have had the Wallet app installed on that phone before (and Android may have left some settings), but I bought the (old) phone I used in 2017, years after I used that wallet.

Strange indeed. Well, yours is strange :P Mine works as expected ;)