Changing mount point of Magisk rclone-mount

I'm using Magisk's rclone-mount module. It works and mounts to /mnt/cloud. I want it to mount to a directory in /sdcard

I don't know whats going under the covers starting the rclone mount.

How can I change the mount point?

hello and welcome to the forum,

i have never used that module, but i took a quick look at the source code.
the mount point is hard coded on line 36.
CLOUDROOTMOUNTPOINT=$HOME/cloud
https://github.com/piyushgarg/rclone-mount/blob/master/binary/rclone-mount

as per the documentation, mounting to a sdcard is not permitted.
" Mount point can not be placed in /sdcard/"
https://github.com/piyushgarg/rclone-mount#known-issues
not a linux expert, given that rclone can mount to a sdcard, i think that is a limitation of the module.

Thanks!

I tried the necessary modification and got it to mount below /sdcard/cloud. From the standpoint of the shell (and Linux) it works fine. However, apps see it as an empty directory, so it doesn't actually help me.

Hi Friend! Can you help me to install magisk module and creat settins step by step for Mega cloud ?

The only experience I have is with google drive, don't now if the Mega cloud would be any different.

I started with using Termux as in this youtube guide

That got my my rclone.config, but I had trouble with the mount. So I switched over to the Megisk rclone-mount module. I just had to copy the rclone.config I already had to /sdcard/.rclone, have the magisk app install the module and reboot.

Don't know if thats helpful. I think you may get better help from others, this was a bit more convoluted than necessary.

Thanks. I will try. Once more 'I tried the necessary modification and got it to mount below /sdcard/cloud. From the standpoint of the shell (and Linux) it works fine. ' - how did you get it?
upd: do you speak russian?

The magisk-rclone module standard setup mounts the remote (in my case google drive) starting at /mnt/cloud/{drtive-name}

If you run termix or any other shell app (command line) you can ls that directory and see the remote files, and presumably use them. However, the apps I've tried don't consider it either local storage or cloud storage, so I don't know how useful it is.

Perhaps a different setup of rclone would be more useful. I don't know.

What is the path for rclone.config ?

with rclone, this command will show that
https://rclone.org/commands/rclone_config_file/

with the magisk module, line 33 of
"CONFIGFILE=$MODDIR/rclone.conf"
https://github.com/piyushgarg/rclone-mount/blob/master/binary/rclone-mount

Thanks, already found

I get error
[$ rclone ls Mega:/sdcard/cloud/
2021/08/28 11:33:04 ERROR : : error listing: directory not found
2021/08/28 11:33:04 Failed to ls with 2 errors: last error was: directory not found]

hello,

that would mean that /sdcard/cloud/ does not exist...
so see the folder names rclone lsd Mega:

i thought that /sdcard/cloud/ is used magisk rclone mount, not a real folder

I want to replace point mount Mega from path /mnt/cloud/ to / sdcard/cloud/ (the real path is /storage/emulated/0/cloud/) but the error is the same
[$ rclone ls Mega:/storage/emulated/0/cloud/
2021/08/28 12:48:16 ERROR : : error listing: directory not found
2021/08/28 12:48:16 Failed to ls with 2 errors: last error was: directory not found]

if you want to see the names of folders that exist, use rclone lsd Mega:
if the folder does not exist, rclone cannot list its contents.

if you are using magisk to mount, i can think of two options.

  1. modify the source code as i explained earlier in this topic.
  2. create symbolic link. not a linux expert but try something like
    ln -s /mnt/cloud /sdcard/cloud
    or
    ln -s /storage/emulated/0/cloud /sdcard/cloud

$ ln -s /mnt/cloud /sdcard/cloud
ln: failed to create symbolic link '/sdcard/cloud/cloud': Permission denied

Yes, im using magisk module Rclone mount

try sudo ln -s /mnt/cloud /sdcard/cloud

I dnt know how to do it

$ sudo ln -s /mnt/cloud /sdcard/cloud
ln: failed to create symbolic link '/sdcard/cloud/cloud': Function not implemented

sorry, not a linux expert, never rooted an android device, never used magisk.

as i shared up above, i would edit that file which creates the mount point.