How to know if a file is synced on my android client?

I have a simple setup with a server (on ubuntu) a desktop client (another ubuntu box) and an android client on a phone. If I create/edit/delete files on the desktop these sync perfectly with the server. But I am having trouble understanding the process to sync changes from the server to the android client.

In the android client I can open a folder and see a list of files. Each file in the list has 2 lines of text. Line 1 is the file name, line 2 may have a little red tick icon then the file size and last modified time. What EXACTLY does the red tick mean?

As far as I can see: no red tick means the file exists on the server but has never been synced to the client. A red tick means that the file exists on the server and at some time in the past has been synced with the client but the client version may or may not be current.

If I click on one of the files with the red tick it will either open immediately, or it will download a refreshed copy and then open it.

So the question is, how can I tell whether the the client has the latest version or not? Do I really have to click each file in turn to be sure the phone has the latest versions?

Sorry if this seems trivial … I’m a beginner here and obviously missing something basic!

This is right. Red tick means there is a cached copy and can be used offline.

Why do you need to make sure this is a latest version? When you are offline, the client can’t tell whether it is a latest version.

True, obviously!

But if the client is online it would be nice to know which files had updated versions available. The client has identified new files so it would seem likely that it would have also scanned for updated files. If it doesn’t know then obviously it can’t flag them. But of it does know then I would have expected some kind of indicator.

So far my client has been keeping the synched/starred items up to date behind the scenes when the android client is online.

It’s actually this particular feature above all else that made me switch to seafile from owncloud (and other potential solutions).

when I change a file on my desktop and the agent synchs it, I see the notification icon on my android appear and synch the file. All other test clients and servers I used I had to open the android client and manually refresh.

When I open the synched file (keepass .kbdx password DB) on my android through the keepass app directly using the content:// provider it has a little toaster message that says that the file is up to date and synched. That’s how I’ve been operating for the past few weeks and it’s always been smooth, AND I haven’t had any conflicts like I did with owncloud.

I have keypass2android using my password database through webdav. No need to rely on the android app to keep cached copies up to date in the background.

I’ve obviously got something wrong with the way my android client is set up. I’ve never seen a notification on the android device. The android client does sort-of sync (I can’t figure out how to control when it syncs?) but the sync process only seems to advise the client which files are out of sync. It doesn’t actually transfer any files from server to client. The only way I can actually get the updated file to transfer to the client is to either open the file within the client, or select it and manually download the file.

The behaviour you are describing is exactly what I’d like, but for some reason mine behaves differently.

I use keepass2android too, and keepassx at the desktop. If I change the database at the desktop in syncs with the server immediately. If I open the database on android I will see the un-updated version. If I open the seafile client on android I can see that the database file was updated moments ago … so the client knows about the desktop change. But I still have to individually select the database file to force it to actually download the thing to the phone. Okay so it works, but it is far from ideal, whereas yours seems to perform quite differently. There must be a setting somewhere that I have got wrong, but I can’t find it.

Are there any settings to control the sync process? All I can find is via android-sertings → cloud & accounts → accounts → seafile but there is nothing useful there.

Why do you not want to just configure the database to be accessed through webdav? It works perfectly for me this way and in the way you want it to act.

The issue is that I often need the files when I have no network. For example I will soon set off on a trip to a country where I have no network roaming, and minimal wifi access. I would like to be sure that I have the latest version of lots of files with me on my phone (it is more than just keepass). The only way I can do this is to wait until just before I travel and then manually force seafile to download the files I’m interested in. That is what I always do, but I was hoping to find an easier way

Keepass2android stores a local cache that it uses if it can’t access the database over the network. I just tested this by going into airplane mode and opening the app up - it worked fine and said it’s using the local cache since it couldnt access the database remotely.

Interesting, I wasn’t aware of that. So for Keepass2Android I can see 2 options. Before I travel, or before I lose network connectivity, I can either use the seafile client to download the latest database, or I can use webdav and Keepass2Android to cache the latest file. It sounds like either would work. But since I have a lot of other files to manage (it’s more than just keepass) I have to do something similar for them too.

Meanwhile I’m still envious of grantthomas …

If only I could get my setup to behave like this!


I don’t have need of anything else being in synch with my mobile, so I don’t have a use case to test any other files really.

What is your process of verifying your keepass is up to date or not?

First launch, I open SF and mark the kbdx for download. Once downloaded, I use the keepass app, ‘get from 3rd party app’, use the 3 dashes in the upper left to open the picker, and find my seafile account. From there I grab the file. Within keepass it now shows up as a recent database like so: content://keepass.kbdx .

If I try to open from a file explorer or directly opening the cached path into the SF directory it seems to fail for auto synch to/from the SF system.

However if I use the content:// handler through the file picker everything works. I’d show you a screenshot, but keepass prevents me from taking a screenshot at the keepass DB password screen.

My usual test is to edit on the desktop, wait a couple minutes, open on android (without opening the seafile app) and verify the changes are there. If they are, I edit the file, save and close through keepass (not touching the seafile app) and I see the desktop client start to synch within a few seconds.

This is when I’m at work and on a different network. My mobile works on 4g or WiFi at the office.

If you want I can try a few different file types to verify if my system is keeping them synched, but you’d need to fill me in on something that’d be useful to you if I could try it out.

Thanks for your interest in this!

FYI I long-ago decided to use Keypass2Android as read-only on the phone because I have no confidence that I am working on the correct version of the database. So I make all keypass database updates on the desktop only.

Because keypass adds extra complexity to this I think it is easier to test using a simpler scenario.

On the desktop I have several folders each set up as SF libraries. Suppose that one of those folders is called /test and contains a file called /test/test1.txt and the text file contains one line of characters “abc”.

Historically I have forced this to sync to the phone and so if I look through the phone file system I can see the file and its contents match the desktop version ie “abc”.

So now:

  • on the desktop edit the file to contain “abcD”.
  • use a browser and view the file on the SF server, it contains “abcD” == GOOD
  • on the phone browse through the file system (outside SF app) and view the file, it contains “abc” == BAD (but not surprising)
  • on the phone settings find the seafile account and notice that the last sync is showing as an hour ago so force a “sync all”
  • on the phone browse the file system and check the file again, it still has “abc” == BAD (I hoped this would have been updated by the sync process)
  • on the phone open the SF app, navigate to the /test folder and note that the file is there, with a red tick, and a timestamp of 3 minutes ago (so SF knows that we just updated the file)
  • click on the file and watch as the file is downloaded, and then chose the open application, open it and see it contains “abcD” == GOOD
  • on the phone check in the file system (ie outside the SF app) that the file has now been updated (just to be sure we’re looking at the right file) and yes, it contains “abcD”

So in summary, when SF did its sync on the phone it appears to update its “knowledge” that the file was updated 3 mins ago, but does not actually download the file.

Back to my original question … how do I know which files are actually current (on the phone) and which ones need to be downloaded?

But it gets worse:

  • don’t close the SF app on the phone
  • on the desktop edit the file again to contain “abcDE”
  • browse the file on the SF server, contains “abcDE” == GOOD
  • on the phone go to the account settings and force a “sync all” again
  • on phone in the SF app browse to the folder again and note that the timestamp on the file does not seem to have been updated since last time.
  • open the file again and it contains “abcD” == BAD
  • long press on the file name, select it and touch download and note a message “all files downloaded”
  • open it again and it still shows “abcD” == BAD
  • wait half an hour … open the file again and watch it download, it contains “abcDE” == WHAT???

So what is going on ? The sync all didin’t seem to work this time around, but then after a wait period it did. Weird?

Bottom line is that I find it really hard to have confidence in the status of files on the phone, and wish I have some better idea how this is supposed to work.

Instead of relying on the seafile app to always have local copies up to date (which frankly the app isn’t designed for that in my opinion) consider using an app like Synchronize Ultimate to automatically keep a local folder on your phone up to date with data from your seafile server.

I use this app to automatically upload photos I take because the auto upload feature in the seafile app is unstable.

It can do both 2 way and 1 way sync and works very well. It has native API support for seafile.

Yes, I plan to try out a few other synchronising apps when I return from my next travels. FolderSync was suggested in another thread. I’ll do some experiments but can’t afford the disruption just yet.

[quote=“George, post:12, topic:3665, full:true”]
FYI I long-ago decided to use Keypass2Android as read-only on the phone because I have no confidence that I am working on the correct version of the database. So I make all keypass database updates on the desktop only.[/quote]

I’ve found that once I started using the content:// handler through the keepass app (bypassing the seafile app), that I get a toaster popup when I open and then save via android the keepass file. The toaster message says something to the effect of “remote file and cache are synchronized”. If I do not see that message on open and then again if I make a change I send out my red flags. Otherwise it seems to work correctly for me.

George, if this does not work for you in the same fashion, I wonder what differences there are between your install and mine. I’d be curious to see if you created a test account on your set up if my process would work on my mobile while it doesn’t work on yours. Just a thought.

This is the behavior I see when I browse the internal/sd storage directly through the filesystem and open seafile files.
However, if I open a txt editor, then use the seafile handler Shown here
it seems to work correctly.

Boy I wish I knew the answer to that one.

Using the another app to open the files by using the content handler and this process worked correctly for me.
I didn’t have your BAD case.
I used this app to test a txt file synched in the same folder as my keepass file is in.
Text Editor – Android App

Thanks for the recommend, I’m going to give this a shot as well.
I think the seafile app /should/ be designed to keep files in synch on the mobile device (preferably one way either direction and/or two way). It’d designed this way on desktop so I would figure it should be so on mobile as well.

Its unfortunate it doesn’t work this way, but neither did owncloud / nextcloud / pydio / other server apps I tried.

[quote=“arjones85, post:13, topic:3665, full:true”]I use this app to automatically upload photos I take because the auto upload feature in the seafile app is unstable.

It can do both 2 way and 1 way sync and works very well. It has native API support for seafile.
Oh this app does sound excellent. If I found that app before I switched to SF I may never have made the leap from OC.

Thanks all, you’ve given me lots of things to try. I’m going to have to park this problem for a few weeks as I’m about to go travelling and I can’t afford to disrupt things before I go.