Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,619 Members 51,613 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Not possible to create a symlink in /mnt/sdcard?

Tip us?
 
Vince_be
Old
#1  
Member - OP
Thanks Meter 0
Posts: 55
Join Date: Jun 2011
Location: Chaineux
Default [Q] Not possible to create a symlink in /mnt/sdcard?

Hi,

Is there a way to create a symling in /mnt/sdcard (I want to point to a folder of the microSD)?

Each time I try (several times since yesterday evening...), I receive the message "Function not implemented"...

Example (/data/sdext2 is an EXT2 partition on my microSD) :

Code:
ln -s /data/sdext2/test /mnt/sdcard/Android/data/test
The usage of mount -o bind doesn't work for what I want to do

Thanks in advance for your help!

Regards.
Smartphone : ZTE V970
Tablet : Asus Eee Pad Transformer
 
AzureusPT
Old
#2  
AzureusPT's Avatar
Senior Member
Thanks Meter 54
Posts: 485
Join Date: Feb 2008

 
DONATE TO ME
First question of all: Are you rooted? If not, root first.

If you are rooted and using shell inside the TF, be sure you do "su" before entering any command to grant root privileges (you should have the # prompt instead of $).

Aside from that, it should work... If is still giving you trouble please post the entire log for that session (just copy paste what you've entered in the console), so we can help you better.
LG G2 | Stock 4.4.2
Samsung Galaxy S2 | CM11
HTC Desire | CM7
ASUS TF101 | KatKiss
Dropbox referal - 500Mb for free!
 
Vince_be
Old
#3  
Member - OP
Thanks Meter 0
Posts: 55
Join Date: Jun 2011
Location: Chaineux
Hi,

First of all, thanks for your answer!

My TF is rooted and I use Revolver 3.11.

There are 2 partitions on my micro sd :

1) 8 GB - FAT32 - Primary
2) 22 GB - EXT2 - Primary

The second partition is mounted on /data/sdext2 (mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2).

Here are the commands :



Code:
su
mount -o remount,rw /
cp -pr /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld /data/sdext2/com.triactivemedia.radiocontrolrotorworld
rm -r /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
ln -s /data/sdext2/com.triactivemedia.radiocontrolrotorworld /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
busybox ln -s /data/sdext2/com.triactivemedia.radiocontrolrotorworld /mnt/sdcard/Android/data/com.triactivemedia.radiocontrolrotorworld
Thanks in advance for your help!

Regards
Smartphone : ZTE V970
Tablet : Asus Eee Pad Transformer
 
hachamacha
Old
#4  
Senior Member
Thanks Meter 271
Posts: 534
Join Date: Jun 2010
Fat32 doesn't support symbolic links. You would need to use a couple of ext* or linux FS's.
 
Vince_be
Old
#5  
Member - OP
Thanks Meter 0
Posts: 55
Join Date: Jun 2011
Location: Chaineux
Hi.

Thanks for the answer.

The second partition (/data/sdext2) is an EXT2 partition. So it seems it's not the issue...

Regards.

Sent from my HTC Sensation Z710e using Tapatalk
Smartphone : ZTE V970
Tablet : Asus Eee Pad Transformer
 
Spidey01
Old
#6  
Senior Member
Thanks Meter 104
Posts: 1,056
Join Date: Sep 2011
Location: Duluth
/mnt/sdcard is a fuse shim around /data/media. Crest your symlink there.

ln -s /Removable/MicroSD/folder /data/media/folder

Should generally work for most people, depending how how custom your tf is or in your case the card :)

Sent from my Transformer Prime TF201 using Tapatalk

- Samsung Galaxy S3 (T-Mobile )SGH-T999, stock+rooted.
- ASUS Transformer TF201 32GB, CyanogenMod.
- ASUS Transformer TF101 32GB, Prime ROM (damaged/retired).
- HTC MyTouch 4G Slide, CM 9.1-stable, retired.
- HTC MyTouch 4G, my first CyanogenMod (7.1), sold.
- LG Optimus T, stock+rooted. gifted to a beautiful Firefly.
My journal
The Following 3 Users Say Thank You to Spidey01 For This Useful Post: [ Click to Expand ]
 
Vince_be
Old
(Last edited by Vince_be; 13th January 2012 at 10:36 PM.)
#7  
Member - OP
Thanks Meter 0
Posts: 55
Join Date: Jun 2011
Location: Chaineux
Hi Spidey01!

Thanks a lot for your precious help!

You are right, I was able to create the symlink using :

ln -s /data/sdext2/Android/data/com.triactivemedia.radiocontrolrotorworld/ /data/media/Android/data/com.triactivemedia.radiocontrolrotorworld


If I go to /data/media/Android/data, everything is fine (see ls and ls -l here after) :

/data/media/Android/data # ls
com.google.android.apps.maps
com.google.android.gallery3d
com.google.android.music
com.google.android.videos
com.triactivemedia.modelhelicopterworld
com.triactivemedia.radiocontrolrotorworld
com.zinio.mobile.android.reader

/data/media/Android/data # ls -l
drwxrwxr-x media_rw media_rw 2012-01-10 15:31 com.google.android.apps.maps
drwxrwxr-x media_rw media_rw 2012-01-10 15:06 com.google.android.gallery3d
drwxrwxr-x media_rw media_rw 2012-01-10 14:57 com.google.android.music
drwxrwxr-x media_rw media_rw 2012-01-10 14:56 com.google.android.videos
drwxrwxr-x media_rw media_rw 2012-01-11 11:45 com.triactivemedia.modelhelicopterworld
lrwxrwxrwx root shell 2012-01-13 23:01 com.triactivemedia.radiocontrolrotorworld -> /data/sdext2/Android/data/com.triactivemedia.radiocontrolrotorworld/
drwxrwxr-x media_rw media_rw 2012-01-11 11:15 com.zinio.mobile.android.reader

If I go to /mnt/sdcard/Android/data, I see the link when I make a ls but not when I make a ls -l :

/mnt/sdcard/Android/data # ls
com.google.android.apps.maps
com.google.android.gallery3d
com.google.android.music
com.google.android.videos
com.triactivemedia.modelhelicopterworld
com.triactivemedia.radiocontrolrotorworld
com.zinio.mobile.android.reader

/mnt/sdcard/Android/data # ls -l
drwxrwxr-x root sdcard_rw 2012-01-10 15:31 com.google.android.apps.maps
drwxrwxr-x root sdcard_rw 2012-01-10 15:06 com.google.android.gallery3d
drwxrwxr-x root sdcard_rw 2012-01-10 14:57 com.google.android.music
drwxrwxr-x root sdcard_rw 2012-01-10 14:56 com.google.android.videos
drwxrwxr-x root sdcard_rw 2012-01-11 11:45 com.triactivemedia.modelhelicopterworld
drwxrwxr-x root sdcard_rw 2012-01-11 11:15 com.zinio.mobile.android.reader

Do you have another idea? Or should we admit that we can't use symlink with Fuse?

Thanks!!!
Smartphone : ZTE V970
Tablet : Asus Eee Pad Transformer
 
leomeloxp
Old
#8  
leomeloxp's Avatar
Member
Thanks Meter 6
Posts: 33
Join Date: Apr 2012
Location: Jersey
Default Re: [Q] Not possible to create a symlink in /mnt/sdcard?

I am after this as well, have you managed to get it working?

I managed to symlink to /data/media/0 and file manager sees it there, but if I go to /sdcard there's nothing either.

Isn't there a way to edit fstab to get /sdcard to mount as ext4, instead of fuse? Because all my systems are Linux, I wouldn't have trouble mounting my Tablet over my laptop (even more because I only do wireless connections via ssh)

Sent from PomPoko [TF101G] using TapaTalkHD
 
frefol123
Old
#9  
Junior Member
Thanks Meter 2
Posts: 9
Join Date: Dec 2011
This is how I did it.

mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
 
leomeloxp
Old
#10  
leomeloxp's Avatar
Member
Thanks Meter 6
Posts: 33
Join Date: Apr 2012
Location: Jersey
Default Re: [Q] Not possible to create a symlink in /mnt/sdcard?

Quote:
Originally Posted by frefol123 View Post
This is how I did it.

Code:
mount -o bind /Removable/MicroSD /mnt/sdcard/extsd
I got the idea, but for what I need bind won't work
I want to symlink, e.g., a download folder from extsd in place of /sdcard/Download.
Bind only mounts the actual devices, subfolders won't work AFAIK

Sent from PomPoko [TF101G] using TapaTalkHD

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...