#1228 0x00000002 Invalid Parameter error opening file on USB/MTP filesystem

KeePass_1.x
closed
nobody
None
5
2014-12-02
2014-03-27
Kev
No

First off, this is great product, thank you for providing it.

KeePass 1.26 running on MS Windows Vista Business SP2 64-bit gives a 0x00000002 Invalid Parameter error when attempting to open a DB on a Nexus 5 running Andriod KitKat 4.4.2. Attempting to save a new file in the same location results in "You can't save here. Please choose another location."

The same file opens just fine when:
+ Using KeePassDroid on the Nexus;
+ If copied to someplace on C:\
+ If opened with KeePassX running on an Ubuntu VM hosted on the same Vista boxen.

The error occurs regardless if the Nexus USB connection is:
+ Set as "Media device (MTP);
+ Set as "Camera (PTP)";
+ Has USB debugging enabled or not.

An older Android device running ye olde Gingerbread 2.3.6 has no problem with same Vista/KeePass/files.

Discussion

  • Paul

    Paul - 2014-03-27

    From your description the error is not with KeePass (older Android device running ye olde Gingerbread 2.3.6 has no problem). This is likely to be a Windows / Android USB issue.

    BTW, KitKat introduced a bunch of errors - not a good release.

    cheers, Paul

     
  • Kev

    Kev - 2014-03-29

    Paul,

    Thanks for getting back to me.

    Please keep this ticket open for a bit while I research the likely Windows / Android USB issue, perhaps we'll get lucky and I can document a workaround.

    ~K

     
  • Paul

    Paul - 2014-03-29

    Even if the ticket is closed you can still post to it.

    cheers, Paul

     
  • Kev

    Kev - 2014-07-23

    Paul et al,

    For all our info, this is also an issue on updated OS versions on both host and smartphone: Windows 7 Professional SP1 running KeePass and file on Nexus 5 running Andriod KitKat 4.4.4.

    Thanks,

    ~K

     
  • wellread1

    wellread1 - 2014-07-23

    See https://sourceforge.net/p/keepass/discussion/329220/thread/9247364f/#d970 for a possible explanation of the saving problem on Android 4.4+

    Note: If the same database file opens on Windows then the file is not damaged; and a problem with saving or opening the same file on the Android OS, or with a third party port (of KeePass) is unrelated to KeePass.

     
  • Paul

    Paul - 2014-07-23

    It seems you are attempting to open the file directly from the tablet using the PC version of KeePass V1. To test if it's a KeePass issue, attempt to open the database with Notepad - it will look weird but should open. Also try saving a bit of text using Notepad.

    cheers, Paul

     
  • T. Bug Reporter

    T. Bug Reporter - 2014-07-23

    Also try saving a bit of text using Notepad

    ... to a new test file in the same folder (in case it wasn't obvious that that's what Paul meant). Notepad is a good way to test if a file or folder is accessible, but don't ever try editing a KeePass database in Notepad; that's a sure way to ruin it.

     
  • Dominik Reichl

    Dominik Reichl - 2014-08-07

    General file access problem; not a KeePass bug.

     
  • Dominik Reichl

    Dominik Reichl - 2014-08-07
    • status: open --> closed
     
  • Kev

    Kev - 2014-12-02

    Some updates to this problem, even though closed, as I am sure I am not unique. The problem exists not only in Andriod KitKat 4.4.4 as first reported, it occurs under Andriod Lollipop 5.0.

    Wellread1: The Android version of KeePass is able to create files on the device. However the Win7 version cannot save a file on the device, it gets the error "You can't save here. Please choose another location." The discussion in the thread you provided seems to suggest that the problem is in Android, maybe that is so. The implied copy/edit/copy solution is quite a bit less than desirable.

    Paul & T.Bug: Yes, I am trying to access an Android-hosted KBD from the Win7 version of KeePass, which sees the files has hosted on a media device (MTP). Copying a KBD from the device to Win7, editing w/ KeePass, and copying back to the device works: Both KeePass and KeePassDroid can open/edit/reopen the file. Opening the file with Notepad gave some really interesting results: I can open the file on the device, but if I try to save it Notepad gives the same result as above, "You can't save here. Please choose another location." There is no problem if I save to C:\ then move it to the device, it can even be opened if I made no changes in Notepad. I think but cannot yet prove the problem is really with how Win7 handles media device (MTP) files as opposed to ordinary USB storage devices.

    Dominik: Thank you again for your most excellent KeePass. My hunch is the problem I'm seeing is caused by a difference of opinion/implementation of the Windows and Android implementations of MTP.

    ~Kevin

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks