29

Is possible to make symbolic links in the android filesystem? (and how?)

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

  • 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
  • 1
    @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
  • @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? – Annan Jan 27 '18 at 17:59
15

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.

  • 1
    I tried to create a symlink from my internal storage targeting a folder on the SD card, but I gotOperation not permitted. – user2284570 Mar 12 '15 at 0:25
  • 2
    @user2284570: you should ask a separate question, and in there please provide more information: where you're creating link from, where you're creating the link to, how you create the symlink, whether or not you're rooted, what are the internal filesystem, and what device you're using and whether you're using custom mods. – Lie Ryan Mar 12 '15 at 0:31
  • I won't root before 2020. The internal filsystem use exr4 qnd the SD card exfat but as it is a symlink to a directory, I don't think it matter. From /storage/emulated/0/Videos to /storage/extSDcard/Videos which is a folder. I also tried with the busybox version of ln and ended with the same result. I have full rights acess to /storage/emulated/0. I am doing it from a terminal emulator on the device. I use android 4.4, but I don't need to write to the SD card, as this is for usingln -s. – user2284570 Mar 12 '15 at 0:41
  • 1
    @user2284570: please create a new question – Lie Ryan Mar 12 '15 at 0:51
5

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.

  • 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
2

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.

  • 1
    This is the kind of changes which would be lost on reboot. – user2284570 Mar 12 '15 at 0:27
  • 1
    This is not a symbolic link; it's a bind mount. – endolith Dec 12 '16 at 19:09
0

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

  • Is this supposed an answer to the question? – FindOutIslamNow Dec 29 '18 at 6:10

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.