Bitcoin Forum
April 26, 2024, 06:54:25 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Getting Private Keys out of mobile Bitcoin Wallet  (Read 391 times)
Atrax (OP)
Member
**
Offline Offline

Activity: 133
Merit: 33


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
1714114465
Hero Member
*
Offline Offline

Posts: 1714114465

View Profile Personal Message (Offline)

Ignore
1714114465
Reply with quote  #2

1714114465
Report to moderator
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714114465
Hero Member
*
Offline Offline

Posts: 1714114465

View Profile Personal Message (Offline)

Ignore
1714114465
Reply with quote  #2

1714114465
Report to moderator
1714114465
Hero Member
*
Offline Offline

Posts: 1714114465

View Profile Personal Message (Offline)

Ignore
1714114465
Reply with quote  #2

1714114465
Report to moderator
TryNinja
Legendary
*
Offline Offline

Activity: 2814
Merit: 6971



View Profile WWW
November 27, 2017, 09:53:43 PM
Last edit: November 27, 2017, 10:12:26 PM by TryNinja
 #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

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6535


Just writing some code


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
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<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.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Atrax (OP)
Member
**
Offline Offline

Activity: 133
Merit: 33


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 (OP)
Member
**
Offline Offline

Activity: 133
Merit: 33


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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!