This project has moved. For the latest updates, please go here.

Error opening database file on Nexus 7 2G: Composite key invalid

Feb 24, 2014 at 1:10 AM
I have a Nexus 7 2G and am unable to open my KeePass2 database file using pswd+keyfile, getting the error "the composite key is invalid". I've tried with both K2A and K2AOffline, both are no-go. I'm using Android 4.4.2, non-rooted.

I've tried opening the database and key file in several combinations using GDrive, DropBox, local storage, and via different android file managers.

I have also ruled-out file corruption by uploading my files to GDrive/DropBox and downloading them again, opening them fine with KP2 on Windows 7.

I've used KeePass (KP2) via Windows for years and am quite familiar with its settings. The issue I'm running into does not appear to be a KP2 issue, but a K2A issue.
Feb 24, 2014 at 3:35 AM
Edited Feb 24, 2014 at 3:35 AM
Hi,

I'm also having the same problem, running the latest version of KP2A on a 4.4.2 Nexus 5. I'm using both a password and keyfile. The "Key file (optional)" message remains after selecting the keyfile and I recieve the same "composite key is invalid" error.
Coordinator
Feb 26, 2014 at 8:20 PM
to understand what the problem is here: Could you please copy both your database and the keyfile to the local storage? Then choose Open file/Local file and select the database with the internal file browser. On the password screen, please enter the password and browse to the keyfile. Please use "Keepass2Android" (on the left) to browse to the file. Please make sure the path displayed in the box in the second row is the path to the key file.
Does this work?
Feb 27, 2014 at 11:45 PM
Hi Philipp,

Thanks for looking into this. I'm not sure what you mean by "use Keepass2Android (on the left) to browse for the file," but I don't have a path displayed in the key file box even after copying both database and key file to local storage. It fails to decrypt with the same message.
Coordinator
Feb 28, 2014 at 10:10 AM
if you have copied key file and database, then please fire up KP2A. If you are on the main screen, select Open file. If not, click the folder icon in the action bar first. Then select Local file and browse to the Database file. Now you should see the password screen where you need to select "Password + key file". (Note: all these texts may differ a little, I don't use the English translation normally.) There you have two fields. In the first, enter your password. Next to the second, there is a browse image. If you click this, you should see the Android 4.4 file selection, where on the left you can choose Google Drive or Keepass2Android (among others). You can you Keepass2Android here (or, ES File Explorer should work as well). When you sleect your local file, you should return to KP2A and the second text box should contain the path to your keyfile (something like /mnt/sdcard/keyfile/key.key).
You can also enter that path manually if you like.
Mar 3, 2014 at 6:12 AM
Hi Philipp, as with TheZedd, I have both my database and key files copied locally to my device. I launch KP2A, select Local and browse to my database file OK. I then select "Password + key file", browse to and select my key file, but when I return to the KP2A main screen, the key file path is not loaded into the textbox. I manually entered the key file path and was able to open the database just fine, thx!

I assume manually typing filepaths is a bug, so I hope this is addressed soon, because there's no way I'm going to do that every time I need to use KeyPass. :(

I also found that I can't copy an acct password to the clipboard, so I'm off to learn how that's done in K2PA. (Yes, I get the little animation at the top of the screen explaining what the 4 icons do, but my icons are 1/16th of an inch in size, aren't readable nor useable. :( I'll keep trying, though.

But many thx for the "manual input" workaround. And here's to a fix soon! :)

TYVM for the great app, can't wait to start using it once everything's copasetic.
Coordinator
Mar 3, 2014 at 6:34 AM
1.) How do you browse to the keyfile? Which file manager do you use?

2.) Typing manually is an option, not a bug.

3.) Are you sure you need to do that every time? KP2A can remember key file locations!

4.) You draw down the notification bar and select "Copy username (or password) to clipboard". Note that the keyboard is the preferred way for this. Please see youtube.com/channel/UCCEVskmyFWfTIHmkrE5kQcw or read https://keepass2android.codeplex.com/documentation

5.) You can post a screenshot if you think there is a display problem with the icons.
Mar 3, 2014 at 2:51 PM
Selecting the file browser manually fixed this for me. Before I had been trying to select the file directly from the shortcuts (Recent, Images, Video, Audio, Downloads).Thanks!
Mar 3, 2014 at 11:29 PM
PhilippC wrote:
1.) How do you browse to the keyfile? Which file manager do you use?
I use the folder icon built into KP2A at the right end of the key file textbox. I browse to the file and select it by touching once, which returns me to the KP2A main screen but w/o retrieving the file path like I thought it would. (If it's not designed to do that, you might consider that as an enhancement, because it'd be awfully nice.)

2.) Typing manually is an option, not a bug.
Hehe I know that, I was referring to selecting the file via browsing and it not transferring the file path to the textbox. I don't mind typing, just not all the time.

3.) Are you sure you need to do that every time? KP2A can remember key file locations!
Aye, I just found that out! I manually entered the file path yesterday and tested it after a reboot, and the filepath was remembered, woot!

4.) You draw down the notification bar and select "Copy username (or password) to clipboard". Note that the keyboard is the preferred way for this. Please see youtube.com/channel/UCCEVskmyFWfTIHmkrE5kQcw or read https://keepass2android.codeplex.com/documentation
That was it! I didn't realize those were the std pulldown icons, so I was trying to touch 'em, not drag 'em. Duh! Once you mentioned this, I felt stupid after realizing you'd integrated your icons into the system notices...that's GREAT!! No way was I expecting that! I read the docs already, but being new to Android, much wasn't clear to me. (I'm still in discovery mode.)

5.) You can post a screenshot if you think there is a display problem with the icons.
No, once I realized it was the notification bar pulldowns and not actual clicky icons, all's well. I pulldown the notifications and there are the properly sized KP2A icons, yay!
Man, your app rocks, I swear! I've used KP at work and home for years and even have the whole family using it. Having it on my new--and first--tablet is like mana from heaven. The beer donation truck is definitely making a stop at YOUR place soon!
Coordinator
Mar 4, 2014 at 4:32 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Mar 4, 2014 at 4:33 AM
glad it's working for you two!
I have created an issue on https://keepass2android.codeplex.com/workitem/180 to improve the behavior in the future!