36

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
    Feb 14 '13 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
    Feb 27 '13 at 14:52
  • but you still fail to tell what it the underling filesystem you have mounted
    – rds
    Feb 27 '13 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
    Jan 27 '18 at 17:59
17

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
6

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
    Feb 14 '13 at 10:23
4

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
  • 1
    This is the kind of changes which would be lost on reboot. Mar 12 '15 at 0:27
  • 2
    This is not a symbolic link; it's a bind mount.
    – endolith
    Dec 12 '16 at 19:09
1

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

2
  • 1
    Is this supposed an answer to the question? Dec 29 '18 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. Nov 27 '19 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.