<p>I have the same issue. I used OpenSSL to decrypt the file, gave the correct password and got <code>org.bitcoin.production</code> followed by a load of protobuf-serialized gibberish.
I then processed the output using the tool mentioned here : <a href="https://github.com/lloeki/bitcoinj-wallet-dump" rel="nofollow noreferrer">https://github.com/lloeki/bitcoinj-wallet-dump</a>, which appears to have worked successfully.</p>

<p>It gave me 271 public keys that my wallet used, that looked like normal bitcoin public keys, and 271 private keys - that were all the same and 7 characters.</p>

<p>So in answer to your question this tool github.com/lloeki/bitcoinj-wallet-dump works - but I'm not sure how to make sense of the output.</p>

<p>The output looked something like this (all values have been changed):</p>

<pre>0 Publ: 1V5h7k
0 Priv: FYhAv34
1 Publ: 16wZac2mEc9jEtbdyGsUBeGR8YCVnJMLk4r2SXZ5k6v2HoCaoKY
1 Priv: FYhAv34
2 Publ: 16PBXd5r563xSA8m5bgRQgDGmn7wJBUoA4mfsfike2a66jzdjZU
2 Priv: FYhAv34
3 Publ: 16faRCW3znVawJis7DFnFNZTJ32F4ry5y7HEtnzPF9dKlXt6gVr
3 Priv: FYhAv34
4 Publ: 18CmUT8CTfbwLzD9PmhDlukA5s1KqJK7PTP9NxYYP5wMkeP36PJ
4 Priv: FYhAv34
.....
</pre>

<p>Anyone know how to make sense of the output? Is that format expected? I was expecting full public and private key pairs.. unless the 7 character constant is a special wallet key? I'm not familiar with wallet details.. </p>

CC BY-SA 3.0
2017-08-19T10:22:33.380Z
I checked a few, but I couldn't find any that made sense.. I will have a more thorough look. I haven't done 270 transactions though.
0lOl0
CC BY-SA 3.0
2017-08-22T04:56:40.347Z
I have a very similar output to 0lOl0.  Were you able to figure out why the private key is only 7 characters?  And how to import it into a Bitcoin Cash wallet?
tbenz9
CC BY-SA 3.0
2017-08-22T15:16:55.157Z
isn't there is one longer private key in the list ? That may be the one.(I just returned from vacation)
Ovidiu Buligan
CC BY-SA 3.0
2017-10-16T07:28:37.287Z
To find which public keys have balances: `for p in $(bin/bitcoinj-wallet-dump exported_dump | grep Publ | cut -c10- ); do echo $p; curl -s "https://blockchain.info/address/$p" | grep final_balance; done`
Synesso
CC BY-SA 3.0
2017-11-11T10:45:48.210Z
see answer from @Synesso . Worked for me . I didn't need to wait for the whole `./wallet-tool sync`  command . I interrupted it after 5 minutes. And still worked eventhoutgh list of transactions was 0 in the dump.
Ovidiu Buligan
CC BY-SA 3.0
2017-08-15T08:22:54.397Z
Please delete this answer, go to https://gist.github.com, paste this answer, choose "create public gist", copy the link of the gist and paste it as a comment.
MCCCS
CC BY-SA 3.0
2017-08-16T18:13:23.013Z
I would have commented, but I need 50 reputation.. so I can't comment on someone else's question - unless you mean comment on my deleted answer, if that is possible?
0lOl0
CC BY-SA 3.0
2017-08-17T15:38:41.273Z
Did you try verifying your addresses on https://blockchain.info/ to check if they are valid and have transactions which make sense to you?
KOld
CC BY-SA 3.0
2017-08-14T10:35:23.713Z
2017-08-14T10:35:23.713Z
0lOl0
<p>Knowing your private key you can transfer/sweep your Bitcoin Cash funds into a offline wallet like Coinomi and then transfer them to an exchange.</p>

<p>More on the process of sweeping your funds is at <a href="https://bitcoin.stackexchange.com/questions/57422/how-to-sweep-private-extended-key-from-mycellium-into-coinomi-for-bitcoin-cash-c/">How to sweep private extended key from mycellium into coinomi for bitcoin cash coins?</a></p>

CC BY-SA 3.0
2017-08-13T09:00:27.460Z
2017-08-13T09:00:27.460Z
KOld
<p>The Bitcoin Wallet project recently included <a href="https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md" rel="nofollow noreferrer">detailed instructions</a> on how to extract your key pairs for exactly this purpose. In the section <em>Recovering from protobuf wallet format</em>, skip to the paragraph beginning with</p>

<blockquote>
  <p>You can also get a list of the private keys...</p>
</blockquote>

<p>(Here is a <a href="https://github.com/bitcoin-wallet/bitcoin-wallet/blob/42be4a1f34ba041f0e50a5dd96a96cbc536763a7/wallet/README.recover.md" rel="nofollow noreferrer">historic version of that guide</a><a href="http://www.betterwritingskills.com/tip-w005.html" rel="nofollow noreferrer">*</a>, should it ever disappear)</p>

<p>I have now completed the process myself. Here's a summary. Note this works for backups made after 2014 (newer protobuf format). See the article above if your backup is older than this.</p>

<pre><code># pre-reqs
sudo apt install openjdk-8-jdk openjfx android-tools-adb openssl git maven

# use known version of bitcoinj - HEAD of branch release-0.14 at time of writing
git clone https://github.com/bitcoinj/bitcoinj.git 
(cd bitcoinj &amp;&amp; git reset --hard 0e30a3011c42cedfd83f2109d54dd192730dcc45) 

# decrypt the wallet backup (substitute for &lt;BACKUP&gt;)
openssl enc -d -aes-256-cbc -md md5 -a -in &lt;BACKUP&gt; &gt; /tmp/dec

# reset &amp; sync wallet (may take some time, but was necessary in my case)
(cd bitcoinj/tools &amp;&amp; \
   ./wallet-tool reset --wallet=/tmp/dec &amp;&amp; \
   ./wallet-tool sync --wallet=/tmp/dec --debuglog)

# dump keys You will need to add `--password=&lt;PIN&gt;` if your wallet is pin protected.
(cd bitcoinj/tools &amp;&amp; ./wallet-tool dump --wallet=/tmp/dec --dump-privkeys)

# delete your decrypted wallet
rm /tmp/dec
</code></pre>

CC BY-SA 3.0
2017-11-11T10:48:06.027Z
Thank you ! it worked. I didn't need to wait for the whole `./wallet-tool sync` , I interrupted it after 5 minutes , dumped the keys (`./wallet-tool dump`) and imported them in Electron BCH.
Ovidiu Buligan
CC BY-SA 3.0
2017-11-11T10:56:40.540Z
For getting the WIF's from text private key dump used regex: regex to delete all lines not containing WIF `^(?!.*WIF=).*$`  , regex to extract WIF values  `^.*WIF=(\w+).*$`
Ovidiu Buligan
CC BY-SA 3.0
2017-10-16T07:44:30.813Z
2017-12-22T20:49:17.503Z
2017-12-22T20:49:17.503Z
Synesso
<p>I have some bitcoin stored in the <a href="https://play.google.com/store/apps/details?id=de.schildbach.wallet&amp;hl=en" rel="noreferrer">bitcoin wallet android app</a></p>

<p>I want to transfer my inherited Bitcoin Cash (BCC) to an exchange.
The android app doesn't care about BCC.</p>

<p>I tried to decode a backup of my wallet to use the private key in <a href="https://www.bitcoinabc.org/" rel="noreferrer">Bitcoin ABC</a> desktop app. 
<code>
openssl enc -d -aes-256-cbc -a -in wallet_backup_file
</code>
But gibberish comes out.
<strong>Update</strong> looks like the decryption worked because I see the first text as <code>org.bitcoin.production</code>. The problem is that it is encoded in a protobuf format: <a href="https://bitcoin.stackexchange.com/questions/29518/problems-decrypting-my-bitcoin-wallet-on-android">Problems decrypting my bitcoin-wallet on android</a></p>

<p>Importing the same backup file on the bitcoin app works , and after some time I can see my funds.</p>

<p>How can I claim my bitcoin cash and transfer them to an exchange ?</p>

CC BY-SA 3.0
2017-08-22T03:55:18.577Z
Would you be able to make a mini tutorial for those of us not particularly technical?
tbenz9
CC BY-SA 3.0
2017-08-22T15:22:33.963Z
@tbenz9 I will try 
 https://coinomi.freshdesk.com/support/solutions/articles/29000013719-how-to-get-bitcoin-cash-from-many-wallet-software-services-with-coinomi (because syncing the whole blokchain is painfully slow)
Ovidiu Buligan
CC BY-SA 3.0
2017-08-11T17:12:55.600Z
I managed to get my private keys by using the suggested tool  https://github.com/lloeki/bitcoinj-wallet-dump after the openssl decryption. I am currently still waiting for the blockchain syncing (with -prune=30000 option). I will update with the full answer after it's done syncing
Ovidiu Buligan
<wallet><client><bitcoin-cash><android>
Claim Bitcoin cash from android bitcoin app
Ovidiu Buligan
# Claim Bitcoin cash from android bitcoin app

(Asked by: username_0 on 2017-08-11)

I have some bitcoin stored in the [bitcoin wallet android app](https://play.google.com/store/apps/details?id=de.schildbach.wallet&hl=en)

I want to transfer my inherited Bitcoin Cash (BCC) to an exchange.
The android app doesn't care about BCC.

I tried to decode a backup of my wallet to use the private key in [Bitcoin ABC](https://www.bitcoinabc.org/) desktop app.
`openssl enc -d -aes-256-cbc -a -in wallet_backup_file`
But gibberish comes out.
**Update** looks like the decryption worked because I see the first text as `org.bitcoin.production`. The problem is that it is encoded in a protobuf format: [Problems decrypting my bitcoin-wallet on android](https://bitcoin.stackexchange.com/questions/29518/problems-decrypting-my-bitcoin-wallet-on-android)

Importing the same backup file on the bitcoin app works , and after some time I can see my funds.

How can I claim my bitcoin cash and transfer them to an exchange ?

**Tags:** wallet, client, bitcoin-cash, android

> **Comments:**
> **username_0**: I managed to get my private keys by using the suggested tool  https://github.com/lloeki/bitcoinj-wallet-dump after the openssl decryption. I am currently still waiting for the blockchain syncing (with -prune=30000 option). I will update with the full answer after it's done syncing  
> **username_1**: Would you be able to make a mini tutorial for those of us not particularly technical?  
> **username_0**: @username_1 I will try   https://coinomi.freshdesk.com/support/solutions/articles/29000013719-how-to-get-bitcoin-cash-from-many-wallet-software-services-with-coinomi (because syncing the whole blokchain is painfully slow)  

---

## 3 answers

### Answer by username_3 on 2017-10-16. Score: 3 | Accepted answer

The Bitcoin Wallet project recently included [detailed instructions](https://github.com/bitcoin-wallet/bitcoin-wallet/blob/master/wallet/README.recover.md) on how to extract your key pairs for exactly this purpose. In the section *Recovering from protobuf wallet format*, skip to the paragraph beginning with

> You can also get a list of the private keys...

(Here is a [historic version of that guide](https://github.com/bitcoin-wallet/bitcoin-wallet/blob/42be4a1f34ba041f0e50a5dd96a96cbc536763a7/wallet/README.recover.md)[\*](http://www.betterwritingskills.com/tip-w005.html), should it ever disappear)

I have now completed the process myself. Here's a summary. Note this works for backups made after 2014 (newer protobuf format). See the article above if your backup is older than this.

```
# pre-reqs
sudo apt install openjdk-8-jdk openjfx android-tools-adb openssl git maven

# use known version of bitcoinj - HEAD of branch release-0.14 at time of writing
git clone https://github.com/bitcoinj/bitcoinj.git 
(cd bitcoinj && git reset --hard 0e30a3011c42cedfd83f2109d54dd192730dcc45) 

# decrypt the wallet backup (substitute for <BACKUP>)
openssl enc -d -aes-256-cbc -md md5 -a -in <BACKUP> > /tmp/dec

# reset & sync wallet (may take some time, but was necessary in my case)
(cd bitcoinj/tools && \
   ./wallet-tool reset --wallet=/tmp/dec && \
   ./wallet-tool sync --wallet=/tmp/dec --debuglog)

# dump keys You will need to add `--password=<PIN>` if your wallet is pin protected.
(cd bitcoinj/tools && ./wallet-tool dump --wallet=/tmp/dec --dump-privkeys)

# delete your decrypted wallet
rm /tmp/dec

```

> **Comments:**
> **username_0**: Thank you ! it worked. I didn't need to wait for the whole `./wallet-tool sync` , I interrupted it after 5 minutes , dumped the keys (`./wallet-tool dump`) and imported them in Electron BCH.  
> **username_0**: For getting the WIF's from text private key dump used regex: regex to delete all lines not containing WIF `^(?!.*WIF=).*$`  , regex to extract WIF values  `^.*WIF=(\w+).*$`  

---

### Answer by username_2 on 2017-08-14. Score: 2

I have the same issue. I used OpenSSL to decrypt the file, gave the correct password and got `org.bitcoin.production` followed by a load of protobuf-serialized gibberish.
I then processed the output using the tool mentioned here : <https://github.com/lloeki/bitcoinj-wallet-dump>, which appears to have worked successfully.

It gave me 271 public keys that my wallet used, that looked like normal bitcoin public keys, and 271 private keys - that were all the same and 7 characters.

So in answer to your question this tool github.com/lloeki/bitcoinj-wallet-dump works - but I'm not sure how to make sense of the output.

The output looked something like this (all values have been changed):

```
0 Publ: 1V5h7k
0 Priv: FYhAv34
1 Publ: 16wZac2mEc9jEtbdyGsUBeGR8YCVnJMLk4r2SXZ5k6v2HoCaoKY
1 Priv: FYhAv34
2 Publ: 16PBXd5r563xSA8m5bgRQgDGmn7wJBUoA4mfsfike2a66jzdjZU
2 Priv: FYhAv34
3 Publ: 16faRCW3znVawJis7DFnFNZTJ32F4ry5y7HEtnzPF9dKlXt6gVr
3 Priv: FYhAv34
4 Publ: 18CmUT8CTfbwLzD9PmhDlukA5s1KqJK7PTP9NxYYP5wMkeP36PJ
4 Priv: FYhAv34
.....

```

Anyone know how to make sense of the output? Is that format expected? I was expecting full public and private key pairs.. unless the 7 character constant is a special wallet key? I'm not familiar with wallet details..

> **Comments:**
> **username_4**: Please delete this answer, go to https://gist.github.com, paste this answer, choose "create public gist", copy the link of the gist and paste it as a comment.  
> **username_2**: I would have commented, but I need 50 reputation.. so I can't comment on someone else's question - unless you mean comment on my deleted answer, if that is possible?  
> **username_5**: Did you try verifying your addresses on https://blockchain.info/ to check if they are valid and have transactions which make sense to you?  
> **username_2**: I checked a few, but I couldn't find any that made sense.. I will have a more thorough look. I haven't done 270 transactions though.  
> **username_1**: I have a very similar output to username_2.  Were you able to figure out why the private key is only 7 characters?  And how to import it into a Bitcoin Cash wallet?  
> **username_0**: isn't there is one longer private key in the list ? That may be the one.(I just returned from vacation)  
> **username_3**: To find which public keys have balances: `for p in $(bin/bitcoinj-wallet-dump exported_dump | grep Publ | cut -c10- ); do echo $p; curl -s "https://blockchain.info/address/$p" | grep final_balance; done`  
> **username_0**: see answer from @username_3 . Worked for me . I didn't need to wait for the whole `./wallet-tool sync`  command . I interrupted it after 5 minutes. And still worked eventhoutgh list of transactions was 0 in the dump.  

---

### Answer by username_5 on 2017-08-13. Score: 1

Knowing your private key you can transfer/sweep your Bitcoin Cash funds into a offline wallet like Coinomi and then transfer them to an exchange.

More on the process of sweeping your funds is at [How to sweep private extended key from mycellium into coinomi for bitcoin cash coins?](https://bitcoin.stackexchange.com/questions/57422/how-to-sweep-private-extended-key-from-mycellium-into-coinomi-for-bitcoin-cash-c/)


---

