i have adoptaable storage and the remotes were not mounting in /sdcard/Cloud or /storage/emulated/Cloud
as it create folder and set permissions in DATA_MEDIA=/data/media which is device's real internal storage and lates tries to bind it on /mnt/runtime/emulated/0/ which is internal storage (Adopted sdcard) for rom.
however changing DATA_MEDIA=/data/media to DATA_MEDIA=/storage/emulated fix the problem and mount show up properly in sdcard.
if you could add a check for device to see if it has adopted storage or not than set the value of DATA_MEDIA accordingly, it will hopefully solve the problem.
i have adoptaable storage and the remotes were not mounting in /sdcard/Cloud or /storage/emulated/Cloud as it create folder and set permissions in DATA_MEDIA=/data/media which is device's real internal storage and lates tries to bind it on /mnt/runtime/emulated/0/ which is internal storage (Adopted sdcard) for rom.
however changing DATA_MEDIA=/data/media to DATA_MEDIA=/storage/emulated fix the problem and mount show up properly in sdcard.
if you could add a check for device to see if it has adopted storage or not than set the value of DATA_MEDIA accordingly, it will hopefully solve the problem.