40

Is it possible to create symbolic links in the Android filesystem? If it's possible, how can I do this?

My Android version is 2.1, I'm using Motorola Defy.

6
  • android is not a fileystem. What is the filesystem on which you try to create the symplink? You can use mount in terminal emulator to gather this information
    – rds
    Commented Feb 14, 2013 at 10:50
  • 3
    @rds I know that Android is not a file system. I wrote "Android file system" instead of "Android's file system" because I was writting too fast.
    – castarco
    Commented Feb 27, 2013 at 14:52
  • but you still fail to tell what it the underling filesystem you have mounted
    – rds
    Commented Feb 27, 2013 at 22:20
  • 2
    @rds I would assume all androids use the same filesystem. If not then I would assume the filesystem depends on OS version. If these assumptions are incorrect please say. Is it phone specific?
    – AnnanFay
    Commented Jan 27, 2018 at 17:59

4 Answers 4

21

Android does support symbolic links, but certain file systems (e.g. FAT or RFS) do not and you cannot create symbolic links in those partitions. If your device uses a filesystem that supports symbolic links (e.g. ext2, ext3, ext4, yaffs2) then you should be able to use ln -s from the Terminal Emulator.

0
8

I think this question on superuser answers your question, i.e. that the FAT filesystem on the SD card does not support symlinks.

Just to clarify (and as reflected in the SU question/answers I linked): the Android OS supports symlinks, but the FAT filesystem on the SD card does not.

1
  • You're always free to format your SD Card with a modern filesystem (if you don't use it on an archaic operating system, of course)
    – rds
    Commented Feb 14, 2013 at 10:23
6

It is possible to do this via the mount -o bind /old/dir /new/dir command as discussed here https://superuser.com/a/377737/45344

You need root I guess.

2
  • 2
    This is the kind of changes which would be lost on reboot. Commented Mar 12, 2015 at 0:27
  • 3
    This is not a symbolic link; it's a bind mount.
    – endolith
    Commented Dec 12, 2016 at 19:09
4

You were dealing with /storage/emulated/0/Videos

Android like to make use of the /dev/fuse partition. I do not think you can make a symbolic link in this filesystem. On my htc desire 510, I see this:

/busybox df /storage/emulated/0                                          
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/fuse              1057284   1040844     16440  98% /mnt/shell/emulated

#

There is some weird stuff going on with /storage

3
  • 1
    Is this supposed an answer to the question? Commented Dec 29, 2018 at 6:10
  • /dev/fuse is not a partition, it's a character device which programs use to communicate with kernel in order to mount Filesystem in UserSpacE. @FindOutIslamNow yes partial answer, because Android's FUSE implementation doesn't support symlinks. Commented Nov 27, 2019 at 5:56
  • thank you very much for this answer!
    – Leathan
    Commented Jul 16, 2023 at 1:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .