[GH-ISSUE #42] Keyfile is not a valid Java object #27

Closed
opened 2026-03-02 03:59:27 +03:00 by kerem · 8 comments
Owner

Originally created by @ghost on GitHub (Nov 23, 2022).
Original GitHub issue: https://github.com/ElDavoo/wa-crypt-tools/issues/42

Originally assigned to: @ElDavoo on GitHub.

Program returns the following error

[F] The keyfile is not a valid Java object: Invalid file magic: 0xefbb

I made a text file using gedit with the key inside and then renamed it to encrypted_backup.key. Is that not right?

Thank you

Originally created by @ghost on GitHub (Nov 23, 2022). Original GitHub issue: https://github.com/ElDavoo/wa-crypt-tools/issues/42 Originally assigned to: @ElDavoo on GitHub. Program returns the following error `[F] The keyfile is not a valid Java object: Invalid file magic: 0xefbb` I made a text file using gedit with the key inside and then renamed it to `encrypted_backup.key`. Is that not right? Thank you
kerem 2026-03-02 03:59:27 +03:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@ElDavoo commented on GitHub (Nov 23, 2022):

Hi,

I made a text file using gedit with the key inside and then renamed it to encrypted_backup.key. Is that not right?

That's not right. You have two ways:

  1. Use utils/hex_string_to_encrypted_backup_key.py to create an encrypted_backup.key file
  2. Use the key directly in the command line, example here.

Let me know!

<!-- gh-comment-id:1324942867 --> @ElDavoo commented on GitHub (Nov 23, 2022): Hi, > I made a text file using gedit with the key inside and then renamed it to `encrypted_backup.key`. Is that not right? That's not right. You have two ways: 1) Use [utils/hex_string_to_encrypted_backup_key.py](https://github.com/ElDavoo/WhatsApp-Crypt14-Crypt15-Decrypter/blob/main/utils/hex_string_to_encrypted_backup_key.py) to create an `encrypted_backup.key` file 2) Use the key directly in the command line, [example here.](https://github.com/ElDavoo/WhatsApp-Crypt14-Crypt15-Decrypter#crypt15) Let me know!
Author
Owner

@ElDavoo commented on GitHub (Nov 23, 2022):

If you're too lazy to do that and you're not using Windows, you can use a shell trick to read the file and use it as it was a parameter:
python ./decrypt14_15.py $(cat encrypted_backup.key) ./msgstore.db.crypt15 ./msgstore.db
or

python ./decrypt14_15.py `cat encrypted_backup.key` ./msgstore.db.crypt15 ./msgstore.db
<!-- gh-comment-id:1324948805 --> @ElDavoo commented on GitHub (Nov 23, 2022): If you're too lazy to do that and you're not using Windows, you can use a shell trick to read the file and use it as it was a parameter: `python ./decrypt14_15.py $(cat encrypted_backup.key) ./msgstore.db.crypt15 ./msgstore.db` or ``` python ./decrypt14_15.py `cat encrypted_backup.key` ./msgstore.db.crypt15 ./msgstore.db ```
Author
Owner

@ghost commented on GitHub (Nov 24, 2022):

Your second solution worked :) (I had to use --force though, do I report that somewhere?) and I am now able to access all my messages with DB Browser for SQLite. Thank you tons :)))

<!-- gh-comment-id:1326197232 --> @ghost commented on GitHub (Nov 24, 2022): Your second solution worked :) (I had to use `--force` though, do I report that somewhere?) and I am now able to access all my messages with DB Browser for SQLite. Thank you tons :)))
Author
Owner

@ElDavoo commented on GitHub (Nov 24, 2022):

Your second solution worked :) (I had to use --force though, do I report that somewhere?)

Yes. Can you send the full log?

<!-- gh-comment-id:1326316944 --> @ElDavoo commented on GitHub (Nov 24, 2022): > Your second solution worked :) (I had to use `--force` though, do I report that somewhere?) Yes. Can you send the full log?
Author
Owner

@ghost commented on GitHub (Nov 24, 2022):

How to do so?

<!-- gh-comment-id:1326323027 --> @ghost commented on GitHub (Nov 24, 2022): How to do so?
Author
Owner

@ElDavoo commented on GitHub (Nov 24, 2022):

select all the program output and the command line and copy-paste here

<!-- gh-comment-id:1326325918 --> @ElDavoo commented on GitHub (Nov 24, 2022): select all the program output and the command line and copy-paste here
Author
Owner

@ghost commented on GitHub (Nov 24, 2022):

It actually worked fine now without --force when doing a re-run, so it may have been one of the error-runs where I didn't have all of the packages and I misremembered. Sorry for the confusion!

<!-- gh-comment-id:1326389383 --> @ghost commented on GitHub (Nov 24, 2022): It actually worked fine now without `--force` when doing a re-run, so it may have been one of the error-runs where I didn't have all of the packages and I misremembered. Sorry for the confusion!
Author
Owner

@julienthevenoz commented on GitHub (Nov 11, 2024):

Hi !
I have the same problem as OP.
But for option 1 : the link you posted utils/hex_string_to_encrypted_backup_key.py seems to not exist anymore
For option 2 : the link you post sends to the readme of your repo, and I cannot find an example of providing the key directly in the command line.

Help ?

<!-- gh-comment-id:2468042196 --> @julienthevenoz commented on GitHub (Nov 11, 2024): Hi ! I have the same problem as OP. But for option 1 : the link you posted [utils/hex_string_to_encrypted_backup_key.py](https://github.com/ElDavoo/WhatsApp-Crypt14-Crypt15-Decrypter/blob/main/utils/hex_string_to_encrypted_backup_key.py) seems to not exist anymore For option 2 : the link you post sends to the readme of your repo, and I cannot find an example of providing the key directly in the command line. Help ?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/wa-crypt-tools#27
No description provided.