What is the status of rclone mount on Android?

I did compile fusermount to make it work on my android phone.
Have a look here: https://forum.xda-developers.com/android/development/fusermount-android-rclone-mount-t3866652

Nice! It might be worth mentioning that in the rclone wiki somewhere.

can you provide full source code?

The source code is mentioned on the link.

could you help me with compiling it?
can it be done on circlecli or on linux?
DO i have to install ndk-build?
how to use this file fusermount.mk ?
thanks in advance

ok i have found it here:

https://groups.google.com/d/msg/upspin/wL4sl3dHbxs/BQycKbHmAAAJ

First off, create a directory to store all this crud.

In order to get fusermount on Android, you have to use this repository:

Clone it to external/fuse.

However, their own build scripts don’t build fusermount. You have to
use a custom one; you can use mine here:

You also need an Android.mk:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
include $(LOCAL_PATH)/external/fuse/lib/Android.mk \
$(LOCAL_PATH)/fusermount.mk

and an Application.mk:

NDK_TOOLCHAIN_VERSION := clang
APP_BUILD_SCRIPT := Android.mk
APP_PLATFORM := android-21
APP_MODULES := libfuse_static fusermount

So your directory right now should look like this:

Application.mk
Android.mk
fusecompress.mk
external/fuse <- android_external_fuse source code

Now you should be able to run:

ndk-build -C . APP_ABI=armeabi-v7a

in order to get a working fusermount binary.

ok nice.
You still need root access to fusermount to work, as on android you need root to access /dev/fuse

Let me know if after mount rclone storage if you can access it from a file explorer on android

i just tested it on my note 8,
with -vv, everything seems to be fine, rclone is saying that it is mounted, but

su ls /storage/mounted
or going into that directory with any file manager or with root access always shows empty folder.

But it has to have something to do with permissions.
Because other process, no mather spawned by root or by user shows that folder is empty.
But if i go to termux and spawn rclone with --daemon
and in the same shell ls /storage/mounted
-it works correctly, shows content exact as it is with folders and files.

but other process cant access it, only the one which spawned previously rcloune mount.

why?

tried with --debug-fuse but it does not show any error

tested on normal terminal, in one windows spawned rclone mount and in second windows i could
cd to /storage.mounted and ls normally

but any file manager even with root access could not see content of /storage/mounted, only process which spawned/executed rclone mount.

i tried with --allow-other --default-permissions, setting guid uid umask, but not helped

Rclone is only mounted inside the terminal emulator (that is still an Android App), so it will only be visible inside the terminal emulator.
I don’t know how to find a work around with it. Maybe an broadcast message or something…

in this topic
https://groups.google.com/d/msg/upspin/wL4sl3dHbxs/S6O-XH8wAQAJ
there is the same problem and he suggest bindfs

what do you think?

my current working solution is:

install
https://play.google.com/store/apps/details?id=nextapp.fx.rk

or similar file manager app which has ability to run scripts as root.

in this app run as root rclone mount (with allow-root as in previous post with fusermount)

and in this file manager i have full access to all folders and files.

unfortunatelly it will be not possible, in this scenario, to open files not supported by fx file manager (as an example).

Fx file manager can open mkv files in build in player but can not open avi files,
and opening with external app does not work, because this external app cant access file.
Only way is - copy file from within fx file manager to some place on phone and have it as normal file.

The best solution would be to mount the rclone folder at boot time. The same time as the /system is mount. But I am not interest in this solution as I don’t know how much rclone would drain my battery.

Maybe the way you have done is also a good one. But what are the advantages bettween mount rclone insise the file explorer or the one explain in the second post, and use the file explorer to open the webdav of ftp?

i dont see advantages.
Only described best possible way…

maybe this could be something:
https://forum.xda-developers.com/apps/magisk/module-magic-folder-binder-t3621814

Can someone share fusermount binaries?
I think best is if we can get rclone mount works just like NVIDIA shield TV samba mount. This will allow all apps to access that mounted folders. This also means great things. Any decent android can be transformed into powerful cloud NAS.
For example, NVIDIA SHIELD TV has already plex server app. Having the ability to access rclone mount inside the device will make current NAS models obsolete.

Currently I have NVIDIA shield TV as my plex server connected to an empty NAS that has rclone mount serving 50TB of media. Eliminating that physical nas by mounting rclone inside NVIDIA shield TV will be a big win for everyone.

1 Like

So for we can mount rclone folder on a terminal emulator, but other apps are not able to access the content of that folder.
The binaries are at the first Post I did it, just follow the link

i think this is due to android treat different app as different “sandbox”, to prevent privacy lost.

And it seems thru desktop linux and android are both linux kernel,
they behave very differently, but connected.

To make it work and allow mount to be visible for all processes and apps:
su -M (-M is mount space option to make it not isolate to certain process)
so in terminal

su -M
and in su shell
rclone mount disk: /mnt/rcm

or

su -Mc rclone mount disk: /mnt/rcm

ofcourse fusermount as in above posts have to be in path.

also /mnt/rcm will bevisible for some apps like fx file manager, but to make it visible for other file apps it have to be mounted somewhere on internal memory, for example:
/mnt/runtime/default/emulated/0/rcm

this ideas come from this post:
https://forum.xda-developers.com/showpost.php?p=78399199&postcount=1325

and this one:
https://forum.xda-developers.com/showpost.php?p=78396521&postcount=1319

I have exact same setup were you able to figure out how to run rclone mount on nvidia shield?