4

I have a PDF on the folder ExtSD/Documents/. I need to make a shortcut of this file to the folder ExtSD/CurrentlyReading/.

So simple on Windows... Apparently never asked on Android.

If it's of any use, my explorer is ES File Explorer V4.0.
XPosed available.

3 Answers 3

4

"Shortcut" is a purely Windows concept. It's an ordinary file (with .lnk extension) which contains a reference to some other file or folder. Windows Explorer and other programs know how to open the actual file by reading reference information from shortcut file, just like as they know how to open a .pdf or .mp4 file. Other operating systems do not know what a .lnk file is, because phenomenon of mounting partitions and hence file paths are different across different OSes.

At filesystem level, Windows' NTFS supports junction points, symbolic links and hard links (1). But FAT family (including exFAT) supports none (2).

Android is based on Linux kernel. Linux's native filesystems (like ext4) support hard links and soft (symbolic) links. For non-native filesystems (like FAT) it depends on the filesystem driver. exfat driver (for exFAT filesystem) supports symlinks, but FUSE based exfat-fuse does not. So is the old vfat driver (for FAT[N] filesystems). New sdfat driver (for FAT[N]/exFAT filesystems) from Samsung does have optional symlink support for FAT[N] filesystems as well. After MS open-sourced exFAT, mainstream Linux driver is also based on sdfat (3).

However that's not the end. External SD cards are usually formatted as FAT32 or exFAT, so they may support symlinks depending on the driver being used. But Android does not expose actual filesystem to apps, instead it's emulated using FUSE or sdcardfs. Emulation is another twisted story (basically a permission-less filesystem to make sharing files among different apps/UIDs possible), see detail in Android's Storage Journey and What is /storage/emulated/0/?.

FUSE drivers may support symlinks (if the underlying filesystem does), but Android's FUSE implementation does not. So is the in-kernel sdcardfs implementation.

So in short, for the most cases, you cannot create symlinks on external SD cards as well as internal SD card. You will get "Operation not permitted" or "Function not implemented" or similar errors. On rooted devices a commonly used alternative is bind-mounts. See details in How can I make a symlink (or equivalent) inside /storage/emulated/0?

1

Shortcuts are Links in linux, and while in a terminal, or X its fairly easy - there's no easy way in the android UI.

youre better off just making a new folder, or getting a reader that supports a reading list.

1

i can do it manually using a freeware app caled MixPlorer but getting it done automatically. not easy to do. getting it done automatically or from inside Tasker is a lot more elusive

ideally a solution can be found to make a hardlink (not symbolic link) to a JPG file so that A.JPG and B.JPG will show the same thumbnails in both folder summer and folder vacation. deleting one of them doesn't delete the other one. either one will still work as long there is still one copy is left. still trying to find a way to create hardlink on Android, preferrably automatically or from inside Tasker

1
  • 2
    What MiXplorer creates is not a filesystem-level link, but an icon which - when tapped - fires an intent to open a file. // Neither FAT family of filesystems, nor Android's FUSE/sdcardfs support symbolic/hard links. Already mentioned in my answer. Commented May 8, 2021 at 11:08

You must log in to answer this question.