This project has moved and is read-only. For the latest updates, please go here.

KDBX cannot be recognized

Oct 4, 2014 at 11:02 AM
Hi Philipp,

I have the following systems:

LENOVO 3000 N200 (TY2EQGE) 0769
WinXP SP3 PROF
KeePass 2.27
Installed XSL stylesheets for XML KDBX
KeePassLibC (1.x file support) 1.27 (0x0174)

and

LG G3 Android V4.4.2

and have the following problems with KP2A:
  1. easy installation of KP2A v0.9.4
  2. KDBX and KEY file copied from laptop to G3 via USB
  3. multiply the path for KDBX changed until KP2A has recognized it
  4. error message: KEY file not found
  5. KP2A now had the same database as the laptop
  6. KP2A WORKED well (!!!), without KEY, but with keyboard of KP2A
  7. meantime, an update of the G3 while maintaining V4.4.2
  8. KDBX expanded on the laptop to new entries after some time
  9. KP2A uninstalled from G3, emptied cache, CCleaner cleanup
  10. KP2A reinstalled on the G3
  11. extended KDBX and KEY file copied from laptop to G3 via USB
  12. KDBX on the laptop was open while copying
  13. KDBX CANNOT be copied on the INTERNAL memory
  14. error message: Connection to device lost .....
  15. KDBX and KEY could be copied to EXTERNAL memory without problems
  16. with G3 moved on INTERNAL memory path storage / emulated
  17. KP2A started and password entered (setting ONLY PASSWORD)
  18. error message: An error occurred: The composite key is invalid ........!
  19. KP2A keyboard does not work
  20. because of presumption of corrupted KDBX, the app, KDBX and KEY reinstalled
  21. the error message "The composite key is invalid! ...." remains
  22. once more everything is un- and reinstalled
  23. now KDBX and KEY can directly be copied to the INTERNAL memory
  24. error message "The composite key is invalid! ...." remains
  25. once more everything is un- and reinstalled
  26. installation of KDBX and KEY in a separate folder "KeePass"
  27. error message "The composite key is invalid! ...." remains
Why the KDBX cannot be recognized after updating my database?

I hope you can help me and possibly thereby improve KP2A.
For questions, I am happy to help.

Best regards and nice weekend!

I hope my message isn´t to long, but i want to show you all my tries.
Oct 5, 2014 at 6:07 AM
Hi,
the German post is ok as well, but I'll answer in English so others can read this as well. (If you need translation, please let me know.)

If you browse for the local kbdx file on your phone, do you find it in the file explorer? What do you mean with "does not recognize" the file?

If you browse for the key file, you probably see the Android file selection view, right? Please select "Keepass2Android" from the left and locate the key file, that should work.
"The composite key is invalid! ...." indicates that you either entered the wrong master password or you didn't select the key file (or the path returned from the file browser was empty - which should be solved by the hint above).
Oct 5, 2014 at 11:53 AM
Hello Philipp, thank you for your quick response.

I use ES File Explorer and can see my local files “Datenbank Heinz.kdbx” and “Datenbank Heinz.key” in the path external…sdcard\ and internal…emulated\0\ as well, while KP2A is installed external. Both files (KDBX and KEY) work successfully on my laptop and are copied newly on the phone. When I start KP2A the error “Datei nicht gefunden” (file not found) appears. Last opened database is shown as “keepass.kdbx”, type of master-password is “password + key-file” and the field „key-file (optionally)” with the “screen icon” is grey. When I click on the “screen icon” I can select “Datenbank Heinz.key” but it didn´t appear in the key-field. I tried to change the path for storing with the button “new data-base” but without success.
When I change to “password only” for the “type of master-password” I have the same result but with error “The composite key is invalid! ....". And my last notice, the KP2A-keyboard is not shown.

Thank you for your help and kind regards to Karlsruhe.
Oct 5, 2014 at 3:29 PM
So do you start KP2A from ES File Explorer? Please start it directly from the app launcher, then select "Open database" and browse to the file with the integrated file browser. You might try to rename the database and/or key file to not include a space character. Did you select it as I described above (selecting "Keepass2ANdroid on the left")?

The keyboard is only shown if you enable and activate it. You don't need it for entering the master key.
Oct 6, 2014 at 8:31 AM
Hi Philipp,

i start KP2A from the icon on the homescreen and not via ES. According to your advice i deleted space in the file-name. No success!
I changed the names of "DatenbankHeinz.KDBX" and "DatenbankHeinz.KEY" to "keepass.kdbx" and "keepass.key", because this name appears in the path for "last opend DB" (/storage/emulated/0/keepass.kdbx; keepass.kdbx is a new empty file). No success!

What does it mean: "Did you select it as I described above (selecting "Keepass2ANdroid on the left")?"
I clicked on button "open DB", scrolled to "DatenbankHeinz.KDBX" and clicked on this file. Window opens for entering the password.


Good start with the new week!
Oct 8, 2014 at 9:06 PM
It´s me once again:

I´ ve noticed with ES File Explorer, that the KDBX- and the KEY-file are marked with "-rw", may be these are permissions? And the file-icons contains "?" (question marks).
Possibly this will help for the detection of the failure a little bit more. Can i try something to support you?

Have a nice evening!
Oct 10, 2014 at 7:49 PM
if you click open db, you are asked if you want to open a local file or with a third party app, right? Did you choose "local file"? Could you please create a test database without key file and test if that works?
Oct 11, 2014 at 11:16 AM
Edited Oct 11, 2014 at 11:49 AM
if you click open db, you are asked if you want to open a local file or with a third party app, right?
right
Did you choose "local file"?
right
Could you please create a test database without key file and test if that works?
test database without data and without key file works

the name of the test database is "keepass"
i did change it to "Keepass Heinz"
it works

i did copy my working db "Datenbank Heinz" again from laptop to phone
"The composite key is invalid! ...."
i did change the name to "keepass"
"The composite key is invalid! ...."

i will check more
Oct 12, 2014 at 11:17 AM
i did change the name of the file "Datenbank Heinz" to "heinz" on my laptop
i did change the name of the key file from "Datenbank Heinz" to "heinz" on my laptop
i did copy them to "external_SD" on my phone
i did open "heinz.kdbx" with kp2a under "only password"
message "The composite key is invalid! ...."
i did change to "password and key"
i did select the key file in it´s path with the "screen icon"
message "key file does not exist"
i did fill in "heinz" in the field "key file (optional)"
message "key file does not exist"
i did fill in "heinz.key" in the field "key file (optional)"
message "key file does not exist"
Oct 12, 2014 at 4:19 PM
with kp2ao (offline) i have exactely the same results
message "key file does not exist"
Oct 12, 2014 at 7:26 PM
you need to specify the full path, e.g. /mnt/sdcard/myfolder.heinz.key (case sensitive!)
Oct 12, 2014 at 8:17 PM
If you keep getting this error, you might try https://keepass2android.codeplex.com/releases/view/120663

It's a windows program (based on Keepass 2.25, but shows additional information about the loading process) and Keepass2Android with the same information. By comparing the two, it should be possible to see why the keys are different.

I'd avoid to post the logs here but you can send them to crocoapps@gmail.com if you need help to interpret them!
Oct 14, 2014 at 9:23 PM
Edited Oct 14, 2014 at 9:25 PM
First of all, thank you very much for your patience to help me!

I have compared the two results and there is a difference, i will send it to you.

I did disable Native key transform in "Security" and retried.
"The composite key is invalid! ...." and "key file does not exist"
Oct 16, 2014 at 8:36 PM
Edited Oct 17, 2014 at 5:29 AM
I did try something different:

kp2a is installed internal
external_sd\new database.kdbx
external_sd\Datenbank Heinz.key

I imported my file "Datenbank Heinz.kdbx" via "repair mode" to "new database.kdbx" and kept the same file "Datenbank Heinz.key":
"The composite key is invalid!"


kp2a moved to external_sd
"The composite key is invalid!"