Bitcoin Forum
September 23, 2018, 07:35:39 AM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Getting Private Keys out of mobile Bitcoin Wallet  (Read 267 times)
Atrax
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
November 27, 2017, 09:48:09 PM
 #1

Hi all,

I am running the Bitcoin Wallet (github.com/bitcoin-wallet/bitcoin-wallet) vrsion 5.40 on an Android mobile. I assume that it is made on the base of core (it sas that it was programmed by the "Bitcoin Wallet developers - but who am I to know...).

However, I try to get hold of my private keys of this wallet. Only question: How?

I can get an encrypted wallet - but this is not accepted by Bitcoin Core on my desktop. I can get an Extended Public Key, but no idea how I can get my private keys with it. If anybody could kick me a bit in the right direction as where to look here, I'd appreciate...

Thanks
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
TryNinja
Hero Member
*****
Offline Offline

Activity: 770
Merit: 760


ChipMixer's Badge of Honor


View Profile
November 27, 2017, 09:53:43 PM
 #2

I'm not sure if this would work but you could try using this tool[1] to export your seed and derivation path. Then, you would be able to import them in Electrum/Electron Cash.

Please share if this works.

[1] https://github.com/jleni/wallet-decrypt

achow101
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1650


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


View Profile WWW
November 29, 2017, 06:09:17 AM
 #3

I assume that it is made on the base of core (it sas that it was programmed by the "Bitcoin Wallet developers - but who am I to know...).
That assumption is wrong. Core does not have an Android app and never has had one. Your wallet is written by different developers and uses different technology. The wallet file is completely incompatible with Bitcoin Core.

However, I try to get hold of my private keys of this wallet. Only question: How?
Bitcoin Wallet for Android uses Bitcoinj. If you are comfortable using the command line and installing JDK and maven packages, then you can use the bitcoinj wallet-tool to extract the data from your wallet file. The wallet-tool is part of the Bitcoinj repository here: https://github.com/bitcoinj/bitcoinj

HCP
Hero Member
*****
Offline Offline

Activity: 728
Merit: 923

<insert witty quote here>


View Profile
November 29, 2017, 09:37:43 AM
 #4

Or... you can use decrypt_bitcoinj_seed (https://github.com/gurnec/decrypt_bitcoinj_seed)...

It will extract the 12 word seed from the Bitcoin Wallet backup file. You can then import that seed mnemonic into any BIP39 compatible wallet.

Atrax
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
December 01, 2017, 09:02:19 PM
 #5

I'm not sure if this would work but you could try using this tool[1] to export your seed and derivation path. Then, you would be able to import them in Electrum/Electron Cash.

Please share if this works.

[1] https://github.com/jleni/wallet-decrypt

Thanks for the hint - worked like a charme.
Atrax
Newbie
*
Offline Offline

Activity: 25
Merit: 0


View Profile
December 01, 2017, 09:16:45 PM
 #6

I assume that it is made on the base of core (it sas that it was programmed by the "Bitcoin Wallet developers - but who am I to know...).
That assumption is wrong. Core does not have an Android app and never has had one. Your wallet is written by different developers and uses different technology. The wallet file is completely incompatible with Bitcoin Core.

However, I try to get hold of my private keys of this wallet. Only question: How?
Bitcoin Wallet for Android uses Bitcoinj. If you are comfortable using the command line and installing JDK and maven packages, then you can use the bitcoinj wallet-tool to extract the data from your wallet file. The wallet-tool is part of the Bitcoinj repository here: https://github.com/bitcoinj/bitcoinj

Thanks.

Tried bitcoinj, but failed miserably Sad
After executing this code:

./wallet-tool dump --dump-privkeys --wallet=[path to my wallet] > wallet.txt

I got an empty file wallet.txt and the following error:

Code:
Failed to load wallet '/path/to/my/Wallet: Could not parse input stream to protobuf
org.bitcoinj.wallet.UnreadableWalletException: Could not parse input stream to protobuf
at org.bitcoinj.wallet.WalletProtobufSerializer.readWallet(WalletProtobufSerializer.java:440)
at org.bitcoinj.tools.WalletTool.main(WalletTool.java:333)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message tag had invalid wire type.
at com.google.protobuf.InvalidProtocolBufferException.invalidWireType(InvalidProtocolBufferException.java:99)
at com.google.protobuf.UnknownFieldSet$Builder.mergeFieldFrom(UnknownFieldSet.java:515)
at com.google.protobuf.GeneratedMessage.parseUnknownField(GeneratedMessage.java:205)
at org.bitcoinj.wallet.Protos$Wallet.<init>(Protos.java:14696)
at org.bitcoinj.wallet.Protos$Wallet.<init>(Protos.java:14653)
at org.bitcoinj.wallet.Protos$Wallet$1.parsePartialFrom(Protos.java:14859)
at org.bitcoinj.wallet.Protos$Wallet$1.parsePartialFrom(Protos.java:14854)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:89)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:95)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
at org.bitcoinj.wallet.Protos$Wallet.parseFrom(Protos.java:15710)
at org.bitcoinj.wallet.WalletProtobufSerializer.parseToProto(WalletProtobufSerializer.java:626)
at org.bitcoinj.wallet.WalletProtobufSerializer.readWallet(WalletProtobufSerializer.java:433)
... 1 more

Although I was able to extract the seed with wallet-decrypt, I'm wondering what went wrong here.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!