Why can't WhatsApp write to bind mounts? I moved all the data of WhatsApp to /mnt/media_rw/6333-6461/WhatsApp, where 6333-6461 is my external SD card. I opened WhatsApp to find that I could not open any previously downloaded data. This is expected.

Now, I executed the following commands in Termux:

$ su
# mount -o bind /mnt/runtime/write/6333-6461/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp


When I opened WhatsApp, I could see all the data that I had previously downloaded. But now I cannot send or receive anything - all sending fails, camera access from WhatsApp fails, and downloading fails.

Evidently WhatsApp is not being able to write onto the bind mount. Any solution to the problem?

My phone, a Samsung Galaxy On7, Android 6.0.1, is rooted with Magisk 20.1 and running stock ROM.
Why can't WhatsApp write to bind mounts?

# mount -o bind /mnt/runtime/write/6333-6461/WhatsApp /mnt/runtime/write/emulated/0/WhatsApp



Apps cannot directly access /mnt/runtime/write/6333-6461 or /mnt/runtime/write/emulated/0/ because /mnt/runtime is only traverse-able by root. Apps access /storage/emulated/0 or /sdcard (symlink to the former) which is bind-mounted to /mnt/runtime/write/emulated/0/ for apps with WRITE_EXTERNAL_STORAGE permission. External SD card is accessible at /storage/6333-6461 in the same way.

When /mnt/runtime/write/6333-6461/WhatsApp is bind-mounted at /mnt/runtime/write/emulated/0/WhatsApp, WhatsApp will actually try to write to external SD card which is not allowed at least since Android 4.4. This is controlled by using permissions READ|WRITE_EXTERNAL_STORAGE / READ|WRITE_MEDIA_STORAGE, GID everybody (9997) / media_rw (1023) and mount namespaces. See details in How to move files to external SD card?.


  Any solution to the problem?


There are some workarounds to set required permissions using FUSE or sdcardfs when bind mounting external directories. For details see How to bind mount a folder inside /sdcard with correct permissions?