How to make bind-mounted (mount -o bind) folders visible for non-root users? I want to mount-bind an app data folder in /data/data/... to a user subfolder in order to automatically synchronize the contents for backup purposes. As root I use the following command:

mount -o bind /data/data/org.blabla.app/database/ /storage/emulated/0/blabla_database


The command seems to work and I can access the files in the mounted folder as long as I am root. However, as soon as I exit root, the files become invisible and the bind-mounted folder is empty.

How can I make the files visible for non-root users so that my sync app can access the files for backup?
In order to have different file ownership and permissions for every app in /sdcard, since Android 6 every app is run in an isolated mount namespace. /storage/emulated is bind mounted for every app with private / slave mount propagation to a different VIEW:

/mnt/runtime/default/emulated
/mnt/runtime/read/emulated
/mnt/runtime/write/emulated


It depends on if the app has READ_EXTERNAL_STORAGE or WRITE_EXTERNAL_STORAGE permission granted or not. For details see What is the “u#_everybody” UID?

Mounting directly to /storage/emulated won't appear in apps' mount namespaces unless you enter every app's mount namespace explicitly. The same is true if you mount from some app's isolated mount namespace as mentioned by @Izzy in comment. See Partition gets unmounted automatically in Android Oreo.

So you need to mount from root mount namespace to one of the above VIEWs, so that mount is propagated to all apps' mount namespaces.

For more details see How to bind mount a folder inside /sdcard with correct permissions?