3

I'm trying to create a symbolic link on my Android N phone, so that my photos are accessible from the Pictures folder. I want to be able to sync all my pictures in a single folder using Syncthing.

My phone isn't rooted, so I booted into a TWRP image using fastboot boot twrp.img, where I have root access to the filesystem. I was then able to log in using adb shell, create the symlink and change its owner.

cd /data/media/0/DCIM
mv Camera Camera.bak
ln -s ../Pictures/Camera Camera
chown -h media_rw:media_rw Camera

Unfortunately the camera app fails to open, with an error message saying No storage found. Attempting to navigate to the symlink results in a Permission denied error.

Is there a way to get this working properly?

Note that in Android /data/media is mounted to /storage/emulated. The filesystem of /data is ext4, which supports symlinks, and the link works correctly from within TWRP.

  • 2
    sdcard usually uses a filesystem that doesn't support permission/symlinking. – Andy Yan Jul 27 '18 at 12:38
  • I should have noted that my phone (a Nexus 5) doesn't have a physical SD card. /sdcard is just a confusing mount point used by TWRP. I've updated my question to be clearer. – Jonathan Holvey Jul 27 '18 at 21:22
  • That's not the point; FUSE and the filesystem behind it is usually the culprit. See this I wrote earlier, and this from the TWRP crew. – Andy Yan Jul 28 '18 at 00:42
  • Thanks for the clarification. I found this article useful to help in understanding. https://www.xda-developers.com/diving-into-sdcardfs-how-googles-fuse-replacement-will-reduce-io-overhead/ – Jonathan Holvey Jul 28 '18 at 06:17

0 Answers0