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

Accessing cached file after losing original

Jul 9, 2015 at 7:41 AM
Hello,

I unfortunately lost my Keepass-File (stored on an FTP) but was hoping to access the cached one on my phone. However if I enable airplane mode and try to access the file the app tells me that the server is not accessible. Is there any way to access the cached file?

Regards,
Tobias
Coordinator
Jul 9, 2015 at 2:06 PM
normally this should work. Could you please enable logging by creating an empty file in /mnt/sdcard/keepass2android.log, then reproduce the issue and send me the log?
I have heard about this bug before and will then try to fix it asap.

If you have root access, you can access the file directly, of course...
Jul 9, 2015 at 3:42 PM
As follows you find the content of the log file. I tried to access the first one, then the second.

09.07.2015 17:14:39:692 -- PasswordActivity.OnStart
09.07.2015 17:14:39:694 -- PasswordActivity.OnResume
09.07.2015 17:14:39:695 -- DatabaseIsUnlocked=False
09.07.2015 17:14:39:702 -- Pre-loading database file starting
09.07.2015 17:14:39:716 -- CFS: OpenWhenNoLocalChanges
09.07.2015 17:14:41:432 -- PasswordActivity.OnActivityResult 874348/1000
09.07.2015 17:14:41:433 -- No AppTask in OnActivityResult
09.07.2015 17:14:41:462 -- Exception: System.Net.WebException: Unable to connect to remote server ---> System.Net.Sockets.SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Net.FtpWebRequest.OpenControlConnection () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.FtpWebRequest.OpenControlConnection () [0x00000] in <filename unknown>:0
at System.Net.FtpWebRequest.ProcessMethod () [0x00000] in <filename unknown>:0
at System.Net.FtpWebRequest.ProcessRequest () [0x00000] in <filename unknown>:0
09.07.2015 17:14:41:489 -- OnFinish message: Ein Fehler ist aufgetreten: Unable to connect to remote server
09.07.2015 17:14:42:802 -- PasswordActivity.OnPause
09.07.2015 17:14:42:835 -- PasswordActivity.OnStop
09.07.2015 17:15:08:989 -- PasswordActivity.OnStart
09.07.2015 17:15:08:991 -- PasswordActivity.OnResume
09.07.2015 17:15:08:993 -- DatabaseIsUnlocked=False
09.07.2015 17:15:08:999 -- Pre-loading database file starting
09.07.2015 17:15:09:1 -- CFS: OpenWhenNoLocalChanges
09.07.2015 17:15:10:939 -- PasswordActivity.OnPause
09.07.2015 17:15:10:971 -- FileSelect.OnCreate
09.07.2015 17:15:10:972 -- FileSelect:apptask=NullTask
09.07.2015 17:15:10:973 -- Loaded task keepass2android.NullTask
09.07.2015 17:15:11:46 -- FileSelect.OnStart
09.07.2015 17:15:11:47 -- FileSelect.OnResume
09.07.2015 17:15:11:550 -- PasswordActivity.OnStop
09.07.2015 17:15:11:558 -- PasswordActivity.OnDestroyTrue
09.07.2015 17:15:12:475 -- No AppTask in OnActivityResult
09.07.2015 17:15:12:502 -- FileSelect.OnPause
09.07.2015 17:15:12:521 -- PasswordActivity.OnCreate
09.07.2015 17:15:12:523 -- PasswordActivity:apptask=
09.07.2015 17:15:12:525 -- Loaded task keepass2android.NullTask
09.07.2015 17:15:12:573 -- PasswordActivity.OnStart
09.07.2015 17:15:12:574 -- PasswordActivity.OnResume
09.07.2015 17:15:12:574 -- DatabaseIsUnlocked=False
09.07.2015 17:15:12:576 -- Pre-loading database file starting
09.07.2015 17:15:12:578 -- CFS: OpenWhenNoLocalChanges
09.07.2015 17:15:13:53 -- FileSelect.OnStop
09.07.2015 17:15:13:90 -- FileSelect.OnDestroyTrue
09.07.2015 17:15:19:993 -- PasswordActivity.OnActivityResult 874348/1000
09.07.2015 17:15:19:995 -- No AppTask in OnActivityResult
09.07.2015 17:15:20:34 -- Exception: System.Net.WebException: Unable to connect to remote server ---> System.Net.Sockets.SocketException: Network is unreachable
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0
at System.Net.FtpWebRequest.OpenControlConnection () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Net.FtpWebRequest.OpenControlConnection () [0x00000] in <filename unknown>:0
at System.Net.FtpWebRequest.ProcessMethod () [0x00000] in <filename unknown>:0
at System.Net.FtpWebRequest.ProcessRequest () [0x00000] in <filename unknown>:0
09.07.2015 17:15:20:67 -- OnFinish message: Ein Fehler ist aufgetreten: Unable to connect to remote server
09.07.2015 17:15:21:736 -- PasswordActivity.OnPause
09.07.2015 17:15:21:750 -- PasswordActivity.OnStop

Unfortunately my phone is not rooted, so I probably don't have a chance to directly access the files? It is a Nexus 5 running 5.1.1
Coordinator
Jul 9, 2015 at 8:51 PM
Thanks for the log. Unfortunately it looks like maybe the KP2A cache was deleted (by the Android OS which is "allowed" because it's only a Cache directory), but I don't know yet.

It looks like if you install adb (android debugging tools), you should be able to get the files. See http://stackoverflow.com/a/7712173/292233

Please also send the list of files in the directory [KP2A Cache Directory] + "/OfflineCache/".
Jul 28, 2015 at 9:25 AM
If I try to run this with adb I get the following error

run-as: Package 'keepass2android.keepass2android' is not debuggable

In /data/data/keepass2android.keepass2android there seems to be no folder OfflineCache, just cache