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.
sdcard
usually uses a filesystem that doesn't support permission/symlinking. – Andy Yan Jul 27 '18 at 12:38/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