pydio / cells-sync

Sync Client for Pydio Cells
https://pydio.com
GNU General Public License v3.0
35 stars 15 forks source link

Mobile device improvements #27

Open Shihira opened 4 years ago

Shihira commented 4 years ago

Recently I managed to compile cells-sync along with GOARCH=arm64 GOOS=linux, removing webview.go and systray.go. As a result it just compiled and produced the binary without any need of further modifications, and basically works like a charm in the Termux environment.

Marvelous compatibility.

I know that Android is not an officially supported platform. I am just finding pydio is the most ideal one among all the syncing solutions and I don't want to give it up so easily just for not supporting mobile devices. So if you developers also think it is a good idea to expand the platform support, there are a few improvements that can be done.

  1. user.Current() returns nil on termux, so a crash occurs in server-config_linux.go.
  2. The web page is not very responsive in small screens, especially for the sidebar.
  3. Android apps have no permission to list the root directory, so a No workspace error is out there.

Thanks a lot for your great app. I may keep testing it on my mobile phone until I find any unworkaroundable problem, then I will accept the reality.

cdujeu commented 4 years ago

Hello @Shihira

Thanks for posting! This is really interesting. Could you go a bit further describing the kind of usage you want to do exactly on Android? Integrate into an app ? Use it inside "termux" (or that one is already working)?

  1. Regarding service-config_linux.go : do you actually plan to set it up as a service?
  2. Indeed, not really thought for that, but for the fixed-size of the desktop app... Would be interesting to dig
  3. When do you have a No Workspace error, when trying to setup a sync ?

Please post as much info as you can :-)

Shihira commented 4 years ago

It is already working nearly out of box in termux, which is a community-driven terminal emulator targeting android. This is their page, in case that you are not familiar with it: https://wiki.termux.com/wiki/Main_Page .

  1. It doesn't have to be a service. It just crashes when I run ./cells-sync start --headless. Simply commenting out this file would be good to go. I currently make it a background service by running it in tmux.
  2. The error occurs everytime I am to setup a new sync or modify an old one. It can fetch the remote directories, but fails to fetch the local filesystem directories. There's nothing strange. It was like when I execute ls /, a permission denied system error will also be there.

I just want some open-source file syncing solution for my phone. I noticed that you seem to have an Pydio app on Play Store, but it is still like a prototype, hardly have any advanced functionalities except for browsing. Will there be any plan to integrate cells-sync with that app, given possible?

Let me get you some screenshots. I currently run it behind a http proxy because I don't have a TLS cert for the server.

image

image

cdujeu commented 4 years ago

for the 1., do you happen to know the GOOS in your case? Maybe a simple compile instruction to exclude have a specific service-config implementation for android could be enough. for the 2. what's unclear is that you seem to be browsing /{appData}/storage/Documents folder not the root folder.. And your screenshot seems to indicate that you do are able to setup the sync?

Shihira commented 4 years ago
  1. I am new to golang. I heard that one should compile with GOOS=android to generate binary targeting android but it was complicated to setup the toolchain. Then GOOS=linux compiles successfully so I decided to give it a try.
  2. Yes. I set it up from the CLI. I am not browsing the root folder, but it seems to me that the file tree has to list every level of the path to form a tree graph, and it fails at the first level, namely the root directory.