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.

castarco
  • 503
  • 1
  • 6
  • 8

4 Answers4

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.

Dan Hulme
  • 35,000
  • 17
  • 90
  • 155
Lie Ryan
  • 19,073
  • 6
  • 65
  • 83
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.

Argalatyr
  • 228
  • 4
  • 10
  • 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
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.

Jus12
  • 169
  • 1
  • 2
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

xavier_fakerat
  • 10,065
  • 6
  • 41
  • 101