What is the status of rclone mount on Android?


#4

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


#5

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


#6

can you provide full source code?


#7

The source code is mentioned on the link.


#9

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


#10

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.


#11

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


#12

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


#13

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.


#14

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


#15

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…


#16

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?


#17

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.


#18

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?


#19

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


#20

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.


#21

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


#22

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.


#23

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


#24

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