Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Restore wallet can't select file darkcoin_wallet_backup_2014-xx-xx Not working

Discussion in 'Android Dash Wallet Support' started by Joe Baker, May 10, 2018.

  1. Joe Baker

    Joe Baker New Member

    Joined:
    May 10, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    So I'm trying to restore a very old wallet from the darkcoin days. It's in the format darkcoin_wallet_backup_2014-xx-xx.

    Instructions for restoring this type of file point to using the android Dash wallet. But it doesn't work sadly.
    The restore wallet screen comes up and asks for a pin. It also says to put the file into /Downloads and there is a dropdown requester for specifying the file to restore, however it does not work to select a file. No dropdown activates. I've tried this on an Android 7 and Android 6.0.1 devices with the same behavior.

    Is the pin requested for the current wallet or for the wallet being restored?

    I'm very, very interested in getting this to work obviously!
     
  2. Joe Baker

    Joe Baker New Member

    Joined:
    May 10, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Heres a screenshot.
     

    Attached Files:

  3. Joe Baker

    Joe Baker New Member

    Joined:
    May 10, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    So the backup was created back in 2014, November. Not likely by an android wallet, probably by desktop software.
     
  4. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    479
    Likes Received:
    252
    Trophy Points:
    133
  5. Joe Baker

    Joe Baker New Member

    Joined:
    May 10, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I'm looking at building the old darkcoin-qt wallet from back then to see exactly how I ended up having this odd backup file and whether there was some restoration mechanism that would name files this way.
     
  6. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    479
    Likes Received:
    252
    Trophy Points:
    133
  7. Joe Baker

    Joe Baker New Member

    Joined:
    May 10, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
  8. Joe Baker

    Joe Baker New Member

    Joined:
    May 10, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    So is the problem with the Dash Android client going to be fixed so one can select a file to import from the /Download directory?

    I'm wondering what client I used back on 11/11/2014 to make the backup. Is there a way I can test the file's format somehow to determine whether it's a wallet.dat file or a Bitcoin4Java sort of backup?

    Don't know if the file is password protected.

    I do have an old binary of darkcoin but it does not like this file being used as a wallet.dat file. It complains about the file.

    Are there any other clients from that time period?

    Can I send you the file over keybase.io to look at? This would mean so much to me right now and would enable me to move further ahead on my RemedyCoin.com project.
     
  9. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    479
    Likes Received:
    252
    Trophy Points:
    133
    I'm not aware of a procedure to determine which app created a wallet.dat file - it could well also be from Bitcoin, Litecoin or any other coin that uses the BerkelyDB file format to store key/value pairs. I'm happy to take a look with a hex editor and see what I can do: https://keybase.io/strophy
     
  10. HashEngineering

    HashEngineering Active Member

    Joined:
    May 3, 2014
    Messages:
    319
    Likes Received:
    374
    Trophy Points:
    133
    The android app (Darkcoin Wallet) was created on May 31, 2014 and `darkcoin_wallet_backup_2014-xx-xx` is definitely a file that this app would have created.

    There might be a strange bug that prevents loading of this file using Safety / Restore Wallet in Dash Wallet, though on my devices the dropdown contains many backup files from various other apps including Bitcoin Wallet, Bitcoin Cash Wallet, Darkcoin, Dash, and a bunch of other ones that I developed.

    An alternative would be to go to the file explorer (like ES File Explorer) on your android phone, go to the Download folder and then Open the file and choose the Dash Wallet app. This will start the app and load the backup file to restore it. You will be asked for the password that was used to make the backup. Then the app will ask you to set the PIN if the restored wallet doesn't have one yet.
     
  11. HashEngineering

    HashEngineering Active Member

    Joined:
    May 3, 2014
    Messages:
    319
    Likes Received:
    374
    Trophy Points:
    133
    What is strange though is that before March 2015, the Darkcoin Wallet app was not HD and the backup was called "darkcoin-key-backup-2014-xx-xxxx"

    After March 2015, the app became HD (meaning all keys were derived from a seed) and then the backup files were called "darkcoin-wallet-backup-2015-xx-xxxx"

    In any case the backup file is encrypted and therefore a Hex Editor probably won't tell us anything.
     
  12. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    479
    Likes Received:
    252
    Trophy Points:
    133
    Hi @HashEngineering

    I took a look at the file provided to me on Keybase by @Joe Baker and was able to open it in the Android app using the ES File Explorer process you described above, but we could not correctly guess the password. I noticed the app will attempt to open and decrypt any file sent to it in this manner, even a JPG image. I had a look at the wallet file in a hex editor and compared it to the file backups generated by both the current version (5.18.1) and old version that I suspect was used at the time (1.0.0). I made the following observations, regardless of what password was used to encrypt the file (note capitalisation and underscore vs. hyphen):
    • 5.18.1 saves files following the name convention "Dash-wallet-backup-yyyy-mm-dd" and beginning with magic number "55 32 46 73" or "U2Fs"
    • 1.0.0 saves files following the name convention "Darkcoin-wallet-keys-yyyy-mm-dd" and beginning with magic number "55 32 46 73" or "U2Fs"
    • User's wallet file is named "darkcoin_wallet_backup_2014-11-11" and begins with magic number "4a 4d 5a 2c" or "JMZ,"
    Any ideas what has happened here? Is it still likely that this was a backup from the Android wallet?
     
  13. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    479
    Likes Received:
    252
    Trophy Points:
    133
    Another difference is that entering the incorrect password for a wallet file known to have been generated by the app usually generates the error "Could not decrypt bytes", but in this case opening the old wallet shows "invalid base64 encoding"
     
  14. HashEngineering

    HashEngineering Active Member

    Joined:
    May 3, 2014
    Messages:
    319
    Likes Received:
    374
    Trophy Points:
    133
    The backup file is in base64 text format, which means that only certain characters are valid (64 of them). If the beginning of the file begins with this: "JMZ," then the file is invalid, because a comma ',' is not part of the base64 format.

    Given that and the file having the date 2014-11-11 it must not have been generated by Dash Wallet unless the file was somehow corrupted.
     
  15. Joe Baker

    Joe Baker New Member

    Joined:
    May 10, 2018
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    OK, I'll run a diff against the best original copy vs the one I sent in. Maybe having tried to open a copy into desktop wallet programs munged them?
     
  16. HashEngineering

    HashEngineering Active Member

    Joined:
    May 3, 2014
    Messages:
    319
    Likes Received:
    374
    Trophy Points:
    133
    If you open a valid backup file in a text editor you will see something like this:

    Each line is 78 characters wide.


    U2FsdGVkX19S4anbqu44VgksbX/wKoj3aJkODgRMl9pp/+o8c066vIuR3MWB8eBLZ222fHHHJpGr
    NEsiYpJ9b1bXeKgdgyBfQvsROdM0dM7gdm46J71Q0bnsG6GI7i00TqtoFfDzPQTk3ebDHMU6isDg
    knAw2FUYu1yEWpC+qKXA33564zCSxzU9g3JtqfGjM/KZH6Yt+ScK2CUypiZyEDjEVlcb2g4sDj1+
     
    • Winner Winner x 1
  17. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    479
    Likes Received:
    252
    Trophy Points:
    133
    Thanks, that helps a lot. It's very obvious looking at the hex editor now that this is not valid base64, there are a lot of non-ANSI characters visible. We'll look into possible corruption or encryption that might have occurred after the wallet export.
     
  18. HashEngineering

    HashEngineering Active Member

    Joined:
    May 3, 2014
    Messages:
    319
    Likes Received:
    374
    Trophy Points:
    133
    If the file was decrypted it would contain a lot of non-ascii characters, but the beginning of the file would contain "org.darkcoin.production"
     
  19. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    479
    Likes Received:
    252
    Trophy Points:
    133
    Finally success on this file! We were able to find another non-corrupted file, which the hex editor identified as a darkcoin core wallet. I was able to load, upgrade, rescan, decrypt and ultimately send the Dash on the address in that file back to @Joe Baker

    Thanks again @HashEngineering for your support - you put us on the right track here :)
     
    • Winner Winner x 1

Share This Page